1
# gozerbot/xmpp/monitor.py
5
""" monitors .. call callback on bot output. """
7
__copyright__ = 'this file is in the public domain'
10
from gozerbot.utils.exception import handle_exception
11
from gozerbot.monitor import Monitor
12
from gozerbot.config import config
13
from gozerbot.eventbase import EventBase
14
from message import Message
16
class XMPPmonitor(Monitor):
18
""" monitor jabber output """
20
def handle(self, bot, event):
22
""" fire jabber monitor callbacks. """
25
#event.fromm = event['from'] = event.to
33
e.fromm = e['from'] = bot.jid
36
Monitor.handle(self, bot, e)
37
except AttributeError:
41
xmppmonitor = XMPPmonitor('xmppmonitor')