| View previous topic :: View next topic |
| Author |
Message |
RaZ Voice
Joined: 29 Jul 2005 Posts: 3
|
Posted: Fri Jul 29, 2005 9:07 pm Post subject: Blowfish decrypt |
|
|
Hello,
I've use this to decrypt http://forum.egghelp.org/viewtopic.php?t=4269 but my bot no responding in channel with this code:
| Quote: | set key "keytest"
bind pub - "#test *" decryptall
proc decryptall { nick uhost handle chan arg } {
global key
set arg [decrypt $key [string range $arg 4 9999]]
eval [$nick $uhost $handle $chan $arg]
} |
Please, help me, i'm noobie  |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Fri Jul 29, 2005 10:12 pm Post subject: |
|
|
what is that [eval] supposed to do?
you are confused with Tcl syntax, square brackets mean command substitution, and $nick is not a Tcl command |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sat Jul 30, 2005 2:55 am Post subject: |
|
|
| Code: | | putserv "PRIVMSG $chan :arg = $arg" |
You obviously didn't read the posted code correctly. There's no mention of [eval]. Replace that line with the one above. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
RaZ Voice
Joined: 29 Jul 2005 Posts: 3
|
Posted: Sat Jul 30, 2005 5:31 am Post subject: |
|
|
with
| Quote: | | putserv "PRIVMSG $chan :arg = $arg" |
its ok but the bot no reply, example:
| Quote: | set key "keytest"
bind pub - !test pub:test
bind pub - "#test *" decryptall
proc pub:test { nick uhost handle channel arg } {
putquick "PRIVMSG $channel :HELLO"
}
proc decryptall { nick uhost handle chan arg } {
global key
set arg [decrypt $key [string range $arg 4 9999]]
putserv "PRIVMSG $chan :arg = $arg"
} |
but i f i wrote !test, the bot dont reply "HELLO"  |
|
| Back to top |
|
 |
RaZ Voice
Joined: 29 Jul 2005 Posts: 3
|
Posted: Sat Jul 30, 2005 8:37 am Post subject: |
|
|
fixed!
set proc [pub:test $nick $uhost $handle $channel [string range $arg 0 9999]]
Thanks |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Jul 30, 2005 11:09 am Post subject: |
|
|
| RaZ wrote: | with
| Quote: | | putserv "PRIVMSG $chan :arg = $arg" |
its ok but the bot no reply, example:
| Quote: | set key "keytest"
bind pub - !test pub:test
bind pub - "#test *" decryptall
proc pub:test { nick uhost handle channel arg } {
putquick "PRIVMSG $channel :HELLO"
}
proc decryptall { nick uhost handle chan arg } {
global key
set arg [decrypt $key [string range $arg 4 9999]]
putserv "PRIVMSG $chan :arg = $arg"
} |
but i f i wrote !test, the bot dont reply "HELLO"  |
bot's own output doesn't get echoed back to it (only to other channel members, not to message originator), so the bind doesn't get triggered; you cannot test your scripts this way |
|
| Back to top |
|
 |
|