Special Events


Special events are events that are not matching the server replies , but rather they catch your actions when playing with TurboIRC . Currently , these events are supported :

IncomingPrivates : This event will be fired when a PRIVMSG causes TurboIRC to open a query window . This event is not default . $0 holds the mask of the user that sent the PRIVMSG to you and forced the query window to be opened . You may lock this event with #lock ; The query won't be opened then , but the message will still be shown to the server window .

OnStartup : This event is fired after a succesfull connection ( after the Message Of The Day ) .

NickLeftDoubleClick : This event occurs when you double click a nick in a channel window . The nick name is passed to the parameter $0

ChannelWindowDoubleClick : This evet occurs when you double click the richedit box of a window . The window title is passed to parameter $0 .

SoundError : This happens when you receive a CTCP sound but the relative file does not exist in your current dir , your SOUND dir , or your MEDIA dir under Windows directory . $0 holds the mask of the user that sent you the CTCP and $1 holds the sound file .

OnNotify: This is fired after a notification that a user is online . $0 holds the nick of the user .

OnUnNotify: This is fied after a notification that a user is offline . $0 holds the nick of the user .

OnFileGetOk/GetError/SendOk/SendError : These happen when you receive/send a file successfully/with failure . $0 is the user that sent you the file , $1 is the file and $2 is the file size

OnConnect: This happens after the connection with the server is made . $0 holds the server name , and $1 $2 hold the IP address and port of the server .

OnDisconnect : This event happens after a server connection is terminated manually or it is dropped remotely . The event will be fired before TurboIRC process any options that might cause it to destroy windows . It can be assumed that all existing windows still exist while OnDisconnect is being executed . If you have created dynamic INI files , Directories or relative Registry entries based on the Socket value of the server ( returned by GetSOPTIONS ), now it is the time to destroy them because the next server connection won't have the same socket value . All values returned by GetSOPTIONS are still valid .

Timer30Seconds: This event is fired each 30 seconds . You may want a script to be executed periodically - in that case , just check the current time within the script .

OnDNS : This event is fired when a /dns that managed a parameter that started with * has finished resolving . $0 holds the domain name , $1 holds the IP address and $2* has any aliases that that domain might have . If an entry is not existing , an asterisk is placed .

ONInput : This event is fired when you press enter after typing some text to a window . This event does not occur when you send input to a window without the keyboard ( for example , using scripts ) . $0* holds the input string . This event is processed after the away status has released in case that the Auto Remove Away On Keypress is selected in Preferences . You may lock this event with #lock ; in that case , TurboIRC will not process your input . This event is not fired when you send input to a DCC window .

OnDCCOpen: This happens after a successful DCC Chat connection . $0 holds the nick , and $1 $2 hold the remote user's IP and port . Please note that this event will not handled correctly within secure DCC chats , and also , it won't work if you try to establish a connection with yourself .

OnDCCClose: This happens after a DCC chat connection is closed. $0 is the nick .

ONDCCIncoming : This event is fired each time a user sends you a DCC request .

$0 = The sender's mask | nick .

$1 = "DCC" , "TDCC" , "CHAT" , "TVOICE" , "SECURECHAT" , "KTP" , "CHESS"

$2 = The File attempted to be transferred . If "CHAT" or "SECURECHAT" , this is 0

$3 = The Size of that File , 0 if CHAT or SECURECHAT or CHESS or TVOICE

$4 = The Users IP , if DCC , TDCC , TVOICE , CHAT , CHESS or SECURECHAT , 0 if KTP .

$5 = The Users IP Port , if DCC,TDCC,TVOICE,CHAT,CHESS or SECURECHAT . 0 if KTP .

ReturnValues :

When you return 0 from that script , TurboIRC processes the DCC request normally . When you return 1 , the processing is halted . When you return 2 , TurboIRC automatically accepts a DCC chat/voice/file transfer . KTP Sessions ignore the return value "2" .

ONDCCMessage : This event is fired each time a user sends you a message that is to be displayed in the DCC box . Use this event and /dccmsg to control text in the dcc . $0 is the number describing the CCWOPTIONS relative number of the DCC box . You can use then GetCCWOPTIONS then to retrieve information about the DCC box , or to the /dccmsg alias . $1* holds the message to be displayed .

OnCTCPIncoming : This event is fired immediately before TurboIRC is about to reply to a VERSION , FINGER , PING , TIME , or CLIENTINFO CTCP . ( Other CTCP's may be trapped from Normal Events ) . $0* holds the buffer that TurboIRC received , in the form of a PRIVMSG :user PRIVMSG target :$h01CTCP .

If you lock this event with #lock , TurboIRC will not send a FINGER , PING , TIME or CLIENTINFO CTCP , but it will still send a VERSION CTCP .

OnPINGReply : This event is fired each time you get a ping reply from a client that you sent a CTCP PING . The event is fired after TurboIRC shows the "Ping reply from <nick> ...." message .$0 holds the nick name and $1 holds the time between the pings , in seconds .

OnSecureKey : This event is fired for a Query Window ( and not a Secure DCC ) when a key from a remote client is received . $0 holds the mask of the user that sent the key . If you lock this event with #lock , the key won't be accepted and the security session won't be started .