comparison src/plugins/plugin_exp_parrot.py @ 1374:0befb14ecf62

renamed tools.misc to tools.trigger
author Goffi <goffi@goffi.org>
date Thu, 19 Mar 2015 19:44:37 +0100
parents bf3f669a6052
children 069ad98b360d
comparison
equal deleted inserted replaced
1373:6d0e01809893 1374:0befb14ecf62
22 from sat.core.log import getLogger 22 from sat.core.log import getLogger
23 log = getLogger(__name__) 23 log = getLogger(__name__)
24 from twisted.words.protocols.jabber import jid 24 from twisted.words.protocols.jabber import jid
25 25
26 from sat.core.exceptions import UnknownEntityError 26 from sat.core.exceptions import UnknownEntityError
27 #from sat.tools.misc import SkipOtherTriggers 27 #from sat.tools import trigger
28 28
29 PLUGIN_INFO = { 29 PLUGIN_INFO = {
30 "name": "Parrot Plugin", 30 "name": "Parrot Plugin",
31 "import_name": "EXP-PARROT", 31 "import_name": "EXP-PARROT",
32 "type": "EXP", 32 "type": "EXP",
64 # except AttributeError: 64 # except AttributeError:
65 # return True 65 # return True
66 # 66 #
67 # if mess_data['to'].userhostJID() in _links.values(): 67 # if mess_data['to'].userhostJID() in _links.values():
68 # log.debug("Parrot link detected, skipping other triggers") 68 # log.debug("Parrot link detected, skipping other triggers")
69 # raise SkipOtherTriggers 69 # raise trigger.SkipOtherTriggers
70 70
71 def MessageReceivedTrigger(self, message, post_treat, profile): 71 def MessageReceivedTrigger(self, message, post_treat, profile):
72 """ Check if source is linked and repeat message, else do nothing """ 72 """ Check if source is linked and repeat message, else do nothing """
73 client = self.host.getClient(profile) 73 client = self.host.getClient(profile)
74 from_jid = jid.JID(message["from"]) 74 from_jid = jid.JID(message["from"])