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

	<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-17T16:11:19-04:00</updated>

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

		<entry>
		<author><name><![CDATA[DarkGhost]]></name></author>
		<updated>2007-01-17T16:11:19-04:00</updated>

		<published>2007-01-17T16:11:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69685#p69685</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69685#p69685"/>
		<title type="html"><![CDATA[How to overwrite/delete a line from .txt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69685#p69685"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>Thanks it works great only problem is it doesnt delete the line its editing <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"></div></blockquote>what "it"? Tosser's code would not work as it will truncate the file before attempting to read from it, so I'm guessing you made something yourself based on what you read in the faq...show us your code.</div></blockquote>lol your so SMART! i had to change some stuff around but here<div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $nick :You are now logged in to $userName"set file [open test.txt r+]foreach line [split [read -nonewline $file] \n] {  if {$line == ""} { return }  if {[string match -nocase "$userName" [lindex [split $line] 0]]} {     regexp -nocase {(.+)\s(.+)\s(.+)\s(.+)\s(.+)} $line -&gt; username host password access    set status "ONLINE"    close $fileset file [open test.txt w+] puts $file "$username $host $password $access $status"  } else {    puts $file "$line"  }</code></pre></div>Oh and by the way i got it to work perfectly thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8602">DarkGhost</a> — Wed Jan 17, 2007 4:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragnLord]]></name></author>
		<updated>2007-01-17T11:32:53-04:00</updated>

		<published>2007-01-17T11:32:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69679#p69679</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69679#p69679"/>
		<title type="html"><![CDATA[login to what?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69679#p69679"><![CDATA[
What type of login are you trying to create this for?<br>If this is for checking if someone is logged into the bot, it would be easier to check with a script using the dcc command "whom".<br>Changing password for eggdrop users is easiest done by using private message to the bot using "pass &lt;oldpass&gt; &lt;newpass&gt;" <br>(example: /msg botnick pass currentpass newpass)<br><br>If this is for some sort of website portal, then you will need a much more complicated approach.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4461">DragnLord</a> — Wed Jan 17, 2007 11:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2007-01-17T06:55:22-04:00</updated>

		<published>2007-01-17T06:55:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69672#p69672</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69672#p69672"/>
		<title type="html"><![CDATA[How to overwrite/delete a line from .txt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69672#p69672"><![CDATA[
<blockquote class="uncited"><div>Thanks it works great only problem is it doesnt delete the line its editing <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"></div></blockquote>what "it"? Tosser's code would not work as it will truncate the file before attempting to read from it, so I'm guessing you made something yourself based on what you read in the faq...show us your code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Jan 17, 2007 6:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DarkGhost]]></name></author>
		<updated>2007-01-16T19:13:17-04:00</updated>

		<published>2007-01-16T19:13:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69667#p69667</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69667#p69667"/>
		<title type="html"><![CDATA[How to overwrite/delete a line from .txt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69667#p69667"><![CDATA[
Thanks it works great only problem is it doesnt delete the line its editing <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=8602">DarkGhost</a> — Tue Jan 16, 2007 7:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-01-16T10:52:08-04:00</updated>

		<published>2007-01-16T10:52:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69659#p69659</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69659#p69659"/>
		<title type="html"><![CDATA[How to overwrite/delete a line from .txt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69659#p69659"><![CDATA[
<blockquote class="uncited"><div>Hello, I have seen alot of people look at this if you cant overwrite/delete lines atleast tell me <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></div></blockquote>It's probably one of those FAQ questions, and you could've found the answer yourself by searching the forum (I know I've written quite a few examples of this and didn't feel like doing it again.)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Tue Jan 16, 2007 10:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2007-01-16T09:20:24-04:00</updated>

		<published>2007-01-16T09:20:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69655#p69655</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69655#p69655"/>
		<title type="html"><![CDATA[How to overwrite/delete a line from .txt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69655#p69655"><![CDATA[
A quick example to help you out:<br><div class="codebox"><p>Code: </p><pre><code>set file [open file.txt w+]foreach line [split [read -nonewline $file] \n] {  if {$line == ""} { return }  if {[string match -nocase "USERNAME" [lindex [split $line] 0]]} {    # To remove the line from file    # return    # To edit the line data    # regexp -nocase {(.+)\s(.+)\s(.+)\s(.+)\s(.+)} $line -&gt; username host password access status    # To change the password use:    # set password "NEWPASS"    # To change online/offline status use:    # set status "ONLINE or OFFLINE"    # Write the modified data back to file    # puts $file "$username $host $password $access $status"  } else {    # We don't need to delete/modify this line, write the line back to file    puts $file "$line"  }}close $file</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Tue Jan 16, 2007 9:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DarkGhost]]></name></author>
		<updated>2007-01-16T07:44:26-04:00</updated>

		<published>2007-01-16T07:44:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69654#p69654</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69654#p69654"/>
		<title type="html"><![CDATA[How to overwrite/delete a line from .txt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69654#p69654"><![CDATA[
Hello, I have seen alot of people look at this if you cant overwrite/delete lines atleast tell me <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8602">DarkGhost</a> — Tue Jan 16, 2007 7:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DarkGhost]]></name></author>
		<updated>2007-01-15T21:03:59-04:00</updated>

		<published>2007-01-15T21:03:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69649#p69649</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69649#p69649"/>
		<title type="html"><![CDATA[How to overwrite/delete a line from .txt]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69649#p69649"><![CDATA[
Hello I am making a login script with in a file.txt I have "username host password access online|offline" and when someone logs in i want to make the offline to online or when someone wants to change there password I want to change password but I am unsure how to do this please help thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8602">DarkGhost</a> — Mon Jan 15, 2007 9:03 pm</p><hr />
]]></content>
	</entry>
	</feed>
