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

	<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>2005-02-05T18:22:56-04:00</updated>

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

		<entry>
		<author><name><![CDATA[keeper]]></name></author>
		<updated>2005-02-05T18:22:56-04:00</updated>

		<published>2005-02-05T18:22:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46297#p46297</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46297#p46297"/>
		<title type="html"><![CDATA[Shell command output trouble]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46297#p46297"><![CDATA[
Thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5966">keeper</a> — Sat Feb 05, 2005 6:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2005-02-05T18:18:12-04:00</updated>

		<published>2005-02-05T18:18:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46296#p46296</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46296#p46296"/>
		<title type="html"><![CDATA[Shell command output trouble]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46296#p46296"><![CDATA[
I'd use eval instead<br><div class="codebox"><p>Code: </p><pre><code>bind pub "-|-" !pp ping_procproc ping_proc {nick uhost handle channel arg} { set num [lindex [split $arg] 0] set target [lindex [split $arg] 1] set command [concat exec /bin/ping -c $num $target] set return [eval $command] foreach output [split $return \n] {  putserv "PRIVMSG $channel :$output" }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Sat Feb 05, 2005 6:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-02-05T18:21:55-04:00</updated>

		<published>2005-02-05T18:18:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46295#p46295</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46295#p46295"/>
		<title type="html"><![CDATA[Re: Shell command output trouble]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46295#p46295"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc outp {i channel} {</code></pre></div>this wont give you the channel. you have to save it globally and retrieve it again in the proc.<br><br>But I wonder anyway in which part ever a command is called requiring a channel (putquick doesnt require a channel name).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sat Feb 05, 2005 6:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[keeper]]></name></author>
		<updated>2005-02-05T17:56:25-04:00</updated>

		<published>2005-02-05T17:56:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46293#p46293</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46293#p46293"/>
		<title type="html"><![CDATA[Shell command output trouble]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46293#p46293"><![CDATA[
I kinda new to tcl coding but by searching this great forum i mangare to almost made it work<br><div class="codebox"><p>Code: </p><pre><code>bind pub "-|-" !pp ping_procproc ping_proc {nick uhost handle channel arg} {set nr [lindex $arg 0]set target [lindex $arg 1]set i [exec /bin/ping -c $nr $target]fileevent $i readable "outp $i"}proc outp {i channel} {putquick "PRIVMSG $channel :[gets $i]"if [eof $i] {close $i}}</code></pre></div>when i type the following in the channel i get this error in the bot..<br><blockquote class="uncited"><div>Tcl error [ping_proc]: can not find channel named "PING localhost (127.0.0.1) 56(84) bytes of data.<br>64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.055 ms<br><br>--- localhost ping statistics ---<br>1 packets transmitted, 1 received, 0% packet loss, time 0ms<br>rtt min/avg/max/mdev = 0.055/0.055/0.055/0.000 ms"</div></blockquote>anyone know how to fix this ?<br><br>cheers!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5966">keeper</a> — Sat Feb 05, 2005 5:56 pm</p><hr />
]]></content>
	</entry>
	</feed>
