Im making a new script, wich should be able to use blowfisch.
The encryption part goes ok, but im having troubles with the decryption command.
Here a few code snippets
Code: Select all
#the blowfish settings
set response(USEBLOW) 1
set response(BLOWKEY) "f0rt3sting0nlyatthismoment!"
set response(BLOWHEADER) "+OK"
#the binding of incoming encrypted things
bind pub -|- [set response(BLOWHEADER)] proc_decrypt
#the decrypting proc
proc proc_decrypt { nick uhost hand chan arg } {
global usedproc response
set commandline [decrypt $response(BLOWKEY) $arg]
set docommand [lindex $commandline 0]
set doarg [lrange $commandline 1 end]
foreach curproc $procs {
set curproc [split $curproc :]
if { $docommand == [subst [lindex $curproc 0]] } {
[lindex $eachproc 1] $nick $uhost $hand $chan $darg
return
}
}
}
But... im getting this wierd error that the proc proc_decrypt is missing an argument:
[13:55] Tcl error [proc_decrypt]: no value given for parameter "hand" to "decrypt"
Kinda wierd, caus if i remove the hand argument, it says the proc is getting called with to many arguments.
Can someone help me with this strange problem?
dw33p