IRCBot Plugin API
v5
|
Classes | |
struct | IBM_NICKCHANGE |
struct | IBM_ON_KICK |
struct | IBM_ON_BAN |
struct | IBM_USERTEXT |
struct | IBM_USERFULL |
struct | IBM_USEREXTENDED |
struct | IBM_GETUSERINFO |
struct | IBM_MEMINFO |
struct | IBM_PROCTEXT |
struct | IBM_SONGINFO |
struct | IBM_RATING |
struct | IBM_REMOTE |
struct | IBM_REQONOFF |
Macros | |
#define | IB_INIT 0x01 |
#define | IB_SHUTDOWN 0x02 |
Important note: unlike v3/v4 IB_SHUTDOWN is only sent when the bot is shutting down for real and not from !modunload or other plugin unloads. More... | |
#define | IB_SS_DRAGCOMPLETE 0x03 |
sent each time at the end of a stats drag. Data sent is a bool which is set to true if the title has changed since the last drag More... | |
#define | IB_REHASH 0x04 |
RadioBot has rehashed, reload your config if you need to. More... | |
#define | IB_LOG 0x05 |
You MUST NOT call ib_printf from within this callback or there will be a thread deadlock on non-Win32 systems. More... | |
#define | IB_GETMEMINFO 0x06 |
This is sent to each plugin individually, and you should return 1 if you provided the information, or 0 if you did not. Data is a pointer to an IBM_MEMINFO structure. More... | |
#define | IB_PROCTEXT 0x07 |
This is sent to all plugins, and you should return 0 whether your processed the text or not. Data is a pointer to an IBM_PROCTEXT structure. More... | |
#define | IB_ON_SONG_RATING 0x08 |
This is sent to all plugins when a song is rated. More... | |
#define | IB_REMOTE 0x09 |
This is sent to all plugins when a remote command is received, data is a ptr to a IBM_REMOTE structure. More... | |
#define | IB_REQ_OFF 0x0A |
This is sent to all plugins when the request system is turned off (!reqlogout, AutoDJ stopped, etc.). Data is a ptr to a IBM_REQONOFF structure. More... | |
#define | IB_REQ_ON 0x0B |
This is sent to all plugins when the request system is turned on (!reqlogin, AutoDJ playing, etc.). Data is a ptr to a IBM_REQONOFF structure. More... | |
#define | IB_ONJOIN 0x10 |
sent when a user joins a channel, data is a ptr to a USER_PRESENCE structure More... | |
#define | IB_ONPART 0x11 |
sent when a user leaves a channel, data is a ptr to a IBM_USERTEXT structure More... | |
#define | IB_ONQUIT 0x12 |
this message is also sent with each channel the bot and the nick had in common with the channel set More... | |
#define | IB_ONTEXT 0x13 |
sent when a user speaks. data is a ptr to a IBM_USERTEXT structure (channel is set to the ircbot's nick in case of type == IBM_UTT_PRIVMSG) More... | |
#define | IB_ONNICK 0x14 |
this message is also sent with each channel the bot and the nick had in common with the channel set More... | |
#define | IB_ONNOTICE 0x15 |
sent when a user notices. data is a ptr to a IBM_USERTEXT structure (channel is set to the ircbot's nick in case of type == IBM_UTT_PRIVMSG) More... | |
#define | IB_ONTOPIC 0x16 |
sent when a channel topic changes. data is a ptr to a IBM_USERTEXT structure More... | |
#define | IB_ONKICK 0x17 |
sent when a person is kicked from a channel. data is a ptr to a IBM_ON_KICK structure More... | |
#define | IB_ONMODE 0x18 |
sent when a mode changes. data is a ptr to a IBM_USERTEXT structure. channel is set to the target username's nick in case of type == IBM_UTT_PRIVMSG, text is the raw mode line More... | |
#define | IB_ONBAN 0x19 |
sent when a ban is added in a channel. data is a ptr to a IBM_ON_BAN structure. More... | |
#define | IB_ONUNBAN 0x1A |
sent when a ban is removed from a channel. data is a ptr to a IBM_ON_BAN structure. More... | |
#define | IB_BROADCAST_MSG 0x1B |
sent when a user sends a broadcast message to IRC (!bcast/!dedicate/etc.). data is a ptr to a IBM_USERTEXT structure. userpres may == NULL if a message was generated by a plugin More... | |
#define | IB_GETUSERINFO 0x20 |
sent when a user's level/info is needed, sent as a IBM_GETUSERINFO structure (the nick/hostmask for you to find will be in the IBM_USERFULL/ui member, remember the hostmask may be an empty string in case of GetUserByNick()) More... | |
#define | IB_ADD_USER 0x21 |
return values are: 0 = I don't support this, 1 = Addition failed, 2 = Addition success More... | |
#define | IB_DEL_USER 0x22 |
sent when a user needs to be deleted, sent as a IBM_USERFULL structure More... | |
#define | IB_ADD_HOSTMASK 0x23 |
sent when a user adds a hostmask, sent as a IBM_USERFULL structure with hostmask as the new hostmask to be added More... | |
#define | IB_DEL_HOSTMASK 0x24 |
sent when a user deletes a hostmask, sent as a IBM_USERFULL structure with hostmask as the hostmask to be deleted More... | |
#define | IB_DEL_HOSTMASKS 0x25 |
sent when a user deletes all of their hostmasks, sent as a IBM_USERFULL structure with hostmask empty More... | |
#define | IB_CHANGE_FLAGS 0x26 |
sent when a user's flags change, sent as a IBM_USERFULL structure with flags as the new flags and hostmask empty More... | |
#define | IB_CHANGE_PASS 0x27 |
sent when a user's password changes, sent as a IBM_USERFULL structure with pass as the new pass and hostmask empty More... | |
#define | SOURCE_C_STOP 0x30 |
commands any source control plugins to stop feeding the stream More... | |
#define | SOURCE_C_PLAY 0x31 |
commands any source control plugins to start feeding the stream More... | |
#define | SOURCE_C_NEXT 0x32 |
commands any source control plugins to skip the current song More... | |
#define | SOURCE_I_STOPPING 0x33 |
broadcast sent by a source plugin when it's stopping playback More... | |
#define | SOURCE_I_STOPPED 0x34 |
broadcast sent by a source plugin when playback stops More... | |
#define | SOURCE_I_PLAYING 0x35 |
broadcast sent by a source plugin when playback starts More... | |
#define | SOURCE_IS_PLAYING 0x36 |
if a source plugin is currently connected and playing returns 1 More... | |
#define | SOURCE_GET_SONGINFO 0x37 |
gets information about the song a source plugin is currently playing, sent as a IBM_SONGINFO structure and returns 1 on success More... | |
#define | SOURCE_GET_SONGID 0x38 |
gets the ID number of the song a source plugin is currently playing, sent as a uint32 and returns 1 on success More... | |
#define | SOURCE_GET_FILE_PATH 0x39 |
gets the full path and filename of a specified file. data is a buffer with the filename to get info on and where the result will be stored with datalen = the size of the buffer. Returns 1 on success More... | |
#define | EMAIL_IS_LOADED 0x44 |
send to see if Email is loaded, anything but 0 means Email is loaded More... | |
#define | EMAIL_GET_INTERFACE 0x45 |
data is a pointer to a EMAIL_INTERFACE structure to be filled in by the Email plugin. Returns 1 for success More... | |
#define | SMS_GET_INTERFACE 0x46 |
data is a pointer to a SMS_INTERFACE structure to be filled in by the SMS plugin. Returns 1 for success More... | |
#define | SMS_ON_RECEIVED 0x47 |
data is a pointer to a SMS_MESSAGE structure containing the message. More... | |
#define | AUTODJ_IS_LOADED 0x50 |
returns 1 if AutoDJ or SimpleDJ are loaded More... | |
#define | AUTODJ_GET_FILE_PATH 0x51 |
use SOURCE_GET_FILE_PATH instead More... | |
Enumerations | |
enum | IBM_USERTEXT_TYPE { IBM_UTT_CHANNEL =0, IBM_UTT_PRIVMSG =1 } |
enum | IBM_GETUSERINFO_TYPES { IBM_UT_FULL = 0, IBM_UT_EXTENDED = 1 } |
0x00 - 0x0F: System Messages
0x10 - 0x1F: IRC
0x20 - 0x2F: User Info/Control
0x30 - 0x3F: Source Control (AutoDJ, mp3_source, etc.)
0x40 - 0x41: TTS Services Interface
0x42 - 0x43: ChanAdmin Interface
0x44 - 0x45: Email Interface
0x46 - 0x4F: Reserved for official RadioBot implementation
0x50 - 0x5F: AutoDJ-specific messages
0x60 - 0xFF: Reserved for official RadioBot implementation<br>
0x0100 - 0x7FFFFFFF: Contact me and I will add it here
#define IB_INIT 0x01 |
sent after RadioBot is done reading the config, loading plugins, and is about to connect to IRC and begin scraping sound servers Important note: unlike v3/v4 IB_INIT is only sent when the bot is starting up for real and not from !modload or other plugin loads.
#define IB_SHUTDOWN 0x02 |
Important note: unlike v3/v4 IB_SHUTDOWN is only sent when the bot is shutting down for real and not from !modunload or other plugin unloads.
hmm... I wonder what this one is
#define IB_SS_DRAGCOMPLETE 0x03 |
sent each time at the end of a stats drag. Data sent is a bool which is set to true if the title has changed since the last drag
#define IB_REHASH 0x04 |
RadioBot has rehashed, reload your config if you need to.
#define IB_LOG 0x05 |
You MUST NOT call ib_printf from within this callback or there will be a thread deadlock on non-Win32 systems.
A line that will be printed to the console/log window. Data is a pointer to a null-terminated string that will be printed.
#define IB_GETMEMINFO 0x06 |
This is sent to each plugin individually, and you should return 1 if you provided the information, or 0 if you did not. Data is a pointer to an IBM_MEMINFO structure.
#define IB_PROCTEXT 0x07 |
This is sent to all plugins, and you should return 0 whether your processed the text or not. Data is a pointer to an IBM_PROCTEXT structure.
#define IB_ON_SONG_RATING 0x08 |
This is sent to all plugins when a song is rated.
#define IB_REMOTE 0x09 |
This is sent to all plugins when a remote command is received, data is a ptr to a IBM_REMOTE structure.
#define IB_REQ_OFF 0x0A |
This is sent to all plugins when the request system is turned off (!reqlogout, AutoDJ stopped, etc.). Data is a ptr to a IBM_REQONOFF structure.
#define IB_REQ_ON 0x0B |
This is sent to all plugins when the request system is turned on (!reqlogin, AutoDJ playing, etc.). Data is a ptr to a IBM_REQONOFF structure.
#define IB_ONJOIN 0x10 |
sent when a user joins a channel, data is a ptr to a USER_PRESENCE structure
#define IB_ONPART 0x11 |
sent when a user leaves a channel, data is a ptr to a IBM_USERTEXT structure
#define IB_ONQUIT 0x12 |
this message is also sent with each channel the bot and the nick had in common with the channel set
sent when a user disconnects, data is a ptr to a IBM_USERTEXT structure (with channel set to NULL in the userinfo member)
#define IB_ONTEXT 0x13 |
sent when a user speaks. data is a ptr to a IBM_USERTEXT structure (channel is set to the ircbot's nick in case of type == IBM_UTT_PRIVMSG)
#define IB_ONNICK 0x14 |
this message is also sent with each channel the bot and the nick had in common with the channel set
sent when a user changes nicks. data is a ptr to a IBM_NICKCHANGE structure
#define IB_ONNOTICE 0x15 |
sent when a user notices. data is a ptr to a IBM_USERTEXT structure (channel is set to the ircbot's nick in case of type == IBM_UTT_PRIVMSG)
#define IB_ONTOPIC 0x16 |
sent when a channel topic changes. data is a ptr to a IBM_USERTEXT structure
#define IB_ONKICK 0x17 |
sent when a person is kicked from a channel. data is a ptr to a IBM_ON_KICK structure
#define IB_ONMODE 0x18 |
sent when a mode changes. data is a ptr to a IBM_USERTEXT structure. channel is set to the target username's nick in case of type == IBM_UTT_PRIVMSG, text is the raw mode line
#define IB_ONBAN 0x19 |
sent when a ban is added in a channel. data is a ptr to a IBM_ON_BAN structure.
#define IB_ONUNBAN 0x1A |
sent when a ban is removed from a channel. data is a ptr to a IBM_ON_BAN structure.
#define IB_BROADCAST_MSG 0x1B |
sent when a user sends a broadcast message to IRC (!bcast/!dedicate/etc.). data is a ptr to a IBM_USERTEXT structure. userpres may == NULL if a message was generated by a plugin
#define IB_GETUSERINFO 0x20 |
sent when a user's level/info is needed, sent as a IBM_GETUSERINFO structure (the nick/hostmask for you to find will be in the IBM_USERFULL/ui member, remember the hostmask may be an empty string in case of GetUserByNick())
#define IB_ADD_USER 0x21 |
return values are: 0 = I don't support this, 1 = Addition failed, 2 = Addition success
sent when a user needs to be added, sent as a IBM_USERFULL structure
#define IB_DEL_USER 0x22 |
sent when a user needs to be deleted, sent as a IBM_USERFULL structure
#define IB_ADD_HOSTMASK 0x23 |
sent when a user adds a hostmask, sent as a IBM_USERFULL structure with hostmask as the new hostmask to be added
#define IB_DEL_HOSTMASK 0x24 |
sent when a user deletes a hostmask, sent as a IBM_USERFULL structure with hostmask as the hostmask to be deleted
#define IB_DEL_HOSTMASKS 0x25 |
sent when a user deletes all of their hostmasks, sent as a IBM_USERFULL structure with hostmask empty
#define IB_CHANGE_FLAGS 0x26 |
sent when a user's flags change, sent as a IBM_USERFULL structure with flags as the new flags and hostmask empty
#define IB_CHANGE_PASS 0x27 |
sent when a user's password changes, sent as a IBM_USERFULL structure with pass as the new pass and hostmask empty
#define SOURCE_C_STOP 0x30 |
commands any source control plugins to stop feeding the stream
#define SOURCE_C_PLAY 0x31 |
commands any source control plugins to start feeding the stream
#define SOURCE_C_NEXT 0x32 |
commands any source control plugins to skip the current song
#define SOURCE_I_STOPPING 0x33 |
broadcast sent by a source plugin when it's stopping playback
#define SOURCE_I_STOPPED 0x34 |
broadcast sent by a source plugin when playback stops
#define SOURCE_I_PLAYING 0x35 |
broadcast sent by a source plugin when playback starts
#define SOURCE_IS_PLAYING 0x36 |
if a source plugin is currently connected and playing returns 1
#define SOURCE_GET_SONGINFO 0x37 |
gets information about the song a source plugin is currently playing, sent as a IBM_SONGINFO structure and returns 1 on success
#define SOURCE_GET_SONGID 0x38 |
gets the ID number of the song a source plugin is currently playing, sent as a uint32 and returns 1 on success
#define SOURCE_GET_FILE_PATH 0x39 |
gets the full path and filename of a specified file. data is a buffer with the filename to get info on and where the result will be stored with datalen = the size of the buffer. Returns 1 on success
#define EMAIL_IS_LOADED 0x44 |
send to see if Email is loaded, anything but 0 means Email is loaded
#define EMAIL_GET_INTERFACE 0x45 |
data is a pointer to a EMAIL_INTERFACE structure to be filled in by the Email plugin. Returns 1 for success
#define SMS_GET_INTERFACE 0x46 |
data is a pointer to a SMS_INTERFACE structure to be filled in by the SMS plugin. Returns 1 for success
#define SMS_ON_RECEIVED 0x47 |
data is a pointer to a SMS_MESSAGE structure containing the message.
#define AUTODJ_IS_LOADED 0x50 |
returns 1 if AutoDJ or SimpleDJ are loaded
#define AUTODJ_GET_FILE_PATH 0x51 |
use SOURCE_GET_FILE_PATH instead
enum IBM_USERTEXT_TYPE |