maybe get rid of the txt file and use a socket to get the insults...
this is nothing more then a fast mock up to give you an idea and maybe a starting point...
on $@*:text:/^!ikick\s(.+)/iS:#:{ if ($regml(1) ison # && $nick isop #) { if ($sock(kinsult)) .sockclose kinsult | .sockopen kinsult www.randominsults.net 80 | .sockmark kinsult # $regml(1) } }
on *:sockopen:kinsult: { sockwrite -nt $sockname GET / HTTP/1.1 | sockwrite -nt $sockname Host: $+(www.randominsults.net,$str($crlf,2)) }
on *:sockread:kinsult: {
var %insult | sockread %insult
if ($regex(%insult,/<i>(.+)<\/i>/)) { kick $sock(kinsult).mark $regml(1) | .sockclose kinsult }
}