alias checkcid { ; Get the connection id for %network var %network = IRCnet var %c = 1 while (%c <= $scid(0)) { if ($scid(%c).network == %network) { %cid = %c break } inc %c } ; Change the script's connection id to %cid if (%cid != $null) { scid %cid } ; Here you can send a message to %network }