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

	<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>2009-12-24T11:43:47-04:00</updated>

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

		<entry>
		<author><name><![CDATA[blake]]></name></author>
		<updated>2009-12-24T11:32:32-04:00</updated>

		<published>2009-12-24T11:32:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91430#p91430</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91430#p91430"/>
		<title type="html"><![CDATA[Makenote viewnotes makenote.txt help[Solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91430#p91430"><![CDATA[
<img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> @ BLaCkShaDoW<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10512">blake</a> — Thu Dec 24, 2009 11:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BLaCkShaDoW]]></name></author>
		<updated>2009-12-24T10:56:47-04:00</updated>

		<published>2009-12-24T10:56:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91429#p91429</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91429#p91429"/>
		<title type="html"><![CDATA[Makenote viewnotes makenote.txt help[Solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91429#p91429"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind msg SA|SA makenote cmd:makenote bind msg SA|SA viewnote cmd:viewnoteset channel "#Test"set fname "makenote.txt"if {[file exists $fname] == 0} {set file [open $fname w]close $file}proc cmd:makenote {nick uhost hand text} {global botnick channel fnameset username [lindex [split $text] 0]set lin 0set text [lrange [split $text] 1 end]set file [open $fname "r"]set database [read -nonewline $file]close $fileset data [split $database "\n"]foreach line $data {set lin [expr $lin +1]set userline [lindex [split $line] 0]if {[string match -nocase $userline $username]} {if {$line != ""} {set num [expr $lin - 1]set delete [lreplace $data $num $num]set files [open $fname "w"]puts $files [join $delete "\n"]close $files}}}set file [open $fname "a"]puts $file "$username $text"close $fileputserv "PRIVMSG $username :$text"   puthelp "NOTICE $channel :Note left about $username to view type /msg $botnick viewnote $username" }proc cmd:viewnote {nick uhost hand text} {global fnameset username [lindex [split $text] 0] if {$username == ""} { puthelp "NOTICE $nick :Try viewnote &lt;username&gt;"return 0}set file [open $fname "r"]set database [read -nonewline $file]close $fileset data [split $database "\n"]if {$database == ""} { puthelp "PRIVMSG $nick :There are no notes available"return 0}foreach line $data {set user [lindex $line 0]if {[string match -nocase $user $username]} {set note [lrange [split $line] 1 end]set found 1puthelp "PRIVMSG $nick :The note for $username is :"puthelp "PRIVMSG $nick :$note"}if {![info exists found]} {puthelp "PRIVMSG $nick :There are no notes for $username"}}}</code></pre></div>Now it overwrites the message if the username is already in the makenote.txt <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>try it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10416">BLaCkShaDoW</a> — Thu Dec 24, 2009 10:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blake]]></name></author>
		<updated>2009-12-24T08:18:45-04:00</updated>

		<published>2009-12-24T08:18:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91428#p91428</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91428#p91428"/>
		<title type="html"><![CDATA[Makenote viewnotes makenote.txt help[Solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91428#p91428"><![CDATA[
Brill thanks BLaCkShaDoW works nice 1 more thing how can i add delnote username to this or get it to overwrite the existing note for username<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10512">blake</a> — Thu Dec 24, 2009 8:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BLaCkShaDoW]]></name></author>
		<updated>2009-12-23T03:48:29-04:00</updated>

		<published>2009-12-23T03:48:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91421#p91421</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91421#p91421"/>
		<title type="html"><![CDATA[Makenote viewnotes makenote.txt help[Solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91421#p91421"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind msg SA|SA makenote cmd:makenote bind msg SA|SA viewnote cmd:viewnoteset channel "#Test"set fname "makenote.txt"if {[file exists $fname] == 0} {set file [open $fname w]close $file}proc cmd:makenote {nick uhost hand text} {global botnick channel fnameset username [lindex [split $text] 0]set text [lrange [split $text] 1 end]set file [open $fname a]puts $file "$username $text"close $fileputserv "PRIVMSG $username :$text"   puthelp "NOTICE $channel :Note left about $username to view type /msg $botnick viewnote $username" }proc cmd:viewnote {nick uhost hand text} {global fnameset username [lindex [split $text] 0] if {$username == ""} { puthelp "NOTICE $nick :Try viewnote &lt;username&gt;"return 0}set file [open $fname "r"]set database [read -nonewline $file]close $fileset data [split $database "\n"]if {$database == ""} { puthelp "PRIVMSG $nick :There are no notes available"return 0}foreach line $data {set user [lindex [split $line] 0]if {[string match -nocase $user $username]} {set note [lrange [split $line] 1 end]set found 1puthelp "PRIVMSG $nick :The note for $username is :"puthelp "PRIVMSG $nick :$note"}if {![info exists found]} {puthelp "PRIVMSG $nick :There are no notes for $username"}}}</code></pre></div>try it <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=10416">BLaCkShaDoW</a> — Wed Dec 23, 2009 3:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blake]]></name></author>
		<updated>2009-12-24T11:43:47-04:00</updated>

		<published>2009-12-22T15:49:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91419#p91419</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91419#p91419"/>
		<title type="html"><![CDATA[Makenote viewnotes makenote.txt help[Solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91419#p91419"><![CDATA[
Been looking at tcl faq adding files to try and get a bit of help with this<br><br>Im trying to get this to work not having no success what im trying to is get the bot to write to a file when someone does /botnick makenote username text will then notice #ops Note left about $username to view type /msg trainingbot viewnote $username<br><br>next it will need need to read makenote.txt when someone does /botnick viewnote username matching the username given then notice nick the text/note that is left against username have tried some of the quote scripts but was enable to mod them seperately<br><div class="codebox"><p>Code: </p><pre><code>bind msg SA|SA makenote cmd:makenotebind msg SA|SA viewnote cmd:viewnote set fname "makenote.txt"proc cmd:makenote {nick uhost hand text} {  set username [lindex [split $arg] 0]  set text [lrange [split $arg] 1 end]  putserv "PRIVMSG $username :$text"  puthelp "NOTICE #Test :Note left about $username to view type /msg trainingbot viewnote $username"}set fp [open $fname "r"]  set data [read -nonewline $fp]  close $fp  set lines [split $data "\n"]  set where_to_insert 0  set lines [linsert $lines $makenote.txt $text]  set fp [open $fp "w"]  puts $fp [join $lines "\n"]  close $fp  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10512">blake</a> — Tue Dec 22, 2009 3:49 pm</p><hr />
]]></content>
	</entry>
	</feed>
