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

	<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>2005-03-01T14:01:42-04:00</updated>

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

		<entry>
		<author><name><![CDATA[sparta]]></name></author>
		<updated>2005-03-01T14:01:42-04:00</updated>

		<published>2005-03-01T14:01:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47109#p47109</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47109#p47109"/>
		<title type="html"><![CDATA[file check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47109#p47109"><![CDATA[
with some modification that worked just fine, thnx for the help.. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> have to read a bit so i know what does what it that code tho <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6022">sparta</a> — Tue Mar 01, 2005 2:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2005-03-01T10:22:25-04:00</updated>

		<published>2005-03-01T10:22:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47100#p47100</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47100#p47100"/>
		<title type="html"><![CDATA[file check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47100#p47100"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc list_bchannels {userfile-loaded} {   global bitchchannels  set datafile bitchchannels   if {![file exists $datafile]} {     set f [open $datafile w]     close $f    putlog "File $datafile missing, created it."   }  set rf [open $datafile r]  set data [split [read $rf] \n]  close $rf  foreach {a b c} $data {     set:sbch $datafile $datafile $a   } }</code></pre></div>this <strong class="text-strong">should</strong> do fine.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Mar 01, 2005 10:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sparta]]></name></author>
		<updated>2005-03-01T10:04:08-04:00</updated>

		<published>2005-03-01T10:04:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47098#p47098</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47098#p47098"/>
		<title type="html"><![CDATA[file check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47098#p47098"><![CDATA[
I got that to work, but now i got another problem..  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_question.gif" width="15" height="15" alt=":?:" title="Question"> <div class="codebox"><p>Code: </p><pre><code>proc list_bchannels {userfile-loaded} {  global "bitchchannels"     set datafile bitchchannels    if {![file exists bitchchannels]}  {    set r [open bitchchannels a+]      puts $r "."     putlog "File bitchchannels missing, created it."    catch {open $datafile r} rf    foreach {a b c} [split [read $rf] \n] {    close $rf           set:sbch $datafile $datafile $a     } else {       if {![catch {open $datafile r} rf]} {    foreach {a b c} [split [read $rf] \n] {    putlog "Added channels: $a."    set:sbch $datafile $datafile $a    }    close $rf    } else {     putlog "Couldn't open $datafile for reading."   }   }   }   }</code></pre></div>it creat the file "bitchchannels", then it put a "." in it if it dosent exist, thats ok, the file cant be empty since the bot reading from it and sets a var from the file, but it dosent go on after } else { . it halts there, and if the file dosent exist, then it should create it then trigger set:sbch $datafile $datafile $a, if the file exist it should read from it, then trigger the command "set:sbch $datafile $datafile $a", what cosing it to halt ? i have +d in console, i also have been looking with .tcl set errorInfo , and i get no info about what cosing the problem, all i get is that the var it should set is missing, thats cos the command never get triggered.. how do i solve this ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6022">sparta</a> — Tue Mar 01, 2005 10:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2005-03-01T09:48:13-04:00</updated>

		<published>2005-03-01T09:48:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47097#p47097</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47097#p47097"/>
		<title type="html"><![CDATA[file check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47097#p47097"><![CDATA[
You probably mean <a href="http://tmml.sourceforge.net/doc/tcl/file.html" class="postlink">file</a> (manipulate file names and attributes) not <a href="http://tmml.sourceforge.net/doc/tcl/info.html" class="postlink">info</a> (return information about the state of the Tcl interpreter) <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Mar 01, 2005 9:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sparta]]></name></author>
		<updated>2005-03-01T09:38:29-04:00</updated>

		<published>2005-03-01T09:38:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47096#p47096</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47096#p47096"/>
		<title type="html"><![CDATA[file check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47096#p47096"><![CDATA[
if {![info exists filename]} {<br>do stuff<br>} else {<br>do other stuff<br>}<br><br>that code should look for a file called "filename", if it dosent exist it should do some stuff, but if it exist it should do something else.. how do i fix this error ? cos now it say the file dosent exist even when it does.. or did i missunderstand something about this command/switches?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6022">sparta</a> — Tue Mar 01, 2005 9:38 am</p><hr />
]]></content>
	</entry>
	</feed>
