mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Re: alias -s hello* #104973 15/12/04 08:13 PM
Joined: Oct 2004
Posts: 73
M
Mardeg Offline
Babel fish
Offline
Babel fish
M
Joined: Oct 2004
Posts: 73
If it suits you to call the "all-in-one" alias as an identifier, you could then use $hello().property method without affecting the $1- parameters, ie:
Code:
 
alias hello {
  if ($isid) goto $prop
  else {
    return
  }
  :hi
  < deal with $1- >
  halt
  :alan
  < deal with $1- >
  halt
  :cat
  < deal with $1- >
  halt
  :world
  < deal with $1- >
}

Just a thought. Haven't tried it myself, and apologies for the use of goto smile

Re: alias -s hello* #104974 15/12/04 10:57 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
there not the same name, thats what i was saying, one is /hello.hi & one is /hello.*

I notice somehere back that . (dot) creeped into how this was percived to work, i dont know if that was addopted as the default idea or not, but i certianly would be insulted about mircs behavour if a command "/recovernick nick pass" was overwridden by "alias rec* { say In Regard to $1 : $2- }"

First come first served isnt really going to work for anything in the real world ex....
"give my car to the guy in the blue shirt, red hat, named Bob whoe works at the Garage on 5th and main"
"i gave your car to a guy in a blue shirt"
YOU DID WHAT!!!!!!

Re: alias -s hello* #104975 16/12/04 03:23 AM
Joined: Aug 2004
Posts: 147
N
nalAAlan Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Aug 2004
Posts: 147
Well what I'm saying is:

Code:
alias -s hello.* {
  echo -a $1 : $2-
}
alias hello.my.mentality {
  echo -a $1-
}


If you did /hello.my.mentality it would call the second alias, because hello.my.mentality overrides hello.* But if it was done "first come first serve" then it would call the first alias because it was first. Maybe there would be a option or something...

Re: alias -s hello* #104976 16/12/04 11:33 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
I think the best way would be how alan said, eg:

Code:
alias -s hello.* {
  echo -a hello $1
}
alias hello.world {
  echo -a hello world
}


/hello.world would call hello.world, not /hello.*.
If /hello.world isn't found, then instead of throwing an error (like mIRC normally does), it would call /hello.*.


New username: hixxy
Re: alias -s hello* #104977 16/12/04 04:41 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I give up people, i give up, im sure im the one who said it would have to look for the exact alias first, then come back if it didnt find it, i was just saying i thought "first come first serve" was a pretty scary idea, (amagine if someone did " alias * { } " LOL ok maybe you have to have a letter first a* eeek! ).

Re: alias -s hello* #104978 16/12/04 09:34 PM
Joined: Aug 2004
Posts: 147
N
nalAAlan Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Aug 2004
Posts: 147
I haven't been able to understand about 90% of your posts, but we are saying that the exact alias should override the wildcard alias.

Re: alias -s hello* #104979 17/12/04 01:53 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
I haven't been able to understand about 90% of your posts, but we are saying that the exact alias should override the wildcard alias.


wow
now i look back and check what i said and...
(from my first message on this)
Quote:
Also since ALIAS BLAH.one is a legal alias name, the alias locator would need to make a full pass over all alias and remotes files, looking for BLAH* and also BLAH.one, since it would only run BLAH* if no blah.one alias existed.


hmmm seems i said it also to u guys.

Page 2 of 2 1 2