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.

Just a little question

Old posts that have not been replied to for several years.
Locked
s
spyda
Halfop
Posts: 64
Joined: Mon Aug 12, 2002 2:22 am
Location: Australia

Just a little question

Post by spyda »

Merry Xmas all and Happy New Year.

Finally got some time to do some more scripting..... :)

I am just making a http live stats TCL. The question that I have is mostlikly stupid, but I cant find the value.

Code: Select all

set botnet-nick "PopeOp"
set botnick "PopeBot"
I know how to pull the $botnick value (that is easy).. but what is the value to use the botnet-nick. Is there one???

Thanx
------------
ThePope
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

from configfile:

# If you want to use a different nickname on the botnet than you use on
# IRC (i.e. if you're on an un-trusted botnet), un-comment the next line
# and set it to the nick you would like to use.
#set botnet-nick "LlamaBot"

from tcl-commands.doc:

GLOBAL VARIABLES:
(All config-file variables are global, too. But these variables
are set by the bot.)
Elen sila lúmenn' omentielvo
s
spyda
Halfop
Posts: 64
Joined: Mon Aug 12, 2002 2:22 am
Location: Australia

Sorry you have miss understanded me

Post by spyda »

Sorry I was talking about taking the value from the configure file and puting it into TCL... eg:

Code: Select all

proc testproc {} {
 global botnick
 puthelp "PRIVMSG ThePope :$botnick"
}
That will allow for me to use $botnick. BUT.. when I try and replace the $botnick with $botnet-nick. The bot crashs!

Code: Select all

proc testbotnet {} {
 global botnet-nick 
 puthelp "PRIVMSG ThePope :$botnet-nick"
}
Hope that helps you more with helping my little problem..

I am trying to put the botnet-nick onto a http page.. But I have no idea other then using [bots] then matching the bot to the botnet-nick.. But I am sure there is a easyer way?

Thanx
------------
ThePope
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Re: Sorry you have miss understanded me

Post by strikelight »

ThePope wrote:Sorry I was talking about taking the value from the configure file and puting it into TCL... eg:
...

Code: Select all

proc testbotnet {} {
 global botnet-nick 
 puthelp "PRIVMSG ThePope :$botnet-nick"
}
The problem is that TCL will stop processing of the variable prior to the minus sign. To tell TCL that you specifically mean the variable which includes a hyphen in it, and not a variable followed by a hyphen string at the end of it, you would use ${botnet-nick} (note the curly braces...)..

I am fairly sure this is covered in suninet's TCL tutorial, which you should definitley check out.
Locked