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

	<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>2011-05-23T01:03:13-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-05-23T01:03:13-04:00</updated>

		<published>2011-05-23T01:03:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96936#p96936</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96936#p96936"/>
		<title type="html"><![CDATA[Greetd.tcl help  SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96936#p96936"><![CDATA[
True, 'string map' is even better. Forgot all about it. <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=187">caesar</a> — Mon May 23, 2011 1:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2011-05-22T21:41:43-04:00</updated>

		<published>2011-05-22T21:41:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96935#p96935</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96935#p96935"/>
		<title type="html"><![CDATA[Greetd.tcl help  SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96935#p96935"><![CDATA[
<blockquote class="uncited"><div>Also, instead of:<blockquote class="uncited"><div>regsub -all "%nick" $welctxt "$nick" welctxt<br>regsub -all "%chan" $welctxt "$chan" welctxt </div></blockquote>you can use '<a href="http://www.tcl.tk/man/tcl8.5/TclCmd/subst.htm" class="postlink">subst</a>' to get the same result.</div></blockquote>And as well, you can use [string map] along with <ul> <li>instead of curly braces. So instead of all this below:<div class="codebox"><p>Code: </p><pre><code>  set welctxt $welc(msg)  regsub -all "%nick" $welctxt "$nick" welctxt  regsub -all "%chan" $welctxt "$chan" welctxt </code></pre></div>Just do this:<div class="codebox"><p>Code: </p><pre><code>set weltxt [string map [list "%nick" "$nick" "%chan" "$chan"] $welc(msg)]</code></pre></div>Using subst most times isn't a clean approach. To me it is akin to regexp and regsub. Only to be used as a last resort.</li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun May 22, 2011 9:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-05-22T04:34:45-04:00</updated>

		<published>2011-05-22T04:34:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96934#p96934</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96934#p96934"/>
		<title type="html"><![CDATA[Greetd.tcl help  SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96934#p96934"><![CDATA[
<blockquote class="uncited"><div>if {$nick != "Monkey"} {return} </div></blockquote>You should use 'string equal -nocase' as you will sooner or later find out that for example 'Monkey' isn't equal with 'monkey'.<br><br>Also, instead of:<blockquote class="uncited"><div>regsub -all "%nick" $welctxt "$nick" welctxt<br>regsub -all "%chan" $welctxt "$chan" welctxt </div></blockquote>you can use '<a href="http://www.tcl.tk/man/tcl8.5/TclCmd/subst.htm" class="postlink">subst</a>' to get the same result.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun May 22, 2011 4:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tazd]]></name></author>
		<updated>2011-05-22T03:25:20-04:00</updated>

		<published>2011-05-22T03:25:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96933#p96933</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96933#p96933"/>
		<title type="html"><![CDATA[Greetd.tcl help  SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96933#p96933"><![CDATA[
Thanks got it running just right now<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11658">tazd</a> — Sun May 22, 2011 3:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doggo]]></name></author>
		<updated>2011-05-21T14:04:42-04:00</updated>

		<published>2011-05-21T14:04:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96931#p96931</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96931#p96931"/>
		<title type="html"><![CDATA[Greetd.tcl help  SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96931#p96931"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind mode * "#nzbmatrix.chat +v" Monkey:voice proc Monkey:voice {nick uhost hand chan mode target} {           if {$nick != "Monkey"} {return}                 putserv "NOTICE $target :type !droid in $chan to list of help commands" }</code></pre></div>should do what you want tazd  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11046">doggo</a> — Sat May 21, 2011 2:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2011-05-21T13:33:02-04:00</updated>

		<published>2011-05-21T13:33:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96930#p96930</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96930#p96930"/>
		<title type="html"><![CDATA[Greetd.tcl help  SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96930#p96930"><![CDATA[
I'd probably add a check somewhat like this:<div class="codebox"><p>Code: </p><pre><code>if {[matchattr $hand +v-ho]} {  return}</code></pre></div>That would make sure the user has the v flag but not the h nor o flag (checking for channel modes +ohv would be rather pointless, since noone will join the channel opped/voiced).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat May 21, 2011 1:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tazd]]></name></author>
		<updated>2011-05-22T03:25:40-04:00</updated>

		<published>2011-05-21T09:28:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96928#p96928</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96928#p96928"/>
		<title type="html"><![CDATA[Greetd.tcl help  SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96928#p96928"><![CDATA[
What i am trying o achieve is add the needed info to get this script to only announce to those that are give +v in a channel but not to those that are a halfop or above.<br><br>This shows what i tried with my limited knowledge and quick scan looking at things but its a no go so was hoping someone here could point me in the right direction.<br><div class="codebox"><p>Code: </p><pre><code>bind mode - '% +h' userhop set welc(msg) "%nick type !droid in %chan to list of help commands"set welc(chan) "#channel"set welc(type) "1"bind join - #channel* givewelcomeproc givewelcome {nick uhost hand chan} {  global welc  set welctxt $welc(msg)  regsub -all "%nick" $welctxt "$nick" welctxt  regsub -all "%chan" $welctxt "$chan" welctxt  switch $welc(type) {    1 { puthelp "NOTICE $nick :$welctxt" }    2 { puthelp "PRIVMSG $nick :$welctxt" }  }} </code></pre></div>Many thanks in advance<br><br><span style="color:red">Moderated: Moved to Scripting Help.<br>Placed script-code inside proper tags.<br><br>/NML_375</span><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11658">tazd</a> — Sat May 21, 2011 9:28 am</p><hr />
]]></content>
	</entry>
	</feed>
