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

	<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>2007-01-03T12:28:21-04:00</updated>

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

		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2007-01-03T12:28:21-04:00</updated>

		<published>2007-01-03T12:28:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69447#p69447</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69447#p69447"/>
		<title type="html"><![CDATA[Database question?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69447#p69447"><![CDATA[
source can load any file, it just won't react too well on non-tcl code.<br><br>you can give it any extension you want, or no extension at all.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Wed Jan 03, 2007 12:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-01-02T07:16:03-04:00</updated>

		<published>2007-01-02T07:16:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69414#p69414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69414#p69414"/>
		<title type="html"><![CDATA[Database question?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69414#p69414"><![CDATA[
Yes, or you can load it inside the script before the code starts (i.e. add source scripts/variables.tcl before starting the code).<br><br>PS: It doesn't have to be a .tcl file, that's just a standard.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Jan 02, 2007 7:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nara]]></name></author>
		<updated>2007-01-02T00:31:22-04:00</updated>

		<published>2007-01-02T00:31:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69410#p69410</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69410#p69410"/>
		<title type="html"><![CDATA[Database question?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69410#p69410"><![CDATA[
Because I never knew you could do that. So, just put them in a blank file, name it .tcl, and load it before the script in the eggdrop configuration?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8006">Nara</a> — Tue Jan 02, 2007 12:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-01-01T19:36:39-04:00</updated>

		<published>2007-01-01T19:36:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69407#p69407</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69407#p69407"/>
		<title type="html"><![CDATA[Database question?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69407#p69407"><![CDATA[
Why don't you save them in the form:<blockquote class="uncited"><div>set var1 bla<br>set var2 blo<br>...</div></blockquote>and simply source the file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Jan 01, 2007 7:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nara]]></name></author>
		<updated>2007-01-01T19:31:15-04:00</updated>

		<published>2007-01-01T19:31:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69406#p69406</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69406#p69406"/>
		<title type="html"><![CDATA[Database question?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69406#p69406"><![CDATA[
I currently use a text file that is named as a .dat to store my eggdrop's custom settings and variables, which is loaded and saved on each load. However, it wipes like weekly to bi-weekly. I think it may have something to do with the way I sync or it could be the file system. Yes, mIRC colour codes are stored within the file if that means anything.<br><br>Sync/Load code:<div class="codebox"><p>Code: </p><pre><code>proc sync {} {        global head tail delim djlist datafile cmdlist website public_channel p$        if { [file exists $datafile] } {                set FD [open $datafile r]                set djlist ""                while { ![eof $FD] } {                        gets $FD line                        set index [string first ":" $line ]                        set name [string range $line 0 [expr {$index - 1}]]                        set value [string range $line [expr {$index + 1}] end ]                        switch -exact $name {                                "head" {                                        set head $value                                }                              "tail" {                                        set tail $value                                }                                "delim" {                                        set delim $value                                }                                "dj" {                                        lappend djlist $value                                }                                "cmdlist" {                                        set cmdlist $value                                }                                "website" {                                        set website $value                                }                                "public_channel" {                                        set public_channel $value                                }                                "private_channel" {                                        set private_channel $value                                }                                "shoutcast" {                                        set shoutcast $value                                }                                "shoutport" {                                        set shoutport $value                                }                                "shoutpass" {                                        set shoutpass $value                                }                                "topicmask" {                                        set topicmask $value                                }                                "stream" {                                        set stream $value                                }                                "rules" {                                        set rules $value                                }                                "autodj" {                                        set autodj $value                                }                                "greet1" {                                        set greet1 $value                                }                                "greet2" {                                        set greet2 $value                                }                                "greet3" {                                        set greet3 $value                                }                                "ads" {                                        set ads $value                                }                                "friends" {                                        set friends $value                                }                                "schedules" {                                        set schedules $value                                }                        }                }                close $FD        }}</code></pre></div><br>Flush/Save code:<div class="codebox"><p>Code: </p><pre><code>proc battle:flush {} {        global head tail delim djlist datafile cmdlist website public_channel pr$        set FD [open $datafile w]        puts $FD "cmdlist:$cmdlist"        puts $FD "head:$head"        puts $FD "tail:$tail"        puts $FD "delim:$delim"        puts $FD "website:$website"        puts $FD "topicmask:$topicmask"        puts $FD "shoutcast:$shoutcast"        puts $FD "shoutport:$shoutport"        puts $FD "shoutpass:$shoutpass"        puts $FD "public_channel:$public_channel"        puts $FD "private_channel:$private_channel"        puts $FD "stream:$stream"        puts $FD "rules:$rules"        puts $FD "autodj:$autodj"        puts $FD "greet1:$greet1"        puts $FD "greet2:$greet2"        puts $FD "greet3:$greet3"        puts $FD "ads:$ads"        puts $FD "friends:$friends"        puts $FD "schedules:$schedules"        foreach dj $djlist {                puts $FD "dj:$dj"        }        close $FD}</code></pre></div>Basically: I want to solve the problem of it wiping itself. I'm more convinced its the linux file system not liking the colour codes or something though, as both of my backup files got wiped too.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8006">Nara</a> — Mon Jan 01, 2007 7:31 pm</p><hr />
]]></content>
	</entry>
	</feed>
