<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/13664" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2007-08-31T04:27:28-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/13664</id>

		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2007-08-31T04:27:28-04:00</updated>

		<published>2007-08-31T04:27:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=75579#p75579</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=75579#p75579"/>
		<title type="html"><![CDATA[Re: blacklist dns help..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=75579#p75579"><![CDATA[
I would attempt to contact the author of this script for that. However, there is a script that will do this. Search the tcl archive for it, but it dose use the bots internal banlist thou. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Fri Aug 31, 2007 4:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sdays]]></name></author>
		<updated>2007-06-25T07:19:19-04:00</updated>

		<published>2007-06-25T07:19:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73880#p73880</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73880#p73880"/>
		<title type="html"><![CDATA[blacklist dns help..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73880#p73880"><![CDATA[
Okay i need this to dns people that joins a channel and search blacklist for the ip, cause i added 10 15 people and there ip changes to hostnames and the bot wont ban them :S..<br><div class="codebox"><p>Code: </p><pre><code>set blacklist_file "db/blacklist/backlist.db"setudef flag blackbind MSG  m|- \$blacklist  blacklist:listbind MSG  m|- \$blackadd   blacklist:addbind MSG  m|- \$blackdel   blacklist:delbind JOIN -|- *            blacklist:joinproc blacklist:list {nickname hostname handle arguments} { global blacklist  set entrys 0  puthelp "PRIVMSG $nickname :BlackList Entrys"  puthelp "PRIVMSG $nickname :Nr. Owner           HostMask"  foreach entry [array names blacklist] {    incr entrys    set owner [lindex $blacklist($entry) 0]    while {[string length $owner] &lt; 15} {      set owner "$owner "    }    if {[string length $entrys] &lt; 2} {      set target "$entrys "    } else {      set target $entrys    }    puthelp "PRIVMSG $nickname :#$target $owner $entry"  }  puthelp "PRIVMSG $nickname :End of list."}proc blacklist:add {nickname hostname handle arguments} { global blacklist  set arguments [blacklist:clean $arguments]  set banmask [blacklist:validate:host [lindex $arguments 0]]  if {([regexp -all -- {!} $banmask] &gt; 1) || ([regexp -all -- {@} $banmask] &gt; 1)} {    puthelp "PRIVMSG $nickname :Sorry, Couldn't Add That HostMask."    return  }  set owner $handle  if {[regexp {^(\d{1,2}|[0-3][0-6][0-5])$} [lindex $arguments 1]]} {   set expire [expr ([lindex $arguments 1] * 86400) + [unixtime]]   set reason [join [lrange $arguments 2 end]]  } else {   set expire 0   set reason [join [lrange $arguments 1 end]]  }  if {[llength $reason] &gt;= 1} {    if {![info exists blacklist($banmask)]} {      set blacklist($banmask) "$owner $expire $reason"      puthelp "PRIVMSG $nickname :Done. $banmask BlackListed Successfully (Reason: $reason)."      } else {      puthelp "PRIVMSG $nickname :Sorry, Couldn't Add That HostMask."    }  } else {    puthelp "PRIVMSG $nickname :You Forgot To Type A BlackList Reason."  }}proc blacklist:del {nickname hostname handle arguments} { global blacklist  set arguments [blacklist:clean $arguments]  set banmask [lindex $arguments 0]  set success 0  if {[regexp {^#([0-9]+)$} $banmask tmp number]} {    set item 0    foreach entry [array names blacklist] {      incr item      if {$item == $number} {        unset blacklist($entry)        set success 1      }    }  } else {    if {[info exists blacklist($banmask)]} {      unset blacklist($banmask)      set success 1    }  }  if {$success == 0} {    puthelp "PRIVMSG $nickname :Couldn't Delete The Requested Ban. Use \$blacklist To View Them."  } else {    puthelp "PRIVMSG $nickname :Done."  }}proc blacklist:join {nickname hostname handle chan} { global blacklist  if {![botisop $chan]} {return}  if {[lsearch -exact [channel info $chan] +black] == -1} {return 0}  set userhost [blacklist:weirdclean "$nickname![getchanhost $nickname]"]  foreach entry [array names blacklist] {    set reason [lrange [blacklist:clean $blacklist($entry)] 2 end]    set blackhost [blacklist:weirdclean $entry]    if {[string match -nocase $blackhost $userhost]} {      putquick "MODE $chan -o+b $nickname $entry"      putquick "KICK $chan $nickname :[join $reason]"    }  }}proc blacklist:validate:host {i} {  regsub -all {\*+} $i {*} i  array set ban {    ident *    host *  }  set ban(nick) $i  if {[regexp -- {!} $i]} {    regexp -- {^(.+?)!(.*?)(@(.*))?$} $i tmp ban(nick) ban(ident) tmp ban(host)  } elseif {[regexp -- {@} $i]} {    regexp -- {^(.+!)?(.*?)(@(.*))?$} $i tmp ban(nick) ban(ident) tmp ban(host)  }  foreach item [array names ban] {    if {[string length $ban($item)] &lt; 1} {      set ban($item) *    }  }  return $ban(nick)!$ban(ident)@$ban(host)}proc blacklist:load {} { global blacklist blacklist_file  regexp {(\S+/)?} $blacklist_file tmp blacklist_dir  if {$blacklist_dir != ""} {    if {![file isdirectory $blacklist_dir]} {      file mkdir $blacklist_dir      putlog "Created directory: $blacklist_dir"    }  }  if {![file exists $blacklist_file]} {    array set blacklist {}    return  }  if {[array exists blacklist]} {    array unset blacklist  }  set file [open $blacklist_file r]  while {![eof $file]} {    gets $file line    if {[regexp -- {(\S+)\s(\S+)\s(\S+)\s(.+)} $line tmp banmask owner expire reason]} {      if {$expire &gt;= [unixtime] || ($expire == 0)} {        set blacklist($banmask) "$owner $expire $reason"      }    }  }  close $file}proc blacklist:save {} { global blacklist blacklist_file  set file "[open $blacklist_file w]"  foreach entry [array names blacklist] {    puts $file "$entry $blacklist($entry)"  }  close $file}proc blacklist:weirdclean {i} {  regsub -all -- \\\\ $i \001 i  regsub -all -- \\\[ $i \002 i  regsub -all -- \\\] $i \003 i  regsub -all -- \\\} $i \004 i  regsub -all -- \\\{ $i \005 i  return $i}proc blacklist:clean {i} {  regsub -all -- \\\\ $i \\\\\\\\ i  regsub -all -- \\\[ $i \\\\\[ i  regsub -all -- \\\] $i \\\\\] i  regsub -all -- \\\} $i \\\\\} i  regsub -all -- \\\{ $i \\\\\{ i  regsub -all -- \\\" $i \\\\\" i  return $i}blacklist:load </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8306">sdays</a> — Mon Jun 25, 2007 7:19 am</p><hr />
]]></content>
	</entry>
	</feed>
