Advertisement
SaNCaK

mIRC Ban List

Feb 3rd, 2014
779
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 3.52 KB | None | 0 0
  1. menu channel,menubar {
  2.   Ban List:iblstart
  3. }
  4. dialog ibllist {
  5.   title "Ban List"
  6.   size -1 -1 211 137
  7.   option dbu
  8.   box "List of bans:", 1, 3 3 137 131
  9.   list 2, 7 11 128 106, multsel check result
  10.   box "Ban Information:", 3, 143 3 64 51
  11.   text "Set by:", 4, 147 11 18 8
  12.   text "", 5, 147 21 56 8
  13.   text "Date set:", 6, 147 31 23 8
  14.   text "", 7, 147 41 56 8
  15.   button "CheckAll", 8, 143 57 64 12
  16.   button "Remove", 9, 143 72 64 12
  17.   button "Remove Selected", 10, 143 87 64 12
  18.   button "Remove All", 11, 143 102 64 12
  19.   button "Ok/Cancel", 12, 156 118 37 12, ok cancel
  20.   text "", 13, 7 122 128 8
  21. }
  22. on *:DIALOG:ibllist:init:*: {
  23.   if ($ibl($active,0) != 0) {
  24.     var %a = 1
  25.     while (%a <= $ibl($active,0)) {
  26.       did -a $dname 2 $ibl($active,%a)
  27.       inc %a
  28.     }
  29.     did -a $dname 13 Total entries on $+($active,$chr(58)) $ibl($active,0)
  30.     noop $input(All entries have been added..,o,Success!)
  31.   }
  32.   else {
  33.     noop $input(There are no entries for $+($active,.),o,Closing Dialog!)
  34.     dialog -x $dname
  35.   }
  36. }
  37. on *:DIALOG:ibllist:sclick:2,8-11: {
  38.   var %a
  39.   if ($did == 2) {
  40.     if ($did($dname,2,0).sel == 1) {
  41.       did -ra $dname 5 $ibl($active,$did($dname,2).sel).by
  42.       did -ra $dname 7 $ibl($active,$did($dname,2).sel).date
  43.     }
  44.     elseif ($did($dname,2,0).sel >= 2) {
  45.       did -ra $dname 5 Multiple Entries
  46.       did -ra $dname 7 Multiple Entries
  47.     }
  48.     elseif ($did($dname,2,0).sel == 0) {
  49.       if ($did($dname,5) != $null) && ($did($dname,7) != $null) {
  50.         did -r $dname 5,7
  51.       }
  52.     }
  53.   }
  54.   if ($did == 8) {
  55.     %a = 1
  56.     while (%a <= $did($dname,2).lines) {
  57.       if ($did(8).text == CheckAll) {
  58.         did -s $dname 2 %a
  59.       }
  60.       elseif ($did(8).text == UnCheckAll) {
  61.         did -l $dname 2 %a
  62.       }
  63.       inc %a
  64.     }
  65.     if ($did(8).text == CheckAll) {
  66.       did -ra $dname 8 UnCheckAll
  67.     }
  68.     elseif ($did(8).text == UnCheckAll) {
  69.       did -ra $dname 8 CheckAll
  70.     }
  71.   }
  72.   if ($did == 9) {
  73.     if ($did($dname,2,0).sel == 1) {
  74.       mode $active -b $did($dname,2,$did($dname,2).sel).text
  75.       did -d $dname 2 $did($dname,2).sel
  76.       .timer 1 1 refreshibl
  77.     }
  78.   }
  79.   if ($did == 10) {
  80.     %a = 0
  81.     var %bans
  82.     while ($did($dname,2,0).csel > 0) {
  83.       %bans = %bans $did($dname,2,$did($dname,2,1).csel).text
  84.       did -d $dname 2 $did($dname,2,1).csel
  85.       inc %a
  86.       if (%a == $modespl) {
  87.         mode $active - $+ $str(b,%a) %bans
  88.         %bans = $null
  89.         %a = 0
  90.       }
  91.     }
  92.     if (%bans) {
  93.       mode $active - $+ $str(b,%a) %bans
  94.     }
  95.     .timer 1 1 refreshibl
  96.   }
  97.   if ($did == 11) {
  98.     %a = 0
  99.     var %bans
  100.     while ($did($dname,2).lines > 0) {
  101.       %bans = %bans $did($dname,2,1).text
  102.       did -d $dname 2 1
  103.       inc %a
  104.       if (%a == $modespl) {
  105.         mode $active - $+ $str(b,%a) %bans
  106.         %bans = $null
  107.         %a = 0
  108.       }
  109.     }
  110.     if (%bans) {
  111.       mode $active - $+ $str(b,%a) %bans
  112.     }
  113.     .timer 1 1 refreshibl
  114.   }
  115. }
  116. alias iblstart {
  117.   if ($me !ison $active) {
  118.     return
  119.   }
  120.   if (!$chan($active).ibl) {
  121.     .enable #IBLList
  122.     .timerIBLListTimeout 1 8 ibltimeout
  123.     mode $active +b
  124.   }
  125.   else {
  126.     ibldialog
  127.   }
  128. }
  129. alias ibldialog {
  130.   dialog $iif($dialog(ibllist),-v,-m ibllist) ibllist
  131. }
  132. alias -l refreshibl {
  133.   did -ra ibllist 13 Total entries on $+($active,$chr(58)) $ibl($active,0)
  134. }
  135. #IBLList off
  136. raw 368:*: {
  137.   HALTDEF
  138.   .timerIBLListTimeout off
  139.   .disable #IBLList
  140.   ibldialog
  141. }
  142. #IBLList end
  143. alias ibltimeout {
  144.   .disable #IBLList
  145.   ibldialog
  146. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement