Internet Relay Chat - Everything you need to know about IRC, chatting online, mIRC, PIRCH, #Beginner Newsletters, being an Op (@) or Voice (+V), meeting others worldwide -- it's fun!

#Beginner Homepage - Undernet - Internet Relay ChatMascot - Team Geese
  | Home  | Gallery  | IRC Info  | Op/Voice Info  | Just for Fun  | Sitemap  | Guestbook  | Search  |Forum  |
#B Home

Gallery

IRC Info
       IRC Class
       mIRC
         . Aliases
         . Commands
         . Popups
         . Remotes
       PIRCH
         . PIRCH Pils
       Abbreviations
       Channel List
       Colors
       DCC Trouble
       Emoticons
       Etiquette
       FAQ's
       History of IRC
       Help Files
       IRC Class
       IRC Clients
       IRC Glossary
       IRC Tips
       IRC Commands
       IRC URL's
       Keyboard Tips
       Need Help?
       Quit Messages
       Scripts
       Security
       Server Info
       Sounds
       Trojans
       Tutorials
       Undernet
         . U-net History
       User Modes
       Useful URL's
       Virus Alerts *
       Viruses
       Worms
       Web Glossary

Op/+V Info

Just For Fun

Visitor Stats

Sitemap

Guestbook

Send Mail


SEARCH


 

 

 

 

 

 

 

 

 

 
IRC Information.....

Remotes - What They Are and How to Make Them - mIRC Specific
A PIRCH tutorial will be coming soon

Remotes:

The remote allows you to create scripts that react to IRC events, such as when a user joins a channel or sends you a message. This tool is the most complex part of IRC and to use it you must already know how to use IRC Commands, how to create Aliases, and how to use Variables and Identifiers. Remote/listen menu includes ctcps, events and raw, these must be turned on for your scripts to work.

The remote consists of three distinct sections: Scripts, Users, Variables.

The Events and CTCP Events sections of this tutorial will give you additional examples.

 Scripts

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.

User List

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!

Variables

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
-- sets %name2 to the nick of the person who activated the event

%count = 1
-- sets %count to equal 1

%number = $nick($chan,%count)
-- sets %number to equal the %count nick in the active channel (%count would be a number)

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.

Events

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.

Example of an ON TEXT line:

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:
:?: is used for any private message
:#: is used for any channel message
:#channelname: is used on the specified channel
:*: for any private or channel message

And lastly we have :/notice $nick Hey, sounds like fun, want to play a game?
This is the message relayed to the user that trigger the event. :)

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.
     hello* :this will trigger only if the line STARTS with the word hello
     *hello :this will only work if the line ENDS with the word hello
     hello :this will work only if hello is the ONLY word on the line

Some examples of lines we may use in our scripts.

on 1:TEXT:*shit*:#:/kick $chan $nick No swearing.
This listens on any channel for any line containing with the word shit and kicks the user who said it off the channel.

on 1:Text:hello*:?:/msg $nick hello there.
This listens for any private message starting with the word hello.

on 1:Text:*help*:*:/msg $nick Hi what is the problem?
This listens in all private messages and all channels for the word help and sends a msg to the nick who said it

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.
This listens on any channel for an action that contains the word boo and responds accordingly.

on 1:NOTICE:*:?:/msg $nick I'm AFK, back in a moment!
This listens for any private notice and responds with the message that you're away from the keyboard.

You can do more events adding variables and parameters, but that will be discussed later as we get more into scripts.

CTCP Events

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:
ctcp 1:gender:?: notice $nick I am Woman :) | sound #babe woman.wav

If you type /ctcp lilbug` gender you would see this:
     [lilbug` GENDER]-lilbug`- I am Woman :)
     and also hear the song woman if you had it on your hard drive.

Maybe this looks a bit complicated so lets try an easier one using the format above:
Format: ctcp <level>:<matchtext>:<*|#|?>:<commands>
Put this into a remote file:

ctcp 1:country:?: notice $nick I am from Canada

Note 1 is the level, lowest level so all users can access it
-- matchtext is country as we will type /ctcp lilbug` country for the reply
-- We use ? as that is for any private message
-- notice is next as this is how we want to send it
-- $nick means sent back to person requesting the ctcp
-- and finally the message to be relayed back.

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

 


Site last updated: Monday, September 02, 2013
line
  Webdesign & development by IRC Beginner.com
  All rights reserved © 1998-2005