mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
wrap_message: expand UID targets into nicks before processing (#153)
This commit is contained in:
parent
244c4fe0eb
commit
73322bd9ba
@ -1872,6 +1872,12 @@ class IRCNetwork(PyLinkNetworkCoreWithUtils):
|
||||
For IRC, the maximum length of one message is calculated as S2S_BUFSIZE (default to 510)
|
||||
minus the length of ":sender-nick!sender-user@sender-host PRIVMSG #target :"
|
||||
"""
|
||||
try:
|
||||
target = self.get_friendly_name(target)
|
||||
except KeyError:
|
||||
log.warning('(%s) Possible desync? Error while expanding wrap_message target %r '
|
||||
'(source=%s)', self.name, target, source, exc_info=True)
|
||||
|
||||
prefixstr = ":%s PRIVMSG %s :" % (self.get_hostmask(source), target)
|
||||
maxlen = self.S2S_BUFSIZE - len(prefixstr)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user