summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorNathan Fritz <nathan@andyet.net>2010-03-04 09:47:42 -0800
committerNathan Fritz <nathan@andyet.net>2010-03-04 09:47:42 -0800
commitc239fb1f90ba794abfc142e5b1043a4110dcb754 (patch)
treeb6520129d2ab8d7ad2e4545a0b4ab198a4326535 /sleekxmpp
parent8d5dbfa691f17118173d4eaeca8222826e6a6dc5 (diff)
downloadslixmpp-c239fb1f90ba794abfc142e5b1043a4110dcb754.tar.gz
slixmpp-c239fb1f90ba794abfc142e5b1043a4110dcb754.tar.bz2
slixmpp-c239fb1f90ba794abfc142e5b1043a4110dcb754.tar.xz
slixmpp-c239fb1f90ba794abfc142e5b1043a4110dcb754.zip
added muc functionality
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/plugins/xep_0045.py9
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py2
2 files changed, 9 insertions, 2 deletions
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
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 594583a8..6898aac9 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -202,7 +202,7 @@ class XMLStream(object):
def __readXML(self):
"Parses the incoming stream, adding to xmlin queue as it goes"
#build cElementTree object from expat was we go
- #self.filesocket = self.socket.makefile('rb', 0)
+ self.filesocket = self.socket.makefile('rb', 0)
#print self.filesocket.read(1024) #self.filesocket._sock.recv(1024)
edepth = 0
root = None