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

	<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>2010-06-17T20:07:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[SignZ]]></name></author>
		<updated>2010-06-17T20:07:25-04:00</updated>

		<published>2010-06-17T20:07:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93341#p93341</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93341#p93341"/>
		<title type="html"><![CDATA[View current Channeltopic (with !topic)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93341#p93341"><![CDATA[
Well, I did re-read the docs and thought the script could be better (besides getting fixed, which was the fault of another script)<div class="codebox"><p>Code: </p><pre><code># SignZ ownz yousetudef flag topicspewvariable topicwait 30bind pub -|- !topic topic:spewproc topic:spew {nick uhost hand chan text} {if {![channel get $chan topicspew]} {return} elseif {[topic:throttle $hand,$chan $::topicwait]} {putserv "privmsg $chan :$nick, you need to wait for [expr {$::topicthrottle($hand,$chan) - [clock seconds]}] more seconds please..."} else {putserv "privmsg $chan :$nick, $chan's topic is: [topic $chan]"}}# Throttle Proc - Thanks to user# see this post: http://forum.egghelp.org/viewtopic.php?t=9009&amp;start=3proc topic:throttle {id seconds} {global topicthrottleif {[info exists topicthrottle($id)]&amp;&amp;$topicthrottle($id)&gt;[clock seconds]} {set id 1} {set topicthrottle($id) [expr {[clock seconds]+$seconds}]set id 0}}# delete expired entries every 10 minutesbind time - ?0* topic:throttledCleanupproc topic:throttledCleanup args {global topicthrottleset now [clock seconds]foreach {id time} [array get topicthrottle] {if {$time&lt;=$now} {unset topicthrottle($id)}}}</code></pre></div>The docs are really helpfull. <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=11251">SignZ</a> — Thu Jun 17, 2010 8:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-06-17T16:26:58-04:00</updated>

		<published>2010-06-17T16:26:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93336#p93336</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93336#p93336"/>
		<title type="html"><![CDATA[View current Channeltopic (with !topic)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93336#p93336"><![CDATA[
Step 1: (re)read the docs about the pub binding (from doc/tcl-commands.doc).<br><br>Step 2: Modify your currenttopic proc accordingly (Hint: you've got one argument too plenty, remove the excessive one).<br><br>Step 3: Fix this line, or remove it completely:<div class="codebox"><p>Code: </p><pre><code>  set curtop[topic $chan]</code></pre></div>There should be a speace between the variable name, and the value you'd like to assign it. That said, you could just as well insert the command substitution directly into the putserv command:<div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $chan :[topic $chan]"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Jun 17, 2010 4:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SignZ]]></name></author>
		<updated>2010-06-17T16:00:12-04:00</updated>

		<published>2010-06-17T16:00:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93334#p93334</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93334#p93334"/>
		<title type="html"><![CDATA[View current Channeltopic (with !topic)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93334#p93334"><![CDATA[
Yoyoyo, been here looking for some scripts a while, but now I really need your help.<br><br>What I wanna do is, that if I or somebody else (doesn't matter who) types !topic in a channel, the Bot "says" the current topic.<br><br>Like:<br>[@SignZ] !topic<br>[@FlameHaze] Welcome to #SignZ. Need help? Just ask &lt; (which would be the channeltopic)<br><br>I tried it with following "script", but..<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !topic currenttopicproc currenttopic {topic nick uhost hand chan text } {  set curtop[topic $chan]  putserv "privmsg $chan :$curtop"}</code></pre></div>.set errorInfo gives me &gt;<blockquote class="uncited"><div>[21:54:05] &lt;SignZ&gt; .set errorInfo<br>[21:54:05] [FlameHaze] [21:53] tcl: builtin dcc call: *dcc:set SignZ 7 errorInfo<br>[21:54:05] [FlameHaze] Currently: wrong # args: should be "currenttopic topic nick uhost hand chan text"<br>[21:54:06] [FlameHaze] Currently: while executing<br>[21:54:06] [FlameHaze] Currently: "currenttopic $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"</div></blockquote>So, can anbody help me with this (maybe easier than I think) script?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11251">SignZ</a> — Thu Jun 17, 2010 4:00 pm</p><hr />
]]></content>
	</entry>
	</feed>
