mIRC Home    About    Download    Register    News    Help

Print Thread
Custom aliasses. #142999 20/02/06 06:45 PM
Joined: Feb 2006
Posts: 7
B
bl44t Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Feb 2006
Posts: 7
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

Re: Custom aliasses. #143000 20/02/06 07:11 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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)

Re: Custom aliasses. #143001 20/02/06 07:19 PM
Joined: Feb 2006
Posts: 7
B
bl44t Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Feb 2006
Posts: 7
Ok but if you do <space>/test 12345 it returns /test 12345. I didnt knew about the double / though, thanks!

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


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: Custom aliasses. #143003 20/02/06 07:23 PM
Joined: Feb 2006
Posts: 7
B
bl44t Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Feb 2006
Posts: 7
Say that to the person that doesnt have much expirience(?) with mIRC/IRC. They like their spaces wink

Re: Custom aliasses. #143004 20/02/06 08:21 PM
Joined: Aug 2004
Posts: 24
W
Wwhat Offline
Ameglian cow
Offline
Ameglian cow
W
Joined: Aug 2004
Posts: 24
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.

Re: Custom aliasses. #143005 21/02/06 09:35 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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)

Re: Custom aliasses. #143006 22/02/06 01:55 AM
Joined: Oct 2005
Posts: 21
P
poiuy_qwert Offline
Ameglian cow
Offline
Ameglian cow
P
Joined: Oct 2005
Posts: 21
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


- poiuy_qwert
Re: Custom aliasses. #143007 22/02/06 05:22 PM
Joined: Feb 2006
Posts: 7
B
bl44t Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Feb 2006
Posts: 7
Haha, yeah correct smile.

Re: Custom aliasses. #143008 23/02/06 10:03 PM
Joined: Dec 2002
Posts: 5,150
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,150
Thanks I've fixed this for the next bugfix release.

Re: Custom aliasses. #143009 24/02/06 07:22 PM
Joined: Feb 2006
Posts: 7
B
bl44t Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Feb 2006
Posts: 7
Glad I could help.