comparison src/tools/misc.py @ 742:03744d9ebc13

plugin XEP-0033: implementation of the addressing feature: - frontends pass the recipients in the extra parameter of sendMessage - backend checks if the target server supports the feature (this is not done yet by prosody plugin) - features and identities are cached per profile and server - messages are duplicated in history for now (TODO: redesign the database) - echos signals are also duplicated to the sender (FIXME)
author souliane <souliane@mailoo.org>
date Wed, 11 Dec 2013 17:16:53 +0100
parents 00318e60a06a
children bfabeedbf32e
comparison
equal deleted inserted replaced
741:00318e60a06a 742:03744d9ebc13
20 """Misc usefull classes""" 20 """Misc usefull classes"""
21 21
22 import sys 22 import sys
23 from logging import debug, warning 23 from logging import debug, warning
24 24
25
25 class TriggerException(Exception): 26 class TriggerException(Exception):
26 pass 27 pass
27 28
28 29
29 class SkipOtherTriggers(Exception): 30 class SkipOtherTriggers(Exception):
30 """ Exception to raise if normal behaviour must be followed instead of 31 """ Exception to raise if normal behaviour must be followed instead of
31 followind triggers list """ 32 following triggers list """
32 pass 33 pass
33 34
34 35
35 class TriggerManager(object): 36 class TriggerManager(object):
36 """This class manage triggers: code which interact to change de behaviour 37 """This class manage triggers: code which interact to change the behaviour
37 of SàT""" 38 of SàT"""
38 39
39 MIN_PRIORITY = float('-inf') 40 MIN_PRIORITY = float('-inf')
40 MAX_PRIORITY = float('+inf') 41 MAX_PRIORITY = float('+inf')
41 42