Advertisement
r00t-err0r

DBaseBL.tcl

Apr 13th, 2017
893
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 3.72 KB | None | 0 0
  1. ##############################################################################################
  2. ##  ##        DBasebl.tcl v1.337 for eggdrop by munZe irc.dbase.in.rs                   ##  ##
  3. ##############################################################################################
  4. ##############################################################################################
  5. ##      ____                __                 ###########################################  ##
  6. ##     / __/___ _ ___ _ ___/ /____ ___   ___   ###########################################  ##
  7. ##    / _/ / _ `// _ `// _  // __// _ \ / _ \  ###########################################  ##
  8. ##   /___/ \_, / \_, / \_,_//_/   \___// .__/  ###########################################  ##
  9. ##        /___/ /___/                 /_/      ###########################################  ##
  10. ##                                             ###########################################  ##
  11. ##############################################################################################
  12. ##  ##                             Start Setup.                                         ##  ##
  13. ##############################################################################################
  14. package require http
  15. package require tls
  16. #http::register https 443 [list ::tls::socket -tls1 1]
  17. namespace eval DBase {
  18. ## Podesava nulu sa dve decimale (NE DIRATI)                                                ##
  19.   set NULLA [format "%.2f" 0]
  20. ## ako je sadrzaj izlaza > od neke konstante koju definisemo (npr. 60.6) da banuje          ##
  21.   set BanAkoJeVeceOd [format "%.2f" 0]
  22. ## Kanal na koji ce da siba poruke                                                          ##
  23.   set KanalZaObavestenja "#Services"
  24. ## ako je sadrzaj izlaza < 0 da ispise da je problem                                        ##
  25.   set ManjeOdNuleNaKanaluIspisuje ""
  26. ## Change bantype to the type of ban you want: gzline, zline                                ##
  27.   set bantype "GLINE"
  28. ## Change bantime to the length of ban you want                                             ##
  29.   set bantime "12h"
  30. ## Change opernick and operpass to reflect the info from the bots oper block                ##
  31. ## If you already have a oper script, comment out the bind at the bottom of this script     ##
  32.  # set opernick opernickhere
  33.  # set operpass operpasshere
  34. ##############################################################################################
  35. ##  ##                           End Setup.                                              ## ##
  36. ##############################################################################################
  37.  
  38.   proc IPlookup {ip} {
  39.     set url "http://check.getipintel.net/check.php?ip=$ip&contact=admin@dbase.in.rs&flags=m"
  40.     set token [ ::http::geturl $url ]
  41.     if {[::http::status $token] == "ok"} {
  42.       set page [ ::http::data $token ]
  43.       set ajdedagamerimo [regexp -all -inline {\d+} $page]
  44.       #if {$ajdedagamerimo <= $DBase::NULLA} { putmsg $DBase::KanalZaObavestenja $DBase::ManjeOdNuleNaKanaluIspisuje }
  45.       if {$ajdedagamerimo == 1} { putnow "$DBase::bantype *@$ip $DBase::bantime :No VPNs on DBase, use your real IP n00b!" }
  46.     } else { putmsg $DBase::KanalZaObavestenja Error: IPCheck Status: [::http::status $token] }
  47.   }
  48.  
  49.   proc connection {host type text} {
  50.     if {[string match -nocase {*client connecting*} $text]} {
  51.       #Gets IP
  52.       regexp -- {.*@([^\)]+)} $text null ip
  53.       #Check IP
  54.       DBase::IPlookup $ip
  55.     }
  56.   }
  57.  
  58.   #proc operup {type} {
  59.   #  putserv "OPER $DBase::opernick $DBase::operpass"
  60.   #}
  61. }
  62. bind raw - NOTICE DBase::connection
  63. ## You can comment out the event below if you already have a oper script for this bot.
  64. #bind evnt - init-server DBase::operup
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement