Owner: make irc.state.history network specific

It is fairly counterintuitive for plugins to read the IrcState history, only to find that the message it got is from the wrong network.
I'm not sure why the original Supybot chose to link all the history buffers together, as those lines came from before Supybot was introduced to Git.

Closes #1211.
This commit is contained in:
James Lu 2017-08-03 12:25:34 -07:00
parent d73de5e512
commit 03c4529d9e

View File

@ -160,9 +160,6 @@ class Owner(callbacks.Plugin):
'No servers are set for the %s network.' % network 'No servers are set for the %s network.' % network
self.log.debug('Creating new Irc for %s.', network) self.log.debug('Creating new Irc for %s.', network)
newIrc = irclib.Irc(network) newIrc = irclib.Irc(network)
for irc in world.ircs:
if irc != newIrc:
newIrc.state.history = irc.state.history
driver = drivers.newDriver(newIrc) driver = drivers.newDriver(newIrc)
self._loadPlugins(newIrc) self._loadPlugins(newIrc)
return newIrc return newIrc