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

	<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>2010-01-25T05:40:53-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Thib]]></name></author>
		<updated>2010-01-25T05:40:53-04:00</updated>

		<published>2010-01-25T05:40:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91843#p91843</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91843#p91843"/>
		<title type="html"><![CDATA[proc under proc problems - dubble logs]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91843#p91843"><![CDATA[
thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11055">Thib</a> — Mon Jan 25, 2010 5:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-01-15T10:35:20-04:00</updated>

		<published>2010-01-15T10:35:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91690#p91690</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91690#p91690"/>
		<title type="html"><![CDATA[proc under proc problems - dubble logs]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91690#p91690"><![CDATA[
If you add a second parameter to your proc declaration, then you must remember to provide the appropriate argument when calling the proc<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Jan 15, 2010 10:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thib]]></name></author>
		<updated>2010-01-15T05:23:46-04:00</updated>

		<published>2010-01-15T05:23:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91687#p91687</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91687#p91687"/>
		<title type="html"><![CDATA[proc under proc problems - dubble logs]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91687#p91687"><![CDATA[
thank you !<br><br>another problem :<br><div class="codebox"><p>Code: </p><pre><code>proc proc_kick {nick uhost} {        global salon                if {[isvoice $nick $salon]} {                  putserv "NOTICE $nick :Bon tchat !"                } else {                  newchanban $salon $uhost Eva "test test" 120                }}</code></pre></div><blockquote class="uncited"><div>(10:12:56) (Eva) [10:12] wrong # args: should be "proc_kick nick uhost"</div></blockquote>If i only " proc proc_kick {nick}", i'm told "$uhost no suhc variable" what is normal.<br>But where the hell is my mistake ? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title="Evil or Very Mad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11055">Thib</a> — Fri Jan 15, 2010 5:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-01-13T13:31:10-04:00</updated>

		<published>2010-01-13T13:31:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91670#p91670</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91670#p91670"/>
		<title type="html"><![CDATA[proc under proc problems - dubble logs]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91670#p91670"><![CDATA[
For that, I'd suggest you test the nickname of the "joiner" using the "isbotnick" command:<div class="codebox"><p>Code: </p><pre><code>proc myjoin {nick host handle channel} {  if {[isbotnick $nick]} {    return  }  ... rest goes here ...}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Jan 13, 2010 1:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thib]]></name></author>
		<updated>2010-01-13T05:50:10-04:00</updated>

		<published>2010-01-13T05:50:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91669#p91669</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91669#p91669"/>
		<title type="html"><![CDATA[proc under proc problems - dubble logs]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91669#p91669"><![CDATA[
It works, thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Other question : when my egg joins, he's noticed by itself .. because of the join.. ( i also have a bind join in my code )<br><br>How can i avoid it ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11055">Thib</a> — Wed Jan 13, 2010 5:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-01-12T17:41:47-04:00</updated>

		<published>2010-01-12T17:41:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91665#p91665</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91665#p91665"/>
		<title type="html"><![CDATA[proc under proc problems - dubble logs]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91665#p91665"><![CDATA[
First off,<br>I'd recommend that you don't create the proc_kick proc from within the notc:confirm proc. I take it you are accustomed with Java classes (especially events)? Unfortunately, tcl does not work that way - the proc_kick proc will be created at a global level, not within any notc:confirm proc/"object".<br><br>Secondly, this is partly due to the first part;<br>Variable scope. $nick is not available within proc_kick, as it is not defined as a variable within proc_kick's namespace. What you'll need to do, is add a parameter for your proc_kick:<div class="codebox"><p>Code: </p><pre><code>proc proc_kick {nickname} {  global salon  putkick $salon $nickname "test"}</code></pre></div>Next, you'll have to provide the nickname as an argument when calling the proc. In a trivial case, you'd simply do proc_kick $nick, but since you use utimer things get alittle more complicated. To avoid double evaluations and possible exploits, you'll need to do it like this:<div class="codebox"><p>Code: </p><pre><code>  utimer 5 [list proc_kick $nick]</code></pre></div>Much simplified, we use the list command to build a proper command line that can be executed safely when the timer expires.<br><br>Third, as for the multiple triggers, most likely you've loaded the script twice, generating 2 bindings (using .rehash will not wipe the current tcl environment, and any already existing bindings will remain).<br><br>All in all, I'd write the script something like this:<div class="codebox"><p>Code: </p><pre><code>#Fancy tweak to see if the binding has already been created, just in case of a .rehashif {[lsearch -glob -- [binds notc] "* notc:confirm"] == -1} { bind notc - * notc:confirm}proc notc:confirm { nick uhost handle text {dest "Eva"} } { global salon if {$text == "confirm"} {  putserv "NOTICE $nick :Vous avez maintenant confirmé"  pushmode $salon +v $nick  putlog "$nick - $uhost à confirmé"  utimer 5 [list proc_kick $nick] }}proc proc_kick {nickname} { global salon if {[onchan $nickname $salon]} {  putkick $salon $nickname "test" }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Jan 12, 2010 5:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thib]]></name></author>
		<updated>2010-01-11T11:58:14-04:00</updated>

		<published>2010-01-11T11:58:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91646#p91646</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91646#p91646"/>
		<title type="html"><![CDATA[proc under proc problems - dubble logs]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91646#p91646"><![CDATA[
Hellow,<br><br>I'm creating my own script, i have 2 questions.<br><br>When an user comes, he's noticed by the bot called Eva. When he "/notice botnick confirm", he's noticed by Eva, and kicked after 5 secs.<br><br>here is my code :<br><div class="codebox"><p>Code: </p><pre><code>set salon "#channel"bind notc - * notc:confirmproc notc:confirm { nick uhost handle text {dest "Eva"} } {        global salon        if {$text == "confirm"} {                putserv "NOTICE $nick :Vous avez maintenant confirmé"                pushmode $salon +v $nick                putlog "$nick - $uhost à confirmé"                utimer 5 { proc_kick }        }        proc proc_kick {} {                global salon                putkick $salon $nick "test"        }}</code></pre></div>first question, when i hit /notice botnick confirm, i can seen two times the confirmation in partyline :<br><blockquote class="uncited"><div>(16:44:24) (Eva) [16:43] aaa - <a href="mailto:a@hide-D4B501FE.unknown.uunet.be">a@hide-D4B501FE.unknown.uunet.be</a> à confirmé <br>(16:44:25) (Eva) [16:43] aaa - <a href="mailto:a@hide-D4B501FE.unknown.uunet.be">a@hide-D4B501FE.unknown.uunet.be</a> à confirmé<br>(16:44:25) (Eva) [16:43] -aaa (<a href="mailto:a@hide-D4B501FE.unknown.uunet.be">a@hide-D4B501FE.unknown.uunet.be</a>)- confirm</div></blockquote>Why ? Same problem for the timer, two timers are started .. ?<br>Why is all cloned ?<br><br>--<br><br>Second question, is concerning the proc_kick.<br>I want it to start after 5 secs, it works. But the user isnt kicked !<br>What do i have to insert here :<blockquote class="uncited"><div>        proc proc_kick {} { </div></blockquote> to catch the nick again ?<br><br>Thank you for your answers <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thib<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11055">Thib</a> — Mon Jan 11, 2010 11:58 am</p><hr />
]]></content>
	</entry>
	</feed>
