aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/wee_slack.py b/wee_slack.py
index fe2b84f..03e1748 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1038,7 +1038,7 @@ class SlackTeam(object):
return self.domain
def buffer_prnt(self, data):
- w.prnt_date_tags(self.channel_buffer, SlackTS().major, tag("backlog"), data)
+ w.prnt_date_tags(self.channel_buffer, SlackTS().major, tag("team"), data)
def get_channel_map(self):
return {v.slack_name: k for k, v in self.channels.iteritems()}
@@ -1514,7 +1514,7 @@ class SlackChannel(object):
def update_nicklist(self, user=None):
if not self.channel_buffer:
return
- if self.type not in ["channel", "group"]:
+ if self.type not in ["channel", "group", "mpim"]:
return
w.buffer_set(self.channel_buffer, "nicklist", "1")
# create nicklists for the current channel if they don't exist
@@ -2837,20 +2837,20 @@ def tag(tagset, user=None):
else:
default_tag = 'nick_unknown'
tagsets = {
+ # messages in the team/server buffer, e.g. "new channel created"
+ "team": "irc_notice,notify_private,log3",
# when replaying something old
- "backlog": "no_highlight,notify_none,logger_backlog_end",
+ "backlog": "irc_privmsg,no_highlight,notify_none,logger_backlog",
# when posting messages to a muted channel
- "muted": "no_highlight,notify_none,logger_backlog_end",
- # when my nick is in the message
- "highlightme": "notify_highlight,log1",
+ "muted": "irc_privmsg,no_highlight,notify_none,log1",
# when receiving a direct message
- "dm": "notify_private,notify_message,log1,irc_privmsg",
- "dmfromme": "notify_none,log1,irc_privmsg",
+ "dm": "irc_privmsg,notify_private,log1",
+ "dmfromme": "irc_privmsg,no_highlight,notify_none,log1",
# when this is a join/leave, attach for smart filter ala:
# if user in [x.strip() for x in w.prefix("join"), w.prefix("quit")]
- "joinleave": "irc_smart_filter,no_highlight",
+ "joinleave": "irc_smart_filter,no_highlight,log4",
# catchall ?
- "default": "notify_message,log1",
+ "default": "irc_privmsg,notify_message,log1",
}
return default_tag + "," + tagsets[tagset]
@@ -2991,6 +2991,8 @@ def command_talk(data, current_buffer, args):
c = team.get_channel_map()
if channel_name not in c:
u = team.get_username_map()
+ if channel_name.startswith('@'):
+ channel_name = channel_name[1:]
if channel_name in u:
s = SlackRequest(team.token, "im.open", {"user": u[channel_name]}, team_hash=team.team_hash)
EVENTROUTER.receive(s)