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

	<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>2009-10-03T19:19:27-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-10-03T19:19:27-04:00</updated>

		<published>2009-10-03T19:19:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90414#p90414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90414#p90414"/>
		<title type="html"><![CDATA[[SOLVED] isvoice / isop help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90414#p90414"><![CDATA[
The putchan command is provided by the alltools.tcl script provided with eggdrops.<br><br>As for the logics, you don't need those parenthesis, as the not-operator (!) has higher priority than either and-operator (&amp;&amp;) or or-operator (||). No harm in including them though.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Oct 03, 2009 7:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MIODude]]></name></author>
		<updated>2009-10-03T18:36:12-04:00</updated>

		<published>2009-10-03T18:36:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90413#p90413</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90413#p90413"/>
		<title type="html"><![CDATA[SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90413#p90413"><![CDATA[
Thanks! that did it..<br><br>I'm not sure about the putchan myself - it came with the original script that i was modifying<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8276">MIODude</a> — Sat Oct 03, 2009 6:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-10-03T18:37:25-04:00</updated>

		<published>2009-10-03T18:20:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90412#p90412</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90412#p90412"/>
		<title type="html"><![CDATA[[SOLVED] isvoice / isop help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90412#p90412"><![CDATA[
Logically you need &amp;&amp; instead of || because you want to trigger if user is not op AND is not voice.<br><br>You are also using braces to seperate the two commands determining the logical result instead of parenthesis. Braces generally hinder variable, command and backslash substitution.<br><br>I'm not entirely sure what putchan means. Perhaps you mean one of the Eggdrop Tcl output commands putserv or putquick.<br><br>The argument 'args' has special meaning, do not use it in this context.<br><br>Generally I would use return 0 or even simply return at the conclusion of a proc, though there are special circumstances where you may want to deliberately return 1. Refer to 'return values' in tcl-commands.doc. In any case you don't need two such statements as per your code.<br><div class="codebox"><p>Code: </p><pre><code>proc procname {nick uhost hand chan text} {     if {(![isvoice $nick $chan]) &amp;&amp; (![isop $nick $chan])} {        putserv "PRIVMSG $chan :$nick, blah blah blah"    }     return 0}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Sat Oct 03, 2009 6:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MIODude]]></name></author>
		<updated>2009-10-03T18:37:04-04:00</updated>

		<published>2009-10-03T17:38:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90411#p90411</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90411#p90411"/>
		<title type="html"><![CDATA[[SOLVED] isvoice / isop help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90411#p90411"><![CDATA[
I just want a simple procedure to only be invoked if the user isn't an op or doesn't have voice... <br><div class="codebox"><p>Code: </p><pre><code>proc procname {nick uhost hand chan args} {     if {{![isvoice $nick $chan]} || {![isop $nick $chan]}} {     putchan $chan "$nick, blah blah blah"     return 1  } return 1}</code></pre></div>i've tried multiple variations - i get <br>expected boolean value but got "![isvoice $nick $chan]"<br><br>What am I doing wrong?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8276">MIODude</a> — Sat Oct 03, 2009 5:38 pm</p><hr />
]]></content>
	</entry>
	</feed>
