1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

don't talk to other bots, added (not activated) presence command

This commit is contained in:
Thorsten
2015-11-28 02:21:49 +01:00
parent 8d953f4183
commit 88d43f9df1
3 changed files with 82 additions and 33 deletions

View File

@@ -54,8 +54,7 @@ class UrlBot(IdleBot):
self.add_event_handler('muc::%s::got_online' % r, self.muc_online)
def muc_message(self, msg_obj):
super(UrlBot, self).muc_message(msg_obj)
return self.handle_msg(msg_obj)
return super(UrlBot, self).muc_message(msg_obj) and self.handle_msg(msg_obj)
def message(self, msg_obj):
if 'groupchat' == msg_obj['type']:
@@ -328,7 +327,7 @@ class UrlBot(IdleBot):
if 'event' in plugin_action:
event = plugin_action["event"]
if 'msg' in event:
register_event(event["time"], self.send_reply, event['msg'])
register_event(event["time"], self.send_reply, [event['msg']])
elif 'command' in event:
command = event["command"]
if rate_limit(RATE_EVENT):