diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2003-11-26 03:02:43 +0300 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2003-11-26 03:02:43 +0300 |
commit | fd89e342264bafd4f9dd1fb432bfda3c5195e0a9 (patch) | |
tree | ff8b1411564a3bcbfeb03eb88e47c4ef09109a4d /core | |
parent | 9919d53aa2728563142565b1d845ffa90b3a7f96 (diff) |
Logger plugin is now available !
Diffstat (limited to 'core')
-rw-r--r-- | core/core.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/core.py b/core/core.py index 10a0b6543..18b8e04f2 100644 --- a/core/core.py +++ b/core/core.py @@ -121,6 +121,7 @@ class GajimCore: if ev[0] == 'QUIT': if self.connected == 1: self.con.disconnect() + self.hub.sendPlugin('QUIT', ()) return #('STATUS', status) elif ev[0] == 'STATUS': @@ -138,6 +139,7 @@ class GajimCore: msg = common.jabber.Message(ev[1][0], ev[1][1]) msg.setType('chat') self.con.send(msg) + self.hub.sendPlugin('MSGSENT', ev[1]) #('SUB', (jid, txt)) elif ev[0] == 'SUB': log.debug('subscription request for %s' % ev[1][0]) @@ -180,7 +182,7 @@ class GajimCore: def start(): gc = GajimCore() - guiPl = gc.hub.newPlugin ('gtkgui') + guiPl = gc.hub.newPlugin('gtkgui') gc.hub.register('gtkgui', 'ROSTER') gc.hub.register('gtkgui', 'NOTIFY') gc.hub.register('gtkgui', 'MSG') @@ -188,5 +190,11 @@ def start(): gc.hub.register('gtkgui', 'SUBSCRIBE') gc.hub.register('gtkgui', 'AGENTS') gc.hub.register('gtkgui', 'AGENT_INFO') - guiPl.load () + guiPl.load() + logPl = gc.hub.newPlugin('logger') + gc.hub.register('logger', 'MSG') + gc.hub.register('logger', 'MSGSENT') + gc.hub.register('logger', 'NOTIFY') + gc.hub.register('logger', 'QUIT') + logPl.load() gc.mainLoop() |