![]() |
IRC Information.....
Remotes - What They Are and How to Make Them - mIRC Specific
Remotes:
The remote consists of three distinct sections: Scripts, Users, Variables.
The Events and CTCP Events sections of this tutorial will give you additional examples.
This is where the scripts that you create are listed.
You can load multiple scripts which work independently of each other.
For example; your clone stopper, flood scripts, swear scripts or any script you have can all be loaded at the same time.
How do you load a script in remote? Easy...click on File, Load, Script, choose directory it is in,
choose file name and click OK. Click on View under the Remote tab and wow, there it is :)
You can view any of your scripts at any time by clicking on Remote/View,
find the script you want to look at and click it, a check mark will appear beside it and it will show in mirc editor.
Clicking on File/Order allows you to put them in order, eg, flood, swear, clone, offensive nicknames, and the list goes on.
Each user in your users section/list can be assigned one or more levels.
These access levels dictate which events a user will be able to access.
A good example is the autovoice script which we set to activate on access level 5.
Having set the script to activate at level 5 and having the +V in our user list as access 5,
this triggers as soon as a +V enters the channel, and bingo, autovoiced, providing nothing has changed in their ip addy.
This is how it would look in remote script section:
on @+5:JOIN:#beginner:/mode #beginner +v $nick
In user list as this:
5:*!*user@*.worldnetla.net ;traveler Neat huh!
This is where the currently active variables are listed.
If you take a look at remote/variables you will see a list of them,
they all start with a %. These variables are set by some scripts you might have and
they are called variables because the value usually changes each time a script is run
($time identifier changes as well but will only give the current time and you can't change what
$time refers to, it will always be the time). You can use variables in scripts the same way you
use identifiers and they will be replaced with the current value of that variable.
Variables - Examples
Variables are similar to indentifiers and can be used in scripts in the same way. The difference is that variables are not specific values and can be changed each time a script runs or an event happens. They always begin with a % symbol like %lastname.
You can set a variable yourself in a script by using /set %variablename value or %variablename = value (value can be a number or an identifier like $nick or $time, and can even be another variable that is already set)
Example: /set %name2 $nick %count = 1 %number = $nick($chan,%count)
Identifiers - Examples
Identifiers return specific values. Whenever mIRC finds an identifier in a command or script, it replaces it with the current value.
The value $time returns the current time in hour:minute:second format.
Example: /mytime /say Here in Quebec right now it is $time
When I type /mytime, this will appear:
Here in Quebec right now it is 21:34:12
See how that works? The $time returned 21:34:12, and whenever it is used, it will return your time.
These are things such as an action, ban, chat, ctcp, notice, ping...there are many events and they can be reviewed in the help files which you can access by typing /help remote.
Scripts consist of events which can only be triggered by users who have the required access levels.
I will explain the following events so you get a better picture of how this works in a script.
Let's start first with the on TEXT event, which triggers when you receive private and/or channel messages. There are a number of different ways you can mask the text you want the event to work with, here are some examples.
on 1:TEXT:*bingo*:#learnin:/notice $nick Hey, sounds like fun, want to play a game?
The on 1: -- tells you what access level the line will react upon. The default user level is 1.
Next is :TEXT: -- tells you exactly what remote 'event' this line is setup for.
We then see :*bingo*: -- tells us what 'text' the line is going to pay attention to. There is more information here than meets the eye, though, so let's break it down a bit more.
See the *'s at the word :*bingo*:? The * acts as a wildcard, which means mIRC will accept any other word in place of where
the * is. So if you setup the line as *word, then mIRC will look for the word at the end of
a text line. If you setup the line as *word*, then mIRC will look
for the word no matter where it is in the sentence.
The format of word* means that mIRC only watches for the word to be at the beginning of the text line,
and lastly, word (all by itself), means that mIRC only watches for that word to be on a text line
all by itself.
Next we see :#learnin: -- this tells the event line which channel to monitor for the test listed. This can also change, as needed.
For instance:
And lastly we have :/notice $nick Hey, sounds like fun, want to play a game?
Clear as mud yet? You can learn a lot from the help files and FAQ's. Take some time to read up and learn more about remotes. Once you've tried it a few times, you'll get it.
*hello* :this mask will react any time the word hello is seen anywhere in any line.
Some examples of lines we may use in our scripts.
on 1:TEXT:*shit*:#:/kick $chan $nick No swearing.
on 1:Text:hello*:?:/msg $nick hello there.
on 1:Text:*help*:*:/msg $nick Hi what is the problem?
The on ACTION and on NOTICE events use exactly the same format as on TEXT, and trigger on an action and on a notice event respectively.
on 1:ACTION:boo:#:/msg $chan Aha, I see we have a ghost among us.
on 1:NOTICE:*:?:/msg $nick I'm AFK, back in a moment!
You can do more events adding variables and parameters, but that will be discussed later as we get more into scripts.
CTCP stands for Client-To-Client-Protocol which is a special type of communication between IRC Clients.
By creating CTCP events, you can make your mIRC react to commands or requests from other users.
Go to Remote, Listen, check CTCP to enable them.
CTCP events use the format: ctcp <level>:<matchtext>:<*|#|?>:<commands>
Here is an example of one ctcp reply I have made:
If you type /ctcp lilbug` gender you would see this:
Maybe this looks a bit complicated so lets try an easier one using the format above:
Note 1 is the level, lowest level so all users can access it
Now try /ctcp lilbug` country, and you see this: [lilbug` COUNTRY]-lilbug`- I am from Canada.
Remote, Listen, Raw:
Raw events are special IRC Server messages that are identified only by a number.
The format of the raw event definition is: raw <numeric>:<matchtext>:<commands>.
As a quick example, the following script filters out the channels list numeric when you use the /list command. raw 322:*mirc*:/echo 5 $1- This script matches numeric 322 which is the channels /list numeric and if the line returned by this numeric has the word mirc in it, it is printed out in the status window.
You can prevent most raw server messages from printing out their default text by using the /halt command. More information on raw servers can be found by reading this document, RFC 1459.
The Internal Address List: mIRC maintains an internal address list of all users who are currently on the same channels as you.
A user's address is added to the list either when they join the channel, send a message to a channel, or make a mode change.
A user's address is removed from the list when they are no longer on any of the channels which you are currently on.
Well guess thats as far as I can go for now without getting too much into scripts.
I hope i haven't totally confused you with all this information, any questions about any of this,
just check out the mirc help files, much more information there to read!
Have fun, cya in #B
Lilbug` Mabel
![]() |