Sure:
alias udp_onsw {
sockclose SERVER
sockclose CLIENT
sockudp -k SERVER 8000
sockudp -kn CLIENT 127.0.0.1 8000 this is a message
.timer 1 2 sockclose SERVER $(|) sockclose CLIENT
}
on *:sockwrite:CLIENT:{
echo -a CLIENT just sent data
}
If on udpwrite wasn't meant to be used with UDP, then why are you suggesting I use it, in which case is it triggered?
On sockwrite has been working with udp socket since ever:
http://www.zigwap.com/mirc/sockets_udp see the getTime alias, which eventually triggers on sockwrite with $sockerr set to 0.