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

	<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>2006-10-23T10:40:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2006-10-23T10:40:35-04:00</updated>

		<published>2006-10-23T10:40:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67358#p67358</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67358#p67358"/>
		<title type="html"><![CDATA[enforcebans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67358#p67358"><![CDATA[
Instead of<div class="codebox"><p>Code: </p><pre><code>set kickmsg "$enforce(kmsg)"</code></pre></div>put<div class="codebox"><p>Code: </p><pre><code>set kickmsg [getrandomreason]</code></pre></div> and use metroid's code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Oct 23, 2006 10:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sdays]]></name></author>
		<updated>2006-10-22T20:11:47-04:00</updated>

		<published>2006-10-22T20:11:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67350#p67350</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67350#p67350"/>
		<title type="html"><![CDATA[enforcebans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67350#p67350"><![CDATA[
This is like something im looking for, but can someone edit it where it<br>can load from a txt file thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><div class="codebox"><p>Code: </p><pre><code>bind mode - "* +b" enforcebansset enforce(max) "8"set enforce(kmsg) ""proc enforcebans {nick uhost hand chan mc ban} {   global enforce    if {![botisop $chan]} { return }   set ban [string map {"\\" "\\\\" "\[" "\\["} $ban]   if {[string match -nocase $ban $::botnick]} { return }   set kickmsg "$enforce(kmsg)"   regsub -all :ban: $kickmsg $ban kickmsg   regsub -all :nick: $kickmsg $nick kickmsg   set list ""   foreach user [chanlist $chan] {      if {[matchattr [nick2hand $user] f $chan]} { continue }      if {[string match -nocase $ban $user![getchanhost $user $chan]]} {         lappend list $user      }   }   if {[string match [llength $list] 0]} { return }   if {[llength $list] &gt; $enforce(max)} {      putserv "MODE $chan -ob $nick $ban"   } else {      if {[llength $list] &lt;= "3"} {         putserv "KICK $chan [join $list ,] :$kickmsg"      } else {         set nlist ""         foreach x $list {            lappend nlist $x            if {[llength $nlist] == "3"} {               putserv "KICK $chan [join $nlist ,] :$kickmsg"               set nlist ""            }         }         if {[llength $nlist] != ""} {            putserv "KICK $chan [join $nlist ,] :$kickmsg"            set nlist ""         }      }   }}putlog "Enforcebans loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8306">sdays</a> — Sun Oct 22, 2006 8:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-10-22T11:40:26-04:00</updated>

		<published>2006-10-22T11:40:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67327#p67327</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67327#p67327"/>
		<title type="html"><![CDATA[enforcebans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67327#p67327"><![CDATA[
For a real random reason from a file:<br><div class="codebox"><p>Code: </p><pre><code>proc getrandomreason {} {  set file [open "YOURFILE" r]  set data [split [read $file] \n]  close $file  return [lindex $data [rand [llength $data]]]}</code></pre></div>This can be used via<br><div class="codebox"><p>Code: </p><pre><code>putserv "KICK #channel nickname :[getrandomreason]"</code></pre></div>Or however you may wish to use it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Sun Oct 22, 2006 11:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-10-22T05:43:48-04:00</updated>

		<published>2006-10-22T05:43:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67321#p67321</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67321#p67321"/>
		<title type="html"><![CDATA[enforcebans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67321#p67321"><![CDATA[
There are a lot of posts about reading/writing to/from text files. It's not that hard.   I'd suggest making it simpler by just putting your random kick msgs into the script itself, like:<br><div class="codebox"><p>Code: </p><pre><code>bind pub o|o !kick kickprocproc kickproc {nick uhost hand chan text} {set text [split $text]set kickmsgs {{msg 1}{msg 2}{msg 3}} set kickmsg [lindex $kickmsgs [rand [llength $kickmsgs]]] if {[isop $nick $chan] &amp;&amp; [onchan [join $text] $chan]} {      putkick $chan [join $text] "$kickmsg" }}</code></pre></div>Something like that..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sun Oct 22, 2006 5:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sdays]]></name></author>
		<updated>2006-10-21T18:44:59-04:00</updated>

		<published>2006-10-21T18:44:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67316#p67316</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67316#p67316"/>
		<title type="html"><![CDATA[Re: enforcebans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67316#p67316"><![CDATA[
Yes, but i look, they don't kick from a txt file, and im a noob to edit it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8306">sdays</a> — Sat Oct 21, 2006 6:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-10-21T05:25:31-04:00</updated>

		<published>2006-10-21T05:25:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67301#p67301</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67301#p67301"/>
		<title type="html"><![CDATA[Re: enforcebans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67301#p67301"><![CDATA[
<blockquote class="uncited"><div>I need a enforcebans tcl that load's kick msg's from a txt file thx  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"></div></blockquote><a href="http://forum.egghelp.org/search.php" class="postlink">Search</a> the forums as this has been done (from memory).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Sat Oct 21, 2006 5:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sdays]]></name></author>
		<updated>2006-10-21T04:53:25-04:00</updated>

		<published>2006-10-21T04:53:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67296#p67296</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67296#p67296"/>
		<title type="html"><![CDATA[enforcebans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67296#p67296"><![CDATA[
I need a enforcebans tcl that load's kick msg's from a txt file thx  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8306">sdays</a> — Sat Oct 21, 2006 4:53 am</p><hr />
]]></content>
	</entry>
	</feed>
