mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-28 13:42:37 +01:00
get_friendly_name: strip STATUSMSG prefixes before checking is_channel
This commit is contained in:
parent
7b744655ee
commit
b0188dab92
@ -1225,9 +1225,8 @@ class PyLinkNetworkCoreWithUtils(PyLinkNetworkCore):
|
||||
return self.servers[entityid].name
|
||||
elif entityid in self.users:
|
||||
return self.users[entityid].nick
|
||||
elif self.is_channel(entityid):
|
||||
# We assume that channels don't conflict with the SID/UID format. For IRC, this is a
|
||||
# relatively safe bet.
|
||||
# Return channels as-is. Remember to strip any STATUSMSG prefixes like from @#channel
|
||||
elif self.is_channel(entityid.lstrip(''.join(self.prefixmodes.values()))):
|
||||
return entityid
|
||||
else:
|
||||
raise KeyError("Unknown UID/SID %s" % entityid)
|
||||
|
Loading…
Reference in New Issue
Block a user