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.

$botnet-nick , ok... but, in tcl?

Old posts that have not been replied to for several years.
Locked
User avatar
FIDe`
Voice
Posts: 32
Joined: Fri Feb 21, 2003 5:41 am
Location: Naples, Italy

$botnet-nick , ok... but, in tcl?

Post by FIDe` »

In my config file, I set , for example:

set botnet-nick "leetbot"

but, if I try to .tcl dccbroadcast $botnet-nick
it says:

.tcl dccbroadcast $botnet-nick
Tcl error: can't read "botnet": no such variable

What is the TCL correspondent to the botnet-nick variable?
Sorry for the lame question.
Thank you[/i]
User avatar
FIDe`
Voice
Posts: 32
Joined: Fri Feb 21, 2003 5:41 am
Location: Naples, Italy

ok, done :)

Post by FIDe` »

ok, I used a
if {[isbotnetnick $bot]}
:D
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

The 2 items of code you pasted are 100% unrelated.

$botnet-nick contains the nickname, the "isbotnetnick" command is used to test if the value you is or isn't the botnetnick (IE, returns 1 or 0, nothing more).

Tcl doesn't work properly with the "-" symbol in statments, due to it's other uses. Use ${botnet-nick} (notice the curly braces)
User avatar
FIDe`
Voice
Posts: 32
Joined: Fri Feb 21, 2003 5:41 am
Location: Naples, Italy

Post by FIDe` »

Yes, I know they can appear 100% unrelated, but I needed $botnet-nick variable to create a function like this:

if {[${botnet-nick} == $hubbot]} {
commands
}

but, I created it using

if {[isbotnetnick $hubbot]} {
commands
}

so, for me it's the same thing :D
however, tnx for the ${botnet-nick} tip :D
Locked