Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
4.2 kB
2
Indexable
Never
menu channel,status {
  Protection
  .Bad Channel:/DBK 
}

dialog -l BadChannel {
  title "Bad Channel Protection by Mario - [/DBK]"
  size -1 -1 228 120
  option dbu notheme
  box "Bad Cannel Triggers", 6, 151 0 74 120
  button "&Close...", 2, 117 106 33 14, flat ok
  list 3, 153 19 69 97
  edit "", 5, 154 8 40 10
  button "Add", 4, 194 8 12 10, flat
  button "Del", 7, 207 8 12 10, flat
  button "&Enable", 41, 72 109 21 10, flat
  button "&Disable", 42, 94 109 20 10, flat
  box "TempBan mins", 9, 103 55 41 20
  edit "", 11, 104 63 17 10
  button "&Add", 22, 45 9 13 8, flat
  button "&Del", 23, 58 9 11 8, flat
  edit "", 24, 4 7 40 11
  combo 25, 75 15 71 37, edit drop
  combo 26, 73 82 76 21, edit drop
  button "&save", 32, 130 5 15 10, flat
  check "Kick", 29, 75 69 23 10
  check "KBan", 31, 75 60 25 10
  button "&save", 39, 124 63 15 10, flat
  list 20, 4 17 65 97
  box "Action", 1, 73 54 29 27
  box "Channel to Protect", 8, 2 0 69 120
  box "Ban Mask Type", 10, 73 0 75 53
  text "BlackRose Script", 12, 88 94 44 11, disable nowrap
}
alias DBK { dialog -ma BadChannel BadChannel }


on 1:dialog:BadChannel:sclick:*: {
  if ($did == 22) { if ($did(24).text == $null) { return } | else { did -a BadChannel 20 $did(24).text | set %proChannels $didtok(BadChannel,20,32) | did -r BadChannel 24    } }
  if ($did == 23) { if ($did(20).sel == $null) { return } | else {  did -d BadChannel 20 $did(20).sel | set %proChannels $didtok(BadChannel,20,32)) } }
  if ($did == 4) { set %Bad.channels [ %Bad.channels ] $did(5) | did -a $dname 3 $did(5) | did -ra $dname 5 }
  if ($did == 7) { if ($did(3).sel > 0) { set %Bad.channels $remtok(%Bad.channels,$did(3).seltext,32) | did -d BadChannel 3 $did(3).sel } }
  if ($did isnum 29-31) { set %badchannel.action $did }
  if ($did == 39) { set %Dmins $did(11) }
  if ($did == 32) { set %bc.bantype $did(25) } 
  if ($did == 41) { .enable #BadChannel ON | .Disable #Wdialog OFF | echo -a *** Bad Channel protection ON  }   
  if ($did == 42) { .disable #BadChannel Off | echo -a *** Bad Channel protection OFF   }
}

on *:dialog:BadChannel:init:*: {
  did -a BadChannel 24 $chan($active)
  didtok BadChannel 20 32 %proChannels
  did -a BadChannel 11 %Dmins
  did -a BadChannel 25  1 *!*user@host.domain
  did -a BadChannel 25  2 *!*@host.domain
  did -a BadChannel 25  3 *!*user@*.domain
  did -a BadChannel 25  4 *!*@*.domain
  did -a BadChannel 25  5 nick!user@host.domain
  did -a BadChannel 25  6 nick!*user@host.domain
  did -a BadChannel 25  7 nick!*@host.domain
  did -a BadChannel 25  8 nick!*user@*.domain
  did -a BadChannel 25  9 nick!*@*.domain
  did -a BadChannel 25 10 *!~user@host???.domain.com
  did -a BadChannel 25 11 *!* user@host???.domain.com
  did -a BadChannel 25 12 *!* @host???.domain.com
  did -a BadChannel 25 13 *!* @host???.domain.com
  did -a BadChannel 25 14 *!*@host???.domain.com
  did -o BadChannel 26 msg %badchannel
  did -o BadChannel 25 msg %bc.bantype
  did -c $dname %badchannel.action
  var %a = 1
  while ($gettok(%Bad.channels,%a,32)) {
    did -a BadChannel 3 $gettok(%Bad.channels,%a,32)
    inc %a
  }

}
on *:dialog:BadChannel:edit:*:{
  if ($did == 26) { set %badchannel $did(26) } 
}
#BadChannel off

on @*:JOIN:#:%proChannels: whois $nick 
raw 319:*:{
  var %x = 1
  while (%x <= $numtok(%Bad.channels,32)) {
    if ($gettok(%Bad.channels,%x,32) isin $strip($3-)) { var %Bad.channels! = $true }
    inc %x
  }

  if (%Bad.channels!) {

    var %t = $comchan($2,0)
    while (%t) {
      if ($me isop $comchan($2,%t)) {
        if (%badchannel.action == 29) { kick $comchan($2,%t) $2  %badchannel }
        if (%badchannel.action == 31) { ban -u [ $+ [ $calc(%Dmins * 60) ] ] $comchan($2,%t) $2 %bc.bantype |  kick $comchan($2,%t) $2  %badchannel  1[ 4B14an4T14ime:10 %Dmins mins 1] %logo }

      }
      dec %t
    }
  }
}
#BadChannel end

on *:LOAD:{
  set %proChannels #rawalpindi #linuxhosters 
  set %badchannel 1[ 4O2ffensive 4C2hannel 4D2etected 1] %v
  set %Bad.channels sex fark Pakistansex incest
echo 4 -a Welcome to [Mario Script] Bad channel protection Addon type /BDK to setup ! }