IRCBot Plugin API
v5
|
#include <plugins.h>
Public Attributes | |
bool(* | LogToChan )(const char *buf) |
Logs a string to LogChan (if defined) More... | |
int(* | SendIRC_Priority )(int32 netno, const char *buf, int32 datalen, uint8 priority) |
int(* | SendIRC_Delay )(int32 netno, const char *buf, int32 datalen, uint8 priority, uint32 delay) |
int DEPRECATE(* | SendSock_Priority )(T_SOCKET *sock, const char *buf, int32 datalen, uint8 priority, uint32 delay) |
void DEPRECATE(* | ClearSockEntries )(T_SOCKET *sock) |
Removes any queued sends for the specified socket. More... | |
bool(* | GetDoSpam )() |
Gets the value of the global DoSpam flag. More... | |
void(* | SetDoSpam )(bool dospam) |
Sets the global DoSpam flag. More... | |
void(* | SetDoSpamChannel )(bool dospam, int netno, const char *chan) |
Sets the DoSpam flag for a particular channel. More... | |
void(* | SetDoOnJoin )(bool doonjoin) |
void(* | SetDoOnJoinChannel )(bool doonjoin, int netno, const char *chan) |
const char *(* | GetCurrentNick )(int32 net) |
const char *(* | GetDefaultNick )(int32 net) |
int(* | NumNetworks )() |
Returns the number of IRC networks that have been defined in ircbot.conf. More... | |
bool(* | IsNetworkReady )(int32 num) |
Check to see if a particular IRC network is connected and logged in. More... | |
These functions let directly interact with IRC networks/connections as well as log things to the LogChan if one is set.
bool(* API_irc::LogToChan)(const char *buf) |
Logs a string to LogChan (if defined)
Queues a string to be sent to IRC connection netno's socket with the specified priority (see the PRIORITY_* defines).
IMPORTANT: All IRC socket output should be done through one of the API_irc::SendIRC_* functions and/or API_irc::SendSock_Priority!!!
netno | The IRC connection number |
buf | The string to send |
datalen | Length of string to send. If datalen <= 0 then it will strlen() it for you. |
priority | The priority of the string from 0-99, with 0 being least important and 99 being most important. |
int(* API_irc::SendIRC_Delay)(int32 netno, const char *buf, int32 datalen, uint8 priority, uint32 delay) |
Queues a string to be sent to IRC connection netno's socket with the specified priority (see the PRIORITY_* defines).
IMPORTANT: All IRC socket output should be done through one of the API_irc::SendIRC_* functions and/or API_irc::SendSock_Priority!!!
netno | The IRC connection number |
buf | The string to send |
datalen | Length of string to send. If datalen <= 0 then it will strlen() it for you. |
priority | The priority of the string from 0-99, with 0 being least important and 99 being most important. |
delay | the number of seconds to to wait before sending the data |
int DEPRECATE(* API_irc::SendSock_Priority)(T_SOCKET *sock, const char *buf, int32 datalen, uint8 priority, uint32 delay) |
Queues a string to be sent to a socket with the specified priority (see the PRIORITY_* defines).
IMPORTANT: All IRC socket output should be done through one of the API_irc::SendIRC_* functions and/or API_irc::SendSock_Priority!!!
sock | The socket |
buf | The string to send |
datalen | Length of string to send. If datalen <= 0 then it will strlen() it for you. |
priority | The priority of the string from 0-99, with 0 being least important and 99 being most important. |
Removes any queued sends for the specified socket.
bool(* API_irc::GetDoSpam)() |
Gets the value of the global DoSpam flag.
void(* API_irc::SetDoSpam)(bool dospam) |
Sets the global DoSpam flag.
void(* API_irc::SetDoSpamChannel)(bool dospam, int netno, const char *chan) |
Sets the DoSpam flag for a particular channel.
void(* API_irc::SetDoOnJoin)(bool doonjoin) |
void(* API_irc::SetDoOnJoinChannel)(bool doonjoin, int netno, const char *chan) |
const char*(* API_irc::GetCurrentNick)(int32 net) |
Get's the bot's current nickname on a particular IRC network. If the network is not connected it will return the default nick for that network
This is a return from a STL string's .c_str() so make sure you copy it because it may not be valid long
net | The network number |
const char*(* API_irc::GetDefaultNick)(int32 net) |
Get's the bot's default nickname on a particular IRC network or the global default nickname
This is a return from a STL string's .c_str() so make sure you copy it because it may not be valid long
net | The network number, or -1 for the global default nickname |
int(* API_irc::NumNetworks)() |
Returns the number of IRC networks that have been defined in ircbot.conf.
bool(* API_irc::IsNetworkReady)(int32 num) |
Check to see if a particular IRC network is connected and logged in.