cclogo2.gif (32918 bytes)

Remotes

Welcome to the last in the three part series on the basics of Remotes/Popups/Aliases. This should prove to be the most difficult for me to explain because remotely initiated actions for your computer by another user may not be easy to grasp... Remotes are not as easy to create or modify as aliases or popups.

As I said in part one of the series, all I can do here is to point people in the right direction. Remotes can get especially complex as the writer becomes more skilled and creates more and more. There are thousands of remote scripts out there in IRC and on the WWW.

What is a remote?

A remote is a small script that resides on your computer, and when it is activated by another user, it will carry out its commands with little or no input from you. Remotes reside in the remotes.ini file and are edited with the mIRC editor in the same fashion as aliases or popups.
A remote is activated by an action, usually text, sent from another computer. They are normally used to initiate file transfers, kick users for foul language, tell jokes, play text files, add people to user lists, etc. etc. Anything that you might want to do to people or share with people can be automated using remotes.

How does it work?

Well, lets take a common example:

I have lots and lots of kewl wav files on my computer. I am on IRC quite a bit and I like to give and get sound requests from other users. Sometimes, the other person I am chatting with and playing sound clips with does not have the same files I do. Under normal circumstances that person would have to ask me to send the sound file to them through a DCC file transfer that I would have to initiate manually. This could become cumbersome (not to mention annoying) after a while. This is where remotes come in.
I can set up a line in my remotes section to have the file sent automatically when the other person asks for it. And get this, the other person can have a line to automatically ask for it if they don't already have it!

Their line would be:

on 1:NOSOUND:/msg $chan ! $+ $nick $filename I want to hear it too!
 

My line would be:

on 1:TEXT:!Tracker*:#:/DCC SEND $NICK c:\progra~1\mirc\wavs\ $+ $PARM2

It looks pretty complicated, but it is really fairly simple when you dissect each part of the command. Lets start by looking at my line:

"on" means wait for the activating event (in this case Text)

"1" is a user level (1 is the lowest)

":" a separator

"TEXT" What type of action will trigger an event. In this case, the remote will wait for a specific text line to be entered before it will 'run'.

":" another separator

"!Tracker" This is the specific TEXT that must be typed into the channel or query to trigger the remote.

":" separator

"#" This is a wild card that says 'happens in any channel that I am in'. Alternately, a specific channel name could be specified if you wanted this remote to only work in a specified channel.

":" separator

"/DCC SEND $NICK c:\progra~1\mirc\wavs\ $+ $PARM2" This is the event that will, happen when all the other criteria have been met. Specifically, all we are doing is calling the mIRC command 'DCC SEND' and attaching all of its necessary parameters to it. They include the persons nick, the directory on my machine where the file can be found, and the file name itself. As you can see, we are using a couple of variables to fill in those blanks.

Lets look at their line:

on 1:NOSOUND:/msg $chan ! $+ $nick $filename I want to hear it too!

"on" again, wait for the specific event to happen.

"1" the user level

"NOSOUND" A mirc event. When a sound is played by someone mirc looks to see if you have that sound, if the answer is no then NOSOUND triggered.

"/msg $chan ! $+ $nick $filename I want to hear it too!" is a /msg command with some attachments. What you need to see here is that the remote is able to create the line that another user would normally have to type to activate my remote. This is the beauty of remotes.

Don't worry about the parameters, variables, and identifiers until you have a clear grasp of what remotes do. How they do it and how to build them will come much easier after that. Again, TJerk has added extensive help on remotes, user levels, identifiers, parameters etc. Also, please look on IRC itself for help and remotes by the dozen. I counted six channels one night on Dalnet alone that were devoted to remotes and scripts. I may even talk to the new Tech editor and ask if we can have a standing article for remotes. That way we can add to the archive.

Here are some of mine:

on 1:JOIN:#:/whois $nick
on 1:TEXT:*!Trackserv*:#:/fserve $nick 10 c:\progra~1\mirc\wavs\
on 1:TEXT:!Tracker*:#:/DCC SEND $NICK c:\progra~1\mirc\wavs\ $+ $PARM2
on 1:CTCPREPLY:ping*:/%time = $ctime - $parm2 | /notice $nick --== $+ $nick you have a %time second PING reply ==--
on 1:TEXT:*!pingme*:#:/ctcp $nick PING
on 1:NOSOUND:/msg $chan ! $+ $nick $filename I want to hear it too!

Happy Scripting,
-Track
 


Comments or suggestions? Please write:

TechEditor@chatcircuit.com

Email the TechEditor

[ Back To TechPage ]

[ Back To ChaTcIRCuiT ]

 

10x10space.gif (821 bytes)
purple line
IRC Info Tech Area Features Diversions F.Y.I.   About ChaTcIRCuiT Return to ChaTcIRCuiT Home Page
purple line
All Rights Reserved ChaTcIRCuiT  ©1997, 1998, 1999
webmaster@chatcircuit.com