Here's my code ... I need the bot to know that it is the one who joined a channel. I only want it to react when it is the one that joins ... not any other nick.
What wrong with that code ?
By the way, <my_nick_here> would be my nick on irc of course.
puthelp <text> [options]
Description: sends text to the server, like 'putserv', but it uses a
different queue intended for sending messages to channels or people.
Options: -next: push messages to the front of the queue
Returns: nothing
Module: server
It works on the fashion of puthelp "PRIVMSG $nick :$what"
There is no error message.
I just don't get any private message from the bot itself although I make sure to specify my nick as the one to receive the message when the bot joins the channel.
It's as if the code wasn't entering that IF condition.
One of the most important skills you can have as a programmer is to learn how to find errors.
You find errors by adding debugging information in key places. The most common form of debugging with Eggdrop is using the "putlog" command. What you need to do is add putlog statements to various parts of the code so that you can trace what is happening.
For instance, add a putlog at the top of the botjoined proc that prints out the $nick that joined. Then add one inside the "if" statement. Eventually you will find out where the error is happening.
z_one wrote:There is no error message.
I just don't get any private message from the bot itself although I make sure to specify my nick as the one to receive the message when the bot joins the channel.
It's as if the code wasn't entering that IF condition.
In addition to the comments of stdragon, make sure you enter the putserv line correctly:
putserv "PRIVMSG z_one :I joined $chan"
i.e.
putserv "PRIVMSG<space>z_one<space>:I joined $chan"
NOT VALID:
putserv "PRIVMSG z_one: I joined $chan"
(i.e. omitting the second <space> is not valid.)