Skip to content

Commit 590a992

Browse files
committed
Add the channel where a command has been called in the logs ('XXX called by XXX').
1 parent 11417ce commit 590a992

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/callbacks.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,12 @@ def callCommand(self, command, irc, msg, *args, **kwargs):
11971197
method(irc, msg, *args, **kwargs)
11981198

11991199
def _callCommand(self, command, irc, msg, *args, **kwargs):
1200-
self.log.info('%s called by %q.', formatCommand(command), msg.prefix)
1200+
if irc.nick == msg.args[0]:
1201+
self.log.info('%s called in private by %q.', formatCommand(command),
1202+
msg.prefix)
1203+
else:
1204+
self.log.info('%s called on %s by %q.', formatCommand(command),
1205+
msg.args[0], msg.prefix)
12011206
# XXX I'm being extra-special-careful here, but we need to refactor
12021207
# this.
12031208
try:

src/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""stick the various versioning attributes in here, so we only have to change
22
them once."""
3-
version = '0.83.4.1+limnoria (2012-03-16T17:35:14+0000)'
3+
version = '0.83.4.1+limnoria (2012-03-18T19:45:17+0000)'

0 commit comments

Comments
 (0)