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

	<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-05-07T10:12:58-04:00</updated>

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

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-05-07T10:12:58-04:00</updated>

		<published>2006-05-07T10:12:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62752#p62752</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62752#p62752"/>
		<title type="html"><![CDATA[publicnotes1.0.1.tcl can't erase notes.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62752#p62752"><![CDATA[
Did a bit of updating on the script, since that was one of my first script re-writes..Amazing how much ya revise once you're more experienced <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>(edit)<br>Made the notes saved path a configurable variable today..<br><br>Same url as above.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sun May 07, 2006 10:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-05-07T04:54:56-04:00</updated>

		<published>2006-05-07T04:54:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62723#p62723</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62723#p62723"/>
		<title type="html"><![CDATA[publicnotes1.0.1.tcl can't erase notes.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62723#p62723"><![CDATA[
I posted my copy here:<br><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> — Sun May 07, 2006 4:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DarkStar723]]></name></author>
		<updated>2006-05-07T00:59:44-04:00</updated>

		<published>2006-05-07T00:59:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62716#p62716</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62716#p62716"/>
		<title type="html"><![CDATA[publicnotes1.0.1.tcl can't erase notes.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62716#p62716"><![CDATA[
Thanks for the reply rosc2112, unfortunately that didnt work either, think im cursed with this script (would help if i knew what i was doing).  I'm not sure about anyone else, but i personally would like to see your script.<br><br>(and tcl/eggdrop under cygwin, oh god, dont get me started on that, it caused so incredibly many bugs that i just gave up, and still has about the same problems *cries*.)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6706">DarkStar723</a> — Sun May 07, 2006 12:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-05-05T01:57:25-04:00</updated>

		<published>2006-05-05T01:57:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62625#p62625</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62625#p62625"/>
		<title type="html"><![CDATA[publicnotes1.0.1.tcl can't erase notes.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62625#p62625"><![CDATA[
I massively re-wrote this script myself, because it was so very unsecure.<br><br>But my changes rely on undernet,  and users using a  *!*@name.users.undernet.org mask, and made it work only with known-users (known to the bot) ... <br><br>I also changed it to handle special chars properly, because as it was, it does not handle them.  I figured my changes were too specific to my own needs, so I haven't published the script publically. If there is interest, I can post my version publically.<br><br>In my version, I use: <br><br>file delete -force /full/path/to/publicnotes/note.$uhostname.txt<br><br>I assume that should work with tcl under windows?  I do not recommend using exec!!! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Peronally, if I had to use eggdrop under windows (not even if it was the last OS on earth ;p) I would install cygwin and use tcl/eggdrop under cygwin, which gives you a unix-like OS under windows, so you would not have these problems with pathname differences and such <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Fri May 05, 2006 1:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DarkStar723]]></name></author>
		<updated>2006-05-01T01:46:49-04:00</updated>

		<published>2006-05-01T01:46:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62513#p62513</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62513#p62513"/>
		<title type="html"><![CDATA[publicnotes1.0.1.tcl can't erase notes.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62513#p62513"><![CDATA[
umm, okay, i thought it would be easier to just post the problematic part in forum so as to not be all spammy, and leave the complete script as a link in case anyone wanted to look at it, but heres the whole thing:<br>Note: i have modified the erase_notes proc in an attempt to get it working under windows, see first post (it doesnt work in its form here, or there).<div class="codebox"><p>Code: </p><pre><code>################################## Public notes by Sergio100 1.01 ###################################You should make a directory named publicnotes where the eggdrop lives :)#It's messy, i know... But i wrote it without help and without knowing TCL :)#TO DO: Check users by host, not by nick.#1.01: I was using string wordend for nicks, but it doesnt work with some characters.#      So i now use lindex and lrange. It's quite faster too :Dbind join - * onjoin_notesbind msg - .erasenotes erase_notesbind msg - .leavenote leave_notesbind msg - .getnotes get_notesbind msg - .noteshelp help_notes#This is the per user limit on notes received at one time (not sent! :).set limitnotes 2proc 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. 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 2)."  return 1}proc onjoin_notes { nick uhost hand chan } {  global botnick  set n [dosearchnote $nick]    if ($n&gt;0) {       putserv "NOTICE $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 "NOTICE $nick :All your notes have been deleted"  eval "exec rm ./publicnotes/public$lowercasenick.txt"  return 1  } else {    putserv "NOTICE $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 "NOTICE $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 "NOTICE $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 "NOTICE $nick :You didnt have any notes."    return 1  }  set notesfile [open "./publicnotes/public$lowercasenick.txt" "r+"]  if {[eof $notesfile]} {    putserv "NOTICE $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 "NOTICE $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 "NOTICE $nick :You have a note from $sendnick -&gt; $msg"        set yes 1      }    }    if { $yes==0 } {      putserv "NOTICE $nick :You dont have any notes. Stop bugging me."    }    close $notesfile  }  return 1}############################### Show load statement        ###############################putlog "Public Notes 1.0 by Sergio100 (EFNet)"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6706">DarkStar723</a> — Mon May 01, 2006 1:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2006-04-30T22:36:58-04:00</updated>

		<published>2006-04-30T22:36:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62510#p62510</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62510#p62510"/>
		<title type="html"><![CDATA[Re: publicnotes1.0.1.tcl can't erase notes.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62510#p62510"><![CDATA[
<blockquote class="uncited"><div>Original Script: <a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=273" class="postlink">http://www.egghelp.org/cgi-bin/tcl_arch ... oad&amp;id=273</a></div></blockquote>If you want help post the original script within code tags. People are not going to download a script to help when they could more easily read it on the forum.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Sun Apr 30, 2006 10:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DarkStar723]]></name></author>
		<updated>2006-04-30T22:33:01-04:00</updated>

		<published>2006-04-30T22:33:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62509#p62509</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62509#p62509"/>
		<title type="html"><![CDATA[publicnotes1.0.1.tcl can't erase notes.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62509#p62509"><![CDATA[
I am trying to get this script working under <strong class="text-strong">windows</strong>, and can't figure out how to get a tcl script to delete a file, this is what i have so far for the erase_notes process.<div class="codebox"><p>Code: </p><pre><code> proc erase_notes { nick uhost hand chan text } {  set lowercasenick [string tolower $nick]  set a [dosearchnote $nick]  if ($a&gt;0) {  putserv "NOTICE $nick :All your notes have been deleted"  eval "exec cmd.exe &gt;&amp;@stdout &lt;@stdin /c del .\publicnotes\public$lowercasenick.txt"  return 1  } else {    putserv "NOTICE $nick :You didnt have any notes :P"    return 0  }} </code></pre></div>I know the problem is somewhere in this line (or i think it is):<div class="codebox"><p>Code: </p><pre><code>eval "exec cmd.exe &gt;&amp;@stdout &lt;@stdin /c del .\publicnotes\public$lowercasenick.txt"</code></pre></div>Im just not sure what to change to get it working.  Any changes just get me one of these two errors:<br><br>[22:21] Tcl error [erase_notes]: couldn't create error file for command: no such file or directory<br>[22:17] Tcl error [erase_notes]: child process exited abnormally<br><br>Original Script: <a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=273" class="postlink">http://www.egghelp.org/cgi-bin/tcl_arch ... oad&amp;id=273</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6706">DarkStar723</a> — Sun Apr 30, 2006 10:33 pm</p><hr />
]]></content>
	</entry>
	</feed>
