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

	<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>2004-04-12T15:07:49-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Real]]></name></author>
		<updated>2004-04-12T15:07:49-04:00</updated>

		<published>2004-04-12T15:07:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35472#p35472</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35472#p35472"/>
		<title type="html"><![CDATA[How to delete a value in a variable?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35472#p35472"><![CDATA[
thanks caesar, it works perfectly <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=4669">Real</a> — Mon Apr 12, 2004 3:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2004-04-12T02:30:52-04:00</updated>

		<published>2004-04-12T02:30:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35450#p35450</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35450#p35450"/>
		<title type="html"><![CDATA[How to delete a value in a variable?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35450#p35450"><![CDATA[
An basic search and remove:<div class="codebox"><p>Code: </p><pre><code>set place [lsearch $variable "your thing"]set result [lreplace $result $place $place]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Apr 12, 2004 2:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spyda]]></name></author>
		<updated>2004-04-11T18:35:03-04:00</updated>

		<published>2004-04-11T18:35:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35447#p35447</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35447#p35447"/>
		<title type="html"><![CDATA[this might help :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35447#p35447"><![CDATA[
You can use a few types of code. <br><div class="codebox"><p>Code: </p><pre><code>bind PUB - !remove remove:nameproc remove:name {nick uhost hand chan text} {   global avail   #### Any check you need in here ####   set who [lindex [split $text] 0]   set newavail ""   foreach takeout [split $avail] {      if {[string match $takeout $who]} {         set removed $takeout      } else {         append newavail "$takeout "      }   }   putquick "NOTICE $nick :Removed $removed - Left $newavail"}</code></pre></div>This will work with <strong class="text-strong">/msg $botnick !remove &lt;nick&gt;</strong><br>And also is untested.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1731">spyda</a> — Sun Apr 11, 2004 6:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Real]]></name></author>
		<updated>2004-04-11T14:47:37-04:00</updated>

		<published>2004-04-11T14:47:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35440#p35440</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35440#p35440"/>
		<title type="html"><![CDATA[How to delete a value in a variable?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35440#p35440"><![CDATA[
<blockquote class="uncited"><div>Split the string and remove the element with lreplace (<a href="http://www.tcl.tk/man/tcl8.4/TclCmd/lreplace.htm" class="postlink">http://www.tcl.tk/man/tcl8.4/TclCmd/lreplace.htm</a>)</div></blockquote>Sorry but I have no idea how to do that <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>Could you give me an example or anything?<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4669">Real</a> — Sun Apr 11, 2004 2:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dollar]]></name></author>
		<updated>2004-04-11T12:18:58-04:00</updated>

		<published>2004-04-11T12:18:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35424#p35424</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35424#p35424"/>
		<title type="html"><![CDATA[How to delete a value in a variable?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35424#p35424"><![CDATA[
Split the string and remove the element with lreplace (<a href="http://www.tcl.tk/man/tcl8.4/TclCmd/lreplace.htm" class="postlink">http://www.tcl.tk/man/tcl8.4/TclCmd/lreplace.htm</a>)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4046">dollar</a> — Sun Apr 11, 2004 12:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Real]]></name></author>
		<updated>2004-04-11T07:52:20-04:00</updated>

		<published>2004-04-11T07:52:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=35414#p35414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=35414#p35414"/>
		<title type="html"><![CDATA[How to delete a value in a variable?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=35414#p35414"><![CDATA[
Hello<br><br>I made a proc which lets people put themselves in the topic, whether or not they are available for a clanwar. <br><br>In short this is:<div class="codebox"><p>Code: </p><pre><code>proc pub_waravail {nick host hand chan text} {   global avail  set myname "[lindex $text 0]"   if {($myname != "")} {     if {$avail == ""} {       set avail "$myname"       } else {       append avail " $myname"     }    putserv "TOPIC $chan :Available: $avail"  } }</code></pre></div>However, there should also be a !remove command. So if e.g. $avail = playerA playerB playerC, and somebody says !remove playerB, only playerA and playerC remain<br><br>Is this possible?<br>I've already made this with different variables, but it's a LOT of code, and there are a lot of spaces in the topic <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br>It looks like this:<br><div class="codebox"><p>Code: </p><pre><code>if {$avail1 == ""} {       set avail1 $mynameputserv "TOPIC $chan :Available: $avail1 $avail2 $avail3 $avail4 $avail5 $avail6 $avail7 $avail8 $avail9 $avail10"return      } if {$avail2 == ""}  {      set avail2 $mynameputserv "TOPIC $chan :Available: $avail1 $avail2 $avail3 $avail4 $avail5 $avail6 $avail7 $avail8 $avail9 $avail10"return}</code></pre></div>So can this be done with just one vars? Thank you <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=4669">Real</a> — Sun Apr 11, 2004 7:52 am</p><hr />
]]></content>
	</entry>
	</feed>
