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

	<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>2009-03-31T12:20:49-04:00</updated>

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

		<entry>
		<author><name><![CDATA[DaRkOoO]]></name></author>
		<updated>2009-03-31T12:20:49-04:00</updated>

		<published>2009-03-31T12:20:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88225#p88225</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88225#p88225"/>
		<title type="html"><![CDATA[topic script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88225#p88225"><![CDATA[
Works fine,thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10236">DaRkOoO</a> — Tue Mar 31, 2009 12:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-03-31T11:27:36-04:00</updated>

		<published>2009-03-31T11:27:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88223#p88223</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88223#p88223"/>
		<title type="html"><![CDATA[topic script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88223#p88223"><![CDATA[
Please excuse the extra close bracket in my earlier code. My editor should have picked up on that.<br><br>Now will work only in channels with the special flag set in the bot's partyline as follows :-<br><br>.chanset #channelname +topic<br><br>Now will exempt users with whatever global bot flag is set in the configuration section<br><div class="codebox"><p>Code: </p><pre><code># *** Configuration *** ## duration of bans in minutesset vHolmBanTime 10# global bot flag to exempt from bad topic ban# o = global operator# m = global master# n = global ownerset vHolmExemptFlag n# list of bad topic words/phrasesset vHolmBadTopic {    "html"    "#"    "www"    "channel"}# *** Code *** #setudef flag topicbind PUB - !topic pHolmTopicproc pHolmTopic {nick uhost handle channel txt} {    global botnick vHolmBadTopic vHolmBanTime vHolmExemptFlag    if {[channel get $channel topic]} {        if {([isvoice $nick $channel]) || ([isop $nick $channel])} {            set topic [string trim $txt]            if {[llength [split $topic]] != 0} {                if {[botisop $channel]} {                    if {![matchattr $handle $vHolmExemptFlag]} {                        foreach word $vHolmBadTopic {                            if {[string match *$word* $txt]} {                                newchanban $channel $nick!*@* $botnick "bad topic *$word*" $vHolmBanTime                                return 0                            }                        }                    }                    putserv "TOPIC $channel :$nick \:$topic"                    putlog "#$nick# !topic $topic"                } else {puthelp "NOTICE $nick :-error- I need to be an op on $channel to change the topic"}            } else {puthelp "NOTICE $nick :-error- Correct syntax is !topic &lt;topic&gt;"}        } else {puthelp "NOTICE $nick :-error- Only channel voices or above are allowed to change the topic"}    }    return 0}</code></pre></div>I'm sure stuff like this has been written before in the vast Tcl archive on this site. I sort of feel I'm reinventing the wheel.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Tue Mar 31, 2009 11:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DaRkOoO]]></name></author>
		<updated>2009-03-31T09:02:58-04:00</updated>

		<published>2009-03-31T09:02:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88220#p88220</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88220#p88220"/>
		<title type="html"><![CDATA[topic script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88220#p88220"><![CDATA[
Works,just this line  <div class="codebox"><p>Code: </p><pre><code>if {[llength [split $topic]]] != 0} {</code></pre></div> should be <div class="codebox"><p>Code: </p><pre><code>if {[llength [split $topic]] != 0} {</code></pre></div>And now I need to be able to specify it just for one,or two channels,and to make bot dont kick/ban his owner[s].. <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=10236">DaRkOoO</a> — Tue Mar 31, 2009 9:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-03-30T19:44:55-04:00</updated>

		<published>2009-03-30T19:44:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88215#p88215</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88215#p88215"/>
		<title type="html"><![CDATA[topic script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88215#p88215"><![CDATA[
I haven't tested it but should be OK. Give it a try please<br><div class="codebox"><p>Code: </p><pre><code>set vHolmBanTime 10set vHolmBadTopic {    "html"    "#"    "www"    "channel"}bind PUB - !topic pHolmTopicproc pHolmTopic {nick uhost hand channel txt} {    global botnick vHolmBadTopic vHolmBanTime    if {([isvoice $nick $channel]) || ([isop $nick $channel])} {        set topic [string trim $txt]        if {[llength [split $topic]]] != 0} {            if {[botisop $channel]} {                foreach word $vHolmBadTopic {                    if {[string match -nocase "*$word*" $topic]} {                        newchanban $channel $nick!*@* $botnick "bad topic *$word*" $vHolmBanTime                        return 0                    }                }                putserv "TOPIC $channel :$nick \:$topic"                putlog "#$nick# !topic $topic"            } else {puthelp "NOTICE $nick :-error- Bot needs to be an op on $channel to change the topic"}        } else {puthelp "NOTICE $nick :-error- Correct syntax is !topic &lt;topic&gt;"}    } else {puthelp "NOTICE $nick :-error- Only channel voices or above are allowed to change the topic"}    return 0}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Mon Mar 30, 2009 7:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DaRkOoO]]></name></author>
		<updated>2009-03-30T18:09:38-04:00</updated>

		<published>2009-03-30T18:09:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88214#p88214</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88214#p88214"/>
		<title type="html"><![CDATA[topic script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88214#p88214"><![CDATA[
Hello everyone..<br><br>I'm using this tcl for topic:<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !topic holm-pub_topicproc holm-pub_topic {nick uhost handle channel text} {global botnick voice_chan voice_flagif {[isvoice $nick $channel]} {if {$text == ""} {puthelp "NOTICE $nick :Usage: !topic &lt;topic&gt;"return 0}if {[isop $botnick $channel] == "0"} {puthelp "NOTICE $nick :Sorry, I'm not a op on $channel."return 0}if {[isop $botnick $channel] == "1"} {putserv "TOPIC $channel :$nick: $text"putlog "#$nick# !topic $text"}}}</code></pre></div>Now,I need :  If someone try to use !topic with word channel or http or www or #,bot should ban him(and don't set that one topic ofc)<br><br>Regards,<br>Darko.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10236">DaRkOoO</a> — Mon Mar 30, 2009 6:09 pm</p><hr />
]]></content>
	</entry>
	</feed>
