well for one thing, you are forgetting that the sockets send blank lines as well, as terminals. So you need to compensate for that as well.
on *:sockread:?#*:{
sockread -n &x
if ($bvar(&x,0) > 0) {
if ($gettok($bvar(&x,1-).text,1-3,32) = AUTH GateKeeperPassport S) { }
etc...
}
}
I believe that's the only problem. You could use a tockenizer so save you from doing $gettok for everything. So the above code becomes...
on *:sockread:?#*:{
sockread -n &x
if ($bvar(&x,0) > 0) {
tokenize 32 $bvar(&x,1-).text
if ($1-3 = AUTH GateKeeperPassport S) { }
etc...
}
}
Basically, you can specify a range ($1-3) to give you a defined from-to comparison. You could also do something like $1 $2 $3 =...
I know it's a bit scrutinising, but i would also recommend following mIRC's structure and doing the "if statement" correct. You are doing a comparison using 1 "=" sign. With mIRC you should use 2 or 3 "=" characters. Please refer to the mIRC help file under "if then else" for correct syntax. This is just good programming practice if you want to better your knowledge in programming.