sendPlugin function accept a queue argument to send the message in a single queue

This commit is contained in:
Yann Leboulanger 2004-08-01 21:45:58 +00:00
parent 9fc8e66770
commit 6ad688ec62
1 changed files with 4 additions and 3 deletions

View File

@ -79,10 +79,11 @@ class GajimHub:
del self.queues[name]
# END unregister
def sendPlugin(self, event, con, data):
def sendPlugin(self, event, con, data, qu=None):
""" Sends an event to registered plugins"""
if self.events.has_key(event):
for i in self.events[event]:
i.put((event, con, data))
for queue in self.events[event]:
if qu == None or qu == queue:
queue.put((event, con, data))
# END sendPlugin
# END GajimHub