mIRC Home    About    Download    Register    News    Help

Print Thread
#74130 06/03/04 08:31 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
in popups i have this code that shows in bracket what
modes has channel i am in:

.Chan Modes
..( $+ $iif($chan(#).mode,$chan(#).mode,n/a) $+ ):return

but i want to get channel modes in %variable
so i can echo them or on join detect what mode is missing
etc...

how to do it?

#74131 06/03/04 09:31 PM
Joined: Aug 2003
Posts: 18
Z
z0r Offline
Pikka bird
Offline
Pikka bird
Z
Joined: Aug 2003
Posts: 18
in a new remote script;
alias retmodes {
var %modes = $chan($1-).mode
if ($isid) {
return $iif(%modes,%modes,n/a)
}
else {
echo $chan modes: %modes
}
}

then use this in popups:
.Chan Modes
..( $+ $retmodes($chan) $+ ):return

#74132 06/03/04 09:34 PM
Joined: Aug 2003
Posts: 18
Z
z0r Offline
Pikka bird
Offline
Pikka bird
Z
Joined: Aug 2003
Posts: 18
errm. Remember that would not be a global variable. For global variable, use: set %modes $chan($1-).mode instead of var %modes = $chan($1-).mode

#74133 06/03/04 11:11 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
i edited a code a bit cos it didnt worked
so this is new one:

alias ccm {
set %ccmodes $chan(#).mode
if ($isid) {
return $iif(%ccmodes,%ccmodes,n/a)
}
else {
echo $chan modes: %ccmodes
}
}


IF someone needs it....

Last edited by bunar; 06/03/04 11:23 PM.

Link Copied to Clipboard