From c1f1da760398b5cabe57db357517a7d27ee6a6a7 Mon Sep 17 00:00:00 2001 From: Joscha Date: Mon, 23 May 2016 16:31:53 +0200 Subject: [PATCH] Remove debug messages --- yaboli/bot.py | 8 -------- yaboli/room.py | 34 ---------------------------------- 2 files changed, 42 deletions(-) diff --git a/yaboli/bot.py b/yaboli/bot.py index 12093a6..3b26ca0 100644 --- a/yaboli/bot.py +++ b/yaboli/bot.py @@ -115,12 +115,10 @@ class Bot(): "please specify its id (from the list below) as follows:\n" "!{} @{} [your arguments...]\n").format(command, name) - print("constructing table") for bot_id in sorted(bots): bot = bots[bot_id] msg += "\n{} - @{} ({})".format(bot_id, bot.get_nick(), bot.creation_info()) - print("sending help message") self.room.send_message(msg, parent=message.id) else: # name is unique @@ -180,8 +178,6 @@ class Bot(): Parse the "!command[ bot_id] @botname[ argpart]" part of a command. """ - print("PARSING - COMMAND") - # command name (!command) split = message.split(maxsplit=1) @@ -227,8 +223,6 @@ class Bot(): Parse the argument part of a command. """ - print("PARSING - ARGPART") - argstr += " " # so the last argument will also be captured escaping = False @@ -306,8 +300,6 @@ class Bot(): Parse a message. """ - print("PARSING") - command, bot_id, name, argpart = self.parse_command(message) if argpart: diff --git a/yaboli/room.py b/yaboli/room.py index 6227169..fc3a6e2 100644 --- a/yaboli/room.py +++ b/yaboli/room.py @@ -328,8 +328,6 @@ class Room(): TODO """ - print("BOUNCE-EVENT") - if self.password is not None: self.authenticate(self.password) @@ -338,8 +336,6 @@ class Room(): TODO """ - print("DISCONNECT-EVENT") - self._con.disconnect() def _handle_hello_event(self, data): @@ -347,8 +343,6 @@ class Room(): TODO """ - print("HELLO-EVENT") - self.session = session.Session.from_data(data["session"]) self._sessions.add(self.session) self._callbacks.call("identity") @@ -362,8 +356,6 @@ class Room(): TODO """ - print("JOIN-EVENT") - ses = session.Session.from_data(data) self._sessions.add(ses) self._callbacks.call("join", ses) @@ -374,8 +366,6 @@ class Room(): TODO """ - print("NETWORK-EVENT") - if data["type"] == "partition": self._sessions.remove_on_network_partition(data["server_id"], data["server_era"]) self._callbacks.call("sessions") @@ -385,8 +375,6 @@ class Room(): TODO """ - print("NICK-EVENT") - ses = self.get_session(data["session_id"]) if ses: ses.name = data["to"] @@ -398,8 +386,6 @@ class Room(): TODO """ - print("EDIT-MESSAGE-EVENT") - msg = message.Message.from_data(data) if msg: self._messages.add(msg) @@ -416,8 +402,6 @@ class Room(): TODO """ - print("PART-EVENT") - ses = session.Session.from_data(data) if ses: self._sessions.remove(ses.session_id) @@ -430,8 +414,6 @@ class Room(): TODO """ - print("PING-EVENT") - self.ping_last = data["time"] self.ping_next = data["next"] self.ping_offset = self.ping_last - time.time() @@ -444,8 +426,6 @@ class Room(): TODO """ - print("SEND-EVENT") - msg = message.Message.from_data(data) self._callbacks.call("message", msg) @@ -457,8 +437,6 @@ class Room(): TODO """ - print("SNAPSHOT-EVENT") - self.set_nick(self.nick) if "pm_with_nick" in data or "pm_with_user_id" in data: @@ -485,8 +463,6 @@ class Room(): TODO """ - print("AUTH-REPLY") - if not data["success"]: self._con.stop() @@ -495,8 +471,6 @@ class Room(): TODO """ - print("GET-MESSAGE-REPLY") - self._messages.add_from_data(data) self._callbacks.call("messages") @@ -505,8 +479,6 @@ class Room(): TODO """ - print("LOG-REPLY") - for msgdata in data["log"]: self._messages.add_from_data(msgdata) self._callbacks.call("messages") @@ -516,8 +488,6 @@ class Room(): TODO """ - print("NICK-REPLY") - if "to" in data: self.nick = data["to"] self.session.name = self.nick @@ -528,8 +498,6 @@ class Room(): TODO """ - print("SEND-REPLY") - self._messages.add_from_data(data) self._callbacks.call("messages") @@ -538,8 +506,6 @@ class Room(): TODO """ - print("WHO-REPLY") - self._sessions.remove_all() for sesdata in data["listing"]: self._sessions.add_from_data(sesdata)