mIRC Home    About    Download    Register    News    Help

Print Thread
#145502 23/03/06 07:37 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
how could i possible check if the channel has a key?

and then do mode -k key on an alias

#145503 23/03/06 07:41 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
$chan(#chan).key

#145504 24/03/06 11:59 AM
Joined: Mar 2006
Posts: 2
C
Bowl of petunias
Offline
Bowl of petunias
C
Joined: Mar 2006
Posts: 2
Should work, not tested ;-)

Code:
alias rmkey {
  if (!$1) && ($chan($active).key) { mode $active -k $ifmatch }
  if ($1) && ($chan($1).key) { mode $chan -k $ifmatch }
}

#145505 24/03/06 04:36 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Also check if you are an op in the channel before removing the key.

Code:
 alias rmkey {
  var %chan = $iif($1,$1,$active)
  if ( $me isop %chan ) && ( $chan(%chan).key ) mode %chan -k $v1
} 


Syntax: /rmkey [#channel]

If channel is not entered, the active channel will be used.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!

Link Copied to Clipboard