Add the channel where a command has been called in the logs ('XXX called by XXX').

This commit is contained in:
Valentin Lorentz 2012-03-18 20:45:17 +01:00
parent 11417cea83
commit 590a992651
2 changed files with 7 additions and 2 deletions

View File

@ -1197,7 +1197,12 @@ class Commands(BasePlugin):
method(irc, msg, *args, **kwargs)
def _callCommand(self, command, irc, msg, *args, **kwargs):
self.log.info('%s called by %q.', formatCommand(command), msg.prefix)
if irc.nick == msg.args[0]:
self.log.info('%s called in private by %q.', formatCommand(command),
msg.prefix)
else:
self.log.info('%s called on %s by %q.', formatCommand(command),
msg.args[0], msg.prefix)
# XXX I'm being extra-special-careful here, but we need to refactor
# this.
try:

View File

@ -1,3 +1,3 @@
"""stick the various versioning attributes in here, so we only have to change
them once."""
version = '0.83.4.1+limnoria (2012-03-16T17:35:14+0000)'
version = '0.83.4.1+limnoria (2012-03-18T19:45:17+0000)'