Jun
28
Just a quick tip on how to make your bot do an ACTION, the equivalent to /me as you might do.
There’s a control character (ascii 1) that needs to wrap your text, and the ACTION keyword added in your message.
in your “ziggi” (plugin)
//normal
$this->pm("This is a normal message");
//action
$this->pm( chr(1)."ACTION enjoys messages".chr(1) );
I intend to add a convenience method in the base ziggi, but that usually takes along time to get checked in.
5 Responses to “How to create ACTIONs”
This is probably not the best place for questions but can this bot log IRC discussions?
By z3zim4 on Jun 30, 2010
Yes, it can.
By admin on Jun 30, 2010
Sweet thanks.
By z3zim4 on Jul 1, 2010
How would you go about getting the modes, like if it were a function… “getModes()”? on a user?
By Nijikokun on Jul 3, 2010
This would be similar to /topic handling, described briefly here, using a send() call to get the irc server to send data back; then listening on a return code ( with getCommand() ) to discern the end of the message. Modes, afaik, come with the list of /names , which can stretch over multiple lines.
I didn’t pursue a core way to check these for a few reasons. First and foremost, lazy. Next, there could be race conditions in play with other input, especially when your bot is present in many channels at once; collecting the proper lines were deemed trickier than I wanted to deal with at the time. Lastly, every network handles modes differently. Freenode uses a few, but I know of a case where botzilla is in use on a network with many more modes that I didn’t know could exist. The best I could hope for is a getMode() equaling ‘@’ or ‘+’ or ‘v’ , or something not-obvious like that.
Take the /topic code and try to make a /names handler.
By admin on Jul 6, 2010