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

	<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>2007-09-25T19:50:17-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Zircon]]></name></author>
		<updated>2007-09-25T19:50:17-04:00</updated>

		<published>2007-09-25T19:50:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76241#p76241</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76241#p76241"/>
		<title type="html"><![CDATA[Voice Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76241#p76241"><![CDATA[
Thanks a lot nml375, it worked 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=8115">Zircon</a> — Tue Sep 25, 2007 7:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-09-25T15:17:03-04:00</updated>

		<published>2007-09-25T15:17:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76239#p76239</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76239#p76239"/>
		<title type="html"><![CDATA[Voice Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76239#p76239"><![CDATA[
You should be able to use "getchanmode" for this, along with "string match" and some "gluecode"<br>I'd suggest something like this:<div class="codebox"><p>Code: </p><pre><code>string match "*D*" [lindex [split [getchanmode $C]] 0]</code></pre></div>This extracts the first part of the channelmode, getting rid of any channelkey and/or limit, then does a simple match to see wether there is a capital D within the remaining string. If there is, it will return true.<br>In your case, you would probably like to negate it, as shown earlier posts.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Sep 25, 2007 3:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Zircon]]></name></author>
		<updated>2007-09-25T14:53:39-04:00</updated>

		<published>2007-09-25T14:53:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76238#p76238</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76238#p76238"/>
		<title type="html"><![CDATA[Voice Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76238#p76238"><![CDATA[
Hello nml375<br><br>        Thanks for yur help, and indeed, you are right about the intuitive thing. I need to add a new condition now before voicing a user. I dont want the script to voice anyone when the channel is on mode "D", c<span style="text-decoration:underline">ase sensitive</span>. What to do  to test that mode "D" is one of the channels modes at that time ?<br><br>Thans in advance<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8115">Zircon</a> — Tue Sep 25, 2007 2:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-09-25T11:56:11-04:00</updated>

		<published>2007-09-25T11:56:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76237#p76237</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76237#p76237"/>
		<title type="html"><![CDATA[Voice Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76237#p76237"><![CDATA[
Well, either should work just fine, as they produce exactly the same result. Which one you use is just a matter of what you find most intuitive.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Sep 25, 2007 11:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Zircon]]></name></author>
		<updated>2007-09-25T01:34:05-04:00</updated>

		<published>2007-09-25T01:34:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76227#p76227</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76227#p76227"/>
		<title type="html"><![CDATA[Voice Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76227#p76227"><![CDATA[
Hi all<br><br>     Thanks for your help nml375 and awyeah. Since i dont want to voice a user that have q global flag <span style="text-decoration:underline">OR</span> q channel flag, i replaced this line : <div class="codebox"><p>Code: </p><pre><code>if {[onchan $N $C] &amp;&amp; ![isvoice $N $C]} { </code></pre></div>by this line :<div class="codebox"><p>Code: </p><pre><code>if {[onchan $N $C] &amp;&amp; ![isvoice $N $C] &amp;&amp; ![matchattr [nick2hand $N $C] q|q $C]} {</code></pre></div>   and it s working, thanks again.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8115">Zircon</a> — Tue Sep 25, 2007 1:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2007-09-24T21:13:39-04:00</updated>

		<published>2007-09-24T21:13:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76223#p76223</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76223#p76223"/>
		<title type="html"><![CDATA[Voice Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76223#p76223"><![CDATA[
Thanks honeybee.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Sep 24, 2007 9:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[honeybee]]></name></author>
		<updated>2007-09-24T21:04:56-04:00</updated>

		<published>2007-09-24T21:04:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76222#p76222</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76222#p76222"/>
		<title type="html"><![CDATA[Voice Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76222#p76222"><![CDATA[
it should work properly it will be only 0 when "-q" for both global &amp; channel. <br>this type of flag matching is mentioned in '.help match'<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7174">honeybee</a> — Mon Sep 24, 2007 9:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2007-09-24T20:29:28-04:00</updated>

		<published>2007-09-24T20:29:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76221#p76221</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76221#p76221"/>
		<title type="html"><![CDATA[Voice Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76221#p76221"><![CDATA[
<blockquote class="uncited"><div>Use "matchattr" to test wether a user has a given flag:<br><div class="codebox"><p>Code: </p><pre><code>matchattr [nick2hand $N $C] "-q&amp;-q" $C</code></pre></div></div></blockquote>Never knew it could be done in this way possible using a "&amp;" with a "-" infront of both flags. All I know is to use it in this way:<br><div class="codebox"><p>Code: </p><pre><code>if {![matchattr [nick2hand $nick $chan] q|q $chan]} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Sep 24, 2007 8:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-09-24T17:20:37-04:00</updated>

		<published>2007-09-24T17:20:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76217#p76217</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76217#p76217"/>
		<title type="html"><![CDATA[Voice Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76217#p76217"><![CDATA[
Use "matchattr" to test wether a user has a given flag or combination of flags.<br>The following should be "true" if the user has neither global or channel-speciffic q:<div class="codebox"><p>Code: </p><pre><code>matchattr $handle "-q&amp;-q" $channel</code></pre></div>Now, since you did not post the full script, you'll have to figure out how to get the handle and channel. I would guess $C is the channel, and $N is the nickname to be voiced, and in this case you could use nick2hand to get the handle:<div class="codebox"><p>Code: </p><pre><code>matchattr [nick2hand $N $C] "-q&amp;-q" $C</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon Sep 24, 2007 5:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Zircon]]></name></author>
		<updated>2007-09-24T17:05:44-04:00</updated>

		<published>2007-09-24T17:05:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76216#p76216</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76216#p76216"/>
		<title type="html"><![CDATA[Voice Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76216#p76216"><![CDATA[
Hi all<br><br>    i have this piece of code that is a part of a Voice script.<div class="codebox"><p>Code: </p><pre><code>proc AV_V {N C c} {  global av_M  if {$av_M($c) == 0} {return 0}  if {[onchan $N $C] &amp;&amp; ![isvoice $N $C]} {    putquick "MODE $C +v $N"  }  return 0}</code></pre></div>I want to modify this proc so the script won't voice a user that has a global or channel q flag. By the way : q flag means "quiet" user (user cannot gain voice) <br><br>Thanks in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8115">Zircon</a> — Mon Sep 24, 2007 5:05 pm</p><hr />
]]></content>
	</entry>
	</feed>
