Changeset 108
- Timestamp:
- 04/16/02 15:58:03 (7 years ago)
- Files:
-
- trunk/RBJabber/RBJabber/JID.py (modified) (2 diffs)
- trunk/RBJabber/RBJabber/JabberObserver.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/RBJabber/RBJabber/JID.py
r96 r108 75 75 jida = filter(None, splitnorm(strJIDa, end=4)) 76 76 jidb = filter(None, splitnorm(strJIDb, end=3))[-len(jida):] 77 return jida == jidb 77 return jida == jidb or compare(strJIDa, strJIDb) 78 78 79 79 def join(*args): … … 149 149 j4 = JID('conference.jabber.org') 150 150 151 assert j1 in j1 151 152 assert j1 in JID('user.name@Jabber.org') 152 153 assert j3 in JID('JaBBer.org') trunk/RBJabber/RBJabber/JabberObserver.py
r103 r108 36 36 37 37 from Foundation.WeakBind import BoundCallable, BindCallable 38 import JID 38 39 39 40 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 75 76 def __call__(self, value): 76 77 for key, compareto in self._MatchInfo.iteritems(): 77 if compareto != getattr(value, key, None): 78 if isinstance(compareto, JID.JID): 79 if getattr(value, key, None) not in compareto: 80 return 0 81 elif compareto != getattr(value, key, None): 78 82 return 0 79 83 else: return 1 … … 122 126 self.Match = Match or MatchAnd() 123 127 128 def AddRule(self, rule): 129 self.Match.append(rule) 130 124 131 def Bid(self, subject, **UpdateDict): 125 132 for value in UpdateDict.itervalues():
