daily pastebin goal
25%
SHARE
TWEET

bad channel script with dialog

Seb Jul 16th, 2010 (edited) 355 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #This script has no channel added to the list, but if you visit this link: http://seb.boards.net/thread/3/list-bad-channel-names
  2. #You will get my personal channel list. Just add the variable to the VARIABLES tab of your client ;)
  3. dialog BD {
  4.   title "Bad Channel Dialog"
  5.   size -1 -1 254 186
  6.   option dbu
  7.   box "Add/Rem Channnel's", 1, 2 2 67 31
  8.   edit "", 2, 3 10 64 9
  9.   button "Add", 3, 3 21 32 10, flat
  10.   button "Remove", 4, 35 21 32 10, flat
  11.   box "Channel List", 5, 70 2 57 164
  12.   list 6, 71 10 54 154, size vsbar
  13.   box "Add/Rem Bad Channels", 7, 128 2 67 28
  14.   edit "", 8, 129 9 64 9, autohs
  15.   button "Add", 9, 129 18 32 10, flat
  16.   button "Remove", 10, 161 18 32 10, flat
  17.   box "Bad Chan List", 11, 195 2 57 164
  18.   list 12, 196 9 54 155, size vsbar
  19.   box "Power On/Off ", 13, 2 167 47 18
  20.   radio "ON", 14, 5 173 18 9, flat
  21.   radio "OFF", 15, 27 173 20 9, flat
  22.   box "Log", 16, 51 167 77 18
  23.   check "OFF", 17, 54 174 20 9, flat
  24.   check "P2P", 18, 77 174 20 9, flat
  25.   check "Window", 19, 96 174 30 9, flat
  26.   text " Bad channel check by Sebastien @ Undernet ", 20, 128 170 124 7, center
  27.   link "http://pastebin.com/u/seb", 21, 156 177 65 8
  28. }
  29. menu menubar,channel {
  30.   .Bad Channel Dialog:{ dialog $iif($dialog(BD),-v,-md) BD BD }
  31. }
  32. on *:DIALOG:BD:init:0:{
  33.   $iif(%badc,did -c $dname 14,did -c $dname 15)
  34.   $iif(%bdlog.p2p,did -c $dname 18,$iif(%bdlog.win,did -c $dname 19,$iif(!%bdlog.*,did -c $dname 17)))
  35.   didtok $dname 6 44 %Rchan
  36.   didtok $dname 12 44 %badchan
  37. }  
  38. on *:DIALOG:BD:sclick:*:{
  39.   if ($did == 14) { set %badc on }
  40.   if ($did == 15) { unset %badc }
  41.   if ($did == 17) { unset %bdlog.* | did -u $dname 18,19 | did -c $dname  17 }
  42.   if ($did == 18) { set %bdlog.p2p on | unset %bdlog.win | did -u $dname 17,19 | did -c $dname 18 }
  43.   if ($did == 19) { set %bdlog.win on | unset %bdlog.p2p | did -u $dname 17,18 | did -c $dname 19 }
  44.   if ($did == 3) {
  45.     if (!$did(2).text || $left($did(2).text,1) != $chr(35) || $istok(%Rchan,$did(2).text,44)) {
  46.       noop $iif(!$did(2).text,$input(No Channel Was Entered,uwo,Error!),$iif($left($did(2).text,1) != $chr(35),$input(Please Enter Channel As Syntax: #channel,uwo,Syntax Error!),$iif($istok(%Rchan,$did(2).text,44),$input(Channel Already Exists,uwo,Error!),)))
  47.       did -r $dname 2
  48.     }
  49.     else {
  50.       set %Rchan $addtok(%Rchan,$did(2).text,44)
  51.       did -r $dname 6,2
  52.       didtok $dname 6 44 %Rchan
  53.     }
  54.   }
  55.   if ($did == 4) {
  56.     if (!$did(2).text && !$did(6).seltext || $left($did(2).text,1) != $chr(35) && !$did(6).seltext || $did(2).text && !$did(6).seltext && !$istok(%Rchan,$did(2).text,44)) {
  57.       noop $iif(!$did(2).text && !$did(6).seltext,$input(No Channel Was Entered Or Selected,uwo,Error!),$iif($left($did(2).text,1) != $chr(35) && !$did(6).seltext,$input(Please Enter Channel As Syntax: #channel,uwo,Syntax Error!),$iif($did(2).text && !$did(6).seltext && !$istok(%Rchan,$did(2).text,44),$input(Channel Does Not Exists,uwo,Error!),)))
  58.       did -r $dname 2
  59.     }
  60.     elseif ($did(2).text && !$did(6).seltext && $istok(%Rchan,$did(2).text,44)) {
  61.       set %Rchan $remtok(%Rchan,$did(2).text,1,44)
  62.       did -r $dname 6,2
  63.       didtok $dname 6 44 %Rchan
  64.     }
  65.     elseif ($did(6).seltext && !$did(2).text) {
  66.       set %Rchan $remtok(%Rchan,$did(6).seltext,1,44)
  67.       did -r $dname 6,2
  68.       didtok $dname 6 44 %Rchan
  69.     }
  70.   }
  71.   if ($did == 9) {
  72.     if (!$did(8).text || $left($did(8).text,1) != $chr(35) || $istok(%badchan,$did(8).text,44)) {
  73.       noop $iif(!$did(8).text,$input(No Channel Was Entered,uwo,Error!),$iif($left($did(8).text,1) != $chr(35),$input(Please Enter Channel As Syntax: #channel,uwo,Syntax Error!),$iif($istok(%badchan,$did(8).text,44),$input(Channel Already Exists,uwo,Error!),)))
  74.       did -r $dname 8
  75.     }
  76.     else {
  77.       set %badchan $addtok(%badchan,$did(8).text,44)
  78.       did -r $dname 8,12
  79.       didtok $dname 12 44 %badchan
  80.     }
  81.   }
  82.   if ($did == 10) {
  83.     if (!$did(8).text && !$did(12).seltext || $left($did(8).text,1) != $chr(35) && !$did(12).seltext || $did(8).text && !$did(12).seltext && !$istok(%badchan,$did(8).text,44)) {
  84.       noop $iif(!$did(8).text && !$did(12).seltext,$input(No Channel Was Entered Or Selected,uwo,Error!),$iif($left($did(8).text,1) != $chr(35) && !$did(12).seltext,$input(Please Enter Channel As Syntax: #channel,uwo,Syntax Error!),$iif($did(8).text && !$did(12).seltext && !$istok(%banchan,$did(8).text,44),$input(Channel Does Not Exists,uwo,Error!),)))
  85.       did -r $dname 8
  86.     }
  87.     elseif ($did(8).text && !$did(12).seltext && $istok(%badchan,$did(8).text,44)) {
  88.       set %badchan $remtok(%badchan,$did(8).text,1,44)
  89.       did -r $dname 8,12
  90.       didtok $dname 12 44 %badchan
  91.     }
  92.     elseif ($did(12).seltext && !$did(8).text) {
  93.       set %badchan $remtok(%badchan,$did(12).seltext,1,44)
  94.       did -r $dname 8,12
  95.       didtok $dname 12 44 %badchan
  96.     }
  97.   }
  98. }    
  99. on !@*:join:#:{ if (%badc && $istok(%Rchan,$chan,44)) { .timer 1 3 whois $nick | set -u5 %achan $chan } }
  100. raw *:*: {
  101.   if (!%who1) {
  102.     if ($istok(311 330 379 378 307 312 317 318,$numeric,32)) { haltdef }
  103.     if ($numeric == 319) {
  104.       haltdef
  105.       var %a = $replace($remove($3-,&,+,%,@,~,!,?),$chr(32),$chr(44)), %x = $numtok(%a,44)
  106.       while (%x) {
  107.         if ($istok(%badchan,$gettok(%a,%x,44),44)) {
  108.           ban -ku300 %achan $2 2 Some channels you visit are questionable... $+([,$gettok(%a,%x,44),])
  109.           if (%bdlog.p2p) { .msg $me $2 Was Banned For Bad Channel In Room %achan Date/Time $time(mmm dd h:nn tt) Bad Channel: $gettok(%a,%x,44) }
  110.           if (%bdlog.win) { window @BadChan | aline @BadChan $+(14[7,$2,14]) Banned In $+(14[9,%achan,14]) Date/Time $time(mmm dd h:nn tt) $+  For:4 $gettok(%a,%x,44) }
  111.         }
  112.         dec %x
  113.       }
  114.     }
  115.   }
  116. }
RAW Paste Data
Top