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

	<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>2006-06-09T14:22:48-04:00</updated>

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

		<entry>
		<author><name><![CDATA[theplop]]></name></author>
		<updated>2006-06-09T14:22:48-04:00</updated>

		<published>2006-06-09T14:22:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63859#p63859</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63859#p63859"/>
		<title type="html"><![CDATA[Notes script.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63859#p63859"><![CDATA[
ok the part i'm having trouble with is understanding what each part of the note delivery does.<br><div class="codebox"><p>Code: </p><pre><code>puthelp "PRIVMSG #channel :[lindex $uzente 0] says at [join [lrange [split [lindex $osszesuzenet 0] " "] 2 end]]" </code></pre></div>I got it to display to the channel by replacing $nick with #channel<br><br>Now, i'm trying to figure out what each part is.  <br><br>&lt;@Fat-S&gt; ex_ex[3] says at #teamvatican 09.06.2006. 12.07: hi, this is my note <br><br>I noticed that the channel name, and timestamp are dropped into the database when the note is stored.<br><div class="codebox"><p>Code: </p><pre><code> puts $filemuvelet "$nick $cimzett $csatorna $ido [join $uzenet] "</code></pre></div>i changed that to read<br><div class="codebox"><p>Code: </p><pre><code> puts $filemuvelet "$cimzett : [join $uzenet]  -- $nick $ido "</code></pre></div>which looks like this:<br>kilroy : did you get any messages? -- ex_ex @ 09. 13.40<br><br>Now i seem to have broken the trigger that catches when the person speaks.  I am still looking for it, and will post my finding when i get them.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7294">theplop</a> — Fri Jun 09, 2006 2:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theplop]]></name></author>
		<updated>2006-06-09T13:06:11-04:00</updated>

		<published>2006-06-09T13:06:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63857#p63857</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63857#p63857"/>
		<title type="html"><![CDATA[Notes script.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63857#p63857"><![CDATA[
Thanks for the replies.<br><br>It looks as though the two scripts are very similar.  <br><br>whittinghamj, i will be sticking with yours.<br>ok, now i was wondering if you could give me a hand tweeking it a bit.<br><br>1. i would like it to display thier note in the channel and not in a private message.<br><br>2. i would like to re-arrange how the note is formatted. instead of " ex_ex says at #teamvatican 09.06.2006. 11.12: stupid notes"  something more like (in the channel) "&lt;to nick:&gt; &lt;message&gt; &lt;from nick&gt; &lt;how long ago&gt;"<br><br>I don't expect you guys to do if for me, so i will be trying to do it myself, though I'm not very good at TCL, and help is very much appreciated.<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7294">theplop</a> — Fri Jun 09, 2006 1:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-06-08T23:26:46-04:00</updated>

		<published>2006-06-08T23:26:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63840#p63840</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63840#p63840"/>
		<title type="html"><![CDATA[Notes script.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63840#p63840"><![CDATA[
uzeno.tcl<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Thu Jun 08, 2006 11:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[whittinghamj]]></name></author>
		<updated>2006-06-08T22:26:16-04:00</updated>

		<published>2006-06-08T22:26:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63839#p63839</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63839#p63839"/>
		<title type="html"><![CDATA[Notes script.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63839#p63839"><![CDATA[
this is a message script I have been using on my bot for a long time now. It does exactly what you need. This is NOT my own code but from the TCL dump.<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- "!msg" mess_dobind pub -|- "!messages" mess_listabind pubm - * mess_joinbind time - "20 * * * *" mess_sortbind pub v|o "!messaging" mess_infobind msg -|- "!msg" mess_do_inmsgset message_db "scripts/fserv/msg.dat"set message_whodid ""proc mess_info {nick host hand chan arg} {puthelp "NOTICE $nick :Recepients list: !messages"puthelp "NOTICE $nick :Leaving message: !msg &lt;nick&gt; &lt;message&gt;"}proc mess_sort {a c d e f} {global message_dbset t_count [clock clicks -milliseconds]set filemuvelet [open $message_db r]set osszesuzenet ""while {![eof $filemuvelet]} {set konkretuzenet [gets $filemuvelet]if {[info exists konkretuzenet]&amp;&amp;$konkretuzenet!=""} {lappend osszesuzenet [split $konkretuzenet " "]}}close $filemuveletset osszesuzenet [lsort -index 1 $osszesuzenet]set filemuvelet [open $message_db w]foreach konkretuzenet $osszesuzenet {puts $filemuvelet [join $konkretuzenet " "]}close $filemuveletputlog "!message Done with sorting of data on the database ($message_db)-&gt;[expr double([clock clicks -milliseconds]-$t_count)/1000]s"}proc mess_do_inmsg {nick uhost hand rest} {global botnickputlog "mess_do_inmsg: $rest"set rest [split $rest " "]set cimzett [lindex $rest 0]if {$cimzett == ""} {puthelp "NOTICE $nick :The right format: !msg &lt;nick&gt; &lt;message&gt;"} else {mess_write $nick $cimzett [lrange $rest 1 end] "MSG"puthelp "NOTICE $nick :Message for $cimzett accepted"}}proc mess_do {nick host hand chan args} {set args [lindex $args 0]set args [split $args " "]set cimzett [lindex $args 0]if {$cimzett == ""} {puthelp "NOTICE $nick :The right format: !msg &lt;nick&gt; &lt;message&gt;"} else {if {[onchan $cimzett $chan]} {set mwhom $cimzettset mmoo [finduser "*![getchanhost $mwhom $chan]"]if {[validuser $mmoo]} {set cimzett $mmoo#putlog "uj uzenet $cimzett botuser szamara"} else {#putlog "uj uzenet $cimzett nick szamara"}}mess_write $nick $cimzett [lrange $args 1 end] $chanputhelp "NOTICE $nick :Message for $cimzett accepted"}}proc mess_write { nick cimzett uzenet csatorna } {global message_dbset cimzett [string tolower $cimzett]if {![file exists $message_db]} {file mkdir [lindex [split $message_db /] 0]set filemuvelet [open $message_db w+]puts $filemuvelet "Hadace !messaging database file created"} else {set filemuvelet [open $message_db a]}set systemTime [clock seconds]set ido [clock format $systemTime -format {%d.%m.%Y. %H.%M:}]puts $filemuvelet "$nick $cimzett $csatorna $ido [join $uzenet] "close $filemuvelet}#####################proc mess_join { nick uhost hand chan args } {#puthelp "NOTICE HeyBaby : $nick $uhost $hand $chan $args"if {$hand != "*"} {set explain [string tolower $hand]} else {set explain [string tolower $nick]}global message_db message_whodidif {![info exists message_whodid]} {set message_whodid ""}set nick [string tolower $nick]set filemuvelet [open $message_db r]set osszesuzenet ""while {![eof $filemuvelet]} {gets $filemuvelet konkretuzenetset konkretuzenet [split $konkretuzenet " "]if {[string equal -nocase [lindex $konkretuzenet 1] $explain]} {lappend osszesuzenet [join $konkretuzenet " "]}}close $filemuveletset count 0if {[llength $osszesuzenet]==1} {set uzente [split [lindex $osszesuzenet 0] " "]puthelp "PRIVMSG $nick :[lindex $uzente 0] says at [join [lrange [split [lindex $osszesuzenet 0] " "] 2 end]]"incr count} else {foreach konkretuzenet $osszesuzenet {incr countputhelp "PRIVMSG $nick :[lindex $konkretuzenet 0]\[${count}] says at [join [lrange [split $konkretuzenet " "] 2 end]]"} }if {$count == 0} { } else {lappend message_whodid [list $explain [string tolower $chan]]set explain [message_filterstr $explain];# Don't allow code to be executedset chan [message_filterstr $chan];# ensure []s are properly handled...mess_delete $explain}}###############################################xproc message_filterstr { data } {regsub -all -- \\\\ $data \\\\\\\\ dataregsub -all -- \\\[ $data \\\\\[ dataregsub -all -- \\\] $data \\\\\] dataregsub -all -- \\\} $data \\\\\} dataregsub -all -- \\\{ $data \\\\\{ dataregsub -all -- \\\" $data \\\\\" datareturn $data}proc mess_delete { cimzett {remnum "all"}} {global message_dbset cimzett [string tolower $cimzett]set filemuvelet [open $message_db r]set osszesuzenet ""set count 1if {$remnum == "all"} {while {![eof $filemuvelet]} {gets $filemuvelet konkretuzenetif {![string equal -nocase [lindex [split $konkretuzenet] 1] $cimzett]} {lappend osszesuzenet $konkretuzenet}}} else {while {![eof $filemuvelet]} {gets $filemuvelet konkretuzenetif {![string equal -nocase [lindex [split $konkretuzenet] 1] $cimzett] || ($count != $remnum &amp;&amp; $remnum != -2)} {if {[info exists konkretuzenet]&amp;&amp;$konkretuzenet!=""} {lappend osszesuzenet $konkretuzenet}if {[string equal -nocase [lindex [split $konkretuzenet] 1] $cimzett]} {incr count}} else {incr count}}}close $filemuveletset filemuvelet [open $message_db w]foreach konkretuzenet $osszesuzenet {puts $filemuvelet $konkretuzenet}close $filemuvelet}proc mess_lista {nick host hand chan args} { global message_dbputserv "NOTICE $nick :\[ Recepients list \]"set lista ""set filemuvelet [open $message_db r]while {![eof $filemuvelet]} {lappend lista [lindex [split [gets $filemuvelet] " "] 1]}close $filemuveletforeach {a b c d e f g} [lsort -unique $lista] {putserv "NOTICE $nick :Recepients: $a $b $c $d $e $f $g"}putserv "NOTICE $nick :\[ end of the list \]" }</code></pre></div>I hope this helps you. I have modded this script a little from its original state and it works perfectly. Any questions drop me a line.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7783">whittinghamj</a> — Thu Jun 08, 2006 10:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theplop]]></name></author>
		<updated>2006-06-08T15:01:30-04:00</updated>

		<published>2006-06-08T15:01:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63829#p63829</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63829#p63829"/>
		<title type="html"><![CDATA[Notes script.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63829#p63829"><![CDATA[
I am looking for a script that will give the message as soon as the person speaks. So if i left a message for bob, it would be delivered as soon as bob spoke.  It also lets you know who left the message.<br><br>If possible, make it so that if you saved a note to "slack" it would deliver it to anyone whos nick starts with slack, eg: slackware and slacker.<br><br>This make sense?<br>Thanks!<br><br>syntax<br>!note &lt;nick&gt; &lt;message&gt;<br><br>&lt;@i2tb&gt;!note bob hi bob, how are you?<br>&lt;@Fat-X&gt;*note has been saved*<br>&lt;@i2tb&gt; dude<br>&lt;@DanMan&gt; wassup?<br>&lt;bob&gt;Hi guys<br>&lt;@Fat-X&gt;bob: hi bob, how are you? -- i2tb (2h4m ago)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7294">theplop</a> — Thu Jun 08, 2006 3:01 pm</p><hr />
]]></content>
	</entry>
	</feed>
