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

	<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-29T23:06:58-04:00</updated>

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

		<entry>
		<author><name><![CDATA[salyn]]></name></author>
		<updated>2006-06-29T09:54:49-04:00</updated>

		<published>2006-06-29T09:54:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64433#p64433</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64433#p64433"/>
		<title type="html"><![CDATA[publicnotes1.0.1 - help please?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64433#p64433"><![CDATA[
<blockquote class="uncited"><div>and if you use "file delete" from TCL it will run even on both Very Happy.<br><br>De Kus </div></blockquote>Ok, little more awake.......forget about using that other script, one small little change worked.<br><br>thanks so much<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7887">salyn</a> — Thu Jun 29, 2006 9:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[salyn]]></name></author>
		<updated>2006-06-29T09:27:22-04:00</updated>

		<published>2006-06-29T09:27:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64430#p64430</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64430#p64430"/>
		<title type="html"><![CDATA[publicnotes1.0.1 - help please?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64430#p64430"><![CDATA[
Hmm, tried your script, and maybe i'm just not awake enough to think this through, but when i tested it, i got<br><blockquote class="uncited"><div>06:18 &lt;decadent`pleasure&gt; You must have a *.users.undernet.org hostmask to use notes, sorry!</div></blockquote>i'm not using this on undernet<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7887">salyn</a> — Thu Jun 29, 2006 9:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-06-29T04:25:54-04:00</updated>

		<published>2006-06-29T04:25:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64425#p64425</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64425#p64425"/>
		<title type="html"><![CDATA[publicnotes1.0.1 - help please?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64425#p64425"><![CDATA[
According to another post, 'file delete' doesn't work either in windows. See:<br><a href="http://forum.egghelp.org/viewtopic.php?p=62509" class="postlink">http://forum.egghelp.org/viewtopic.php?p=62509</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Thu Jun 29, 2006 4:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-06-29T05:20:48-04:00</updated>

		<published>2006-06-29T04:20:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64424#p64424</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64424#p64424"/>
		<title type="html"><![CDATA[publicnotes1.0.1 - help please?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64424#p64424"><![CDATA[
and if you use "file delete" from TCL it will run even on both <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<br><br>Edit: has it been tried to be used with the full functional TCL like 8.4.9 was? Meaning no need for that stdin/ou thing.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Jun 29, 2006 4:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-06-29T04:15:33-04:00</updated>

		<published>2006-06-29T04:15:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64423#p64423</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64423#p64423"/>
		<title type="html"><![CDATA[publicnotes1.0.1 - help please?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64423#p64423"><![CDATA[
Presumably this is on a windows box, which doesn't have an 'rm' command, it has 'del'<br><br>BTW, that script is exploitable, since it does not handle tcl-special chars, and especially since you're using 'exec'<br><br>I rewrote that script to be safe. If you want to look it over for ideas, it's at:<br><a href="http://members.dandy.net/~fbn/publicnotes.rosc2112.tcl.txt" class="postlink">http://members.dandy.net/~fbn/publicnot ... 12.tcl.txt</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Thu Jun 29, 2006 4:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[salyn]]></name></author>
		<updated>2006-06-28T22:00:12-04:00</updated>

		<published>2006-06-28T22:00:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64416#p64416</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64416#p64416"/>
		<title type="html"><![CDATA[publicnotes1.0.1 - help please?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64416#p64416"><![CDATA[
<blockquote class="uncited"><div>It would appear the above folder, publicnotes, is not being created or the file is not being created within it (if it does indeed exist).</div></blockquote>yea the folder is there, and the file is created. i'm getting the notes<br><br>next idea?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7887">salyn</a> — Wed Jun 28, 2006 10:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-06-28T20:45:15-04:00</updated>

		<published>2006-06-28T20:45:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64415#p64415</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64415#p64415"/>
		<title type="html"><![CDATA[publicnotes1.0.1 - help please?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64415#p64415"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>eval "exec rm ./publicnotes/public$lowercasenick.txt" </code></pre></div>It would appear the above folder, publicnotes, is not being created or the file is not being created within it (if it does indeed exist).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Wed Jun 28, 2006 8:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[salyn]]></name></author>
		<updated>2006-06-29T23:06:58-04:00</updated>

		<published>2006-06-28T20:38:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64414#p64414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64414#p64414"/>
		<title type="html"><![CDATA[publicnotes1.0.1 - help please?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64414#p64414"><![CDATA[
Script works great........except it won't erase the notes. ideas?<br><div class="codebox"><p>Code: </p><pre><code>bind join - * onjoin_notesbind msg - !erasenotes erase_notesbind msg - !leavenote leave_notesbind msg - !getnotes get_notesbind msg - !noteshelp help_notesbind msg - !delnotes erase_notesbind msg - !sendnote leave_notesbind msg - !notehelp help_notesbind msg - !checknotes get_notesbind msg - !notes help_notes#This is the per user limit on notes received at one time (not sent! :).set limitnotes 20proc help_notes { nick uhost hand text } {  global botnick  puthelp "PRIVMSG $nick :Use /msg $botnick !leavenote &lt;nick&gt; &lt;text&gt; to send a note to any of the DJ's."   puthelp "PRIVMSG $nick :DJ's? Use /msg $botnick !getnotes to read your notes or /msg $botnick !erasenotes to delete them."  puthelp "PRIVMSG $nick :The script will let you know if you have notes when you join the channel. Please delete your notes after reading them. Otherwise you wont be able to get more (limit is 20)."  return 1}proc onjoin_notes { nick uhost hand chan } {  global botnick  set n [dosearchnote $nick]    if ($n&gt;0) {       putserv "PRIVMSG $nick :You have $n notes waiting to be read. Use /msg $botnick !getnotes to read them."      return 1    }  return 0}proc erase_notes { nick uhost hand text } {  set lowercasenick [string tolower $nick]  set a [dosearchnote $nick]  if ($a&gt;0) {  putserv "PRIVMSG $nick :All your notes have been deleted"  eval "exec rm ./publicnotes/public$lowercasenick.txt"  return 1  } else {    putserv "PRIVMSG $nick :You didnt have any notes :P"    return 0  }}proc dosearchnote {getnick} {  set lowercasenick [string tolower $getnick]  set notesf [file exists "./publicnotes/public$lowercasenick.txt"]  if ($notesf==0) {     return 0  }  set notesfile [open "./publicnotes/public$lowercasenick.txt" "r+"]  set numbernotes 0  while {[eof $notesfile] == 0} {    set line [gets $notesfile]    set nickline [lindex $line 0]    if {[string compare [string tolower $nickline] [string tolower $getnick]] == 0} {      set numbernotes [incr numbernotes]    }  }  close $notesfile  return $numbernotes}proc leave_notes { nick uhost hand text } {  global limitnotes  set getnick [lindex $text 0]  set msg [lrange $text 1 end]  set numbernotes [dosearchnote $getnick]  set cmp [expr $numbernotes &gt;= $limitnotes]  if ($cmp&gt;0) {    putserv "PRIVMSG $nick :The user already has $limitnotes notes. No more notes can be added to prevent spam."  } else {    set lowercasenick [string tolower $getnick]    set thereis [file exists "./publicnotes/public$lowercasenick.txt"]    set cmp [expr $thereis == 1]    if ($cmp) {      set notesfile [open "./publicnotes/public$lowercasenick.txt" "a"]    } else {      set notesfile [open "./publicnotes/public$lowercasenick.txt" "w+"]    }    puts $notesfile "$getnick $nick $msg"    putserv "PRIVMSG $nick :Note to $getnick has been stored."    close $notesfile  }  return 1}proc get_notes { nick uhost hand text } {  set lowercasenick [string tolower $nick]  set thereis [file exists "./publicnotes/public$lowercasenick.txt"]  if ($thereis==0) {    putserv "PRIVMSG $nick :You didnt have any notes."    return 1  }  set notesfile [open "./publicnotes/public$lowercasenick.txt" "r+"]  if {[eof $notesfile]} {    putserv "PRIVMSG $nick :You dont have any notes."    close $notesfile  } else {    set yes 0    set b [dosearchnote $nick]    set cmp [expr $b &gt; 0]    if ($cmp&lt;=0) {      putserv "PRIVMSG $nick :You dont have any notes."      close $notesfile      return 1    }      while {[eof $notesfile] == 0} {      set line [gets $notesfile]      set thisnick [lindex $line 0]      set cmpstr [string compare [string tolower $thisnick] [string tolower $nick]]      if ($cmpstr==0) {        set sendnick [lindex $line 1]        set msg [lrange $line 2 end]        putserv "PRIVMSG $nick :You have a note from $sendnick -&gt; $msg"        set yes 1      }    }    if { $yes==0 } {      putserv "PRIVMSG $nick :You dont have any notes. Stop bugging me."    }    close $notesfile  }  return 1}</code></pre></div>so when i do the !erasenotes i get this error in the bot:<blockquote class="uncited"><div>[17:28] Tcl error [erase_notes]: couldn't execute "rm": no such file or directory<br></div></blockquote><div class="codebox"><p>Code: </p><pre><code></code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7887">salyn</a> — Wed Jun 28, 2006 8:38 pm</p><hr />
]]></content>
	</entry>
	</feed>
