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

	<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>2021-01-13T01:49:01-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2021-01-13T01:49:01-04:00</updated>

		<published>2021-01-13T01:49:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109338#p109338</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109338#p109338"/>
		<title type="html"><![CDATA[Mrc to TCL !!! Plissssssssss !!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109338#p109338"><![CDATA[
Ah, i missed the #chan1 part in the initial post (to be honest didnd't even look at it). Yeah, you are right, my bad.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Jan 13, 2021 1:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2021-01-12T19:15:21-04:00</updated>

		<published>2021-01-12T19:15:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109337#p109337</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109337#p109337"/>
		<title type="html"><![CDATA[Mrc to TCL !!! Plissssssssss !!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109337#p109337"><![CDATA[
I disagree:<br>Reading the .mrc code, the script voices john on #chan2 if John joins #chan1. So the eggdrop must be op on #chan2 to give the voice. Doesn't matter if it'd op in #chan1 (so $chan), it doesn't make any action in it.<br><br>I think you made an initial confusion: John joins #chan1 ($chan) and must be voiced in #chan2.<br>Your script is: John joins any channl (but not #chan2) where the eggdrop is op, John is voiced. Not what I read in the .mrc.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Jan 12, 2021 7:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2021-01-11T12:38:18-04:00</updated>

		<published>2021-01-11T12:38:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109335#p109335</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109335#p109335"/>
		<title type="html"><![CDATA[Mrc to TCL !!! Plissssssssss !!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109335#p109335"><![CDATA[
Actually I didn't.<br><br>For argument sake let's say the following variables hold some values:<div class="codebox"><p>Code: </p><pre><code>$nick = John (bot's nick is Bot)$chan = #something</code></pre></div>We break this code:<div class="codebox"><p>Code: </p><pre><code>if {[isbotnick $nick] || ![string equal -nocase $chan "#chan2"] || ![botisop $chan]} return</code></pre></div>into 3 separate if statements so it's easier to follow:<div class="codebox"><p>Code: </p><pre><code>if {[isbotnick $nick]} returnif {![string equal -nocase $chan "#chan2"]} returnif {![botisop $chan]} return</code></pre></div>1st - since $nick holds a value "John" and bot's nick is "Bot" the result will be false and continues to 2nd statement (or second part of the initial statement, doesn't mater from a compiler point of view)<br>2nd - since the $chan is #something and the two strings aren't equal the statement will return false but since it's an IF NOT will make the result a true and thus will enter it's <em class="text-italics">THEN</em> part and dose a <em class="text-italics">return</em><br><br>Now let's make a change to $chan making it be equal with #cHaN2 (notice the mixed case) for example.<br><br>1st step will continue as above<br>2nd step compares the "#cHaN2" with <em class="text-italics">#chan2</em> in a case in-sensitive matter, meaning the two are identical thus the statement returns true. the IF NOT makes the true into a false thus continues to 3rd step<br>3rd step - at this point the $nick = John and $chan = #cHaN2 (from the botisop perspective it's identical with #chan2) since it passed the 2nd step. So, no, $chan is correct there since <em class="text-italics">excluded</em> other names at 2nd step.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jan 11, 2021 12:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2021-01-11T10:18:00-04:00</updated>

		<published>2021-01-11T10:18:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109334#p109334</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109334#p109334"/>
		<title type="html"><![CDATA[Mrc to TCL !!! Plissssssssss !!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109334#p109334"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>bind join - * voiceproc voice {nick uhost hand chan} {if {[isbotnick $nick] || ![string equal -nocase $chan "#chan2"] || ![botisop $chan]} returnpushmode $chan +v $nick}</code></pre></div><em class="text-italics">isbotnick</em> - returns 0 or 1 if the <em class="text-italics">nick</em> is the bot itself<br><em class="text-italics">string equal</em> with the <em class="text-italics">-nocase</em> <span style="text-decoration:underline">arg</span>ument compares the channel name with #chan2<br><em class="text-italics">botisop</em> - returns 0 or 1 if the bot has channel operator status<br><em class="text-italics">pushmode</em> - sends out a channel mode change, it's one of the methods with a slow queue<br>the <em class="text-italics">!</em> (exclamation mark) in front of the <em class="text-italics">[function]</em> negates the result, basically turns the <em class="text-italics">IF</em> statement into an <em class="text-italics">IF NOT</em></div></blockquote>Thanks for having given explanations.<br>You made a small error on botisop: it's on target channel that it must be tested, so on #chan2, not on $chan.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Jan 11, 2021 10:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2021-01-11T10:07:14-04:00</updated>

		<published>2021-01-11T10:07:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109333#p109333</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109333#p109333"/>
		<title type="html"><![CDATA[Re: Mrc to TCL !!! Plissssssssss !!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109333#p109333"><![CDATA[
Agreeing with the above.<br><br>Here are some links to bookmark and use.   <br><br><a href="http://suninet.the-demon.de/" class="postlink">http://suninet.the-demon.de/</a><br><br><a href="https://docs.eggheads.org/mainDocs/tcl-commands.html" class="postlink">https://docs.eggheads.org/mainDocs/tcl-commands.html</a><br><br><a href="http://www.tcl.tk/man/tcl8.6/TclCmd/contents.htm" class="postlink">http://www.tcl.tk/man/tcl8.6/TclCmd/contents.htm</a><br><br>It's fun stuff.   Try it.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">     Get started.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Mon Jan 11, 2021 10:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2021-01-11T07:15:24-04:00</updated>

		<published>2021-01-11T07:15:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109332#p109332</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109332#p109332"/>
		<title type="html"><![CDATA[Mrc to TCL !!! Plissssssssss !!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109332#p109332"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind join - * voiceproc voice {nick uhost hand chan} {if {[isbotnick $nick] || ![string equal -nocase $chan "#chan2"] || ![botisop $chan]} returnpushmode $chan +v $nick}</code></pre></div><em class="text-italics">isbotnick</em> - returns 0 or 1 if the <em class="text-italics">nick</em> is the bot itself<br><em class="text-italics">string equal</em> with the <em class="text-italics">-nocase</em> <span style="text-decoration:underline">arg</span>ument compares the channel name with #chan2<br><em class="text-italics">botisop</em> - returns 0 or 1 if the bot has channel operator status<br><em class="text-italics">pushmode</em> - sends out a channel mode change, it's one of the methods with a slow queue<br>the <em class="text-italics">!</em> (exclamation mark) in front of the <em class="text-italics">[function]</em> negates the result, basically turns the <em class="text-italics">IF</em> statement into an <em class="text-italics">IF NOT</em><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jan 11, 2021 7:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2021-01-11T06:57:32-04:00</updated>

		<published>2021-01-11T06:57:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109331#p109331</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109331#p109331"/>
		<title type="html"><![CDATA[Mrc to TCL !!! Plissssssssss !!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109331#p109331"><![CDATA[
You probably must begin to learn TCL.<br><br>Here is the basic "conversion":<div class="codebox"><p>Code: </p><pre><code>bind join - "#chan1 *" voiceproc voice {nick uhost handle chan} {   pushmode "#chan2" +v $nick}</code></pre></div>And a better procedure:<div class="codebox"><p>Code: </p><pre><code>proc voice {nick uhost handle chan} {   if {$nick eq $::botnick} { return }   if {![botisop "#chan2"} { return }   if {![onchan $nick "#chan2"} { return }   pushmode "#chan2" +v $nick}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Jan 11, 2021 6:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ORATEGOD]]></name></author>
		<updated>2021-01-10T22:28:09-04:00</updated>

		<published>2021-01-10T22:28:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109330#p109330</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109330#p109330"/>
		<title type="html"><![CDATA[Mrc to TCL !!! Plissssssssss !!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109330#p109330"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>on *:join:#CHAN1:{ mode #CHAN2 +v $nick }</code></pre></div>thanks a lot for the help friends<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12869">ORATEGOD</a> — Sun Jan 10, 2021 10:28 pm</p><hr />
]]></content>
	</entry>
	</feed>
