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

	<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>2005-04-15T05:49:51-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2005-04-15T05:49:51-04:00</updated>

		<published>2005-04-15T05:49:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48128#p48128</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48128#p48128"/>
		<title type="html"><![CDATA[Help with restrict.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48128#p48128"><![CDATA[
Why don't you first contact the author regarding any issues with the script?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Apr 15, 2005 5:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2005-04-15T01:29:09-04:00</updated>

		<published>2005-04-15T01:29:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48124#p48124</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48124#p48124"/>
		<title type="html"><![CDATA[Help with restrict.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48124#p48124"><![CDATA[
Try my keepout script, It works fine and won't mess up. <br><br><a href="http://v1per.servicez.org/scripts/keepout.tcl" class="postlink">http://v1per.servicez.org/scripts/keepout.tcl</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Fri Apr 15, 2005 1:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[anotheregglover]]></name></author>
		<updated>2005-04-14T17:54:31-04:00</updated>

		<published>2005-04-14T17:54:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48118#p48118</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48118#p48118"/>
		<title type="html"><![CDATA[Help with restrict.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48118#p48118"><![CDATA[
I am using the restrict.tcl script to restrict access to one of my channels.  I only have it loaded on one bot, but whenever a user(me on a different host in this case) enters, a random bot kicks him and it messes up the count.  I tried taking out the newchanban part and having it just putserv the kick and ban, but it still doesnt work.  Here is the script if anybody can help me with this:<br><br><div class="codebox"><p>Code: </p><pre><code># Restricted access TCL V1.4# by quantum @ dalnet# what it does:# k/b's anyone who's not in the bot's userfile and puts a kick counter in the message#####################################  Values to modify##################################### What chan to restrict?set r_chan "#electronica"# Duration of ban in minutes (0 for perm)set r_time 60# File to add kick messages toset r_msg "rkickmsgs"# Flag needed to add msgsset addflag "m"# Flag required to msgsset delflag "m"####################################  You may not modify it##################################bind join -|- "$r_chan *!*@*" r_kickbind pub $addflag !addkickmsg r_addmsgbind pub $delflag !delkickmsg r_delmsgproc r_kick { nick uhost hand chan } {global r_ban r_time r_chan r_msg# create random kick number file and random kick msg file if not otherwise created (lazy bastard)if {![file exists restrictkick]} {set rnum [open restrictkick w]puts $rnum "0"close $rnum }if {![file exists r_msg]} {set rmsg [open r_msg w]puts $rnum "thou hast been neutralized"putlog "*** Restrict 1.3 - Restrict Kick Msg File created with 1 default kick msg.  Type !addkickmsg &lt;msg&gt; to add more."close $rmsg }# get random kick msg#if {[lindex [split $arg] 0] != ""} { set chan [lindex [split $arg] 0] }if {(![file exists $r_msg]) || (![file readable $r_msg])} { putserv "NOTICE $nick :Unable to read from file $r_msg."} else {set kmsg [r_getmsg]}if { ![validuser $hand] } {set rnum [open restrictkick r]gets $rnum knumclose $rnumset cnum [expr $knum + 1]set rnum [open restrictkick w]puts $rnum "$cnum"close $rnum---------------------this is the part i changed to putserv kick and mode +b, but a random bot still kicks the user-------------------newchanban $chan [string trimleft [maskhost [getchanhost $nick $chan]] ~] neutralized " $kmsg \[\002\037$cnum\002\037|\002\037$r_chan\002\037\]" $r_time}}# Get random msg from fileproc r_getmsg { } {global r_msgset kmsg ""set fd [open $r_msg r]while {![eof $fd]} { gets $fd textif {$text != ""} {lappend kmsg $text}}close $fdreturn [lindex $kmsg [rand [llength $kmsg]]]}# Add an msgproc r_addmsg {nick uhost hand chan arg}  {global r_msgset kmsg [join [lrange [split $arg] 0 end]]if {$kmsg == ""} {putserv "NOTICE $nick :Usage: !addkickmsg &lt;kick msg&gt;"} else {if {[prc_addmsg $kmsg]} {putserv "NOTICE $nick :An msg msg was added to $r_msg."} else { putserv "NOTICE $nick :Unable to add msg to $r_msg."}}return 1}# Delete an msgproc r_delmsg {nick uhost hand chan arg} {global r_msgset kmsg [join [lrange [split $arg] 0 end]]if {(![file exists $r_msg]) || (![file readable $r_msg])} { putserv "NOTICE $nick :Unable to read from file $r_msg."} else {if {$kmsg == ""} {putserv "NOTICE $nick :Usage: !delkickmsg &lt;kick msg&gt;"} else {if {[prc_delmsg $kmsg]} { putserv "NOTICE $nick :An was deleted from $r_msg."} else {putserv "NOTICE $nick :Unable to delete msg from $r_msg."}}}return 1}proc prc_addmsg {kmsg} {global r_msgif {[catch {open $r_msg a} fd]} {return 0} else {puts $fd $kmsgclose $fdreturn 1}}proc prc_delmsg {kmsg} {global r_msgset what ""set msgrem 0if {[catch {open $r_msg r} fd]} {return 0} else {while {![eof $fd]} { gets $fd textif {[string tolower $text] != [string tolower $kmsg]} { append what "$text\n"} else { set msgrem 1 } }close $fdif {[catch {open $r_msg w} fd]} {return 0} else {puts $fd $whatclose $fdreturn $msgrem}}}### Endputlog "Restrict 1.4 loaded &lt;\037\002quantum\037\002&gt;"### Create kickmsg file if it doesn't existif {![file exists $r_msg]} {set rmsg [open $r_msg w]puts $rmsg "thou hast been neutralized"putlog "*** Restrict 1.4 - Restrict Kick Msg File created with 1 default kick msg.  Type !addkickmsg &lt;msg&gt; to add more."close $rmsg}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5886">anotheregglover</a> — Thu Apr 14, 2005 5:54 pm</p><hr />
]]></content>
	</entry>
	</feed>
