When testing with a script supposed to reproduce the behavior, I was running a timer checking if the sockname was there, if not, display a message that it has been closed and stop the timer; after idling, one /sockudp would close the socket.

Inside the real game, I would only notice it because the game use UDP to allow people to move, so nobody would be moving anymore.

Server side, the game use the following on udpread event:
Code:
on *:udpread:pacuserv:{
  var %id $+($sock(pacuserv).saddr,/,$sock(pacuserv).sport)
  if ($sockerr) { echo 4 -s * pac_serv udpread ( %id ) error $v1 $sock(pacuserv).wserr - $sock(pacuserv).wsmsg | return }
  sockread -n &a
  if ($bvar(&a,0)) {
    tokenize 32 $bvar(&a,1-512).text
    ;handle message here
  }
}
The server doesn't use anything else (regarding UDP), no on sockwrite, on sockread is not for UDP, and I checked, on sockclose is not triggered (server side) when it happens. the $sockerr part of that event is not triggered either when it happens.

Client side, there is also only a on udpread event:
Code:
on *:udpread:pacuclient:{
  if ($sockerr) { echo -s udpread client error: $v1 - $sock(pacuclient).wserr $sock(pacuclient).wsmsg | return }
  sockread -n &a
  ;handle message here
}
When it happens, NO error are reported at all, I have the same check for $sockerr inside the TCP events I use, but should be all irrelevant, it's been a long time since I didn't try to reproduce.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel