Working nick changes
This commit is contained in:
parent
8d26131fcd
commit
ab8f0a3078
1 changed files with 4 additions and 5 deletions
|
@ -138,7 +138,7 @@ class LogBot(SingleServerIRCBot):
|
||||||
def on_nick(self, c, e):
|
def on_nick(self, c, e):
|
||||||
new = nm_to_n(e.source())
|
new = nm_to_n(e.source())
|
||||||
old = e.target()
|
old = e.target()
|
||||||
self.write(channel, self.format["nick"].replace("%old%", old) \
|
self.write(None, self.format["nick"].replace("%old%", old) \
|
||||||
.replace("%new%", new))
|
.replace("%new%", new))
|
||||||
|
|
||||||
def on_pubnotice(self, c, e):
|
def on_pubnotice(self, c, e):
|
||||||
|
@ -153,7 +153,6 @@ class LogBot(SingleServerIRCBot):
|
||||||
user = nm_to_n(e.source())
|
user = nm_to_n(e.source())
|
||||||
reason = e.arguments()[0]
|
reason = e.arguments()[0]
|
||||||
channel = e.target()
|
channel = e.target()
|
||||||
print channel
|
|
||||||
self.write(channel, self.format["quit"].replace("%user%", user) \
|
self.write(channel, self.format["quit"].replace("%user%", user) \
|
||||||
.replace("%reason%", reason))
|
.replace("%reason%", reason))
|
||||||
|
|
||||||
|
@ -164,7 +163,7 @@ class LogBot(SingleServerIRCBot):
|
||||||
print "%s> %s %s" % (channel, time, message)
|
print "%s> %s %s" % (channel, time, message)
|
||||||
channels = [channel]
|
channels = [channel]
|
||||||
else:
|
else:
|
||||||
# Quits don't have channels
|
# Quit/nick don't have channels
|
||||||
print "%s %s" % (time, message)
|
print "%s %s" % (time, message)
|
||||||
channels = self.chans
|
channels = self.chans
|
||||||
|
|
||||||
|
@ -246,8 +245,8 @@ def main(conf):
|
||||||
stylesheet = CONFIG.get("log", "stylesheet")
|
stylesheet = CONFIG.get("log", "stylesheet")
|
||||||
|
|
||||||
# Get the formation information
|
# Get the formation information
|
||||||
types = ["join", "kick", "mode", "part", "pubmsg", "pubnotice", "quit",
|
types = ["join", "kick", "mode", "nick", "part", "pubmsg", "pubnotice",
|
||||||
"topic"]
|
"quit", "topic"]
|
||||||
format = {}
|
format = {}
|
||||||
for type in types:
|
for type in types:
|
||||||
format[type] = CONFIG.get("format", type)
|
format[type] = CONFIG.get("format", type)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue