Sure you can test it.. Your current script won't work... Kill your bot.. and start it up from the shell prompt again, and then test it in the channel...Cavemanm85de wrote: What you said could be true, I have no way of testing against it, as the bind is a pubm and therefor would only work in a channel.
It's working because when you rehash, your bot is already on irc, and botnick is already set. You can remove the global line and it will still work when you do this.But anyhow I do not believe you as your reasoning would mean that my script would not work in any way. But it is working, due to the 'global $botnick' inside the procedure.
Simple, It's not.Now you tell me, that the binds get read before the botnick is set.
Then how does this explain that my bind, using a not-set-variable, is working without rehashing?
*very confused*
Code: Select all
global $nick
For future readers, please do not assume this solution to be correct, because it is NOT. The person in question has either been rehashing their bot, or have changed their code from their original post and have not displayed those changes, which would be the real reason for why it would work.Cavemanm85de wrote:I think I did not make very clear *sigh*
Without 'global' the bind gets executed if someone says 'shut up' with the 'global' it only gets executed with 'botnick shut up'.
Now if $botnick was *blank* this would not happen.
That is my problem. I see your reasoning but I also see the way eggdrop reacts.
You keep saying botnick is not set when the binds get read therefor it must be "blank".
Strange is, that it works right after starting up the bot and only if I have the 'global' set.
As for telling me 'it's not working' ... *shrugs*
QED. It *IS* working (right after starting the bot without rehashing) even though no one seems to know why.
/case closed; points go to gb for the tip .)
Thank you very much.The person in question has either been rehashing their bot, or have changed their code from their original post and have not displayed those changes
This again.. I did not correct your spelling, I corrected the word you were using.... you spelled "mood" correct, but that was not the word for which you were looking to use, and as such, made the sentences you were writing incomprehensible. As for my own spelling, I did not from what I can tell make any spelling mistakes, but thanks for coming out.Cavemanm85de wrote: BTW, since you were already so nice and correct my spelling you should make sure that your own is correct.
It's not arrogance, it is the fact that I don't want users with similar problems in the future reading this and thinking they'll fix it by using your incorrect solution, because it won't work.Cavemanm85de wrote: You may be an admin/owner/whatever on this board and you may have a lot of work with it, granted, but you seem to be very arrogant if one does not believe you or if you do not believe some one. I have seen many people getting to this point it's part of the 'burn-out-syndrom'.[/b]