From c239fb1f90ba794abfc142e5b1043a4110dcb754 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Thu, 4 Mar 2010 09:47:42 -0800 Subject: added muc functionality --- sleekxmpp/plugins/xep_0045.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sleekxmpp/plugins/xep_0045.py') diff --git a/sleekxmpp/plugins/xep_0045.py b/sleekxmpp/plugins/xep_0045.py index 82737421..d530a0ab 100644 --- a/sleekxmpp/plugins/xep_0045.py +++ b/sleekxmpp/plugins/xep_0045.py @@ -146,7 +146,14 @@ class xep_0045(base.base_plugin): """ Handle a message event in a muc. """ self.xmpp.event('groupchat_message', msg) - + + def jidInRoom(self, room, jid): + for nick in self.rooms[room]: + entry = self.rooms[room][nick] + if entry is not None and entry['jid'].full == jid: + return True + return False + def getRoomForm(self, room, ifrom=None): iq = self.xmpp.makeIqGet() iq['to'] = room -- cgit v1.2.3