mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-16 22:53:08 +01:00
Fixed non-relaying of QUITs.
This commit is contained in:
parent
59b6a7b67d
commit
d37e229027
@ -43,6 +43,7 @@ Commands include:
|
|||||||
from baseplugin import *
|
from baseplugin import *
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
import copy
|
||||||
|
|
||||||
import ircdb
|
import ircdb
|
||||||
import debug
|
import debug
|
||||||
@ -98,8 +99,15 @@ class Relay(callbacks.Privmsg):
|
|||||||
self.ircs = {}
|
self.ircs = {}
|
||||||
self.started = False
|
self.started = False
|
||||||
self.channels = set()
|
self.channels = set()
|
||||||
|
self.ircstates = {}
|
||||||
self.abbreviations = {}
|
self.abbreviations = {}
|
||||||
|
|
||||||
|
def inFilter(self, irc, msg):
|
||||||
|
if not isinstance(irc, irclib.Irc):
|
||||||
|
irc = irc.getRealIrc()
|
||||||
|
self.ircstates[irc] = copy.copy(irc.state)
|
||||||
|
return msg
|
||||||
|
|
||||||
def startrelay(self, irc, msg, args):
|
def startrelay(self, irc, msg, args):
|
||||||
"""<network abbreviation for current server>
|
"""<network abbreviation for current server>
|
||||||
|
|
||||||
@ -298,7 +306,7 @@ class Relay(callbacks.Privmsg):
|
|||||||
else:
|
else:
|
||||||
s = '%s/%s has quit.' % (msg.nick, network)
|
s = '%s/%s has quit.' % (msg.nick, network)
|
||||||
for channel in self.channels:
|
for channel in self.channels:
|
||||||
if msg.nick in irc.state.channels[channel].users:
|
if msg.nick in self.ircstates.channels[channel].users:
|
||||||
for otherIrc in self.ircs.itervalues():
|
for otherIrc in self.ircs.itervalues():
|
||||||
if otherIrc != irc:
|
if otherIrc != irc:
|
||||||
otherIrc.queueMsg(ircmsgs.privmsg(channel, s))
|
otherIrc.queueMsg(ircmsgs.privmsg(channel, s))
|
||||||
|
Loading…
Reference in New Issue
Block a user