mIRC Homepage
Posted By: bl44t Custom aliasses. - 20/02/06 06:45 PM
If you have a custom alias like /test, and put a space before or right after the / then it will evaluate the alias 2 times.

This sounds a bit unclear so I'll give an example.

Code:
alias test echo -a $1-


Now enter <space>/test in your editbox. It will return /test in the active window. Same when you try /<space>test. Only this will give test in the active window. So the command will be $1 and the rest will be $2-. I don't know with you guys but this has a huge effect on most of my commands..

I dont know if this is really a bug but I post it anyway.


Regards..

P.s first post
Posted By: DaveC Re: Custom aliasses. - 20/02/06 07:11 PM
Loks like it is a bug (6.17)

It doesnt evaluate it twice as far as i can see but this occurs

/test 12345
12345

/ test 12345
test 12345

// test 12345
12345

In the center example, it appears the pharsing of the line for $1- is bugged, in that it has seen TEST the alias name as $1

* note its gone in //, so as a solution untill fixed you could use // (unless you dont want things oin the line to be evaluated)
Posted By: bl44t Re: Custom aliasses. - 20/02/06 07:19 PM
Ok but if you do <space>/test 12345 it returns /test 12345. I didnt knew about the double / though, thanks!
Posted By: qwerty Re: Custom aliasses. - 20/02/06 07:19 PM
A simpler solution is to just not type spaces between / and the command wink
Posted By: bl44t Re: Custom aliasses. - 20/02/06 07:23 PM
Say that to the person that doesnt have much expirience(?) with mIRC/IRC. They like their spaces wink
Posted By: Wwhat Re: Custom aliasses. - 20/02/06 08:21 PM
wtf, I have been using mirc for years and never typed a space between / and the name of my aliasses, and I typo on almost every line so it can't be that.
Posted By: DaveC Re: Custom aliasses. - 21/02/06 09:35 AM
try this im writing it here and so havent tested it

on *:input:*:{ if ((/ * iswm $1-) && (!$ctrlenter) && (!$inpaste)) { haltdef | $2- } }

it looks to see if the line is "/ *" and if so just executes $2- as the command, this should fix the problem (i think)
Posted By: poiuy_qwert Re: Custom aliasses. - 22/02/06 01:55 AM
I found a niftly little thing you can do with this: If you change your nick to msg or notice, users can do / msg|notice Message instead of having to do /msg|notice Nick Message. smile
Posted By: bl44t Re: Custom aliasses. - 22/02/06 05:22 PM
Haha, yeah correct smile.
Posted By: Khaled Re: Custom aliasses. - 23/02/06 10:03 PM
Thanks I've fixed this for the next bugfix release.
Posted By: bl44t Re: Custom aliasses. - 24/02/06 07:22 PM
Glad I could help.
© mIRC Discussion Forums