Difference between revisions of "On connect"

From Scriptwiki
Jump to: navigation, search
m (Added on connectfail.)
 
Line 1: Line 1:
 +
== on CONNECT ==
 
The on CONNECT event triggers when [[mIRC]] connects to an [[IRC]] Server right after the [[MOTD]] is displayed.
 
The on CONNECT event triggers when [[mIRC]] connects to an [[IRC]] Server right after the [[MOTD]] is displayed.
  
Line 17: Line 18:
  
 
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 [http://www.quakenet.org/faq/faq.php?c=160&expand=yup&l=0 Security FAQ] at QuakeNet's site for further information.
 
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 [http://www.quakenet.org/faq/faq.php?c=160&expand=yup&l=0 Security FAQ] at QuakeNet's site for further information.
 +
 +
== on CONNECTFAIL ==
 +
The on CONNECTFAIL event uses the same as above and triggers when a connection attempt (including all retries) has failed. $1- is set to the connect error message.
 +
 +
on *:connectfail:{
 +
  echo -sg Connection failed: $1-
 +
}
  
 
{{Author|Tovrleaf}}
 
{{Author|Tovrleaf}}
Line 22: Line 30:
 
== See Also ==
 
== See Also ==
 
* [[on_disconnect|on disconnect]]
 
* [[on_disconnect|on disconnect]]
* [[on_connectfail|on connectfail]]
 
 
* {{Relatedraws|join}}
 
* {{Relatedraws|join}}
  
 
[[Category:Events]]
 
[[Category:Events]]

Latest revision as of 20:57, 6 July 2014

on CONNECT

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.

on CONNECTFAIL

The on CONNECTFAIL event uses the same as above and triggers when a connection attempt (including all retries) has failed. $1- is set to the connect error message.

on *:connectfail:{
  echo -sg Connection failed: $1-
}
Contributed by Tovrleaf

See Also