aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2016-02-12 07:58:23 -0800
committerRyan Huber <rhuber@gmail.com>2016-02-12 07:58:23 -0800
commite283335a296e62a20f2802c533a899d143c6f225 (patch)
treeafac9f46ca71d6340ed7be95465d6e19a52940dd /wee_slack.py
parent3ef1eb4051bb9f8da4009bcf22cee15dfaaa2f5b (diff)
parentbe3f3f6cfce847bd5990e8ef6f56bcc85e3a283a (diff)
downloadwee-slack-e283335a296e62a20f2802c533a899d143c6f225.tar.gz
Merge pull request #149 from rawdigits/allow-dot-nick
Allow dot in nicks
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 159b306..a8807ec 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -504,11 +504,11 @@ class Channel(object):
message = message.split(' ')
for item in enumerate(message):
if item[1].startswith('@') and len(item[1]) > 1:
- named = re.match('.*[@#](\w+)(\W*)', item[1]).groups()
+ named = re.match('.*[@#]([\w.]+)(\W*)', item[1]).groups()
if named[0] in ["group", "channel", "here"]:
message[item[0]] = "<!{}>".format(named[0])
if self.server.users.find(named[0]):
- message[item[0]] = "<@{}|{}>{}".format(self.server.users.find(named[0]).identifier, named[0], named[1])
+ message[item[0]] = "<@{}>{}".format(self.server.users.find(named[0]).identifier, named[1])
if item[1].startswith('#') and self.server.channels.find(item[1]):
named = re.match('.*[@#](\w+)(\W*)', item[1]).groups()
if self.server.channels.find(named[0]):