summaryrefslogtreecommitdiffstats
path: root/connection
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-05-09 21:49:15 +0200
committerMatthias Schiffer <matthias@gamezock.de>2010-05-09 21:49:15 +0200
commit1384d1976fa984b6b254c93677363f67944c0c7a (patch)
tree698faff3ef045df7f2a8e3bd75e6b1e04a397b28 /connection
parente5cd4bb20328110561ee9956f948b97c378cf671 (diff)
downloadcurunir-1384d1976fa984b6b254c93677363f67944c0c7a.tar
curunir-1384d1976fa984b6b254c93677363f67944c0c7a.zip
Made everything much more error resistant
Diffstat (limited to 'connection')
-rw-r--r--connection/xmpp.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/connection/xmpp.py b/connection/xmpp.py
index 454f3df..dd1c061 100644
--- a/connection/xmpp.py
+++ b/connection/xmpp.py
@@ -38,8 +38,7 @@ class MucHandler(MucRoomHandler):
if(user == None or user.same_as(self.room_state.me) or stanza.get_body() == None):
return
- for mod in self.client.module_manager.modules.itervalues():
- mod.groupchat(stanza.get_from().bare().as_unicode(), stanza.get_from().resource, stanza.get_body(), self)
+ self.client.module_manager.groupchat(stanza.get_from().bare().as_unicode(), stanza.get_from().resource, stanza.get_body(), self)
def user_joined(self, user, stanza):
if(not self.room_state.joined or user.same_as(self.room_state.me)):
@@ -49,8 +48,7 @@ class MucHandler(MucRoomHandler):
if stanza.get_status() != None:
status = stanza.get_status()
- for mod in self.client.module_manager.modules.itervalues():
- mod.join(stanza.get_from().bare().as_unicode(), stanza.get_from().resource, stanza.get_show(), status, self)
+ self.client.module_manager.join(stanza.get_from().bare().as_unicode(), stanza.get_from().resource, stanza.get_show(), status, self)
def user_left(self, user, stanza):
if(not self.room_state.joined or user.same_as(self.room_state.me)):
@@ -60,16 +58,14 @@ class MucHandler(MucRoomHandler):
if stanza.get_status() != None:
status = stanza.get_status()
- for mod in self.client.module_manager.modules.itervalues():
- mod.leave(stanza.get_from().bare().as_unicode(), stanza.get_from().resource, stanza.get_show(), status, self)
+ self.client.module_manager.leave(stanza.get_from().bare().as_unicode(), stanza.get_from().resource, stanza.get_show(), status, self)
def subject_changed(self, user, stanza):
topic = ''
if stanza.get_subject() != None:
topic = stanza.get_subject()
- for mod in self.client.module_manager.modules.itervalues():
- mod.topic(stanza.get_from().bare().as_unicode(), stanza.get_from().resource, topic, self)
+ self.client.module_manager.topic(stanza.get_from().bare().as_unicode(), stanza.get_from().resource, topic, self)
class PresenceHandler(object):