Code: Select all
proc qstat:results {chan nick pf} {
while {[gets $pf line] >= 0} {
if {[string match "DOWN*" $line]} {
putquick "NOTICE $nick :Connection refused while querying server."
break
} elseif {[string match "HOSTNOTFOUND*" $line]} {
putquick "NOTICE $nick :Host not found."
break
} elseif {[string match "TIMEOUT*" $line]} {
putquick "NOTICE $nick :Timeout while querying server."
break
}
set msg [split $line]
set string ""
foreach query $msg {
if {[string length $string] + [string length $query] < 458} {
append string $query
} else {
putquick "NOTICE $nick :$string"
set string ""
}
}
if {$string != ""} {
putquick "NOTICE $nick :$string"
}
}
}
Code: Select all
[Server:TestServer¤IP:cs.gather.lt[212.122.68.248:27015]¤Players:18/19¤ Map:de_dust2¤Password:No¤NextMap:cs_estate¤TimeLeft:08:21¤Cheating-Death:4.21.0]
Code: Select all
[ Server: Test Server ¤ IP: cs.gather.lt [212.122.68.248:27015] ¤ Players: 18/19 ¤ Map : de_dust2 ¤ Password : No ¤ Next Map: cs_estate ¤ Time Left : 08:21 ¤ Cheating-Death: 4.21.0 ]
P.S.
There is one more problem:
Code: Select all
[22:52] -Bot- [Player:Nick-Frags:16][Player:
[22:52] -Bot- -Frags:5]