This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Blowfish weird problem

Help for those learning Tcl or writing their own scripts.
Post Reply
k
ka0n
Voice
Posts: 13
Joined: Mon Jan 19, 2004 5:33 pm

Blowfish weird problem

Post by ka0n »

Hi guys,

I've create this procedure that handles outgoing msg to diff chans and i want my bot to switch between 2 blowkeys, #chan and #chan-ops, in chan i use blowkey "LOL" and in #chan-ops "101". With windrop (1.6.18+nosharefix) everything seems to run smooth and easy but in *nix (tried with 1.16.17 and 1.6.18RC1) all the problems come up. The same script doesn't work there, it always uses the blokey "LOL" in both chans.

Here is the proc.

Code: Select all

set blow_key "LOL"
set blow_key_op_chan "101"
set chans "#chan #chan2"
set admin_chan "#chan-ops"

proc msg_out {who what} {
global admin_chan blow_key blow_key_op_chan
	if {![string match -noc "*$admin_chan*" $who]} {set what [encrypt $blow_key $what]
	} else {set what [encrypt $blow_key_op_chan $what]}
	putserv "privmsg $who :+OK $what"
}

proc testing {nick host hand arg} {
global admin_chan
msg_out "$admin_chan" "testing"

}
Anyone got ideas?

Thanks for the help guys!
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

I see only one thing that might cause an TCL error, but none that could cause your described problem.
always use full parameter names. Some TCL compilations (at least I believe its a configure thing of TCL install) dont like even unique shortcuts. Try using -nocase instead of -noc :).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Post Reply