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

	<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>2008-11-14T12:24:45-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-11-14T12:24:45-04:00</updated>

		<published>2008-11-14T12:24:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85817#p85817</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85817#p85817"/>
		<title type="html"><![CDATA[How to put console/terminal text into channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85817#p85817"><![CDATA[
Another bummer with variables.. double-checking the code right now just to make sure I havn't made yet another bummer :p<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Nov 14, 2008 12:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ZEXEL]]></name></author>
		<updated>2008-11-14T02:28:33-04:00</updated>

		<published>2008-11-14T02:28:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85806#p85806</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85806#p85806"/>
		<title type="html"><![CDATA[How to put console/terminal text into channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85806#p85806"><![CDATA[
<blockquote class="uncited"><div>Nah, just means I made a bummer mixing up variables... fixed now.</div></blockquote>it's look stop processing at:<div class="codebox"><p>Code: </p><pre><code>can't read "t_input(file8)": no such variable    while executing"puthelp "PRIVMSG $channel :Input: $t_input($socket)""    (procedure "ParseHtext" line 5)    invoked from within"ParseHtext file8 #finger"</code></pre></div>and the I fix it with:<div class="codebox"><p>Code: </p><pre><code>"puthelp "PRIVMSG $channel :Input: $::t_input($socket)""</code></pre></div>it's works but show only 1st line:<div class="codebox"><p>Code: </p><pre><code>&lt;@yuppy&gt; !hash The quick brown fox jumps over the lazy dog&lt;+bothash&gt; Input: The quick brown fox jumps over the lazy dog</code></pre></div>need more help please...  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7909">ZEXEL</a> — Fri Nov 14, 2008 2:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-11-13T14:16:26-04:00</updated>

		<published>2008-11-13T14:16:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85797#p85797</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85797#p85797"/>
		<title type="html"><![CDATA[How to put console/terminal text into channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85797#p85797"><![CDATA[
Nah, just means I made a bummer mixing up variables... fixed now.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Nov 13, 2008 2:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ZEXEL]]></name></author>
		<updated>2008-11-12T22:06:23-04:00</updated>

		<published>2008-11-12T22:06:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85791#p85791</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85791#p85791"/>
		<title type="html"><![CDATA[little error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85791#p85791"><![CDATA[
@TCL_no_TK, @speechles thx for suggestion  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> <br>@nml375, thx for the script <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br>@user, nice tips and tricks  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br><br>I got error in console/terminal when trying to get result from the channel:<div class="codebox"><p>Code: </p><pre><code>can't read "t_input(#finger)": no such variable    while executing"puthelp "PRIVMSG $channel :Input: $t_input($channel)""    (procedure "ParseHtext" line 5)    invoked from within"ParseHtext file8 #finger"</code></pre></div>Is that mean I must add variabel channel at $t_input($channel) ?<br><br>thx you very much for your help...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7909">ZEXEL</a> — Wed Nov 12, 2008 10:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-11-12T18:26:17-04:00</updated>

		<published>2008-11-12T18:26:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85788#p85788</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85788#p85788"/>
		<title type="html"><![CDATA[How to put console/terminal text into channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85788#p85788"><![CDATA[
Point taken. Would be worth mentioning that would apply any use of external command invocation (such as with <strong class="text-strong">exec</strong>). Same concern should be taken when using <strong class="text-strong">eval</strong> mentioned earlier aswell.<br>Unfortunately, the old trick of using lists is only reliable within a tcl-environment, and is of limited use with <strong class="text-strong">exec</strong> and/or <strong class="text-strong">open</strong>.<br><br>As for filtering/escaping contents, the pipe and redirection tokens documented in the manpage for <strong class="text-strong">exec</strong> would be the major concern to escape.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Nov 12, 2008 6:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2008-11-12T17:04:14-04:00</updated>

		<published>2008-11-12T17:04:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85787#p85787</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85787#p85787"/>
		<title type="html"><![CDATA[How to put console/terminal text into channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85787#p85787"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set f_id [open "|./htext $text"]</code></pre></div></div></blockquote>It might be a good idea to limit access to this command (require some flag) or filter/escape the contents of $text  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Nov 12, 2008 5:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-11-14T12:22:14-04:00</updated>

		<published>2008-11-12T15:59:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85784#p85784</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85784#p85784"/>
		<title type="html"><![CDATA[How to put console/terminal text into channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85784#p85784"><![CDATA[
I'd do something like below:<br>Code is untested, let me know if there's any errors..<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !hash do_hashproc do_hash {nick host handle channel text} { set f_id [open "|./htext $text"] fconfigure $f_id -blocking 0 fileevent $f_id readable [list ParseHtext $f_id $channel] set ::t_list($f_id) [list] set ::t_input($f_id) $text}proc ParseHtext {socket channel} { if {[gets $socket line] &lt; 0} {  if {[eof $socket]} {   close $socket   puthelp "PRIVMSG $channel :Input: $::t_input($socket)"   puthelp "PRIVMSG $channel :[join $::t_list($socket) " | "]"   unset ::t_list($socket)   unset ::t_input($socket)   return  } } else {  if {[regexp -- {&gt;&gt; ([[:alnum:]]+): ([[:xdigit:]]+)} $line text key value] == 1} {   lappend ::t_list($socket) "$key: $value"  } }}</code></pre></div>Edit: Bummer using wrong variable, fixed now..<br>Edit: Another variable bummer, fixed now...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Nov 12, 2008 3:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-11-12T07:48:45-04:00</updated>

		<published>2008-11-12T07:48:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85783#p85783</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85783#p85783"/>
		<title type="html"><![CDATA[How to put console/terminal text into channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85783#p85783"><![CDATA[
<blockquote class="uncited"><div>@TCL_no_TK<br>I've used it, but unformatted and multiple texts will show in the channel if I use that.<br><br>more help please...  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"></div></blockquote>Use eval as suggested. Stuff the results into a variable. Then use regexp, regsub or scan to "parse" the things you want out of it. This is exactly the same as parsing html pages only a bit easier because the output is predictable and doesn't change.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Wed Nov 12, 2008 7:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ZEXEL]]></name></author>
		<updated>2008-11-12T00:24:26-04:00</updated>

		<published>2008-11-12T00:24:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85781#p85781</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85781#p85781"/>
		<title type="html"><![CDATA[How to put console/terminal text into channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85781#p85781"><![CDATA[
@TCL_no_TK<br>I've used it, but unformatted and multiple texts will show in the channel if I use that.<br><br>more help please...  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7909">ZEXEL</a> — Wed Nov 12, 2008 12:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2008-11-11T16:36:34-04:00</updated>

		<published>2008-11-11T16:36:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85773#p85773</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85773#p85773"/>
		<title type="html"><![CDATA[How to put console/terminal text into channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85773#p85773"><![CDATA[
Could try <div class="codebox"><p>Code: </p><pre><code>eval exec</code></pre></div> If you look in the TCL FAQ section, you'll find an example proc of !exec code, hope it helps. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>RE: <a href="http://forum.egghelp.org/viewtopic.php?t=9945" class="postlink">http://forum.egghelp.org/viewtopic.php?t=9945</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Tue Nov 11, 2008 4:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ZEXEL]]></name></author>
		<updated>2008-11-12T00:27:00-04:00</updated>

		<published>2008-11-11T04:35:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85766#p85766</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85766#p85766"/>
		<title type="html"><![CDATA[How to put console/terminal text into channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85766#p85766"><![CDATA[
I've some mini hash calculator for texts but it's run only under console/terminal. How can I put the result of that's into the channel.<br>in console/terminal, I type:<div class="codebox"><p>Code: </p><pre><code>[kingkong@pine eggdrop]$ ./htext The quick brown fox jumps over the lazy dog~Mini Hash by ranDoM v1.3~&gt;&gt; Input Texs: The quick brown fox jumps over the lazy dog&gt;&gt; Adler32: DA0FDC5B&gt;&gt; SHA1: 2FD4E1C67A2D28FCED849EE1BB76E7391B93EB12&gt;&gt; CRC32: 61EE9D45&gt;&gt; MD5: 9E107D9D372BB6826BD81D3542A419D6&gt;&gt; GOST: 77B7FA410C9AC58A25F49BCA7D0468C9296529315EACA76BD1A10F376D1F4294&gt;&gt; RIPE128: 3FA9B57F053C053FBE2735B2380DB596--- done ---[kingkong@pine eggdrop]$ </code></pre></div>example (i want):<div class="codebox"><p>Code: </p><pre><code>&lt;@Yuppy&gt;!hash The quick brown fox jumps over the lazy dog</code></pre></div>and output:<div class="codebox"><p>Code: </p><pre><code>&lt;+bothash&gt;Input: The quick brown fox jumps over the lazy dog&lt;+bothash&gt;SHA1: 2FD4E1C67A2D28FCED849EE1BB76E7391B93EB12 | MD5: 9E107D9D372BB6826BD81D3542A419D6 | CRC32: 61EE9D45 | Adler32: DA0FDC5B</code></pre></div>Hopefully you all can help me and write the tcl for it, and thank you...  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7909">ZEXEL</a> — Tue Nov 11, 2008 4:35 am</p><hr />
]]></content>
	</entry>
	</feed>
