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

	<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>2013-06-15T16:40:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2013-06-15T16:40:57-04:00</updated>

		<published>2013-06-15T16:40:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101680#p101680</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101680#p101680"/>
		<title type="html"><![CDATA[Public note script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101680#p101680"><![CDATA[
Ok, speechless was friendly enough to write a 8.4 version:<br><div class="codebox"><p>Code: </p><pre><code>setudef str notesbind pub - .note pub_notebind join - pub_note_checkbind pubm - pub_note_bindproc pub_note {n u h c a} {set notes [channel get $c notes]set m [join [lrange [split $a] 1 end]]set t [lindex [split $a] 0]lappend notes $t\n$m\n[clock seconds]\n$nchannel set $c notes $notesputnotc $n "Note was sent."}proc pub_note_check {n c} {set notes [channel get $c notes]set start 0while {[set idx [lsearch -start $start -glob [string tolower $notes] "[string tolower $n]\n*"]] &gt; -1} {foreach {t m c f} [split [lindex $notes $idx] \n] { break }putmsg $c "$n: $f left a note [duration [expr {[clock seconds] - $c}]] $m"set notes [lreplace $notes $idx $idx]set start [incr idx -1]}channel set $c notes $notes}proc pub_note_bind {n u h c args} {pub_note_check $n $c}</code></pre></div>To be clear: 8.4 is end-of-life, and I refuse it to change something so it can work with 8.4<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Sat Jun 15, 2013 4:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2013-06-15T14:37:36-04:00</updated>

		<published>2013-06-15T14:37:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101679#p101679</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101679#p101679"/>
		<title type="html"><![CDATA[Public note script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101679#p101679"><![CDATA[
SQLite version (not channel specific)<br><div class="codebox"><p>Code: </p><pre><code>package require sqlite3sqlite3 notesdb pubnotes.dbnotesdb eval {CREATE TABLE IF NOT EXISTS notes (from TEXT, time INTEGER, to TEXT, message TEXT}bind pub - .note pub_notebind join - pub_note_joinbind pubm - pub_note_bindproc pub_note {n u h c a} {    set m [join [lassign [split $a] t]]    set time [clock seconds]    notesdb eval {INSERT INTO notes VALUES ($n, $time, $t, $m)}    putnotc $n "Note was send."}proc pub_note_check {n c} {    set notes [channel get $c notes]    notesdb eval {SELECT * FROM notes WHERE to = $n} {        putmsg $c "$to: $from left a note [duration [expr {[clock seconds] - $time}]] ago: $message"    }    notesdb eval {DELETE FROM notes WHERE to = $n}}proc pub_note_bind {n u h c args} {pub_note_check $n $c}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Sat Jun 15, 2013 2:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2013-06-13T17:26:10-04:00</updated>

		<published>2013-06-13T17:26:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101677#p101677</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101677#p101677"/>
		<title type="html"><![CDATA[Public note script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101677#p101677"><![CDATA[
Upgrade to at least Tcl 8.5<br><br>Tcl 8.4 is end of life.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Thu Jun 13, 2013 5:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SignZ]]></name></author>
		<updated>2013-06-13T10:57:29-04:00</updated>

		<published>2013-06-13T10:57:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101675#p101675</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101675#p101675"/>
		<title type="html"><![CDATA[Public note script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101675#p101675"><![CDATA[
Thanks Johannes, but I get an error when I do .note anybody<blockquote class="uncited"><div>[16:55:15] Tcl error [pub_note]: invalid command name "lassign"</div></blockquote>I restarted the bot already, but that did nothing.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11251">SignZ</a> — Thu Jun 13, 2013 10:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2013-06-15T14:27:28-04:00</updated>

		<published>2013-06-11T15:38:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101657#p101657</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101657#p101657"/>
		<title type="html"><![CDATA[Public note script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101657#p101657"><![CDATA[
Easy<br><div class="codebox"><p>Code: </p><pre><code>setudef str notesbind pub - .note pub_notebind join - pub_note_joinbind pubm - pub_note_bindproc pub_note {n u h c a} {    set notes [channel get $c notes]    set m [lassign [split $a] t]     dict lappend notes $t [list message $m time [clock seconds] from $n]    channel set $c notes $notes    putnotc $n "Note was send."}proc pub_note_check {n c} {    set notes [channel get $c notes]    if {[dict exists $notes $n]} {         foreach m [dict get $notes $n] {            putmsg $c "$n: [dict get $m from] left a note [duration [expr {[clock seconds] - [dict get $m time]}]] ago: [dict get $m message]"          }          dict unset notes $n          channel set $c notes $notes    }}proc pub_note_bind {n u h c args} {pub_note_check $n $c}</code></pre></div>Not tested.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Tue Jun 11, 2013 3:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SignZ]]></name></author>
		<updated>2013-06-10T07:02:53-04:00</updated>

		<published>2013-06-10T07:02:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101653#p101653</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101653#p101653"/>
		<title type="html"><![CDATA[Public note script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101653#p101653"><![CDATA[
Hello ladies and gentlemen, today I come to you to request a public note script.<br>It should use channel commands (well, only one command -&gt; .note $nick $text) and tell $nick the note as soon as he either joins the channel or says something.<br>The only note scripts I have found either use the partyline or a query-based system.<br>I'd like the output to be something like "$nick: $othernick left a note $time ago: $text" where $nick is the target and $othernick is the one who left the note. (for example: "SignZ: randomguy left a note 1 hour, 52 minutes ago: this is a note")<br>I hope you guys can help me with this request.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11251">SignZ</a> — Mon Jun 10, 2013 7:02 am</p><hr />
]]></content>
	</entry>
	</feed>
