Fix a bug in the status plugin

(if python had real closures, I would not need that)
This commit is contained in:
mathieui 2013-03-03 01:33:06 +01:00
parent b8bc08eb4c
commit f84e3d1928

View file

@ -7,7 +7,7 @@ class Plugin(BasePlugin):
def init(self):
for st in ('dnd', 'busy', 'afk', 'chat', 'xa', 'away', 'available'):
self.add_command(st,
lambda line: self.core.command_status(st + ' "'+line+'"'),
lambda line,st=st: self.core.command_status(st + ' "'+line+'"'),
usage='[status message]',
short='Set your status as %s' % st,
help='Set your status as %s' % st)