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.

$botnick empty on start

Help for those learning Tcl or writing their own scripts.
Post Reply
Online
User avatar
CrazyCat
Revered One
Posts: 1334
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

$botnick empty on start

Post by CrazyCat »

Hello there,

I've a small trouble I can't understand whith a script I'm doing.
It contains an init procedure which is called at the end of the script, and inside I use $::botnick.

When I start, or restart, the eggdrop, I got the following error:

Code: Select all

[09:09] can't read "::crelay::regg()": no such element in array
    while executing
"array set me $::crelay::regg($::botnick)"
    (procedure "::crelay::init" line 5)
    invoked from within
"::crelay::init"
But if I comment the auto-load and launch the procedure from party-line, it works fine.
So, what is the trouble, when is $botnick setted ?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Since your eggdrop has not yet completed the connection and handshake with the irc server, at the time the code is executed, your eggdrop hasn't gained it's nickname yet.

::botnick will always contain the current nickname the eggdrop holds on the server, and is thus empty until it has gained a nickname.
NML_375
Online
User avatar
CrazyCat
Revered One
Posts: 1334
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Ok, thanks for this explanation.
So, I now use $::username and it works
Post Reply