Last Updated: February 25, 2016
·
1.141K
· jordanmussi

IRC /welcome

Introduction

When I join a channel I like to say hi to everyone. I usually type in /me waves to all in #chan.
What we can do is make ourselves a /welcome command. When we send this we can either have it replaced with one string or have a random welcome phrase. This will be done using aliases.

How to do it

To use these aliases, we first need to open aliases.ini.
In your mIRC window open the Scripts Editor, which is located in the tools menu, by pressing ALT + R.
Click the Aliases tab (far left) and at the bottom paste the following code.
/welcome { /set %MeJoin.rand $rand(1,5) if (%MeJoin.rand == 1) { /describe $chan waves to all in $chan } if (%MeJoin.rand == 2) { /msg $chan Hello all. } if (%MeJoin.rand == 3) { /msg $chan Hello. } if (%MeJoin.rand == 4) { /msg $chan Hi all. } if (%MeJoin.rand == 5) { /msg $chan Hi. } /unset %MeJoin.rand }
So, with that code saved, now when we send /welcome to the channel it will be replaced with one of the 5 specified options.

But if you only want one phrase to replace /welcome use the following code.
/welcome /describe $chan waves to all in $chan
This code will send /me waves to all in #chan.

Finer Details

So you want to know what goes on in this snippet?
/set %MeJoin.rand $rand(1,5) This sets the variable %MeJoin.rand to a random number between 1 and 5. This can be changed if you want more different phrases.
if (%MeJoin.rand == 1) { /describe $chan waves to all in $chan } If the random number turns out to be 1 then this sends /me waves to all in #chan to the channel.
/unset %MeJoin.rand This isn't really needed but I like to delete variables once I have finished using them.

To add another message to the list just increase the number. For example I have just pasted the code above and want another message to be /me walks into #chan then we add a new line to that block before we unset the variable.
This new line would be: if (%MeJoin.rand == 6) { /describe $chan walks into $chan }
We would then have to change /set %MeJoin.rand $rand(1,5) to /set %MeJoin.rand $rand(1,6) because we now have a 6th option.

No everyone in the channels you join will know you have arrived! Happy chatting.