Closed clefable closed 11 years ago
This caused a bug where Clefable could not retrieve the correct channels.
channels() = {} @channels = {} getChannels() = {} Bot::instance::getChannels() = real channels
All of the above should return all the channels.
However, @emailMap can be referenced like this.
This happened because the Bot children needed to be Singleton w.r.t. the Bot base class. However, the threads need to be Singleton w.r.t. the child classes. The traditional Singleon module supplies the child singleton behavior.
Bot has been moved away from this module and implemented its own Singleton. Fixed in 9148be53aa061cc9319ac2651a638ff1baa8d04b.
Reported by eriq.
The current Singleton module breaks some stuff (like periodic actions and reloading core files). Either workaround or roll your own Singleton module.