<?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/20758" />

	<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>2021-02-11T15:35:36-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Carlin0]]></name></author>
		<updated>2021-02-11T15:35:36-04:00</updated>

		<published>2021-02-11T15:35:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109408#p109408</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109408#p109408"/>
		<title type="html"><![CDATA[BlackCountry by blackshadow]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109408#p109408"><![CDATA[
pity that on freenode it does not recognize the hosts of those who enter from the web <br><br>example ...<br><blockquote class="uncited"><div>admin33 (571ad670@gateway/web/cgi-irc/kiwiirc.com/ip.87.26.214.112)</div></blockquote>or<blockquote class="uncited"><div>leo17 (972453dc@gateway/web/cgi-irc/kiwiirc.com/ip.151.36.83.220)</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12778">Carlin0</a> — Thu Feb 11, 2021 3:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Zohaib]]></name></author>
		<updated>2020-04-21T09:22:02-04:00</updated>

		<published>2020-04-21T09:22:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108284#p108284</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108284#p108284"/>
		<title type="html"><![CDATA[BlackCountry by blackshadow]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108284#p108284"><![CDATA[
<blockquote class="uncited"><div>ban-time 120<br>Set here how long temporary bans will last (in minutes). If you set this setting to 0, the bot will never remove them.</div></blockquote>Please check ban-time from eggdrop config. Make sure it is not zero<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11670">Zohaib</a> — Tue Apr 21, 2020 9:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Elegant]]></name></author>
		<updated>2020-04-21T07:39:28-04:00</updated>

		<published>2020-04-21T07:39:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108282#p108282</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108282#p108282"/>
		<title type="html"><![CDATA[BlackCountry by blackshadow]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108282#p108282"><![CDATA[
Script is working good but when I add for example china , a user from china join the channel , he will get banned. And when I remove that country , bot still ban that user which his ip address is in china.<br><br>So is it possible to fix that?<br><div class="codebox"><p>Code: </p><pre><code>#####################################################################################  BlackCountry 1.0 EN####### The script will ban all IPs which are in countries added to the blacklist.# You can add both full name and/or countries shortcut.## For enable the script: !country &lt;on&gt;/&lt;off&gt; or .chanset #channel +bcountry# Add locations/countries: !country add &lt;locatie&gt; (Ex: US sau United States)# List all blacklisted countries: !country list# Remove countries from the blacklist: !country del &lt;number&gt; (from the blacklist)# For informations: !country help##+++ ATTENTION ++++ You must have 'package GeoIP' for the script to work.## cd /usr/share/GeoIP# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz# gunzip GeoIP.dat.gz# mv -v GeoIP.dat /usr/share/GeoIP/GeoIP.dat### BLaCkShaDoW ProductionS - #TCL-HELP @ Undernet.org##       translation provided by florian@tclscripts.net#####################################################################################Here set the predefined message banset blackcountry(breason) "Due to problems of clones and flood abuse, all\002 %location% users, \002are banned from this channel."#Here set the predefined time ban (minutes)set blackcountry(btime) "120"###################################################################################bind pub mn|- !country blackcountry:cmdbind join - * blackcountry:joinsetudef flag bcountryset blackcountry(file) "scripts/country_list.txt"if {![file exists $blackcountry(file)]} {set file [open $blackcountry(file) w]close $file}proc blackcountry:cmd {nick host hand chan arg} {global blackcountryset arg0 [lindex [split $arg] 0]set arg1 [lindex [split $arg] 1]if {$arg0 == ""} {putserv "NOTICE $nick :\[BlackCountry\] Use: \002!country help\002 for more informations."return}switch $arg0 {on {channel set $chan +bcountryputserv "NOTICE $nick :\[BlackCountry\] enabled on $chan."}off {channel set $chan -bcountryputserv "NOTICE $nick :\[BlackCountry\] disabled on $chan."}add {if {$arg1 == ""} {putserv "NOTICE $nick :\[BlackCountry\] Use: \002!country help\002 for more informations."return}set file [open $blackcountry(file) a]puts $file "$chan $arg1"close $fileputserv "NOTICE $nick :\[BlackCountry\] I added\002 $arg1 \002in my blacklist."}list {set file [open $blackcountry(file) "r"]set read [read -nonewline $file]close $fileset data [split $read "\n"]set i 0if {$data == ""} { putserv "NOTICE $nick :\[BlackCountry\] There are\002 no locations \002added to blacklist."return}putserv "NOTICE $nick :\[BlackCountry\] The list of locations added in my blacklist."foreach line $data {set read_chan [lindex [split $line] 0]if {[string match -nocase $read_chan $chan]} {set i [expr $i +1]set read_blackchan [lindex [split $line] 1]putserv "NOTICE $nick :$i.) $read_blackchan"}}}del {array set countrydel [list]if {![regexp {^[0-9]} $arg1]} {putserv "NOTICE $nick :\[BlackCountry\] Use: \002!country help\002 for more informations."return}set file [open $blackcountry(file) "r"]set data [read -nonewline $file]close $fileset lines [split $data "\n"]set counter -1set line_counter -1set current_place -1foreach line $lines {set line_counter [expr $line_counter + 1]set read_chan [lindex [split $line] 0]if {[string match -nocase $read_chan $chan]} {set counter [expr $counter + 1]set countrydel($counter) $line_counter}}foreach place [array names countrydel] {if {$place == [expr $arg1 - 1]} {set current_place $countrydel($place)}}if {$current_place == "-1"} {putserv "NOTICE $nick :\[BlackCountry\] The entry number\002 $arg1 \002does not exist."return}set delete [lreplace $lines $current_place $current_place]set files [open $blackcountry(file) "w"]puts $files [join $delete "\n"]close $filesset file [open $blackcountry(file) "r"]set data [read -nonewline $file]close $fileif {$data == ""} {set files [open $blackcountry(file) "w"]close $files}putserv "NOTICE $nick :\[BlackCountry\] The entry number\002 $arg1 \002was removed from blacklist."}help {putserv "NOTICE $nick :\[BlackCountry\] To turn the script on or off use: \002!country &lt;on&gt;/&lt;off&gt;\002"putserv "NOTICE $nick :\[BlackCountry\] You can add locations using: \002!country add &lt;location&gt;\002 (Eg: US or United States)"putserv "NOTICE $nick :\[BlackCountry\] To see all the countries use:\002 !country list\002"putserv "NOTICE $nick :\[BlackCountry\] To delete a location use:\002 !country del &lt;number&gt;\002 (from the blacklist)"}}}proc blackcountry:join {nick host hand chan } {global blackcountryset handle [nick2hand $nick]set hostname [lindex [split $host @] 1]if {![validchan $chan]} { return }if {![channel get $chan bcountry]} { return }if {[isbotnick $nick]} { return }if {![botisop $chan]} { return }if {[string match -nocase "*undernet.org" $host]} { return}if {[matchattr $handle "nm|oHPASMVO" $chan]} { return }set execution [exec geoiplookup $hostname]set execution [split $execution "\n"]set split_execution [split [lindex $execution 0] ","]set short_location [concat [string map {"GeoIP Country Edition:" "" "  " ""} [lindex $split_execution 0]]]set location [concat [lindex $split_execution 1]]set file [open $blackcountry(file) "r"]set read [read -nonewline $file]close $fileset data [split $read "\n"]foreach line $data {set read_chan [lindex $line 0]set read_location [lindex $line 1]if {[string match -nocase $read_chan $chan]} {if {[string equal -nocase $read_location $short_location] || [string match -nocase $read_location $location]} {set replace(%location%) $read_locationset reason [string map [array get replace] $blackcountry(breason)]set banmask "*!*@[lindex [split $host @] 1]"newchanban $chan $banmask "BlackCountry" $reason $blackcountry(btime)}}}}putlog "BlackCountry 1.0 EN by BLaCkShaDoW Loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12834">Elegant</a> — Tue Apr 21, 2020 7:39 am</p><hr />
]]></content>
	</entry>
	</feed>
