Changeset 108

Show
Ignore:
Timestamp:
04/16/02 15:58:03 (7 years ago)
Author:
sholloway
Message:

*** empty log message ***

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBJabber/RBJabber/JID.py

    r96 r108  
    7575    jida = filter(None, splitnorm(strJIDa, end=4)) 
    7676    jidb = filter(None, splitnorm(strJIDb, end=3))[-len(jida):] 
    77     return jida == jidb 
     77    return jida == jidb or compare(strJIDa, strJIDb) 
    7878 
    7979def join(*args): 
     
    149149    j4 = JID('conference.jabber.org') 
    150150 
     151    assert j1 in j1 
    151152    assert j1 in JID('user.name@Jabber.org') 
    152153    assert j3 in JID('JaBBer.org') 
  • trunk/RBJabber/RBJabber/JabberObserver.py

    r103 r108  
    3636 
    3737from Foundation.WeakBind import BoundCallable, BindCallable 
     38import JID 
    3839 
    3940#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    7576    def __call__(self, value): 
    7677        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): 
    7882                return 0 
    7983        else: return 1 
     
    122126        self.Match = Match or MatchAnd() 
    123127 
     128    def AddRule(self, rule): 
     129        self.Match.append(rule) 
     130 
    124131    def Bid(self, subject, **UpdateDict): 
    125132        for value in UpdateDict.itervalues():