Missing ) and added nick/topic changes
This commit is contained in:
parent
38b5eed20a
commit
8d26131fcd
3 changed files with 20 additions and 3 deletions
|
@ -20,7 +20,9 @@ stylesheet = conf/stylesheet.css
|
||||||
join = -!- <span class="join">%user%</span> [%host%] has joined %channel%
|
join = -!- <span class="join">%user%</span> [%host%] has joined %channel%
|
||||||
kick = -!- <span class="kick">%user%</span> was kicked from %channel% by %kicker% [%reason%]
|
kick = -!- <span class="kick">%user%</span> was kicked from %channel% by %kicker% [%reason%]
|
||||||
mode = -!- mode/<span class="mode">%channel%</span> [%modes% %person%] by %giver%
|
mode = -!- mode/<span class="mode">%channel%</span> [%modes% %person%] by %giver%
|
||||||
|
nick = <span class="nick">%old%</span> is now known as <span class="nick">%new%</span>
|
||||||
part = -!- <span class="part">%user%</span> has parted %channel%
|
part = -!- <span class="part">%user%</span> has parted %channel%
|
||||||
pubmsg = <span class="person"><%user%></span> %message%
|
pubmsg = <span class="person"><%user%></span> %message%
|
||||||
pubnotice = <span class="notice">-%user%:%channel%-</span> %message%
|
pubnotice = <span class="notice">-%user%:%channel%-</span> %message%
|
||||||
quit = -!- <span class="quit">%user%</span> has quit [%reason%]
|
quit = -!- <span class="quit">%user%</span> has quit [%reason%]
|
||||||
|
topic = <span class="topic">%user%</span> changed topic of <span class="topic">%channel%</span> to: %topic%
|
||||||
|
|
|
@ -19,6 +19,6 @@ a:hover, .time:hover { text-decoration: underline; }
|
||||||
|
|
||||||
.person { color: #DD1144; }
|
.person { color: #DD1144; }
|
||||||
|
|
||||||
.join, .part, .quit, .kick, .mode { color: #42558C; }
|
.join, .part, .quit, .kick, .mode, .topic, .nick { color: #42558C; }
|
||||||
|
|
||||||
.notice { color: #AE768C; }
|
.notice { color: #AE768C; }
|
17
logbot.py
17
logbot.py
|
@ -127,6 +127,20 @@ class LogBot(SingleServerIRCBot):
|
||||||
def on_privmsg(self, c, e):
|
def on_privmsg(self, c, e):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def on_topic(self, c, e):
|
||||||
|
user = nm_to_n(e.source())
|
||||||
|
channel = e.target()
|
||||||
|
topic = e.arguments()[0]
|
||||||
|
self.write(channel, self.format["topic"].replace("%user%", user) \
|
||||||
|
.replace("%channel%", channel) \
|
||||||
|
.replace("%topic%", topic))
|
||||||
|
|
||||||
|
def on_nick(self, c, e):
|
||||||
|
new = nm_to_n(e.source())
|
||||||
|
old = e.target()
|
||||||
|
self.write(channel, self.format["nick"].replace("%old%", old) \
|
||||||
|
.replace("%new%", new))
|
||||||
|
|
||||||
def on_pubnotice(self, c, e):
|
def on_pubnotice(self, c, e):
|
||||||
user = nm_to_n(e.source())
|
user = nm_to_n(e.source())
|
||||||
channel = e.target()
|
channel = e.target()
|
||||||
|
@ -232,7 +246,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", "part", "pubmsg", "pubnotice", "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