aboutsummaryrefslogtreecommitdiff
path: root/Utils.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-13 11:46:42 +0100
committerGravatar jesopo2018-09-13 11:46:42 +0100
commit8e003281b621e30cc6cf3d0a1f696aaa51cfe3d0 (patch)
tree57955083c0b73603236b02cb0d6631ba13379e2c /Utils.py
parentRemove additional % (diff)
signature
Support "nickname@hostname" hostmask, even though it's almost certain it'll
never be seen in the wild.
Diffstat (limited to 'Utils.py')
-rw-r--r--Utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Utils.py b/Utils.py
index 6a9adf69..fd9f5234 100644
--- a/Utils.py
+++ b/Utils.py
@@ -49,10 +49,12 @@ def seperate_hostmask(hostmask):
hostmask = remove_colon(hostmask)
first_delim = hostmask.find("!")
second_delim = hostmask.find("@")
- nickname = username = hostname = hostmask
+ nickname, username, hostname = hostmask, None, None
if first_delim > -1 and second_delim > first_delim:
nickname, username = hostmask.split("!", 1)
username, hostname = username.split("@", 1)
+ else if second_delim > -1:
+ nickname, hostname = hostmask.split("@", 1)
return IRCHostmask(nickname, username, hostname, hostmask)
def get_url(url, **kwargs):