mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 14
IL_Pizu Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Dec 2002
Posts: 14
alias _floodprotchans {
return <commands>
}

menu channel {
FloodProtChan
.All Channels:set %chan2prot #
.$submenu($_floodprotchans(%chan2prot))
}

alias protchan {
if (%chan = $null) {
var %chan = #$$?="Enter The Chan Name That You Want To Protect"
if (%chan2prot == $null) {
.set %chan2prot %chan
echo -a %chan2prot
halt
}
else {
var %check = %chan2prot
if (%chan != %chan2prot) {
var %chan = #$$?="Enter The Chan Name That You Want To Protect"
var %add = $addtok(%add,%chan,32)
var %adda = $addtok(%chan,%chan2prot,44)
halt
}
}
}
.set %chan2prot %adda
echo -a %adda
}

i want that i will have a menu
and i will have the list off all channels that are protected.
i want that i can remove/add channels and also if i do: # all channels will be removed laugh


Watch Your Back.
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Code:
alias _floodprotchans {
  if (( $1 == begin ) || ( $1 == end )) return
  elseif ( $gettok(%floodprot.chans,0,44) &gt;= $1 ) return $gettok(%floodprot.chans,$1,44) : set % $+ floodprot.chans $remtok(%floodprot.chans,$gettok(%floodprot.chans,$1,44),1,44)
}

menu channel {
  Flood protection
  . $iif( !%floodprot.chans, $style(2) ) Remove
  ..Current # : set %floodprot.chans $remtok(%floodprot.chans,#,1,44)
  ..All Channels : set %floodprot.chans
  ..$submenu($_floodprotchans($1))
  .Add
  ..Current # : set %floodprot.chans $addtok(%floodprot.chans,#,44)
  ..Other: set %floodprot.chans $addtok(%floodprot.chans,$input(Enter channels to protect with $chr(44) between each,e,Enter Channel,$+(#channel1,$chr(44),#channel2)),44)
}
  


maybe you like to change the variable name from just replace "floodprot.chans" to your "adda", if you want...


Code:
//if ( khaled isgod ) echo yes | else echo no
Joined: Dec 2002
Posts: 14
IL_Pizu Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Dec 2002
Posts: 14
hey theRat,
10x for your help, it worked perfect! smile


Watch Your Back.

Link Copied to Clipboard