mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Fixed nick and mode change propogation
This commit is contained in:
parent
b147dfe1d3
commit
2bb3189d54
@ -95,7 +95,7 @@ class Relay(callbacks.Privmsg):
|
|||||||
otherIrc.driver.die()
|
otherIrc.driver.die()
|
||||||
del self.ircs[network]
|
del self.ircs[network]
|
||||||
world.ircs.remove(otherIrc)
|
world.ircs.remove(otherIrc)
|
||||||
del self.abbreviations[network]
|
del self.abbreviations[otherIrc]
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
relaydisconnect = privmsgs.checkCapability(relaydisconnect, 'owner')
|
relaydisconnect = privmsgs.checkCapability(relaydisconnect, 'owner')
|
||||||
|
|
||||||
@ -201,21 +201,24 @@ class Relay(callbacks.Privmsg):
|
|||||||
s = 'mode change on %s/%s %s' % \
|
s = 'mode change on %s/%s %s' % \
|
||||||
(channel, abbreviation, ' '.join(msg.args[1:]))
|
(channel, abbreviation, ' '.join(msg.args[1:]))
|
||||||
for otherIrc in self.ircs.itervalues():
|
for otherIrc in self.ircs.itervalues():
|
||||||
otherIrc.queueMsg(ircmsgs.privmsg(channel, s))
|
if otherIrc != irc:
|
||||||
|
otherIrc.queueMsg(ircmsgs.privmsg(channel, s))
|
||||||
|
|
||||||
def doNick(self, irc, msg):
|
def doNick(self, irc, msg):
|
||||||
if self.started:
|
if self.started:
|
||||||
if not isinstance(irc, irclib.Irc):
|
if not isinstance(irc, irclib.Irc):
|
||||||
irc = irc.getRealIrc()
|
irc = irc.getRealIrc()
|
||||||
s = 'nick change by %s to %s' % (msg.prefix, msg.args[0])
|
newNick = msg.args[0]
|
||||||
for otherIrc in self.ircs.itervalues():
|
s = 'nick change by %s to %s' % (msg.nick, newNick)
|
||||||
for channel in self.channels:
|
for channel in self.channels:
|
||||||
if channel in otherIrc.state.channels:
|
if newNick in irc.state.channels[channel].users:
|
||||||
chan = otherIrc.state.channels[channel]
|
for otherIrc in self.ircs.itervalues():
|
||||||
if msg.nick in chan.users:
|
if otherIrc != irc:
|
||||||
otherIrc.queueMsg(ircmsgs.privmsg(channel, s))
|
otherIrc.queueMsg(ircmsgs.privmsg(channel, s))
|
||||||
|
|
||||||
def outFilter(self, irc, msg):
|
def outFilter(self, irc, msg):
|
||||||
|
if not self.started:
|
||||||
|
return msg
|
||||||
if not isinstance(irc, irclib.Irc):
|
if not isinstance(irc, irclib.Irc):
|
||||||
irc = irc.getRealIrc()
|
irc = irc.getRealIrc()
|
||||||
if msg.command == 'PRIVMSG':
|
if msg.command == 'PRIVMSG':
|
||||||
@ -225,7 +228,9 @@ class Relay(callbacks.Privmsg):
|
|||||||
if not (rPrivmsg.match(msg.args[1]) or \
|
if not (rPrivmsg.match(msg.args[1]) or \
|
||||||
rAction.match(msg.args[1]) or \
|
rAction.match(msg.args[1]) or \
|
||||||
msg.args[1].find('has left on ') != -1 or \
|
msg.args[1].find('has left on ') != -1 or \
|
||||||
msg.args[1].find('has joined on ') != -1):
|
msg.args[1].find('has joined on ') != -1 or \
|
||||||
|
msg.args[1].startswith('mode change') or \
|
||||||
|
msg.args[1].startswith('nick change')):
|
||||||
channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
if channel in self.channels:
|
if channel in self.channels:
|
||||||
abbreviation = self.abbreviations[irc]
|
abbreviation = self.abbreviations[irc]
|
||||||
|
Loading…
Reference in New Issue
Block a user