mIRC Home    About    Download    Register    News    Help

Print Thread
$lactive #56174 19/10/03 06:54 PM
Joined: Oct 2003
Posts: 16
B
baron Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Oct 2003
Posts: 16
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

Re: $lactive #56175 20/10/03 06:45 PM
Joined: Oct 2003
Posts: 53
W
WhoJoeDaddy Offline
Babel fish
Offline
Babel fish
W
Joined: Oct 2003
Posts: 53
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>

Last edited by WhoJoeDaddy; 20/10/03 07:56 PM.
Re: $lactive #56176 23/10/03 01:49 AM
Joined: Oct 2003
Posts: 16
B
baron Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Oct 2003
Posts: 16
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

Last edited by baron; 23/10/03 01:50 AM.
Re: $lactive #56177 24/10/03 03:47 PM
Joined: Oct 2003
Posts: 273
E
EVH Offline
Fjord artisan
Offline
Fjord artisan
E
Joined: Oct 2003
Posts: 273
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.

Last edited by EVH; 24/10/03 05:43 PM.
Re: $lactive #56178 26/10/03 05:23 AM
Joined: Oct 2003
Posts: 16
B
baron Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Oct 2003
Posts: 16
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>