mIRC Home    About    Download    Register    News    Help

Page 2 of 2 < 1 2
Topic Options
#104973 - 15/12/04 08:13 PM Re: alias -s hello*
Mardeg Offline
Babel fish

Registered: 30/10/04
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
  &lt; deal with $1- &gt;
  halt
  :alan
  &lt; deal with $1- &gt;
  halt
  :cat
  &lt; deal with $1- &gt;
  halt
  :world
  &lt; deal with $1- &gt;
}

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

Top
#104974 - 15/12/04 10:57 PM Re: alias -s hello*
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
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!!!!!!

Top
#104975 - 16/12/04 03:23 AM Re: alias -s hello*
nalAAlan Offline
Vogon poet

Registered: 04/08/04
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...

Top
#104976 - 16/12/04 11:33 AM Re: alias -s hello*
tidy_trax Offline
Hoopy frood

Registered: 02/11/03
Posts: 2327
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

Top
#104977 - 16/12/04 04:41 PM Re: alias -s hello*
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
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! ).

Top
#104978 - 16/12/04 09:34 PM Re: alias -s hello*
nalAAlan Offline
Vogon poet

Registered: 04/08/04
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.

Top
#104979 - 17/12/04 01:53 AM Re: alias -s hello*
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
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.

Top
Page 2 of 2 < 1 2