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

	<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>2004-10-13T11:01:06-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-10-13T11:01:06-04:00</updated>

		<published>2004-10-13T11:01:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41786#p41786</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41786#p41786"/>
		<title type="html"><![CDATA[Finding out when a topic was set]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41786#p41786"><![CDATA[
First off, thanks to both to you. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>gb, thanks! Works great.<br><br>I'll promise I'll analyse that code, so I get what's going on <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">.<p>Statistics: Posted by Guest — Wed Oct 13, 2004 11:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2004-10-12T23:45:26-04:00</updated>

		<published>2004-10-12T23:45:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41783#p41783</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41783#p41783"/>
		<title type="html"><![CDATA[Finding out when a topic was set]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41783#p41783"><![CDATA[
Something like this should do the trick<div class="codebox"><p>Code: </p><pre><code>bind raw - "331" reply:notopicbind raw - "333" reply:topicwhotimebind dcc -|- foo dcc:gettopicproc dcc:gettopic {hand idx arg} { global topic  set chan [lindex [split $arg] 0]  if {$chan == ""} {    putdcc $idx "Syntax: .foo &lt;#channel&gt;"    return  }  if {[catch {botonchan $chan}]} {    putdcc $idx "I'm not on $chan!"    return  }  set topic(idx) $idx  putserv "TOPIC $chan"}proc reply:notopic {from key args} { global topic  putdcc $topic(idx) "No topic is set."}proc reply:topicwhotime {from key args} { global topic  set when [lindex [join $args] end]  putdcc $topic(idx) "Topic was set: [ctime $when] ([duration [expr [clock seconds]-$when]] ago)"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Tue Oct 12, 2004 11:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-10-12T21:38:01-04:00</updated>

		<published>2004-10-12T21:38:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41782#p41782</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41782#p41782"/>
		<title type="html"><![CDATA[Finding out when a topic was set]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41782#p41782"><![CDATA[
Well that is not that difficult. Try implementing the script and let us know if you recieve any errors.<br><br>You might have some difficultly with the raw proc and splitting the text other than that it would be fairly easy.<br><br>You can save the unixtime in notes, make the bot send a note to you, or memo you if you have MemoServices or you could write it to a file and make public trigger to retrieve it.<br><br>Just remember the raw 333, will only trigger when a topic is changed. So you cannot make it trigger before that. You cannot bind dcc to trigger a raw on 333. Just bind raw 333 and make a proc to trigger it get the unixtime and save it as I said.<br><br>Then make a public trigger to retrieve the unixtime.<br><br>Question:<br>What will you do if you want the bot to retrieve the time when the topic was set, when it joins the channel? How about thinking about that too.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Tue Oct 12, 2004 9:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-10-12T15:47:09-04:00</updated>

		<published>2004-10-12T15:47:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41773#p41773</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41773#p41773"/>
		<title type="html"><![CDATA[Finding out when a topic was set]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41773#p41773"><![CDATA[
Hi!<br><br>My objective is the following: I want to create a partyline command ".foo #channel" that returns the timestamp of when the topic on the channel was set to the partyline.<br><br>I have a *rough* understanding of how to do this: I have to bind a partyline command that, when it is issued, binds the raw numerical 333, issues a topic command, catches the raw server reply, scans it for the unixtime field in the reply and puts it on the partyline via putlog.<br><br>Now, I'm a total TCL beginner, and while I think I understand what I have to do here on a conceptual level, I will never ever get the syntax right. Can anybody help me?<p>Statistics: Posted by Guest — Tue Oct 12, 2004 3:47 pm</p><hr />
]]></content>
	</entry>
	</feed>
