From d86dfb15f27086bfb0052c89ca5b0e17388ff66b Mon Sep 17 00:00:00 2001 From: VMiklos Date: Tue, 4 Sep 2007 22:20:51 +0200 Subject: hide the ping/pong from the log, it's just spam also set the ping timeout to 2sec, it does not cause a big cpu load but this way skyped is much more interactive --- skype/skyped.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'skype') diff --git a/skype/skyped.py b/skype/skyped.py index d4af5bda..e9f2080e 100644 --- a/skype/skyped.py +++ b/skype/skyped.py @@ -51,9 +51,9 @@ def input_handler(fd, io_condition): return True def idle_handler(skype): - skype.send("PING") + skype.skype._DoCommand("PING") try: - time.sleep(10) + time.sleep(2) except KeyboardInterrupt: sys.exit("Exiting.") return True @@ -89,6 +89,8 @@ class SkypeApi(): global conn if mode != "rece_api": return + if msg_text == "PONG": + return if "\n" in msg_text: # crappy skype prefixes only the first line for # multiline messages so we need to do so for the other -- cgit v1.2.3