aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2015-01-21 14:58:41 -0800
committerRyan Huber <rhuber@gmail.com>2015-01-21 14:58:41 -0800
commit8fa266d0fb6ae45535efad6169408b3b1ab2ba36 (patch)
tree2ed462afa1810e42c615f9a6ff063769eaee54f3 /wee_slack.py
parent56bf3be9b46e6335406387da91a032fa84329999 (diff)
downloadwee-slack-8fa266d0fb6ae45535efad6169408b3b1ab2ba36.tar.gz
fix writing to nonexistent server buffer
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/wee_slack.py b/wee_slack.py
index e1a9efd..b71cbdc 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -745,8 +745,7 @@ def command_changetoken(current_buffer, args):
def command_test(current_buffer, args):
- if slack_buffer:
- w.prnt(slack_buffer, "worked!")
+ w.prnt(current_buffer, "worked!")
def command_away(current_buffer, args):
@@ -868,7 +867,7 @@ def process_team_join(message_json):
server = servers.find(message_json["myserver"])
item = message_json["user"]
server.users.append(User(server, item["name"], item["id"], item["presence"]))
- w.prnt(server.buffer, "New user joined: {}".format(item["name"]))
+ server.buffer_prnt(server.buffer, "New user joined: {}".format(item["name"]))
def process_presence_change(message_json):
@@ -902,7 +901,7 @@ def process_channel_created(message_json):
else:
item = message_json["channel"]
server.channels.append(Channel(server, item["name"], item["id"], item["is_open"], item["last_read"], "#", item["members"], item["topic"]))
- w.prnt(server.buffer, "New channel created: {}".format(item["name"]))
+ server.buffer_prnt("New channel created: {}".format(item["name"]))
def process_channel_left(message_json):
@@ -977,7 +976,7 @@ def process_im_created(message_json):
else:
item = message_json["channel"]
server.channels.append(DmChannel(server, channel_name, item["id"], item["is_open"], item["last_read"]))
- w.prnt(server.buffer, "New channel created: {}".format(item["name"]))
+ server.buffer_prnt("New channel created: {}".format(item["name"]))
def process_user_typing(message_json):