Filter out owner presence/messages

This commit is contained in:
Marco Pesenti Gritti 2006-05-11 15:14:26 -04:00
parent 6a45bea079
commit 878714a627
3 changed files with 12 additions and 9 deletions

View File

@ -31,8 +31,7 @@ class Owner(Buddy):
if not nick or not len(nick):
nick = "n00b"
service_name = nick + '.' + GROUP_SERVICE_TYPE
service = Service(service_name, '', '', GROUP_SERVICE_PORT)
service = Service(nick, '', '', GROUP_SERVICE_PORT)
Buddy.__init__(self, service, nick)

View File

@ -67,6 +67,8 @@ class LocalGroup(Group):
def _on_service_resolved(self, interface, protocol, name, stype, domain,
host, aprotocol, address, port, txt, flags):
print name
if name != self._owner.get_service().get_name():
service = Service(name, host, address, port)
self._services[name] = service
if stype == BUDDY_SERVICE_TYPE:

View File

@ -37,5 +37,7 @@ class StreamReader:
self._recv(msg['addr'], msg['data'])
def _recv(self, address, data):
owner = self._group.get_owner()
if address != owner.get_service().get_address():
buddy = self._group.get_buddy_from_address(address)
self._callback(buddy, data)