mIRC Home    About    Download    Register    News    Help

Print Thread
#142999 20/02/06 06:45 PM
B
bl44t
bl44t
B
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

#143000 20/02/06 07:11 PM
D
DaveC
DaveC
D
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)

#143001 20/02/06 07:19 PM
B
bl44t
bl44t
B
Ok but if you do <space>/test 12345 it returns /test 12345. I didnt knew about the double / though, thanks!

#143002 20/02/06 07:19 PM
Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
A simpler solution is to just not type spaces between / and the command wink

#143003 20/02/06 07:23 PM
B
bl44t
bl44t
B
Say that to the person that doesnt have much expirience(?) with mIRC/IRC. They like their spaces wink

#143004 20/02/06 08:21 PM
W
Wwhat
Wwhat
W
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.

#143005 21/02/06 09:35 AM
D
DaveC
DaveC
D
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)

#143006 22/02/06 01:55 AM
P
poiuy_qwert
poiuy_qwert
P
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

#143007 22/02/06 05:22 PM
B
bl44t
bl44t
B
Haha, yeah correct smile.

#143008 23/02/06 10:03 PM
Joined: Dec 2002
Posts: 3,853
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 3,853
Thanks I've fixed this for the next bugfix release.

#143009 24/02/06 07:22 PM
B
bl44t
bl44t
B
Glad I could help.


Link Copied to Clipboard