Mercurial > libervia-backend
comparison src/plugins/plugin_exp_parrot.py @ 603:1d6f48ae31d1
plugin parrot: sendMessage now avoid triggers
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 22 Feb 2013 00:19:32 +0100 |
parents | 6fd1095b2b7b |
children | 84a6e83157c2 |
comparison
equal
deleted
inserted
replaced
602:6fd1095b2b7b | 603:1d6f48ae31d1 |
---|---|
21 | 21 |
22 from logging import debug, info, warning, error | 22 from logging import debug, info, warning, error |
23 from twisted.words.protocols.jabber import jid | 23 from twisted.words.protocols.jabber import jid |
24 | 24 |
25 from sat.core.exceptions import UnknownEntityError | 25 from sat.core.exceptions import UnknownEntityError |
26 from sat.tools.misc import SkipOtherTriggers | 26 #from sat.tools.misc import SkipOtherTriggers |
27 | 27 |
28 PLUGIN_INFO = { | 28 PLUGIN_INFO = { |
29 "name": "Parrot Plugin", | 29 "name": "Parrot Plugin", |
30 "import_name": "EXP-PARROT", | 30 "import_name": "EXP-PARROT", |
31 "type": "EXP", | 31 "type": "EXP", |
92 src_txt = from_jid.user | 92 src_txt = from_jid.user |
93 msg = "[%s] %s" % (src_txt, mess_body) | 93 msg = "[%s] %s" % (src_txt, mess_body) |
94 | 94 |
95 linked = _links[from_jid.userhostJID()] | 95 linked = _links[from_jid.userhostJID()] |
96 | 96 |
97 self.host._sendMessage(unicode(linked), msg, None, "auto", profile_key=profile) | 97 self.host.sendMessage(jid.JID(unicode(linked)), msg, None, "auto", no_trigger=True, profile_key=profile) |
98 else: | 98 else: |
99 warning("No body element found in message, following normal behaviour") | 99 warning("No body element found in message, following normal behaviour") |
100 | 100 |
101 return True | 101 return True |
102 | 102 |