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

	<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>2012-02-28T17:48:50-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Regex]]></name></author>
		<updated>2012-02-28T17:48:50-04:00</updated>

		<published>2012-02-28T17:48:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98901#p98901</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98901#p98901"/>
		<title type="html"><![CDATA[How can we read txt file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98901#p98901"><![CDATA[
Johannes13 thank you so much!!!<br><br>You're the best! Thx for your concerns. My script is workin' with any problems <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=11617">Regex</a> — Tue Feb 28, 2012 5:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2012-02-28T14:36:40-04:00</updated>

		<published>2012-02-28T14:36:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98900#p98900</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98900#p98900"/>
		<title type="html"><![CDATA[How can we read txt file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98900#p98900"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>namespace eval ::welcome {   set welcomefile "/foo/bar/baz.txt"   bind join - * [namespace current]::onjoin   proc onjoin {n u h c} {      variable welcomefile      set fd [open $welcomefile r]      set data [read $fd]      close $fd      set arraydata {}      foreach line [split $data \r\n] {         lappend arraydata [lindex [split $line] 0] [join [lrange [split $line] 1 end]]      }      array set welcomes $arraydata      if {[info exists welcomes($n)]} {         putnotc $n $welcomes($n)      }   }}</code></pre></div>Forgot the namespace current<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Tue Feb 28, 2012 2:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Regex]]></name></author>
		<updated>2012-02-28T13:44:15-04:00</updated>

		<published>2012-02-28T13:44:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98898#p98898</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98898#p98898"/>
		<title type="html"><![CDATA[How can we read txt file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98898#p98898"><![CDATA[
Johannes13 thank you but, isn't workin'<br><br>Giving this message on the putty.<br><br>[19:43:02] Tcl error [onjoin]: invalid command name "onjoin"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11617">Regex</a> — Tue Feb 28, 2012 1:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2012-02-28T05:40:13-04:00</updated>

		<published>2012-02-28T05:40:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98895#p98895</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98895#p98895"/>
		<title type="html"><![CDATA[How can we read txt file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98895#p98895"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>namespace eval ::welcome {set welcomefile "/foo/bar/baz.txt"bind join - * onjoinproc onjoin {n u h c} {variable welcomefileset fd [open $welcomefile r]set data [read $fd]close $fdset arraydata {}foreach line [split $data \r\n] {lappend arraydata [lindex [split $line] 0] [join [lrange [split $line] 1 end]]}array set welcomes $arraydataif {[info exists welcomes($n)]} {putnotc $n $welcomes($n)}}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Tue Feb 28, 2012 5:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Regex]]></name></author>
		<updated>2012-02-27T17:19:34-04:00</updated>

		<published>2012-02-27T17:19:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98894#p98894</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98894#p98894"/>
		<title type="html"><![CDATA[How can we read txt file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98894#p98894"><![CDATA[
Hi dear coders, how can we read txt file when user join the channel (if she/he has a message in txt file)?<br><br>I know, add/del a text to file. But i dont know check it. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br><br>Like that;<br><br>*** Joins: s7e7v7e7n has joined the room.<br><br>After user has joined the room, my eggdrop'll open the file. if his/her nick in the text file, my bot'll send a message his/her greet to channel. In file.tx<br><br>file.txt (example)<br><br>(nick - greet)<br>s7e7v7e7n7 this is my message <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br>RoSe Hi everybody, this is my greet.<br><br>*** Joins: s7e7v7e7n has joined the room.<br>&lt;Eggdrop&gt; [s7e7v7e7n]: this is my message <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br>*** Joins: RoSe has joined the room.<br>&lt;Eggdrop&gt; [RoSe] Hi everybody, this is my greet.<br><br>If user has no message in the file, bot'll not send a message.<br><br>Thx for your concerns <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=11617">Regex</a> — Mon Feb 27, 2012 5:19 pm</p><hr />
]]></content>
	</entry>
	</feed>
