Filter out owner presence/messages
This commit is contained in:
parent
6a45bea079
commit
878714a627
@ -31,8 +31,7 @@ class Owner(Buddy):
|
|||||||
if not nick or not len(nick):
|
if not nick or not len(nick):
|
||||||
nick = "n00b"
|
nick = "n00b"
|
||||||
|
|
||||||
service_name = nick + '.' + GROUP_SERVICE_TYPE
|
service = Service(nick, '', '', GROUP_SERVICE_PORT)
|
||||||
service = Service(service_name, '', '', GROUP_SERVICE_PORT)
|
|
||||||
|
|
||||||
Buddy.__init__(self, service, nick)
|
Buddy.__init__(self, service, nick)
|
||||||
|
|
||||||
|
@ -67,6 +67,8 @@ class LocalGroup(Group):
|
|||||||
|
|
||||||
def _on_service_resolved(self, interface, protocol, name, stype, domain,
|
def _on_service_resolved(self, interface, protocol, name, stype, domain,
|
||||||
host, aprotocol, address, port, txt, flags):
|
host, aprotocol, address, port, txt, flags):
|
||||||
|
print name
|
||||||
|
if name != self._owner.get_service().get_name():
|
||||||
service = Service(name, host, address, port)
|
service = Service(name, host, address, port)
|
||||||
self._services[name] = service
|
self._services[name] = service
|
||||||
if stype == BUDDY_SERVICE_TYPE:
|
if stype == BUDDY_SERVICE_TYPE:
|
||||||
|
@ -37,5 +37,7 @@ class StreamReader:
|
|||||||
self._recv(msg['addr'], msg['data'])
|
self._recv(msg['addr'], msg['data'])
|
||||||
|
|
||||||
def _recv(self, address, 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)
|
buddy = self._group.get_buddy_from_address(address)
|
||||||
self._callback(buddy, data)
|
self._callback(buddy, data)
|
||||||
|
Loading…
Reference in New Issue
Block a user