mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 12:12:54 +01:00
irclib: Make NestedCommandsIrcProxy._replyOverhead count in bytes instead of chars
It was, once again, a bug to count characters, because they might contain multi-byte characters, and truncation happens after the 512th byte.
This commit is contained in:
parent
8a3efe4379
commit
de29218bdb
@ -956,9 +956,9 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
|
||||
Ignores tag bytes, as they are accounted for separatly."""
|
||||
overhead = (
|
||||
len(':')
|
||||
+ len(self.irc.prefix)
|
||||
+ len(self.irc.prefix.encode())
|
||||
+ len(' PRIVMSG ')
|
||||
+ len(target)
|
||||
+ len(target.encode())
|
||||
+ len(' :')
|
||||
+ len('\r\n')
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user