just use the on connect event

3 explains see below

1 of 3
;just on connect perform a command ...
;perform command on specify network

on 1:CONNECT:if ($network == GRNet) { timerconnect off }

the same can be done with a server.

on 1:CONNECT:if ($server == darkness.irc.gr) { timerconnect off }

2 of 3
now the same with multi networks ~,or servers

on 1:CONNECT:{
var %s = server1 server2 server3 server4
if ($istok(%s,$server,32)) Command
}
the same now with networks

on 1:CONNECT:{
var %n = GRNet DALnet somnet
if ($istok(%n,$network,32)) Command
}