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

	<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-09-08T04:26:15-04:00</updated>

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

		<entry>
		<author><name><![CDATA[oxygen]]></name></author>
		<updated>2005-09-08T04:26:15-04:00</updated>

		<published>2005-09-08T04:26:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55441#p55441</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55441#p55441"/>
		<title type="html"><![CDATA[store nicks to a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55441#p55441"><![CDATA[
Tnx demond<br><br>You're a nice guy   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><br>@minted<br>yepp, i'm a old man and always polite  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br><br>friendly regards<br>oxygen<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6688">oxygen</a> — Thu Sep 08, 2005 4:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[minted]]></name></author>
		<updated>2005-09-08T01:36:21-04:00</updated>

		<published>2005-09-08T01:36:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55439#p55439</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55439#p55439"/>
		<title type="html"><![CDATA[store nicks to a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55439#p55439"><![CDATA[
lol! he was so polite u couldnt resist<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6501">minted</a> — Thu Sep 08, 2005 1:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-09-07T16:30:47-04:00</updated>

		<published>2005-09-07T16:30:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55423#p55423</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55423#p55423"/>
		<title type="html"><![CDATA[store nicks to a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55423#p55423"><![CDATA[
oh well, here it is with reading:<div class="codebox"><p>Code: </p><pre><code>set tfile teams.txtbind pub - !add foobind time - ?0* barif {![catch {set f [open $tfile]}]} {   foreach e [split [read $f] \n] {      set t [lindex [split $e] 0]; if {$t == ""} continue      set team($t) [lrange [split $e] 1 e]   }   close $f}proc foo {n u h c t} {   set t [lindex [split $t] 0]   if {[info exists ::team($t)]} {      if {[lsearch -exact $::team($t) $n] != -1} {return}   }   lappend ::team($t) $n   puthelp "notice $n :added you to $t team"}proc bar {args} {   set f [open $::tfile w]   foreach {t m} [array get ::team] {      puts $f "$t [join $m]"   }   close $f} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Sep 07, 2005 4:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[oxygen]]></name></author>
		<updated>2005-09-07T16:09:23-04:00</updated>

		<published>2005-09-07T16:09:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55422#p55422</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55422#p55422"/>
		<title type="html"><![CDATA[store nicks to a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55422#p55422"><![CDATA[
No problem demond <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>You say it's easy? I try for over a week to do this <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br>Seems I'm to lame for .tcl  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked"> <br>Tnx anyway  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> I appreciate your help. <br>Hope some "soul" will help.<br><br>friendly regards<br>oxygen<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6688">oxygen</a> — Wed Sep 07, 2005 4:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-09-07T15:59:08-04:00</updated>

		<published>2005-09-07T15:59:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55421#p55421</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55421#p55421"/>
		<title type="html"><![CDATA[store nicks to a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55421#p55421"><![CDATA[
you didn't say anything about reading from file in your initial request, you only required storing - and now is kind of late for that <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> I don't feel like constantly satisfying ever changing requirements anymore; but maybe some kind soul will do that for you, it's fairly easy<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Sep 07, 2005 3:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[oxygen]]></name></author>
		<updated>2005-09-07T15:46:33-04:00</updated>

		<published>2005-09-07T15:46:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55420#p55420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55420#p55420"/>
		<title type="html"><![CDATA[store nicks to a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55420#p55420"><![CDATA[
Hello demond.<br><br>Sorry, but it isn't what I'm lookin' for. I feel bad to wast your time...<br>What I need is a script that reads the teams and nicks from a file, and when the nick is on any team to return 0. If the nick is not in the file, then it should check if arg is a team in the file, and if it is to add the nick to te team. Else creat a new team. And store all in the file again.<br>Something like I posted earlyer. I tryed several ways but couldn't make it work.<br>Hope anybody can help.<br><br>friendly regards<br>oxygen<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6688">oxygen</a> — Wed Sep 07, 2005 3:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-09-06T14:54:26-04:00</updated>

		<published>2005-09-06T14:54:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55361#p55361</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55361#p55361"/>
		<title type="html"><![CDATA[store nicks to a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55361#p55361"><![CDATA[
then replace:<div class="codebox"><p>Code: </p><pre><code>puts $f "$t: [join $m ,]" </code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>puts $f "$t [join $m]" </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Sep 06, 2005 2:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[oxygen]]></name></author>
		<updated>2005-09-06T14:48:16-04:00</updated>

		<published>2005-09-06T14:48:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55360#p55360</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55360#p55360"/>
		<title type="html"><![CDATA[store nicks to a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55360#p55360"><![CDATA[
Hello demond.<br><br>Tnx for our reply. It works, but....<br>I made a mistake the txt file should be like this:<br><br>Team1 nick1 nick2 nick3 .. <br>Team2 nick4 nick5 nick6 .. <br>Team3 nick7 nick8 nick9 .. <br><br>Maybe it explains better I post the script I wrote but dosn't work:<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !add teamproc team {nick uhost hand chan arg} {   global newteam newmember      set addteam [lindex [split $arg] 0] set in [open team.txt r]          while {![eof $in]} {                set list [gets $in]      if {[lsearch -exact $list $nick] != -1} {                                    set team [lindex [split $list] 0]              if {$addteam==$team} {         puthelp "notice $nick :you're already on $team "          return      } else {          puthelp "notice $nick :you're already on $team and can't leave your team"          return }        } else {         set team [lindex [split $list] 0]         set members [lrange [split $list] 1 end]         if {$addteam==$team} {              puthelp "notice $nick :added you to $team"              set newmember "$team $members $nick"           saveteam2      return} else {     puthelp "notice $nick :you created $addteam"     set newteam "$addteam $nick"  saveteam1      return}}   close $in     }}proc saveteam1 {} {   global newteam         set fd [open team.txt a+]        puts $fd "$newteam"          close $fd  } proc saveteam2 {} {   global newmember         set fd [open team.txt w]        puts $fd "$newmember"          close $fd  }  </code></pre></div>I hope you can help me with this.<br>friendly regards<br>oxygen<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6688">oxygen</a> — Tue Sep 06, 2005 2:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-09-05T18:06:10-04:00</updated>

		<published>2005-09-05T18:06:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55322#p55322</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55322#p55322"/>
		<title type="html"><![CDATA[store nicks to a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55322#p55322"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - !add foobind time - ?0* barproc foo {n u h c t} {   set t [lindex [split $t] 0]   if {[info exists ::team($t)]} {      if {[lsearch -exact $::team($t) $n] != -1} {return}   }   lappend ::team($t) $n   puthelp "notice $n :added you to $t team"}proc bar {args} {   set f [open teams.txt w]   foreach {t m} [array get ::team] {      puts $f "$t: [join $m ,]"   }   close $f}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Sep 05, 2005 6:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[oxygen]]></name></author>
		<updated>2005-09-05T17:37:51-04:00</updated>

		<published>2005-09-05T17:37:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=55320#p55320</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=55320#p55320"/>
		<title type="html"><![CDATA[store nicks to a file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=55320#p55320"><![CDATA[
Hello<br><br>I hope somebody is nice to help me with a script.<br>I want to store on a command in a channel like !add &lt;team&gt; the teamname and the nick in a file.<br>like:<br>Team1 nick1 nick2 nick3 ..<br>Team2 nick1 nick2 nick3 ..<br>Team3 nick1 nick2 nick3 ..<br>.<br>.<br><br>if the nick is already on a team return 0 , and if the team exists add his nick to the team, else create a new team.<br><br>Tnx for anybody could help.<br>friendly regards<br>oxygen<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6688">oxygen</a> — Mon Sep 05, 2005 5:37 pm</p><hr />
]]></content>
	</entry>
	</feed>
