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

	<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>2003-06-24T14:07:58-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-06-24T14:07:58-04:00</updated>

		<published>2003-06-24T14:07:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22501#p22501</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22501#p22501"/>
		<title type="html"><![CDATA[Help with a scriptlet im working on. Writing masks to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22501#p22501"><![CDATA[
split and lappend operate on lists. you didn't use 'join' to turn it into a normal string before writing to the file.<br><br>also you use 'lrange' (again without 'join') in the first loop without first splitting the line.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue Jun 24, 2003 2:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aron]]></name></author>
		<updated>2003-06-24T07:05:05-04:00</updated>

		<published>2003-06-24T07:05:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22479#p22479</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22479#p22479"/>
		<title type="html"><![CDATA[Hours of scripting later]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22479#p22479"><![CDATA[
Alright, ive got a large part of the script finished now.<br><br>But now i've got another problem..<br><br>When writing the person's nick to a dat file, it adds { }'s  in the nick, if it contains [ ] 's..<br><br>Is there any way to solve this?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2858">Aron</a> — Tue Jun 24, 2003 7:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aron]]></name></author>
		<updated>2003-06-22T05:09:16-04:00</updated>

		<published>2003-06-22T05:09:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22364#p22364</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22364#p22364"/>
		<title type="html"><![CDATA[Help with a scriptlet im working on. Writing masks to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22364#p22364"><![CDATA[
Could you be a bit more specific? I already saw some other topics, but i really dont know what im doing wrong... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2858">Aron</a> — Sun Jun 22, 2003 5:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-06-21T19:47:12-04:00</updated>

		<published>2003-06-21T19:47:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22341#p22341</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22341#p22341"/>
		<title type="html"><![CDATA[Help with a scriptlet im working on. Writing masks to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22341#p22341"><![CDATA[
The problem is your use of "close". Also your while loop is bad -- try searching on the forum for how to properly read in a file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sat Jun 21, 2003 7:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aron]]></name></author>
		<updated>2003-06-21T18:21:50-04:00</updated>

		<published>2003-06-21T18:21:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22338#p22338</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22338#p22338"/>
		<title type="html"><![CDATA[Help with a scriptlet im working on. Writing masks to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22338#p22338"><![CDATA[
Im working on a script that will check a nick's hostmask on join, and if it doesnt match one of the hostmasks for that nick, it will add it.<br>When i rejoin the channel, i get the following error message:<br><br>I want it to write to a text file, in the form of "Nick host1 host2 host3 etc".<br>With my basic knowledge of tcl, i thought one way to do this, was to set all the info in a a list, then write it. Any suggestions are welcome <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><div class="codebox"><p>Code: </p><pre><code>[00:18] Tcl error [join:hostcheck]: can not find channel named "file17"</code></pre></div>This is my code:<br><div class="codebox"><p>Code: </p><pre><code>set hostfile "/home/asoaron/devbot/scripts/hosts/hosts.dat"bind join - * join:hostcheckproc join:hostcheck {nick host hand chan} { global hostfile botnick  set found 0   set fs [open $hostfile r]   while {![eof $fs]} {    gets $fs line    if {[lrange $line 1 end] == $host} { set found 1 }    close $fs     }  if {$found} {   return 0 }   else {    if {[lindex $line 0] == $nick} {    set lijst  [split $line]     set lijst2 [lappend $lijst $host]    set fs [open $hostfile w]     puts $fs "$lijst2"     close $fs    }   }}</code></pre></div><br>Thanks in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2858">Aron</a> — Sat Jun 21, 2003 6:21 pm</p><hr />
]]></content>
	</entry>
	</feed>
