egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need a Help With This Script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Stefano1990
Voice


Joined: 04 Jun 2018
Posts: 9
Location: Greccee

PostPosted: Mon Jun 25, 2018 5:17 am    Post subject: Need a Help With This Script Reply with quote

I need a code to add exempt Ip and Ports

where i can add exemp ip to not be banned with GZ-Line with command .exempadd / .exempdel *@10.10.*
in specific #channel to active with command .enable / .disable dnsbl
and action banned to be GZ-line *@ip +2H Proxy

and code to make port check from my list port i add with command
.addport 8080 .delport 8080
and the script to match check on Connection Client IP=Port from the bot portlist
i add
can anyone help me with this script
thx in advance

..
Code:


##############################################################################################
##  ##     dnsbl.tcl for eggdrop                                                        ##  ##
##############################################################################################
##############################################################################################
##      ____                __                 ###########################################  ##
##     / __/___ _ ___ _ ___/ /____ ___   ___   ###########################################  ##
##    / _/ / _ `// _ `// _  // __// _ \ / _ \  ###########################################  ##
##   /___/ \_, / \_, / \_,_//_/   \___// .__/  ###########################################  ##
##        /___/ /___/                 /_/      ###########################################  ##
##                                             ###########################################  ##
##############################################################################################
##  ##                             Start Setup.                                         ##  ##
##############################################################################################
namespace eval dnsbl {
## Edit checksite to add or remove dnsbl sites                                              ##
  set checksite {"dnsbl.dronebl.org" "recent.spam.dnsbl.sorbs.net" "bl.blocklist.de" "rbl.efnet.org"}
## Change banmessage to the ban message you want                                            ## 
  set banmessage "\002IP found it dnsbl blacklist\002"
## Change bantype to the type of ban you want: gzline, zline                                ##
  set bantype "gzline"
## Change bantime to the length of ban you want                                             ##
  set bantime "10d"
## Change opernick and operpass to reflect the info from the bots oper block                ##
## If you already have a oper script, comment out the bind at the bottom of this script     ##
  set opernick opernickhere
  set operpass operpasshere
##############################################################################################
##  ##                           End Setup.                                              ## ##
##############################################################################################   
  proc connection {host type text} {
    if {[string match -nocase {*client connecting*} $text]} {
      regexp -- {.*@([^\)]+)} $text null ip
      if {[regexp -- {([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})} $ip null a b c d]} {
        foreach dnsbl $dnsbl::checksite {
          dnslookup "$d.$c.$b.$a.$dnsbl" dnsbl::dronelookup
        }
      } else {
        dnslookup $ip dnsbl::lookup
      }
    }
  }
  proc dronelookup {ip host status} {
     if {$status == 1} {
         regexp -- {([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.} $host null a b c d
         putnow "$dnsbl::bantype *@$d.$c.$b.$a $dnsbl::bantime :$dnsbl::banmessage"
     } else {
       return ""
     }
  }
  proc lookup {ip host status} {
     if {$status == 1} {
       regexp -- {([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})} $ip null a b c d
       foreach dnsbl $dnsbl::checksite {
         dnslookup "$d.$c.$b.$a.$dnsbl" dnsbl::dronelookup
       }
     } else {
       return ""
     }
  }
  proc operup {type} {
    putserv "OPER $dnsbl::opernick $dnsbl::operpass"
  }
}
bind raw - NOTICE dnsbl::connection
## You can comment out the event below if you already have a oper script for this bot.
bind evnt - init-server dnsbl::operup


_________________
Use your common sense and try not to make me look too much like I know what I'm doing.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber