Advertisement
WraithRIOT

IpBL

Apr 12th, 2011
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.04 KB | None | 0 0
  1.  
  2. #Testing On
  3. On *:Snotice:*Client Connecting:{ .Timer 1 1 .Getip $9 }
  4.  
  5. Alias Getip {
  6.   If (a isin $Usermode) {
  7.     .who $$1
  8.     Set %GettinIp.Nick $$1
  9.   }
  10. }
  11.  
  12. Raw 352:*:{
  13.   Set %Ip $4-
  14.   Set %Ip $Gettok(%ip,1,32)
  15.   Hadd -m ip %GettinIp.Nick %Ip
  16.   Halt
  17. }
  18.  
  19. Raw 315:*:{
  20.   Halt
  21. }
  22. Alias Ip.Return {
  23.   Var %Ipgetx 1
  24.   While (%Ipgetx <= $Hget(ip,0).item) {
  25.     If ($Nick Isin $Hget(ip,%Ipgetx).item) {
  26.       Return $Hget(ip,%ipgetx).data
  27.     }
  28.     Inc %Ipgetx
  29.   }
  30. }
  31. On *:Exit:{ Hsave -o ip ip.x }
  32. Alias Blist { Dialog -m Blist Blist }
  33. dialog Blist {
  34.   title "Black List"
  35.   size -1 -1 172 93
  36.   option dbu
  37.   edit "", 1, 3 2 88 10, autohs
  38.   button "Add", 2, 97 2 32 12
  39.   button "Remove", 3, 136 2 32 12
  40.   list 4, 0 17 171 76, size
  41. }
  42. On *:Dialog:Blist:*:*:{
  43.   If ($Devent == Init) {
  44.     Var %Bip 1
  45.     While (%Bip <= $Lines(Documents\Blist.txt)) {
  46.       Did -a $dname 4 $Read(Documents\Blist.txt,%Bip)
  47.       Inc %Bip
  48.     }
  49.     dll $mdx MarkDialog $Dname
  50.     dll $mdx SetControlMDX $dname 1,2,3,4 hasbuttons > $views
  51.     dll $mdx SetBorderStyle $dname 4 windowedge
  52.     dll $mdx SetFont $Dname 1,2,3,4 -13 400 Times New Roman
  53.     dll $mdx SetDialog $Dname BGColor $color(1)
  54.     dll $mdx SetColor $Dname 1,2,3,4 BackGround $color(1)
  55.     dll $mdx SetColor $Dname 1,2,3,4 text $color(15)
  56.     dll $mdx SetColor $Dname 1,2,3,4 textbg $color(1)
  57.   }
  58.   If ($Devent == Sclick) {
  59.     If ($did = 2) {
  60.       Write Documents\Blist.txt $did(1)
  61.       Did -a $dname 4 $did(1)
  62.     }
  63.     If ($did = 3) {
  64.       Write -dl $did(4).sel Documents\Blist.txt
  65.       Did -d $dname 4 $did(4).sel
  66.     }
  67.   }
  68. }
  69. On *:Snotice:*Client Connecting*:{
  70.   .Timer 1 4 CheckIp
  71.   Set %BnickPossible $9
  72. }
  73. Alias CheckIp {
  74.   If (%Ip == $Read(Documents\Blist.txt,r,%Ip)) {
  75.     Set %ip $Gettok($Replace(%ip,-,.),2-,46)
  76.     Set %ip $Remove(%ip,$Gettok(%ip,5-,46))
  77.     Set %ip $Remtok(%ip,5,46)
  78.     Wallops Connection From $9 Was Found On Blacklist Database Klining %ip
  79.     Unset %BNickPossible
  80.     kline %ip 14X15-14E15cution i14R15C BlackListed Ip
  81.   }
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement