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

	<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>2011-06-25T07:10:17-04:00</updated>

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

		<entry>
		<author><name><![CDATA[hrz]]></name></author>
		<updated>2011-06-25T07:10:17-04:00</updated>

		<published>2011-06-25T07:10:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97091#p97091</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97091#p97091"/>
		<title type="html"><![CDATA[topic change ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97091#p97091"><![CDATA[
I think this would be much simpler, basically:<br>.chanset #chan *word1*,*word2*,*some more words :D*<br>and<br>.chanset $chan This is what I want the topic to be if someone puts something nasty in my old topic<br>and<br>.chanset #chan tb-kickmsg I think you're mean for setting that topic, meanie!<br>and<br>.chanset #chan +tb<div class="codebox"><p>Code: </p><pre><code>setudef flag tb setudef str tb-wordssetudef str tb-topicsetudef str tb-kickmsgproc topc_proc {nick uhost handle chan topic} {     if {![channel get $chan tb] || [isbotnick $nick] || [string trim $topic] == "" } {        return    }    foreach word [split [channel get $chan tb-words] ,] {         if {[string match -nocase [join $b_word] $topic]} {set match 1}     }    if {[info exists $match]} {        set banmask [maskhost $nick!$uhost [channel get $chan ban-type]]        newchanban $chan $banmask TOPICBAN [channel get $chan tp-kickmsg] [channel get $chan ban-time]        pushmode $target_chan "+b" $banmask        flushmode $chan        putkick $chan $nick [channel get $chan tp-kickmsg]    }}bind topc -|- "*" topc_procputlog "Topic badword banner thingy hack"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11700">hrz</a> — Sat Jun 25, 2011 7:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2011-06-25T05:20:24-04:00</updated>

		<published>2011-06-25T05:20:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97090#p97090</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97090#p97090"/>
		<title type="html"><![CDATA[topic change ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97090#p97090"><![CDATA[
try it:<div class="codebox"><p>Code: </p><pre><code># Author: tomekk# e-mail:  tomekk/@/oswiecim/./eu/./org# home page: http://tomekk.oswiecim.eu.org/## Version 0.1## This file is Copyrighted under the GNU Public License.# http://www.gnu.org/copyleft/gpl.html# if you want to use this script on your chan, type in eggdrop console (via telnet or DCC chat)# .chanset #channel_name +tb# and later .save# kick messageset kick_msg "bye bye"# bad words (case insensitive)set bad_topic_words {*anus**something**word1**word2*}# topicsset topics {"#chan1\ntopic for channel #chan1""#chan2\ntopic for channel #chan2"}# ban type # 1)  *!*@*.domain.com # 2)  *!*@some.domain.com # 3)  *nick*!*@some.domain.com # 4)  *!*ident*@some.domain.comset ban_type 1######################################################bind topc -|- "*" topc_proc setudef flag tbproc topc_proc { nick uhost handle chan topic } {global bad_topic_words kick_msg botnick topicsif {![channel get $chan tb]} {return}  if {$botnick == $nick} {return}if {[string trim $topic] != "" } {set kick_fag 0                                                                                          foreach b_word [split $bad_topic_words "\n"] {if {[string match -nocase [join $b_word] $topic]} {                                    set kick_fag 1break}}if {$kick_fag == 1} {                                                                         putquick "MODE $chan +b [banmask $uhost $nick]"putkick $chan $nick $kick_msgforeach topic $topics {if {$topic != ""} {set topic_data [split $topic "\n"]set topic_chan [lindex $topic_data 0]set topic_topic [lindex $topic_data 1]if {$topic_chan == $chan} {putquick "TOPIC $chan :$topic_topic"break}}}}}}proc banmask { host nick } {global ban_typeswitch -- $ban_type {1 {set mask "*!*@[lindex [split [maskhost $host] "@"] 1]"}2 {set mask "*!*@[lindex [split $host @] 1]"}3 {set mask "*$nick*!*@[lindex [split $host "@"] 1]"}4 {set mask "*!*[lindex [split $host "@"] 0]*@[lindex [split $host "@"] 1]"}return $mask}}putlog "topic-ban.tcl ver 0.1 by tomekk loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sat Jun 25, 2011 5:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[samhain]]></name></author>
		<updated>2011-06-24T08:48:49-04:00</updated>

		<published>2011-06-24T08:48:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97086#p97086</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97086#p97086"/>
		<title type="html"><![CDATA[topic change ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97086#p97086"><![CDATA[
The script works perfect, tommek, One more little tweak to do, I want that after the bot bans the user, The bot should change the topic to some text.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8567">samhain</a> — Fri Jun 24, 2011 8:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2011-06-22T04:54:46-04:00</updated>

		<published>2011-06-22T04:54:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97064#p97064</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97064#p97064"/>
		<title type="html"><![CDATA[topic change ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97064#p97064"><![CDATA[
You're right, moving botnick check before foreach could save some IO operations when this situation occurs (but I don't think so this ever will happen...)<br><br>'global botnick' is kinda oldschool but is proper<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Wed Jun 22, 2011 4:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-06-22T02:50:40-04:00</updated>

		<published>2011-06-22T02:50:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97062#p97062</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97062#p97062"/>
		<title type="html"><![CDATA[topic change ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97062#p97062"><![CDATA[
you should replace<div class="codebox"><p>Code: </p><pre><code>if {$botnick != $nick} { </code></pre></div>with<div class="codebox"><p>Code: </p><pre><code>if {[isbotnick $nick]} return</code></pre></div>and move it after<div class="codebox"><p>Code: </p><pre><code>if {![channel get $chan tb]} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Jun 22, 2011 2:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2011-06-21T16:27:42-04:00</updated>

		<published>2011-06-21T16:27:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97061#p97061</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97061#p97061"/>
		<title type="html"><![CDATA[topic change ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97061#p97061"><![CDATA[
fixed...<br><div class="codebox"><p>Code: </p><pre><code># Author: tomekk# e-mail:  tomekk/@/oswiecim/./eu/./org# home page: http://tomekk.oswiecim.eu.org/## Version 0.1## This file is Copyrighted under the GNU Public License.# http://www.gnu.org/copyleft/gpl.html# if you want to use this script on your chan, type in eggdrop console (via telnet or DCC chat)# .chanset #channel_name +tb# and later .save# kick messageset kick_msg "bye bye"# bad words (case insensitive)set bad_topic_words {*anus**something**word1**word2*}# ban type # 1)  *!*@*.domain.com # 2)  *!*@some.domain.com # 3)  *nick*!*@some.domain.com # 4)  *!*ident*@some.domain.comset ban_type 1######################################################bind topc -|- "*" topc_proc setudef flag tbproc topc_proc { nick uhost handle chan topic } {global bad_topic_words kick_msg botnickif {![channel get $chan tb]} {return}  if {[string trim $topic] != "" } {set kick_fag 0                                                                                          foreach b_word [split $bad_topic_words "\n"] {if {[string match -nocase [join $b_word] $topic]} {                                          set kick_fag 1break}}if {$kick_fag == 1} {                                                                         if {$botnick != $nick} {putquick "MODE $chan +b [banmask $uhost $nick]"putkick $chan $nick $kick_msg}}}}proc banmask { host nick } {global ban_typeswitch -- $ban_type {1 {set mask "*!*@[lindex [split [maskhost $host] "@"] 1]"}2 {set mask "*!*@[lindex [split $host @] 1]"}3 {set mask "*$nick*!*@[lindex [split $host "@"] 1]"}4 {set mask "*!*[lindex [split $host "@"] 0]*@[lindex [split $host "@"] 1]"}return $mask}}putlog "topic-ban.tcl ver 0.1 by tomekk loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Tue Jun 21, 2011 4:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[samhain]]></name></author>
		<updated>2011-06-21T15:21:24-04:00</updated>

		<published>2011-06-21T15:21:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97060#p97060</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97060#p97060"/>
		<title type="html"><![CDATA[topic change ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97060#p97060"><![CDATA[
* gasgas changes topic to ' anus rectum'<br>* BallotBox sets mode: +b *!*@182.177.61.*<br>* gasgas was kicked by BallotBox (Trolling with the channel topic Badword in topic detected.)<br>&lt;+Hawk-&gt; good<br>* Retrieving #AmericaPolitics modes...<br>* sheperd changes topic to '  Ron Paul  /  Michelle Bachmann  2012   '<br>* Hawk- changes topic to 'Today is the anniversary of the ratification of the US Constitution on  June 21, 1788'<br>* ezwinner changes topic to ''<br>* BallotBox sets mode: -b+b *!*@Cunty.users.undernet.org *!*@*.undernet.org<br>* WebGuy sets mode: -b *!*@*.undernet.org<br>* ezwinner was kicked by BallotBox (Trolling with the channel topic Badword in topic detected.)<br>* BallotBox sets mode: +b *!*@Cunty.users.undernet.org<br><br>The script banned ezwinner for doing nothing.....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8567">samhain</a> — Tue Jun 21, 2011 3:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2011-06-21T06:23:51-04:00</updated>

		<published>2011-06-21T06:23:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97053#p97053</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97053#p97053"/>
		<title type="html"><![CDATA[topic change ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97053#p97053"><![CDATA[
try this script, it has couple of years... it should work...<div class="codebox"><p>Code: </p><pre><code># Author: tomekk# e-mail:  tomekk/@/oswiecim/./eu/./org# home page: http://tomekk.oswiecim.eu.org/## Version 0.1## This file is Copyrighted under the GNU Public License.# http://www.gnu.org/copyleft/gpl.html# if you want to use this script on your chan, type in eggdrop console (via telnet or DCC chat)# .chanset #channel_name +tb# and later .save# kick messageset kick_msg "bye bye"# bad words (case insensitive, line-by-line)set bad_topic_words {*anus**something**word1**word2*}# ban type # 1)  *!*@*.domain.com # 2)  *!*@some.domain.com # 3)  *nick*!*@some.domain.com # 4)  *!*ident*@some.domain.comset ban_type 1######################################################bind topc -|- "*" topc_proc setudef flag tbproc topc_proc { nick uhost handle chan topic } {global bad_topic_words kick_msg botnickif {![channel get $chan tb]} {return}  set kick_fag 0                                                                                          foreach b_word [split $bad_topic_words "\n"] {if {[string match -nocase [join $b_word] $topic]} {                                          set kick_fag 1break}}if {$kick_fag == 1} {                                                                         if {$botnick != $nick} {putquick "MODE $chan +b [banmask $uhost $nick]"putkick $chan $nick $kick_msg}}}proc banmask { host nick } {global ban_typeswitch -- $ban_type {1 {set mask "*!*@[lindex [split [maskhost $host] "@"] 1]"}2 {set mask "*!*@[lindex [split $host @] 1]"}3 {set mask "*$nick*!*@[lindex [split $host "@"] 1]"}4 {set mask "*!*[lindex [split $host "@"] 0]*@[lindex [split $host "@"] 1]"}return $mask}}putlog "topic-ban.tcl ver 0.1 by tomekk loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Tue Jun 21, 2011 6:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[samhain]]></name></author>
		<updated>2011-06-21T05:09:38-04:00</updated>

		<published>2011-06-21T05:09:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97051#p97051</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97051#p97051"/>
		<title type="html"><![CDATA[topic change ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97051#p97051"><![CDATA[
* Inertia changes topic to 'ANUS RECTUM  ANUS RECTUM  ANUssss RECTUM  ANUS RECTUMANUS RECTUM AHAHAHAHAHAHHA ANUS RECTUM AHAHA<br>A guy usually floods our channel with that kind of stuff, Because usually our channel is -t, so normal users can change topics, I need a script which has a list of words, so if a user changes a topic that includes one of those words, the guy should be banned from the channel by the eggie, thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8567">samhain</a> — Tue Jun 21, 2011 5:09 am</p><hr />
]]></content>
	</entry>
	</feed>
