diff options
author | Ryan Huber <rhuber@gmail.com> | 2015-07-18 09:16:31 -0400 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2015-07-18 09:16:31 -0400 |
commit | 9154c11d2bbd30db9f5c1fb35aba2bcf943663b0 (patch) | |
tree | 65cd0e5b3ad49c8963d793d884115fb1d1feda07 /wee_slack.py | |
parent | 3567ad97e1967145efca985da0d9df005775a452 (diff) | |
download | wee-slack-9154c11d2bbd30db9f5c1fb35aba2bcf943663b0.tar.gz |
keep 2k messages per channel
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py index 98571ea..e9752d8 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -26,6 +26,7 @@ SCRIPT_LICENSE = "MIT" SCRIPT_DESC = "Extends weechat for typing notification/search/etc on slack.com" BACKLOG_SIZE = 200 +SCROLLBACK_SIZE = 2000 SLACK_API_TRANSLATOR = { "channel": { @@ -653,8 +654,8 @@ class Channel(SlackThing): if from_me: message_json["user"] = self.server.users.find(self.server.nick).identifier self.messages.append(Message(message_json)) - if len(self.messages) > BACKLOG_SIZE: - self.messages = self.messages[-BACKLOG_SIZE:] + if len(self.messages) > SCROLLBACK_SIZE: + self.messages = self.messages[-SCROLLBACK_SIZE:] def get_history(self): if self.active: |