IRCBot Plugin API  v5
Public Attributes | List of all members
API_irc Struct Reference

#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...
 

Detailed Description

These functions let directly interact with IRC networks/connections as well as log things to the LogChan if one is set.

Member Data Documentation

bool(* API_irc::LogToChan)(const char *buf)

Logs a string to LogChan (if defined)

int(* API_irc::SendIRC_Priority)(int32 netno, const char *buf, int32 datalen, uint8 priority)

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!!!

Parameters
netnoThe IRC connection number
bufThe string to send
datalenLength of string to send. If datalen <= 0 then it will strlen() it for you.
priorityThe priority of the string from 0-99, with 0 being least important and 99 being most important.
See also
PRIORITY_IMMEDIATE
PRIORITY_INTERACTIVE
PRIORITY_DEFAULT
PRIORITY_SPAM
PRIORITY_LOWEST
Returns
The length of the string queued, or -1 on error
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!!!

Parameters
netnoThe IRC connection number
bufThe string to send
datalenLength of string to send. If datalen <= 0 then it will strlen() it for you.
priorityThe priority of the string from 0-99, with 0 being least important and 99 being most important.
delaythe number of seconds to to wait before sending the data
Returns
The length of the string queued, or -1 on error
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!!!

Parameters
sockThe socket
bufThe string to send
datalenLength of string to send. If datalen <= 0 then it will strlen() it for you.
priorityThe priority of the string from 0-99, with 0 being least important and 99 being most important.
See also
PRIORITY_IMMEDIATE
PRIORITY_INTERACTIVE
PRIORITY_DEFAULT
PRIORITY_SPAM
PRIORITY_LOWEST
Returns
The length of the string queued, or -1 on error
void DEPRECATE(* API_irc::ClearSockEntries)(T_SOCKET *sock)

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

Parameters
netThe 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

Parameters
netThe 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.


The documentation for this struct was generated from the following file: