egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

$botnick empty on start

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Thu Jun 24, 2010 3:51 am    Post subject: $botnick empty on start Reply with quote

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:
[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 ?
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Jun 24, 2010 8:22 am    Post subject: Reply with quote

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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Thu Jun 24, 2010 9:15 am    Post subject: Reply with quote

Ok, thanks for this explanation.
So, I now use $::username and it works
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber