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

	<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>2003-10-30T09:38:36-04:00</updated>

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

		<entry>
		<author><name><![CDATA[BiLL]]></name></author>
		<updated>2003-10-30T09:38:36-04:00</updated>

		<published>2003-10-30T09:38:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29191#p29191</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29191#p29191"/>
		<title type="html"><![CDATA[2 Things - Channel Key Saving and [channels] cutting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29191#p29191"><![CDATA[
Absolutely perfect, no error everything perfect. Big thanks m8. I respect your knowledge!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=50">BiLL</a> — Thu Oct 30, 2003 9:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-10-30T02:52:20-04:00</updated>

		<published>2003-10-30T02:52:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29176#p29176</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29176#p29176"/>
		<title type="html"><![CDATA[Re: 2 Things - Channel Key Saving and [channels] cutting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29176#p29176"><![CDATA[
<blockquote class="uncited"><div>channel set $newchan need-key {putserv "JOIN $newchan $key"}</div></blockquote>the braces prevent variable substitution, use 'list':<div class="codebox"><p>Code: </p><pre><code>channel set $newchan need-key [list putserv "JOIN $newchan $key"]</code></pre></div>And for your second problem, either loop through 'channels' and lappend each one that is not your current chan to a new list OR use 'lsearch' and 'lreplace' to remove the current channel from an existing list.<div class="codebox"><p>Code: </p><pre><code>foreach c [channels] {  if {![string eq -nocase $c $chan]} {lappend channels $c}}</code></pre></div> or <div class="codebox"><p>Code: </p><pre><code>set channels [string tolower [channels]]if {[set i [lsearch -exact $channels [string tolower $chan]]]&gt;-1} {set channels [lreplace $channels $i $i]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Oct 30, 2003 2:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BiLL]]></name></author>
		<updated>2003-10-29T23:30:24-04:00</updated>

		<published>2003-10-29T23:30:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29173#p29173</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29173#p29173"/>
		<title type="html"><![CDATA[2 Things - Channel Key Saving and [channels] cutting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29173#p29173"><![CDATA[
Heyya!<br><br>Good morning guys!<br>I am here cause I got a problem again hehe <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile">.<br>But I respect your help and knowledge and I hope to get helped here.<br><br>My first thing:<br><br>How do I save a channel key per TCL? It sounds easy, but HA! It isn't!<br><br>In partyline it's easy:<br><br>.chanset #chan need-key putserv "JOIN :#chan key"<br><br>So I tried to use that same line in TCL:<br><br>channel set $newchan need-key {putserv "JOIN $newchan $key"}<br><br>But it doesn't work.<br>When I drop the { } I only see "putserv" in need-key.<br>When I drop the " " I only see the variables $key instead of the real key.<br>(Eggdrop 1.6.13 + TCL 8.3.4)<br><br>I watched into a few public command scripts, but I didn't found ANY SCRIPT who saves channel keys (weired - nobody noticed yet). In LOLz tools they use that way: channel set $newchan need-key "chankey #chan key" &lt;- but that way doesnt work. Gives error "chankey?".<br>So can anyone gimme a working solution to save channel key's?<br>My current script looks like this but won't work:<br><br>channel add $newchan<br>channel set $newchan need-key {putserv "JOIN $newchan $key"}<br>putserv "JOIN $newchan $key"<br>-&gt; Key get's lost after .restart (sure cause need-key is wrong <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">).<br><br>Thanks.<br><br>My second problem:<br><br>I know [channels] and I know current chan $chan.<br>I want to set a new variable which contains ALL [channels] EXCEPT current $chan. I tried that with foreach but couldn't find the correct solution. Can anyone help me? I just need a variable which contains all other channels where the bot is on ([channels]) except the chan where I used that command in ($chan).<br><br>Big thanks. I love you guys (and girls??) <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile">.<br><br>See ya,<br>BiLL<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=50">BiLL</a> — Wed Oct 29, 2003 11:30 pm</p><hr />
]]></content>
	</entry>
	</feed>
