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

	<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>2019-04-14T02:28:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[l.kleijn]]></name></author>
		<updated>2019-04-14T02:28:12-04:00</updated>

		<published>2019-04-14T02:28:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107597#p107597</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107597#p107597"/>
		<title type="html"><![CDATA[Delete a line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107597#p107597"><![CDATA[
I know what the problem was. i forgot the msg to bot. but it's working<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12392">l.kleijn</a> — Sun Apr 14, 2019 2:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2019-04-13T15:07:15-04:00</updated>

		<published>2019-04-13T15:07:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107595#p107595</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107595#p107595"/>
		<title type="html"><![CDATA[Delete a line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107595#p107595"><![CDATA[
<blockquote class="uncited"><div>... it don't work</div></blockquote>You need to give a better, more complete description of what is happening.<br><br>People here on the forum are not there with you.  Can't see whatever you are seeing.   <br><br>Put yourself in our shoes.<br>What does "it don't work" mean?<br><br>Did the bot crash?<br>Did you see errors in the partyline?<br><br>Is the bind that calls this procedure loaded?<br>Is its hit counter incrementing? <br><br>Any and every detail that you can see,  please share it here.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Sat Apr 13, 2019 3:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[l.kleijn]]></name></author>
		<updated>2019-04-13T12:38:35-04:00</updated>

		<published>2019-04-13T12:38:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107594#p107594</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107594#p107594"/>
		<title type="html"><![CDATA[Delete a line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107594#p107594"><![CDATA[
But even with the quote of the original post, change the file you sayd, it don't work<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12392">l.kleijn</a> — Sat Apr 13, 2019 12:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2019-04-13T11:42:17-04:00</updated>

		<published>2019-04-13T11:42:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107593#p107593</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107593#p107593"/>
		<title type="html"><![CDATA[Delete a line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107593#p107593"><![CDATA[
Well, it seems that you've done additional modifications since the original post; now you've removed the "lreplace" command, which is actually used to remove an element (line from the file) from the list (of lines), before writing it back to the file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Apr 13, 2019 11:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[l.kleijn]]></name></author>
		<updated>2019-04-13T11:29:22-04:00</updated>

		<published>2019-04-13T11:29:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107592#p107592</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107592#p107592"/>
		<title type="html"><![CDATA[Delete a line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107592#p107592"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc msg:calculate {nick host hand arg} {  global botnick opchan  set fname "remember.txt"  set fp [open $fname "r"]  set data [read -nonewline $fp]  close $fp  set lines [split $data "\n"]  set linetodelete [expr {[llength $lines] -1}]   set fp [open $fname "w"]  puts $fp [join $lines "\n"]  close $fp  putserv "PRIVMSG Fujin :Done."}</code></pre></div>It doesn't work i don't know anymore.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12392">l.kleijn</a> — Sat Apr 13, 2019 11:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2019-04-13T10:08:25-04:00</updated>

		<published>2019-04-13T10:08:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107591#p107591</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107591#p107591"/>
		<title type="html"><![CDATA[Delete a line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107591#p107591"><![CDATA[
Hello,<br>Assuming you'd like to remove the top-line of the file named "remember.txt", the main problem is at line 10, where you open the file for write-access, but mistakenly use $fp instead of $fname for filename:<div class="codebox"><p>Code: </p><pre><code>set fp [open $fp "w"]</code></pre></div> should be changed into <div class="codebox"><p>Code: </p><pre><code>set fp [open $fname "w"]</code></pre></div>On a side-note, there's no point in mapping global varialbes botnick or opchan into this proc, as it never uses either of those variables.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Apr 13, 2019 10:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[l.kleijn]]></name></author>
		<updated>2019-04-13T04:25:10-04:00</updated>

		<published>2019-04-13T04:25:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107590#p107590</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107590#p107590"/>
		<title type="html"><![CDATA[Delete a line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107590#p107590"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc msg:calculate {nick host hand arg} {  global botnick opchan  set fname "remember.txt"  set fp [open $fname "r"]  set data [read -nonewline $fp]  close $fp  set lines [split $data "\n"]  set linetodelete 0  set lines [lreplace $lines $linetodelete $linetodelete]  set fp [open $fp "w"]  puts $fp [join $lines "\n"]  close $fp  putserv "PRIVMSG Fujin :Done."}</code></pre></div>I got this from this site but it won't work for me, could someone help me.<br>To remove a line from a txt file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12392">l.kleijn</a> — Sat Apr 13, 2019 4:25 am</p><hr />
]]></content>
	</entry>
	</feed>
