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

	<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-02T06:12:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[geek]]></name></author>
		<updated>2021-01-02T06:12:20-04:00</updated>

		<published>2021-01-02T06:12:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109305#p109305</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109305#p109305"/>
		<title type="html"><![CDATA[raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109305#p109305"><![CDATA[
to avoid the "lag" problem, I put the rest of the code in ldm:whoraw instead of ldm:who<br><br>but now<br><br>when bot enter in a new channel, I think eggdrop performs a global "WHO #channel" command and so it runs my procedure that catch raw 352 too :)<br><br><br>How can solve this problem? with utimer method of willyw? right?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10286">geek</a> — Sat Jan 02, 2021 6:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[geek]]></name></author>
		<updated>2020-12-27T14:56:49-04:00</updated>

		<published>2020-12-27T14:56:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109283#p109283</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109283#p109283"/>
		<title type="html"><![CDATA[raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109283#p109283"><![CDATA[
yes tnx, global var ::ldmident works<br><br><br>BUT<br><br>there is a kind of "lag" between the WHO command and the availability of the value compute in ldm:whoraw<br><br>SO<br><br>the first execution I get "no such variable", the following I get a result but is "the old" ident, lol<br><br><br>THIS OCCURS:<br><br>(fresh restart of the eggdrop)<br><br>first time:<br>!testraw nickONE -&gt; I get "no such variable"<br><br>second time:<br>!testraw nickTWO -&gt; I get identONE<br><br>third time:<br>!testraw nickTHREE -&gt; I get identTWO<br><br>and so on...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10286">geek</a> — Sun Dec 27, 2020 2:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2020-12-27T13:47:13-04:00</updated>

		<published>2020-12-27T13:47:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109282#p109282</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109282#p109282"/>
		<title type="html"><![CDATA[raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109282#p109282"><![CDATA[
Check out:<br><br><a href="http://www.tcl.tk/man/tcl8.6/TclCmd/global.htm" class="postlink">http://www.tcl.tk/man/tcl8.6/TclCmd/global.htm</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Sun Dec 27, 2020 1:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[geek]]></name></author>
		<updated>2020-12-27T12:27:27-04:00</updated>

		<published>2020-12-27T12:27:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109281#p109281</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109281#p109281"/>
		<title type="html"><![CDATA[raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109281#p109281"><![CDATA[
<blockquote class="uncited"><div>1. ident is too generic, better to use something like ldmident</div></blockquote>yes :)<br><blockquote class="uncited"><div>2. your variable is set with the answer of the /who command, but the /who is initiated by your ldm:who proc. So you can't already have this value.</div></blockquote>you mean in ldm:who:<br><br>example1)<br>puthelp "PRIVMSG #test :$::ldmident"<br>putserv "WHO $nickname"<br><br>example2)<br>putserv "WHO $nickname"<br>puthelp "PRIVMSG #test :$::ldmident"<br><br>1 -&gt; not work / error<br>2 -&gt; work<br><br>right?<br><br><br><br><strong class="text-strong">EDIT:   NO! <br><br>perhaps now I have understand<br>I try example2 and I get "no such variable" error again<br>You mean that "it takes some time" for ::ldmident to be available and use it<br>right?</strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10286">geek</a> — Sun Dec 27, 2020 12:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-12-27T12:07:29-04:00</updated>

		<published>2020-12-27T12:07:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109279#p109279</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109279#p109279"/>
		<title type="html"><![CDATA[raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109279#p109279"><![CDATA[
Use global variable:<div class="codebox"><p>Code: </p><pre><code>set ::ident [lindex $text 2]...puthelp "PRIVMSG #test :$::ident"</code></pre></div>Take care about 2 things:<br><br>1. ident is too generic, better to use something like ldmident<br>2. your variable is set with the answer of the /who command, but the /who is initiated by your ldm:who proc. So you can't already have this value.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sun Dec 27, 2020 12:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[geek]]></name></author>
		<updated>2020-12-27T11:38:49-04:00</updated>

		<published>2020-12-27T11:38:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109278#p109278</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109278#p109278"/>
		<title type="html"><![CDATA[raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109278#p109278"><![CDATA[
and if I want pass a variable from ldm:whoraw to ldm:who ?<br><br>something like:<div class="codebox"><p>Code: </p><pre><code>proc ldm:whoraw {from key text} {   set ident [lindex $text 2]   return}</code></pre></div>and in ldm:who<div class="codebox"><p>Code: </p><pre><code>puthelp "PRIVMSG #test :$ident"</code></pre></div><br>I get always Tcl error: can't read "ident": no such variable<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10286">geek</a> — Sun Dec 27, 2020 11:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2020-12-27T11:10:30-04:00</updated>

		<published>2020-12-27T11:10:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109277#p109277</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109277#p109277"/>
		<title type="html"><![CDATA[raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109277#p109277"><![CDATA[
<blockquote class="uncited"><div> ...<br>yes, I'll use your code <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>and very tnx willyw</div></blockquote>And test it.  Then test it some more.   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>One way:   use  <br>.binds raw<br>from the partyline, to be sure that the bind is first there, and then gone, when you expect both.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Sun Dec 27, 2020 11:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[geek]]></name></author>
		<updated>2020-12-27T07:35:37-04:00</updated>

		<published>2020-12-27T07:35:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109275#p109275</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109275#p109275"/>
		<title type="html"><![CDATA[raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109275#p109275"><![CDATA[
<blockquote class="uncited"><div>You can have multiple scripts using the same raw number without any trouble.</div></blockquote>thanks :)<br><blockquote class="uncited"><div>This is a quite good idea to use utimer to unbind, but you can have side effects.</div></blockquote>what kind of side effects?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10286">geek</a> — Sun Dec 27, 2020 7:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-12-27T06:18:56-04:00</updated>

		<published>2020-12-27T06:18:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109273#p109273</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109273#p109273"/>
		<title type="html"><![CDATA[raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109273#p109273"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>The ldm:whoraw will catch any who response sent to the eggdrop.</div></blockquote>and if are there more than one scripts that catch the same raw number? is it a problem?<br>very tnx CrazyCat</div></blockquote>You can have multiple scripts using the same raw number without any trouble.<blockquote class="uncited"><div><blockquote class="uncited"><div>It is what I usually do.<div class="codebox"><p>Code: </p><pre><code>...</code></pre></div>The idea is to create the bind that you will need.<br>Then, a few seconds later, unbind it.</div></blockquote>yes, I'll use your code <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>and very tnx willyw</div></blockquote>This is a quite good idea to use utimer to unbind, but you can have side effects.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sun Dec 27, 2020 6:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[geek]]></name></author>
		<updated>2020-12-27T06:05:41-04:00</updated>

		<published>2020-12-27T06:05:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109272#p109272</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109272#p109272"/>
		<title type="html"><![CDATA[raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109272#p109272"><![CDATA[
<blockquote class="uncited"><div>The ldm:whoraw will catch any who response sent to the eggdrop.</div></blockquote>and if are there more than one scripts that catch the same raw number? is it a problem?<br>very tnx CrazyCat<br><br><blockquote class="uncited"><div>It is what I usually do.<div class="codebox"><p>Code: </p><pre><code>...</code></pre></div>The idea is to create the bind that you will need.<br>Then, a few seconds later, unbind it.</div></blockquote>yes, I'll use your code :)<br>and very tnx willyw<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10286">geek</a> — Sun Dec 27, 2020 6:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2020-12-27T03:15:47-04:00</updated>

		<published>2020-12-27T03:15:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109271#p109271</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109271#p109271"/>
		<title type="html"><![CDATA[Re: raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109271#p109271"><![CDATA[
<blockquote class="uncited"><div>...<br>the question is: when I use it, does "ldm:whoraw" capture ONLY the /who command inside this script or is there the possibility that catch /who command from others scripts too?<br>...</div></blockquote>If this is a concern, here's an idea to consider.   It is what I usually do.<br><div class="codebox"><p>Code: </p><pre><code>proc ldm:who {nick host hand chan arg} {   bind raw - "352" ldm:whoraw    utimer 5 [list unbind raw - "352" ldm:whoraw]   &lt; continue with the rest of the procedure's code here &gt;}</code></pre></div>The idea is to create the bind that you will need.<br>Then, a few seconds later, unbind it.  <br><br>Of course, you should adjust the value of the utimer to whatever you think is best.<br><br><br>I hope this helps.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Sun Dec 27, 2020 3:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-12-26T20:06:23-04:00</updated>

		<published>2020-12-26T20:06:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109270#p109270</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109270#p109270"/>
		<title type="html"><![CDATA[raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109270#p109270"><![CDATA[
The ldm:whoraw will catch any who response sent to the eggdrop.<br>You can simply test that: in party-line, do a <strong class="text-strong">.tcl putserv "WHO $botnick"</strong> and your proc will work.<br><br>A bind catch a specific server event, it's totally independant of who/what asked the server to react.<br><br>But your script is <em class="text-italics">secure</em> as it just displays server's who replies to a particular channel. If it's just a test script, you'd better use a putlog and check in party-line, to avoid flood on your server.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sat Dec 26, 2020 8:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[geek]]></name></author>
		<updated>2020-12-26T19:33:29-04:00</updated>

		<published>2020-12-26T19:33:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109269#p109269</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109269#p109269"/>
		<title type="html"><![CDATA[raw binding]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109269#p109269"><![CDATA[
I write this small tcl script to understand raw binding:<div class="codebox"><p>Code: </p><pre><code>##raw 352risposta al WHO "vanilla"##raw 354risposta al WHOX che è la versione "extended"####nel RFC 1459 ( https://www.rfc-editor.org/rfc/rfc1459.txt )#402ERR_NOSUCHSERVER#352RPL_WHOREPLY#315RPL_ENDOFWHO#bind pub - !testraw ldm:whoproc ldm:who {nick host hand chan arg} {set nickname [stripcodes * $arg]set nickname [string trim $nickname]set arguments [llength $nickname]if { $arguments &gt; 1 } {puthelp "PRIVMSG $chan :specificare un utente alla volta"return} elseif { $arguments == 0 } {puthelp "PRIVMSG $chan :specificare il nickname"return}if { ![onchan $nickname $chan] } {puthelp "PRIVMSG $chan :nickname non trovato"return}putserv "WHO $nickname"#bind raw - "315" ldm:whorawbind raw - "352" ldm:whoraw#bind raw - "354" ldm:whoraw#bind raw - "402" ldm:whorawreturn}proc ldm:whoraw {from key text} {puthelp "PRIVMSG #prova :$text"return}</code></pre></div><br>is this script secure? are there potential problems with other scripts?<br><br>the question is: when I use it, does "ldm:whoraw" capture ONLY the /who command inside this script or is there the possibility that catch /who command from others scripts too?<br><br>(sorry for my english)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10286">geek</a> — Sat Dec 26, 2020 7:33 pm</p><hr />
]]></content>
	</entry>
	</feed>
