aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2015-07-17 19:50:34 -0400
committerRyan Huber <rhuber@gmail.com>2015-07-17 19:50:34 -0400
commite1b20ee45e2aa39816feba0180de401d1dde2161 (patch)
tree83b222bcf010a96f5d5963f561844cb323eb0592
parentfbe2063ec844745a4dddcfff59e1ab7b9c403d76 (diff)
downloadwee-slack-e1b20ee45e2aa39816feba0180de401d1dde2161.tar.gz
fix crash derp
-rw-r--r--wee_slack.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/wee_slack.py b/wee_slack.py
index f2840a2..0c20c60 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -511,10 +511,6 @@ class Channel(SlackThing):
async_slack_api_request(self.server.domain, self.server.token, SLACK_API_TRANSLATOR[self.type]["leave"], {"channel": self.identifier})
def closed(self):
- try:
- message_cache.pop(self.identifier)
- except KeyError:
- pass
self.channel_buffer = None
self.last_received = None
self.close()
@@ -620,11 +616,6 @@ class Channel(SlackThing):
self.messages.sort()
for message in self.messages:
process_message(message.message_json, False)
-# if "user" not in message.message_json:
-# self.buffer_prnt('unknown', message.message_json["text"], message.message_json["ts"])
-# else:
-# self.buffer_prnt(message.message_json["user"], message.message_json["text"], message.message_json["ts"])
- #process_message(message.message_json)
def change_previous_message(self, old, new):
message = self.my_last_message()
@@ -796,11 +787,10 @@ def slack_command_cb(data, current_buffer, args):
else:
function_name, args = a[0], None
-# try:
- command = cmds[function_name](current_buffer, args)
-# except KeyError:
-# w.prnt("", "Command not found: " + function_name)
-
+ try:
+ command = cmds[function_name](current_buffer, args)
+ except KeyError:
+ w.prnt("", "Command not found: " + function_name)
return w.WEECHAT_RC_OK