Remote, Events
The Events section is intended to respond to things that other people people do, like msgs, changing nicks, quits, etc etc. It can also be configured to be triggered by things you do.
The ON triggers
There is a small example after each and should only be used for testing purposes and not in any actual channels. Also each example is set to be triggered by a level one user.
ON ACTION - Whenever someone does a /me or /describe in a channel
1:ON ACTION:*tired*:#:/msg $chan Then go to bed, $nick
ON BAN - This is triggered whenever someone sets a ban in a channel
1:ON BAN:#: if ($me isin $banmask) { msg $nick why'd you ban me? }
ON CHAT - This one is triggered by text in a dcc chat window.
1:ON CHAT:hi:/msg = $+ $nick hello
ON CHATOPEN - This is triggered when a dcc chat is first esablished.
1:ON CHATOPEN:/echo 4 $nick Secured DCC Chat Connection with $nick established.
ON CHATCLOSE - This is triggered whenever a dcc chat connection is ended.
1:ON CHATCLOSE:/close -c $nick
ON CTCPREPLY - This one is triggered whenever you get a ctcp reply from someone.
1:ON CTCPREPLY:PING* {
%ping = $ctime - $parm2
notice $nick Your Ping reply was %ping secs
}
ON DEOP - Triggered by a deop in a channel
1:ON DEOP:#: if ($opnick == $me) { msg $nick Please give me back my ops }
ON DEVOICE - Triggered when a user is -v'd.
friend:ON DEVOICE:#:/mode $chan +v $nick
ON INVITE - Triggered whenever you are invited to another channel
1:ON INVITE:#:/ignore -u60 $nick 3 | /echo 4 60 sec Ignore $nick for inviting
ON JOIN - Triggered by someone joining the channel
1:ON JOIN:#mirc:/msg $chan welcome to $chan $nick
ON FILERCVD - Triggered whenever a file is successfully recieved
1:ON FILERCVD:*.jpg:/msg $nick Thanks for the picture $nick
ON FILESENT - Triggered whenever a file is successfully sent
1:ON FILESENT:*:/echo 2 File Transfer to $nick complete.
ON KICK - Triggered whenever someone is kicked from a channel
1:ON KICK:#:/invite $knick $chan | /mode $chan -o $nick | /msg $chan Don't deop $knick , $nick
ON MODE - Triggered by a mode change in a channel
1:ON MODE:-i:/msg $chan don't do that $nick
ON NICK - Triggered whenever someone changes their nick
1:ON NICK:/msg $newnick what a silly nick!
ON NOSOUND - Triggered whenever you don't have a sound that was played
1:ON NOSOUND:/msg $nick I don't have $filename can you send it?
ON NOTICE - Triggered whenever ou receive a notice
1:ON NOTICE:*:#:/notice $nick I hate notices
ON NOTIFY - Triggered whenever someone in your notify list joins or quits IRC
1:ON NOTIFY:/msg $nick I've been waiting for you.
ON OP - Triggered whenever someone is op'd in a channel
1:ON OP:#:/msg $nick does $opnick really deserve ops?
ON PART - Triggered whenever someone parts a channel
1:ON PART:#nec:/msg $chan I'm glad $nick left.
ON QUIT - Triggered whenever someone quits the IRC
1:ON QUIT:/echo 2 $nick has left the IRC ( $+ $parms)
ON SERV - Triggered by something said in a Fileserver
1:ON SERV:get*:/msg = $+ $nick Invalid File Name | /halt
Note: your fileserver won't send files if you have this line.
ON SERVCLOSE - Triggered whenever a File Server is closed.
1:ON SERVCLOSE:/echo 2 File Server with $nick closed.
ON SERVOPEN - Triggered whenever a File Server is opened.
1:ON SERVOPEN:/msg = $+ $nick Don't even leech and files
ON SERVEROP - Triggered whenever a server ops someone.
1:ON SERVEROP:#:/mode $chan -o $nick
ON SNOTICE - Triggered by server notices.
1:ON SNOTICE:*client*:!
ON TEXT - Triggered whenever text is typed.
1:ON TEXT:*:?:/echo 2 $active $nick just msg'd you.
1:ON TEXT:*dirty word*:#:/kick $chan $nick watch your language
1:ON TEXT:!fserve:*:/fserve $nick c:\files
ON TOPIC - Triggered whenever topic is changed.
1:ON TOPIC:#:/msg $chan I really love the topic " $+ $topic"
ON UNBAN - Triggered wherever someone unbans an address.
1!:ON UNBAN:#:/mode $chan +b $banmask
ON VOICE - Triggered when someone is given a +v by someone.
1:ON VOICE:#:/msg $me $nick just voiced $vnick
ON WALLOPS - Triggered whenever a wallop is received.
1:ON WALLOPS:*:/echo 4 -Wallop- $nick $+ : $parms
Structure
You have to be careful how you put these in your events section. mIRC will go from top to bottom and execute the first matching one it comes to.
Example:
1:ON TEXT:*:#:/msg $me < $+ $nick> $parms
1:ON TEXT:hello:#:/msg $me $nick said hello
The hello will not work because mIRC will see the ON TEXT:*: and execute that and quit there. However if you were to switch them around like so:
1:ON TEXT:hello:#:/msg $me $nick said hello
1:ON TEXT:*:#:/msg $me < $+ $nick> $parms
Now whenever someone says something in the channel mIRC will see if it was "hello" and if it wasn't it will go on to the next one.
By putting an @ in front of the user level you can have it only execute if you're an op.
Examples:
@1:ON OP:#mirc:/mode -oo $nick $opnick | /msg $chan Secured ops in on.
@1:ON DEOP:#nec:/mode -o+o $nick $opnick
These events will only execute if you are an op in the channel.
This page hosted by Get your own Free Homepage
©1996 The Scripters Guild All Rights Reserved
Please send all questions and comments to TiAMaT