Remote 1


 

Remotes is perhaps the most exciting part of regular mIRC scripting; while popups and aliases both require
input from you, remotes are reacting on things entirely without your interaction. Isn't that cooooool?? ;)
Remote events can be split into 3 main types;'regular' events, raw events, and ctcp events. A little
knowledge of identfiers and basic IRC/mIRC commands, aliases and identifiers will make this section easier
to understand. Also make sure remotes are turned on, if you type /remote, it should show this:

 

remoteon.gif (5824 bytes)

 

Remote1

 

if it doesn't, you can turn them on by typing /ctcps on, /events on and /raw on.

 

Regular events:

 

This is shortly put events that is neither raw, nor ctcp :) This can be an user joining a channel you're on,
parting it, somebody typing some text in a channel or query window with you, somebody sending you a file,
an op, deop, kick or ban event, or a soundfile being played (by you or others) etc etc etc. The
helpfile has
a list of all events, together with examples on how to use them and tips. Events are generally in the format:

 

on level:event:command(s)

 

Level is here an userlevel, by default, all users have userlevel 1, and all ' on 1 ' events will trigger for these
people, unless you have configured it not to.
Event is the name of the event that should be defined, and
command(s) is/are the command(s) to perform if an user of the required userlevel triggers the event defined.
Some events also have ways to react differently depending on wether the event takes place in a specific
channel, a specific window, etc, such as

 

on level:event:matching:where/how:commands

 

in which case the 'matching' part is requiring the event to not only be triggered by an user of the correct
level, but also that the matching expression is filled (the text event is a good example of this). The
where/how part of the definition sets requirements to in which cases input is accepted, for instance ' # '
which will be fulfilled on any channel, '
#Q8scripting' which will only be fulfilled if the event is being triggered in
#Q8scripting, ' ? ' which will be fulfilled if triggered from any private message (iow, not in a channel), and ' * '
which is fulfilled regardless of where/how the event was triggered.

 

A couple of examples:

 

on 1:DNS:{if ($raddress) { clipboard $raddress }}

 

This event will trigger whenever you perform a /dns, be it on a nickname or on a host / an ip address (or
rather, when the dns has either succeeded or failed), and if the address got resolved, it will copy this
address to the clipboard, else it will not do anything. Here the level is '
1', the event is 'DNS', and the
command is '
clipboard $raddress' ($raddress is an identifier holding the resolved address).

 

An example of the second kind of event, might be;

 

      on @1:TEXT:*suck*:#:{
         kick $chan $nick 3eeb 3alek wala ahlek marabooK ? Dont swear in $chan
         guser 2 $nick 3
     }

 

        on @2:KICK:#:{ mode $chan +b $address($nick,3) }

 

Okok, I know, this is two events, and I said one, but puleeeeaze, bear with me? =). The @ before the level
here, means that it will only trigger if you are an op on the channel (for more info on prefixes and suffixes in
events, check the section on user levels). The event is here of course 'TEXT' in the first part, and 'KICK' in
the second part, and the matching is '
*suck*'. The where/how in this case is the '#' which means it will
trigger on all channels (again, with the @ before the level, only on the channels you are an op), and the
commands are the 'kick etc', and the 'guser 2 $nick'.

 

What these two events do is that whenever an user type a word or sentence containing 'suck' in it, in a
channel where you are an op, it will kick the person with the message 'Please watch your language here in
#channelname', and then it will add the user to
userlevel 2. Next time you kick this person, you will also
ban the user from the channel, with the
banmask *!*user@*.domain. For more info on the use of regular
events, check the helpfile :)

 

Next

Hosted by www.Geocities.ws

1