mIRC Homepage

$lactive

Posted By: baron

$lactive - 19/10/03 06:54 PM

ok right now i have this as a command that someone helped me with before

scid $activecid if ($active ischan) describe $active [command]

now i tried this to display in the last active only if the lastactive is a channel and i put

scid $activecid if ($lactive ischan) describe $lactive [command]

also i wanna make it so the last active command only works when in query so i put if ($1 == $active) { command } right?

but it dont work....and i really dont understand why
Posted By: WhoJoeDaddy

Re: $lactive - 20/10/03 06:45 PM

You sir need to type /help aliases

Code:
//scid $activecid if ($active ischan) describe $active <text> | if (($query($active)) && ($lactive ischan)) describe $lactive <text>


Edit: This is an example of where that isquery feature suggestion would be useful imo
Code:
//scid $activecid if ($active ischan) describe $active <text> | if (($active isquery) && ($lactive ischan)) describe $lactive <text>
Posted By: baron

Re: $lactive - 23/10/03 01:49 AM

nice try man but did you even try that code? it doesnt work...please test before you give i would really appreciate it, i spent an hour thinking i did something wrong when your code never worked in the first place lol..good try tho

you should try /help aliases wink
Posted By: EVH

Re: $lactive - 24/10/03 03:47 PM

Excuse me .. the first one works perfectly for me.
The second one was meant as an example for a new
isquery if-then-else operator suggested in
feature suggestions, so of course it won't work.

What was meant by "type /help aliases" was this ..
Make an alias instead of trying to do it all in one line.
Code:
[color:green];Usage: This checks to see if $active is a channel.
;If $active is a channel, this performs action on $active
;If $active not a channel, this checks to see if $lactive
; is a channel, if $lactive is a channel & $active is a query,
; this performs action on $lactive[/color]
[color:red]; Syntax: /act <text>
;Example: /act is hungry[/color]
alias act {
  if ($active ischan) var %tchan = $active
  elseif (($query($active)) && ($lactive ischan)) var %tchan = $lactive
  if (%tchan != $null) scid $activecid describe $1-
}

That was exactly what you asked for.
Or you could use the following ..
Code:
[color:green];Usage: This checks to see if $active is a channel.
;If $active is a channel, this performs action on $active
;If $active is not a channel, this checks to see if $lactive is a channel.
;If $lactive is a channel , this performs action on $lactive[/color]
[color:red]; Syntax: /act <text>
;Example: /act is hungry[/color]
alias act {
  if ($active ischan) var %tchan = $active
  elseif ($lactive ischan) var %tchan = $lactive
  if (%tchan != $null) scid $activecid describe $1-
}


I personally would use the latter over the former.
Posted By: baron

Re: $lactive - 26/10/03 05:23 AM

ok your right i did get it to work....yanno what the problem was tho i was using multi server, opened the mp3 on cid 1 and was testing on cid 3, this code does not work with multi serve

if ($active ischan) /scid $activecid describe $active <text> | if (($query($active)) && ($lactive ischan)) /scid $activecid describe $lactive <text>
© 2021 mIRC Discussion Forums