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.
in console/terminal, I type:
[kingkong@pine eggdrop]$ ./htext The quick brown fox jumps over the lazy dog
~Mini Hash by ranDoM v1.3~
>> Input Texs: The quick brown fox jumps over the lazy dog
>> Adler32: DA0FDC5B
>> SHA1: 2FD4E1C67A2D28FCED849EE1BB76E7391B93EB12
>> CRC32: 61EE9D45
>> MD5: 9E107D9D372BB6826BD81D3542A419D6
>> GOST: 77B7FA410C9AC58A25F49BCA7D0468C9296529315EACA76BD1A10F376D1F4294
>> RIPE128: 3FA9B57F053C053FBE2735B2380DB596
--- done ---
[kingkong@pine eggdrop]$
<+bothash>Input: The quick brown fox jumps over the lazy dog
<+bothash>SHA1: 2FD4E1C67A2D28FCED849EE1BB76E7391B93EB12 | MD5: 9E107D9D372BB6826BD81D3542A419D6 | CRC32: 61EE9D45 | Adler32: DA0FDC5B
Hopefully you all can help me and write the tcl for it, and thank you...
Last edited by ZEXEL on Wed Nov 12, 2008 12:27 am, edited 4 times in total.
ZEXEL wrote:@TCL_no_TK
I've used it, but unformatted and multiple texts will show in the channel if I use that.
more help please...
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.
Point taken. Would be worth mentioning that would apply any use of external command invocation (such as with exec). Same concern should be taken when using eval mentioned earlier aswell.
Unfortunately, the old trick of using lists is only reliable within a tcl-environment, and is of limited use with exec and/or open.
As for filtering/escaping contents, the pipe and redirection tokens documented in the manpage for exec would be the major concern to escape.
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"
Is that mean I must add variabel channel at $t_input($channel) ?
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"