The mIRC chat has been going well and it's good to hear that everyone is enjoying it. Though I have noticed some confusion with how to use things. So I have written this guide here, hoping that you all can use it to get into the channel and take part in the festivities.
Getting Started[note=shortcut]At the time of writing this (July 13th 2008) mIRC is at version 6.32. If you are feeling lazy you can click here (http://dw.com.com/redir?edId=3&siteId=4&oId=3000-2150_4-10001733&ontId=2150_4&spi=f1550ab13201524ef9ff03ea9087f890&lop=link&tag=tdw_dltext<ype=dl_dlnow&pid=10845072&mfgId=50355&merId=50355&destUrl=http%3A%2F%2Fwww.download.com%2F3001-2150_4-10845072.html%3Fspi%3Df1550ab13201524ef9ff03ea9087f890%26part%3Ddl-mIRC) to get it directly but take note that the download link may stop working after awhile (or the version might update) so there are no guarantees it's still there at the time you are reading this.[/note]
First thing's first, we need to download the program. So head on over to here (http://www.mirc.com/get.html) and hit the download mIRC button. That should take you to a mirror site which you can download it from. Once there hit the Download Now button.
Just hit save file and download it. After its done you should have a .exe file on the desktop (or wherever you saved it) so click that and let it open. Just click next then I agree and then next again. Let it install and then you are good to go.
Setting UpNext thing we need to do is get setup so open up mIRC (if you didn't tell it to give you a desktop shortcut you should be able to find it in C:\program files\mIRC). If a little about mIRC box pops up talking about registering it just hit continue. Despite what it looks like you don't have to register mIRC (it will keep working past the 30 day trial date it will just nag you a little each time you open it).
[note=misc]
Other things that you can setup include:
- Connect > Options > Reconnect on Disconnect: automatically reconnects to the server if your connection times out.
- Connect > Options > Check for timed out connection: automatically checks periodically to see if you are connected.
- Connect > Options > Connect on Startup: will connect to the server each time mIRC is accessed.
There are more advanced things you can do like changing your timestamp or logging chats but we won't worry about that right now.
[/note]
Once it is up you should have a little server window pop up (if not hit the hammer and file icon, open up the connect tab and hit servers). Anyhow you want to click on add. In the description just put something like otherworlders or CBG to remind you which server it is. In irc server we put in
irc.otherworlders.org. Just keep
port as 6667 and leave the rest blank and you are good to go. Next up we are going to want to go ahead and setup our info so go over and click on the connect tab itself. Put something into full name it can be anything that is 50 characters or less (it just shows up after your hostmask in a whois query; more on that later). Next put something in for email, I opt for a fake email for securities sake (mine is just nomad at nomad dot com). Finally put in something for nickname and alternative (nick is of course your username in the channel while alt is what your username will change to if someone else is on your primary name).
[note=using /ns]
As a side note remember that using /ns instead of /msg nickserv doesn't work in all chat clients. It does however work in mIRC.
[/note]
ConnectingNow for the moment of truth. Close out of the options menu and hit the little lightning bolt icon in the upper left of the main window. It should run through its little thing and connect you. You will know you are connected when a whole bunch of text starts rolling down the screen. Now before we go any farther we want to register our nickname. This protects it so that nobody else can impersonate you or otherwise steal it. First make sure your name is what you want (it will show up on the very top; should look something like Status: <your nickname> etc etc...) then what you want to do is type in the following:
[ic=registering]/ns register <password> <email>[/ic]
I don't think this server requires you to confirm with an email but just in case it does you will want to be sure to put in a real email that you can check (if it does just follow the instructions it gives you). Once you are registered you will need to log in when you connect to mIRC. This is done like so:
[ic=logging in]/ns id <password>[/ic]
So don't forget that password. Once you are in you will want to access the cbg channel. To do this simply type in
/join #thecbg. If you want to auto-join on each connect you can do so via the mIRC favorites menu. Hit the icon up top that looks like a folder with a #+ on it. Click on add and put #thecbg into the channel box. Select the join on connect check box, hit ok, and you are ready to go.
Getting aroundSo now that you are in you can feel free to chat with friends (which is as simple as typing and hitting enter). There are a few commands though that you may find useful.
[ic=general commands]
*/me <action> = you do an action (for example /me says hi would say "yourname says hi" in the channel.
*/whois <nick> = gives you information about the username.
*/notice <nick or #channel> = sends a notice to the user or channel.
*/msg <nick or #channel> = sends a message to the user or channel.
*/query <nick> = sends a private message to the user and opens up a chat window with them.
*/ns ghost <nick> <password> = kicks your name off the server if you reconnect to discover that the server doesn't yet realize you disconnected.
*/quit <message> = message is optional; makes you disconnect and if a message was specified sends it to the channel.
*/server -m <server> = connects you to the specified server (note that -m is optional, it simply tells mIRC to keep open the current server window and not close it when you open up the new server connection).
[/ic]
Scripting in mIRC
I am not going to get too in depth here. Suffice it to say that I will give you enough to get on your feet. From there you can use mIRC's help files (type /help in mIRC) and online help sites (www.hawkee.com (http://www.hawkee.com/phpBB2/index.php?c=3) is a good one).
Why?
mIRC has a powerful scripting language built into it known as mSl (mIRC scripting language). It is based off the even more powerful PHP scripting language and offers myriad things to do with it. The reason I have this section here is so that even if you don't get into it you will have a handle on it which will make your life a whole lot easier.
Getting Started
Once you have mIRC open you will need to open up the mSl remote editor. This is done by holding down alt + r. This should open up a menu area with several tabs and the first time you do this you will likely default to the aliases tab. Since this is a good foundation we will start here.
Coding
So now we will get down to business. Before we begin though, there are a few basic commands we should go over.
[ic]on TEXT:
the on TEXT event triggers anytime someone says something in a chat window or a private chat window that you are in. It is laid out like so:
if (ishmayl == turtle) { offer cabbage }
It seems fine at first, but what happens if vreeg isn't drunk? Now technically if that was true mIRC would just halt the script and nothing would happen. But doing that can leave a script looking unfinished and faulty so we use Mr Else.
if (vreeg == drunk) { hide wine }
Else { bring out the wine! }
So let's look at what we have so far:
if (vreeg == drunk) {
hide wine
}
elseif (vreeg == drinking) { join in }
else { bring out the wine! }
}
Using || and &&:[/u]
What if you need the script to check and see if multiple things are true? Well this is where these guys come in. They work like this:
if (vreeg == drunk) && (snargash moonclaw == wall of text) {
hide wine
}
elseif (vreeg == drinking) || (ishmayl == cabbage dunking) { join in
}
else { bring out the wine!
}
}
[/ic]
[ic]Making things do stuff:[/u]
So we now have the basis of our script and we need to tell it what to do when it meets those conditions. For this there is a list of commands that can come in handy.
$1/$2/$3/..... :
These grab words typed for later use. They grab them off the original line typed. So then if your activating word was !hello * and someone typed "!hello to everyone in the cbg" then it would capture them as the following variables:
$1 = !hello
$2 = to
$3 = everyone
$4 = in
$5 = the
$6 = cbg
so in layman's terms they represent the words and their position on the line. You can also do words after a point using a - after the number. So the $3- for the above would be "everyone in the cbg" the $5- would be "the cbg" and so on.
$nick/$chan:
Similar to the above except they have semi-fixed amounts.
$nick is the username of the person that typed it. So if you had:
<Wicked_Troll> I like leather
$nick would be Wicked_Troll
$chan is the channel that it took place in. So if Wicked_troll said "I like leather" in #thecbg, then $chan would equal #thecbg.
msg/notice/describe:
These commands are used to actually do/say things. Each one does a different thing.
msg = the equivalent of typing /msg. It lets you tell a script to make you say something. So msg $chan delicious wine would message the chan that the script was activated in with a scrumptious "delicious wine".
notice = the same as /notice. It sends a mini-private message to someone that will pop up on all their windows telling them something. So "notice $nick I saw that" would send a notice that would pop up in all their chat windows saying "I saw that" when they activated the script.
describe = the same as the me command. It tells people an action. So using describe $chan laughs at you all would display in the channel as "<your name> laughs at you all".
Looking at the if statements there are also a few that will come in handy.
ison/isop/isvoice/etc:
There is a huge list of these and if you want to see them all you just have to type /help if then else in mirc and scroll down in the help window. We will just deal with the main ones.
ison = this is written out as "if (<person> ison <channel>)" and checks to see if the person is on the channel before running the script. So "if ($2 ison $chan) would check to see if $2 (the second word typed in a command) is a user that is on the channel that the command was typed in.
isop/ishop/isvoice = this checks to see if the person is an op/hop/voiced member on the channel. It is written out as "if (<person> isop <channel>). So then you could have "if (ishmayl isop #thecbg)" and it would check if ishmayl was an op (admin type user with a @ at the front of their name) on the channel.
The above can be used with the lovely || and && commands. As an example this could be typed out as: "if (<person> isop <channel> || <person> ishop <channel>)". This would check to see if the person was an op or half op on the channel in question. Furthermore we can use either != or ! if we want it to check if something isn't true. As an example:
"if ($nick != ishmayl)" would check to see if the person activating the command wasn't ishmayl. If we are using an is(something) command we prefix it with a ! to do this. So "if ($2 !ison #thecbg) would check to see if the second word said in the command was not a user currently on #thecbg.[/ic]
[note=null]
Just as an FYI that $null that you see stands for null/nothing/zilch. It means that the value supplied is equal to nothing at all. So if someone typed !hello with nothing after it then the script would recognize that as !hello $null and activate the proper command. We use it there because technically " " qualifies as nick that could be on the channel even though in actuality it couldn't. Using it like that avoids an error.
[/note]
[ic]Aliases[/b]
Aliases let you activate your scripts yourself and function much like macros in other programs. There are two forms of aliases:
Simple Aliases:
These are simple aliases generally one to a few lines long. To create them you will go to your aliases section. So open up the script editor with alt+r and click the tab up top that says aliases. There should already be a few there so you can right off see a general idea of format.
To create one of these we will put in /<activating text> <command it performs>. So if you wanted to be able to say "Hello everyone" just by typing a single command you could put in /hi /msg $chan Hello everyone. Then activating it would be as simple as typing /hi and hitting enter.
Scripted Aliases:
These are the more advanced ones that are full blown scripts in their own rights. You put these in the same place as a normal script, under the remotes tab. So let's open that up and get started.
The commands for beginning an alias is alot simpler then an on TEXT style script. All it is, is Alias <aliasname> { <code goes here> }. So alias hello { code } would run the code when you typed /hello. Other then that things work similar to an on TEXT with a few changes (these changes hold true in both types of aliases).
Alias Commands:
$1 not $2:
When mIRC sees something beginning with a / it marks it as a command. This means it doesn't count it as an actual word. So if you type /hello there ishy unlike in an on TEXT event $1 is equal to there and $2 is equal to ishy (not $2 for there and $3 for ishy). mIRC doesn't include the alias as one of the words.
$?*!="message":
This one will display a prompt box. This is useful if you want to enter data without typing out a big long alias. If you just use $? it will give you a basic text box that asks you to Enter a reply. To modify that message we use the ="text" part. So $?="Put some text here" would pop up a text box with the text "Put some text here" on it. The * is a censor so that anything typed into the text box is starred out. Useful for password related functions. That is done as $?*="text". The last function is the ! which gives a yes no dialog. So $?!="Continue?" would pop up a yes/no box labeled with a "Continue?" on it. If you hit yes it will return the value of $true while no shows up as false. This can be used with our old friend the "if (this == that)" statement in conjunction with some basic variables.
$!:
This is a variable that represents the text just entered into the text box. So if you had a text box that asked if you liked pie and you typed in yes and hit enter. Then $! would equal yes and could be retrieved with the $! command.
Other then these commands aliases work pretty much like the on TEXT (except the person running them can actually activate them unlike on a remote script).[/ic]
Did you mention that you can simultaneously connect to multiple servers?
This is very good, nomad. A couple pointers:
Possibly mention how to set up #theCBG (and any other channels you would like) as favorites that you automatically log into.
Show how to script in under Remote Scripts an automatic password writer, so when you log in with a registered name, it will automatically send your password (in case you forget).
I assume in the aliases section, you will show us how to write up a few ourselves? Because I would like to personally know how to do one particular thing that I haven't been able to figure out yet.
Also good to note, is that for those who don't want the extra program, www.mibbit.com is a browser-based alternative, that also features auto-translators for several languages (both your text to other languages and other text to your language of choice). You can just use the Otherworlders server on there and decide which channels you want to use.
Another note - some programs (if you're not using mirc) don't accept the "/ns identify
" message, you have to type "/msg nickserv identify " instead.
QuoteDid you mention that you can simultaneously connect to multiple servers?
This is very good, nomad. A couple pointers:
Possibly mention how to set up #theCBG (and any other channels you would like) as favorites that you automatically log into.
Show how to script in under Remote Scripts an automatic password writer, so when you log in with a registered name, it will automatically send your password (in case you forget).
I assume in the aliases section, you will show us how to write up a few ourselves? Because I would like to personally know how to do one particular thing that I haven't been able to figure out yet.
[/quote]
Another note - some programs (if you're not using mirc) don't accept the "/ns identify " message, you have to type "/msg nickserv identify " instead.
[/quote]
True but this was written for mIRC. However I will add that in as a side note.
Update: added the guide.
Technically I cheated as I used one of my old guides but it should work just fine. Please tell me if there is anything else you want to learn about and I will get you going.
A little treat for you all...
Commands:
/tavern - echoes to your mIRC the latest tavern post and who it was by (now with proper showing of emotes).
To install just hit alt+r in mirc then copy/paste it into the remotes tab and save it in your default mIRC directory (making sure it saves as a .ini file). Be sure to replace all (dot)'s with .'s I had to do that because of the forums tendency to auto change url's to a url link.
[spoiler=warning extra wide text]
alias Tavern {
if ($sock(tavern)) .sockclose tavern
sockopen tavern www(dot)thecbg(dot)org 80
}
on *:SOCKOPEN:tavern: {
sockwrite -nt $sockname GET /news.php HTTP/1.1
sockwrite -nt $sockname Host: www(dot)thecbg(dot)org
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:tavern: {
if ($sockerr) {
echo -a Socket Error: $sockname $+ . Error code: $sockerr
halt
}
else {
var %sockreader
sockread %sockreader
if (*<div style='border : 0* iswm %sockreader ) {
tokenize 44 %sockreader
var %name $remove($right(%sockreader,30),</a>,</b>)
var %pos - $+ $calc($pos(%name,'>,1) + 1)
var %name $right(%name,%pos)
sockread %sockreader | sockread %sockreader
tokenize 44 %sockreader
var %text $remove(%sockreader,<a href="," >URL</a>,<br />,<img src=',http://www.thecbg.org/e107_images/emotes/default/,alt='' style='vertical-align:middle; border:0' />, e107_images/emotes/default/,')
var %text $replace(%text,0smile.png,8],0sad.png,8[,0tongue.png,8P,band.gif,*band*,turtle.png,*turtle*,blahblah1mz1.gif,*blah blah*,0angry.png,>8[,axe.gif,*axe murderer*,bangin.gif,*hammer strike*,0censored.gif,>8X,blowup.gif,*exploding*,0confused.png,8S,0cry.png,*crying*,0dead.png,X_X,0dodge.png,o_O,demon.gif,*demon*,detective.gif,*detective*,ditto.gif,*with stupid*,0ill.png,*sick*,dots.gif,*...*,drunk.gif,*drunk*,fencing.gif,*fencing*,fluffy.gif,*bunny*,google.gif,*google*,happybday.gif,*happybday*,heart.gif,<3,idea.png,*idea*,0mad.png,>8|,L33T.gif,*leet*,lurk.gif,*lurk*,0mistrust.png,8/,0neutral.png,8|,morons.gif,*morons*,muffy.gif,*monster*,0rolleyes.png,*eyeroll*,nopity.gif,*no pity*,offtopic.gif,*off topic*,ontopic.gif,*on topic*,ph34r.gif,*ninja*,pokey.gif,*poke*,protest.gif,*protest*,pwned.gif,*pwned*,question.png,*question*,rambo.gif,*rambo*,0shades.png,B],0shy.png,*shy*,0special.png,*special ed*,soap.gif,*soapbox*)
var %text $replace(%text,0suprised.png,8O,0wink.png,;],twocents.gif,*2 cents*,wtf.gif,*wtf*,yummp4.gif,*yummy*,0amazed.png,8D)
echo -a %name $+ : %text
sockclose tavern
}
}
}
[/spoiler]
You could always use $chr(46) to create the dots instead.
(Or whatever mirc's funny syntax is)
Is it possible to have a script that activates when someone joins the CBG channel?
@sparkletwist - no I was talking about how the forums automatically change things like www(dot)thecbg(dot)org into things like this -> www.thecbg.org
@higgs - you sure can, you just have to use the on join command
Quoteon *:JOIN:#thecbg: {
msg $chan Well hello there $nick $+ .
}
The above will message anyone joining the channel with "Well hello there <their name>."
Yes, I know. My point was that if your code used $chr(46) instead of just writing (dot), it'd work in mIRC without modifications and not require users to change anything by hand.
Hey can we put a ban or limitations on the use of scripts?
Atlantis has a script right now that triggers on the letter I. An I anywhere in the a sentence triggers it. It is getting very annoying. The worst part is that he's away from keyboard right now, those trying to chat have to suffer with the annoying script.
It wouldn't be so, bad if I could ignore atlantis, but for some reason everything I use the ignore command it comes back with unknown command.
If otherworlders has a botserv network you could designate a bot and turn on its spam filter. Other than that I can create an ignore script or a kick script (if ishy wants to moderate that stuff).
Quote from: PoseidonAtlantis has a script right now that triggers on the letter I. An I anywhere in the a sentence triggers it. It is getting very annoying. The worst part is that he's away from keyboard right now, those trying to chat have to suffer with the annoying script.
Oh dear.... I'll look into that, Poseidon.
Folks, this stuff is supposed to be for fun more than anything else, so if it's being abused, the abusers will have to stop.
Quote from: IshmaylOh dear.... I'll look into that, Poseidon.
Folks, this stuff is supposed to be for fun more than anything else, so if it's being abused, the abusers will have to stop.
He stopped the script and I wouldn't want to have a ban on someone having fun. Making a simple one that triggers on a commonly typed phrase, word, or letter is fine for a short period. However the problem comes when they leave it on after the initial HA HA....
Without an OP in the chat there is no way to stop the script.
What made the experience worse was the fact my ignore doesn't work in the channel for some reason (not using mIRC). So while I could warn others of the active script, and that they could ignore it, I was still being pummeled by it (especially by some of those triggering it purposefully :P). (I probably wouldn't have said anything if ignore worked)
I just ask that people have fun, but do not make things like this linger. Please.
That's a good way of putting it Poseidon - I wouldn't ban anyone for something like that anyway, but if they had left and I was there, I would have at least booted them from the channel until they could come back and disable it! ;)
Is there a way to search for a portion of a nick, in case you can't remember the entire thing?
Depends on what you mean by search. However you can use wildcards and regex to do such a search function (by only inputting part of a word)
I'm familiar with wildcards and all that *, but what's regex?
Regex stands for Regular Expressions. It is an advanced search language that many programming languages incorperate. It lets you do alot more than a simple wildcard search.
As an example say you wanted to search for a smiley face you could use regex to tell it to look for some eyes (a colon) followed by certain symbols. In regex this would look something like (and I am greatly simplifying it) :[)(/|OP3] so it would return true for a : followed by any of the symbols between the ][ brackets. Of course you also have to put into account proper escaping (since some of those symbols are regex commands you have to precede them with a slash to tell regex not to consider them as such) but overall that's the gist of it.
So, in short, how would I use this to do a search for, say, *Dwarf, or elf*?
Well if you just wanted to search for dwarf or elf in a name you could simply use wildcards. Say you wanted to say something to someone who joined the channel you could do:
[ic]
on *:JOIN:#:{
if (dwarf isin $nick) { msg $chan Hello oh drunken one. }
elseif (elf isin $nick) { msg $chan Hello nature lover. }
}
[/ic]
Note that this code is totally untested by me, just giving an idea of how to use the isin wildcard to check. Isin obviously checks to see if string 1 is inside string 2 (as an example drag isin sdragon is true). If you wanted to do variations (elf,elves,eladrin,drow,etc) you could use regex (or a whole bunch of if statements if you are lazy).
Actually, I meant server-wide. In case I want to find somebody I was supposed to meet on a certain server at a certain time, but can't quite remember exactly what their nick was. Is there any way to do that?
Not unless you have access to the server memberlist. That's something only network administrators (and sometimes irc operators) can look at.
You can type /who ** and get a list of everyone who isn't set invisible... but that's hardly anyone these days.
Bumping this (for shame that ishy hasn't stickied it yet)
I can't seem to get the register to work? Whenever i write /ns and then register and password and email it just says: "NS Unknown command"
try using /nickserv instead of /ns.
still nothing. But it doesn't write out that Status: <nick> you mentioned.
Now it says you're not on a channel instead
Quote from: Prone To WanderingBumping this (for shame that ishy hasn't stickied it yet)
Bah! His Turtleness is busy!
Quote from: Cataclysmic CrowNow it says you're not on a channel instead
Are you connecting to the server first? Because you need to be connected to the server to send messages to the nickname server.
I think i got it to work. It was something with the serves i believe, so thanks for the help.
Anyway, I seem to be in the right chatroom as there are some recognizable names in the right menu bar.
Are the names there even if the user isn't on?
No Cataclysmic Crow. You have to stay connected for your name to be there. However a lot of people (Vreeg, SDragon, others) just leave there computer online and rarely log off.
Looks like you were in the right place, CC. I see you entering and leaving in my logs (I was asleep and am one of the aforementioned idlers who occasionally leave their computer on).
Well good to hear you're able to get on.
Great :)
Bump. Thank you Nomadic.
What do we do after the 30 day trial expires for the MIRC version that is provided for download on this page?
Or do we just register it (for free?)
ummm I've been unregistered...for a while....
Registering costs money.
You can however continue to use it, it just means you have to wait two minutes (one minute each, for two screens to click a button on each) before mIRC is started up.
You don't have to wait two minutes. Yea mIRC is nagware but you have to wait 15 seconds for both button clicks (not 2 minutes).
I thought it was a minute for each.
nah, I just timed it... its 15 seconds max
Thank you for the information.
-LD.
Relevant: no font says "computer" nearly as much as Mono Sans.
Bump.