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

	<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>2006-09-22T22:06:59-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2006-09-22T22:06:59-04:00</updated>

		<published>2006-09-22T22:06:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66585#p66585</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66585#p66585"/>
		<title type="html"><![CDATA[PING script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66585#p66585"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code> putserv "privmsg [lindex $moo(arg) :\001PING [clock clicks -milliseconds]\001" </code></pre></div>That's the only obvious error I see so far.  When you tested $moo(arg) did you get an error (undeclared) or was it just the wrong value (e.g. empty)?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Fri Sep 22, 2006 10:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-09-20T19:56:24-04:00</updated>

		<published>2006-09-20T19:56:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66503#p66503</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66503#p66503"/>
		<title type="html"><![CDATA[Re: sorry]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66503#p66503"><![CDATA[
<blockquote class="uncited"><div>sorry but I didn't ask for a pre-made script. I just asked where's the problem in my own. and the "rules" on this section of the forum are "do no request scripts".</div></blockquote>I posted it as an example of a working script. Take it as such, or read it and learn from it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Sep 20, 2006 7:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-09-20T17:17:28-04:00</updated>

		<published>2006-09-20T17:17:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66497#p66497</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66497#p66497"/>
		<title type="html"><![CDATA[PING script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66497#p66497"><![CDATA[
And it would be polite for you to enclose your code within code tags.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Wed Sep 20, 2006 5:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[chadchoud]]></name></author>
		<updated>2006-09-20T16:42:10-04:00</updated>

		<published>2006-09-20T16:42:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66496#p66496</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66496#p66496"/>
		<title type="html"><![CDATA[sorry]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66496#p66496"><![CDATA[
sorry but I didn't ask for a pre-made script. I just asked where's the problem in my own. and the "rules" on this section of the forum are "do no request scripts".<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8215">chadchoud</a> — Wed Sep 20, 2006 4:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-09-20T14:47:59-04:00</updated>

		<published>2006-09-20T14:47:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66490#p66490</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66490#p66490"/>
		<title type="html"><![CDATA[PING script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66490#p66490"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set pingchans "#mychan #chan2 #etc"bind pub - .ping pub:pingbind ctcr - PING ctcr:pingproc pub:ping {nick uhost hand chan arg} {global pingreq pingp pingchans        if {[lsearch -exact $pingchans $chan] == -1} {                puthelp "PRIVMSG $nick :ping disabled on $chan"                return        }        set arg [string trim $arg]        if {![info exists pingp($chan)]} {                 set pingp($chan) 0         }        utimer 2 [list incr pingp($chan) -1]        if {[incr pingp($chan)] &lt; 3} {                if {[set targ [lindex [split $arg] 0]] == ""} {                        putserv "PRIVMSG $chan :Use: .ping &lt;nick&gt; or .ping me"                        return                }                if {([string equal -nocase "me" $targ] == 1)} {                        putserv "PRIVMSG $nick :\001PING [clock clicks -milliseconds]\001"                        set pingreq([string tolower $nick]) "$chan"                        return                }                if {[onchan $targ $chan]} {                        putserv "PRIVMSG $targ :\001PING [clock clicks -milliseconds]\001"                        set pingreq([string tolower $targ]) "$chan"                } else {                        puthelp "PRIVMSG $chan :$targ is not in $chan."                }        }}proc ctcr:ping {nick uhost hand dest keyword arg} {        global pingreq        if {![info exists pingreq([set nnick [string tolower $nick]])]} {return}        if {[string is integer [set reply [lindex [split $arg] 0]]]} {                putserv "PRIVMSG $pingreq($nnick) :\[\002$nick\002 PING reply\]: [expr {abs([clock clicks -milliseconds] - $reply) / 1000.0}] seconds."        }        unset pingreq($nnick)}putlog "Ping.tcl v1.3 by Opposing Loaded..."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Sep 20, 2006 2:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[chadchoud]]></name></author>
		<updated>2006-09-20T14:16:50-04:00</updated>

		<published>2006-09-20T14:16:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66489#p66489</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66489#p66489"/>
		<title type="html"><![CDATA[PING script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66489#p66489"><![CDATA[
I wrote a tcl ping script. I'm still a newbie in tcl. I hope somebody can help.<br>Here's the script:<div class="codebox"><p>Code: </p><pre><code>bind PUB - !ping CheckPingproc CheckPing {nick uhost hand chan text} {  putserv "privmsg $chan : [lindex [split $text] 0]"  if { [lindex [split $text] 0] != "" } {    set ::moo(arg) [lindex [split $text] 0]  } else {      set ::moo(arg) $nick  }  set ::moo(ticks) [clock clicks -milliseconds]  set ::moo(chan) $chan  putserv "privmsg $chan : $moo(arg) "  putserv "privmsg [lindex $moo(arg) :\001PING [clock clicks -milliseconds]\001"  putserv "privmsg $chan :ping sent!"  putserv "privmsg $chan :I'm sending the ping request to $moo(arg) now."}bind CTCR - PING* Replyproc Reply {nick uhost hand dest keyword text} {  global server moo  putserv "privmsg $moo(chan) :$moo(arg)'s ping reply from $server is : [expr [expr [clock clicks] - $moo(ticks)] / 1000]"}</code></pre></div>As you see, I added some debuging, and found that $moo(arg) isn't filled.<br><br>I didn't check the ctcp reply yet..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8215">chadchoud</a> — Wed Sep 20, 2006 2:16 pm</p><hr />
]]></content>
	</entry>
	</feed>
