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

	<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>2002-03-03T20:13:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Wcc]]></name></author>
		<updated>2002-03-03T20:13:00-04:00</updated>

		<published>2002-03-03T20:13:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5020#p5020</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5020#p5020"/>
		<title type="html"><![CDATA[Changing contents of a file (.ini file with info to change)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5020#p5020"><![CDATA[
<a href="http://www.asciitable.com" class="postlink">http://www.asciitable.com</a><br><br>Look under the oct column.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=270">Wcc</a> — Sun Mar 03, 2002 8:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-03T18:18:00-04:00</updated>

		<published>2002-03-03T18:18:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5016#p5016</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5016#p5016"/>
		<title type="html"><![CDATA[Changing contents of a file (.ini file with info to change)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5016#p5016"><![CDATA[
isn't there a code (&lt;nr&gt;) to show things like [ into a string? (like 03 and so on..)<br><br>greejtz, Zygo.<p>Statistics: Posted by Guest — Sun Mar 03, 2002 6:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2002-03-01T23:47:00-04:00</updated>

		<published>2002-03-01T23:47:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4991#p4991</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4991#p4991"/>
		<title type="html"><![CDATA[Changing contents of a file (.ini file with info to change)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4991#p4991"><![CDATA[
the way to do it is to store all the variables in memory in arrays. write them out to file in tcl format, and source that file on reload. saves messing around with file search routines and is more efficient (unless of course the list is gonna get huge and start hogging memory). however, if you do output in to file tcl format, be sure to escape command characters (eg [, , {, } and ]) so that they're not executed when its sourced<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Fri Mar 01, 2002 11:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-01T16:20:00-04:00</updated>

		<published>2002-03-01T16:20:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4984#p4984</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4984#p4984"/>
		<title type="html"><![CDATA[Changing contents of a file (.ini file with info to change)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4984#p4984"><![CDATA[
now i got it almost working, after adding something, he only puts the last few chars of $line in the string when reaching the next line, in stead of the whole string. For chek of $line, the bot says $line in the chan and it's correct.<br><br>Greejtz, Zygo.<p>Statistics: Posted by Guest — Fri Mar 01, 2002 4:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-01T16:09:00-04:00</updated>

		<published>2002-03-01T16:09:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4982#p4982</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4982#p4982"/>
		<title type="html"><![CDATA[Changing contents of a file (.ini file with info to change)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4982#p4982"><![CDATA[
come on, someone must know this.<p>Statistics: Posted by Guest — Fri Mar 01, 2002 4:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-02-27T20:19:00-04:00</updated>

		<published>2002-02-27T20:19:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4952#p4952</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4952#p4952"/>
		<title type="html"><![CDATA[Changing contents of a file (.ini file with info to change)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4952#p4952"><![CDATA[
I'm working on a script which shows info from a site when typing the trigger for info. You can also add a site, using the addsite trigger. When doing this, all the value-fields in the .ini file will be set to ??? for that site. With an other trigger, you should be able to change this values (like the name, i'm working on that now).<br><br>What i got now is:<br><div class="codebox"><p>Code: </p><pre><code>proc pub_addname {nick uhost hand chan arg} {  if {[string tolower $chan] == "#&lt;chan&gt;" } {    set site "-[string tolower [lindex $arg 0]]-"    set name [lrange $arg 1 end]    set file1r [open "sites.ini" r+]    set file2 [read $file1r]    foreach line [split $file2 "n"] {      if { [string tolower $line] == $site } {        putserv "PRIVMSG #&lt;chan&gt; :site found"        set found 1      } else { if {$found != 1 } { putserv "PRIVMSG #&lt;chan&gt; :site not found" } }      if { $found == 1 &amp;&amp; $nameset != 1 } {        if { [lsearch -exact $line "name"] != 1 } {          putserv "PRIVMSG #&lt;chan&gt; :name field found"          set nameset 1        }      }    }    close $file1r    close $file2  }}</code></pre></div>i've tried some [censored] with strings, files and other things but it didn't work.<br><br>the name field in the .ini file is in the format:<br>name=&lt;name&gt; (??? by default)<br>the name of the site is in the format:<br>-&lt;sitename&gt;-<br>after -&lt;sitename&gt;-, all the fields for that site are shown, each at a new line.<br><br>Does anyone know how i can change the value from ??? to the given name, or from the old name to the new name??<br>Thx alot, i've been trying for hours but it still won't work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":sad:" title="Sad"><br><br>Greejtz, Zygo.<br><br>&lt;font size=-1&gt;[ This Message was edited by: Zygomaticum on 2002-03-01 13:09 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Wed Feb 27, 2002 8:19 pm</p><hr />
]]></content>
	</entry>
	</feed>
