mIRC Home    About    Download    Register    News    Help

Print Thread
#162820 23/10/06 12:36 AM
Joined: Feb 2006
Posts: 546
J
jaytea Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
this is arguably a feature suggestion, but since many people probably think as i thought before this was pointed out to me.. it's probably best suited to this forum. $show's value will change from $true to $false if it's used in a command with the silencing . prefix, eg

Code:
alias testShow {
   echo echo $!show = $show
  .echo .echo $!show = $show
}


/testShow:

echo $show = $true
.echo $show = $false

/.testShow:

echo $show = $false
.echo $show = $false

notice $show's value in /testShow's .echo was $false because ".echo" was used. but why then is $show = $false in echo $show in /.testShow? i believe it should reflect whether or not the alias it was called with a . in all areas of that alias, regardless of whether or not it's in a command with the . prefix. this is problematic in this type of situation:

Code:
alias showTest_ {
 ; code
 .timer 1 2 $iif(!$show,.) $+ notice nick text
}


$show is always $false there, when in fact i want to check if the /showtest_ alias was called with . or not. yes i realize the workaround is simple, but my point is there shouldnt need to be a workaround :P


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
#162821 23/10/06 12:40 AM
Joined: Jan 2003
Posts: 22
M
Ameglian cow
Offline
Ameglian cow
M
Joined: Jan 2003
Posts: 22
This has irritated me for a long time. I consider it a bug, but regardless I'd like to see it changed to reflect only the silenced status of the alias call. Why anyone would need an identifier to evaluate whether or not they explicitly typed a period in front of a command is a mystery to me.

To clarify, I think it ought to work like this:
/testShow:

echo $show = $true
.echo $show = $true

/.testShow:

echo $show = $false
.echo $show = $false

...because that's the only way that really makes it useful in scripting. Consider this a vote for change!

(also, be sure and fix echo -q to behave the same way if the code isn't shared with $show)


Link Copied to Clipboard