From 5268bd75760eaf0a7120c878312ed6d26189dcf9 Mon Sep 17 00:00:00 2001 From: VMiklos Date: Wed, 5 Sep 2007 20:04:04 +0200 Subject: do not use internal functions for receiving messages thanks awahlig --- skype/skyped.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'skype') diff --git a/skype/skyped.py b/skype/skyped.py index 7ff26ced..177845d5 100644 --- a/skype/skyped.py +++ b/skype/skyped.py @@ -81,14 +81,11 @@ def dprint(msg): class SkypeApi(): def __init__(self): self.skype = Skype4Py.Skype() - self.skype._API.Handlers.append(Skype4Py.utils.WeakCallableRef(self.recv)) - self.skype._API._Handler = self.recv + self.skype.OnNotify = self.recv self.skype.Attach() - def recv(self, mode, msg_text): + def recv(self, msg_text): global conn - if mode != "rece_api": - return if msg_text == "PONG": return if "\n" in msg_text: -- cgit v1.2.3