mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-22 15:26:37 +00:00
IrcClient.py:IrcClient.{queue,unqueue}(): always CR NL-terminate messages & encode() before queuing.
This commit is contained in:
parent
9c34fe3220
commit
b71ca6af89
@ -95,13 +95,12 @@ class IrcClient:
|
||||
msg += ":" + args[argNum]
|
||||
else:
|
||||
msg += args[argNum] + " "
|
||||
self.clientQueue.append(msg)
|
||||
self.clientQueue.append((msg + "\r\n").encode())
|
||||
# }}}
|
||||
# {{{ unqueue(): Send all queued lines to server, honouring timers
|
||||
def unqueue(self):
|
||||
while self.clientQueue:
|
||||
msg = self.clientQueue[0]
|
||||
msg = (msg + "\r\n").encode(); msgLen = len(msg); msgBytesSent = 0;
|
||||
msg = self.clientQueue[0]; msgLen = len(msg); msgBytesSent = 0;
|
||||
while msgBytesSent < msgLen:
|
||||
if self.clientNextTimeout:
|
||||
timeNow = time.time()
|
||||
|
Loading…
Reference in New Issue
Block a user