Download:
child 36:d4200e4286b9
parent 34:5c2da0b79812
35:71efda851281
Anton Shestakov <av6@dwimlabs.net>, Wed, 04 Apr 2018 00:25:43 +0800
rollbot: don't direct slash-me messages in MUCs to anybody

1 файлов изменено, 3 вставок(+), 2 удалений(-) [+]
rollbot.py file | annotate | diff | comparison | revisions
--- a/rollbot.py Wed Apr 04 00:25:23 2018 +0800
+++ b/rollbot.py Wed Apr 04 00:25:43 2018 +0800
@@ -204,8 +204,9 @@
mbody = mbody.lstrip(':, ')
rbody, rxbody = self.respond(mbody)
if rbody:
- rbody = '%s: %s' % (msg['mucnick'], rbody)
- rxbody = '%s: %s' % (cgi.escape(msg['mucnick']), rxbody)
+ if not rbody.startswith('/me '):
+ rbody = '%s: %s' % (msg['mucnick'], rbody)
+ rxbody = '%s: %s' % (cgi.escape(msg['mucnick']), rxbody)
msg.reply(rbody)
msg['html'] = rxbody
msg.send()