diff options
author | Araq <rumpf_a@web.de> | 2011-09-24 20:22:53 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-09-24 20:22:53 +0200 |
commit | 0f37d0e1f2aeee466b3c6179886963354eaa6222 (patch) | |
tree | 51ae4183dabd454877d7570cafb7f72dcf519011 /lib/pure/irc.nim | |
parent | 485c371942cbbb1f9a10c64b6fcc699e59511460 (diff) | |
download | Nim-0f37d0e1f2aeee466b3c6179886963354eaa6222.tar.gz |
sockets.recv optimizations; stdlib now supports taint mode
Diffstat (limited to 'lib/pure/irc.nim')
-rw-r--r-- | lib/pure/irc.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/irc.nim b/lib/pure/irc.nim index 0397502cd..7e1cd0eca 100644 --- a/lib/pure/irc.nim +++ b/lib/pure/irc.nim @@ -205,15 +205,15 @@ proc poll*(irc: var TIRC, ev: var TIRCEvent, ## This function should be called often as it also handles pinging ## the server. if not irc.connected: ev.typ = EvDisconnected - var line = "" + var line = TaintedString"" var socks = @[irc.sock] var ret = socks.select(timeout) if socks.len() == 0 and ret == 1: if irc.sock.recvLine(line): - if line == "": + if line.string.len == 0: ev.typ = EvDisconnected else: - ev = parseMessage(line) + ev = parseMessage(line.string) if ev.cmd == MPing: irc.send("PONG " & ev.params[0]) if ev.cmd == MPong: |