Difference between revisions of "On connect"

From Scriptwiki
Jump to: navigation, search
m (added link)
Line 23: Line 23:
 
* [[on_disconnect|on disconnect]]
 
* [[on_disconnect|on disconnect]]
 
* [[on_connectfail|on connectfail]]
 
* [[on_connectfail|on connectfail]]
 +
* {{Relatedraws|join}}
  
 
[[Category:Events]]
 
[[Category:Events]]

Revision as of 17:47, 5 September 2005

The on CONNECT event triggers when mIRC connects to an IRC Server right after the MOTD is displayed.

on <level>:CONNECT:<commands>

On connect event is most commonly used to perform commands right after joining a server, such as automaticly joining channels or authenticate with Q bot.

on *:connect:{
  if ($network === QuakeNet) && ($right($server, 13) === .quakenet.org) {
    !var %u = username
    !var %p = password
    !.msg Q@CServe.quakenet.org auth %u %p

    join #help.script
    join #mIRC
  }
}

Please note, that keeping your account secure is up to you, the user, and cannot be achieved by anyone/thing else. So using automaticly authenticating scripts or storing your Q-password to remote file is your own choise and only You. There's always existing security risk. Read Security FAQ at QuakeNet's site for further information.

Contributed by Tovrleaf

See Also