JABirchall / NimdaTS3

An Advanced Teamspeak 3 Bot with a nice plugin autoloading
GNU Affero General Public License v3.0
28 stars 6 forks source link

Improvement: parent->teamSpeak3Bot #20

Closed JABirchall closed 7 years ago

JABirchall commented 7 years ago

Technically plugins should not need to reference $teamSpeak3Bot in __contruct(). They should be able to invoke parent->teamSpeak3Bot as the plugin container already has a reference.

Making so many references to teamSpeak3Bot does have performance impacts.

@Najsr could you look into this for me.

JABirchall commented 7 years ago

Possibley could use get_parent_class($this)->teamSpeak3Bot->Foobar()

JABirchall commented 7 years ago

IM AN IDIOT. all plugins extend the base plugin class which has Teamspeak3Bot referenced. making another reference is completely obsolete.

Can just do $this->teamSpeak3Bot without needing to make the reference (again)

JABirchall commented 7 years ago

This is a derp moment... Working hard.