mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 14:14:37 +01:00
Should be able to reload Relay module now too.
This commit is contained in:
parent
147d5cf6da
commit
57cc6615c4
@ -102,6 +102,7 @@ class Relay(callbacks.Privmsg):
|
|||||||
self.lastmsg = ircmsgs.ping('this is just a fake message')
|
self.lastmsg = ircmsgs.ping('this is just a fake message')
|
||||||
self.channels = sets.Set()
|
self.channels = sets.Set()
|
||||||
self.abbreviations = {}
|
self.abbreviations = {}
|
||||||
|
self.originalIrc = None
|
||||||
|
|
||||||
def inFilter(self, irc, msg):
|
def inFilter(self, irc, msg):
|
||||||
if not isinstance(irc, irclib.Irc):
|
if not isinstance(irc, irclib.Irc):
|
||||||
@ -114,6 +115,12 @@ class Relay(callbacks.Privmsg):
|
|||||||
self.lastmsg = msg
|
self.lastmsg = msg
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
|
def die(self):
|
||||||
|
for irc in self.abbreviations:
|
||||||
|
if irc != self.originalIrc:
|
||||||
|
irc.callbacks[:] = []
|
||||||
|
irc.die()
|
||||||
|
|
||||||
def startrelay(self, irc, msg, args):
|
def startrelay(self, irc, msg, args):
|
||||||
"""<network abbreviation for current server>
|
"""<network abbreviation for current server>
|
||||||
|
|
||||||
@ -125,6 +132,7 @@ class Relay(callbacks.Privmsg):
|
|||||||
will show up as 'user@oftc'.
|
will show up as 'user@oftc'.
|
||||||
"""
|
"""
|
||||||
realIrc = irc.getRealIrc()
|
realIrc = irc.getRealIrc()
|
||||||
|
self.originalIrc = realIrc
|
||||||
abbreviation = privmsgs.getArgs(args)
|
abbreviation = privmsgs.getArgs(args)
|
||||||
self.ircs[abbreviation] = realIrc
|
self.ircs[abbreviation] = realIrc
|
||||||
self.abbreviations[realIrc] = abbreviation
|
self.abbreviations[realIrc] = abbreviation
|
||||||
|
Loading…
Reference in New Issue
Block a user