|
IRCBot Plugin API
v5
|
#include <sqlite3.h>#include <curl/curl.h>#include <string>#include <map>#include <iostream>#include "common_messages.h"#include "user_flags.h"#include "../../Common/remote_protocol.h"Go to the source code of this file.
Classes | |
| struct | USER |
| struct | USER_PRESENCE |
| struct | COMMAND_ACL |
| struct | COMMAND |
| struct | REMOTE_HEADER |
| struct | SOUND_SERVER |
| struct | STATS |
| struct | SONG_RATING |
| struct | FIND_RESULT |
| struct | FIND_RESULTS |
| struct | REQUEST_INTERFACE |
| struct | API_textfunc |
| struct | API_commands |
| struct | API_db |
| struct | API_curl |
| struct | API_memory |
| struct | API_ial |
| struct | API_user |
| struct | API_config |
| struct | YP_HANDLE |
| struct | YP_CREATE_INFO |
| struct | API_yp |
| struct | API_irc |
| struct | API_ss |
| struct | PLUGIN_PUBLIC |
| struct | BOTAPI |
Macros | |
| #define | IRCBOT_PLUGIN_VERSION 0x0E |
| #define | IRCBOT_VERSION_FLAG_DEBUG 0x00000001 |
| #define | IRCBOT_VERSION_FLAG_LITE 0x00000002 |
| #define | VOID void |
| #define | SOCKET int |
| #define | BYTE unsigned char |
| #define | HANDLE void * |
| #define | DL_HANDLE HANDLE |
| #define | DSL_CC |
| #define | SQLITE3_DLL |
| #define | PLUGIN_EXPORT extern "C" |
| #define | DEPRECATE |
| #define | PLUGIN_EXPORT_NAME GetIRCBotPlugin |
| #define | PLUGIN_EXPORT_FULL PLUGIN_EXPORT PLUGIN_PUBLIC * PLUGIN_EXPORT_NAME() { return &plugin; } |
| #define | MAX_IRC_SERVERS 16 |
| #define | MAX_IRC_CHANNELS 16 |
| #define | MAX_PLUGINS 32 |
| #define | MAX_SOUND_SERVERS 32 |
| #define | MAX_HOSTMASKS 16 |
| #define | MAX_TIMERS 32 |
| #define | REF_TRACKING_DEPTH 16 |
| #define | RefUser(x) (x)->ref(x) |
| #define | UnrefUser(x) (x)->unref(x) |
| #define | COMMAND_ACTION 0x00 |
| #define | COMMAND_PROC 0x01 |
| #define | CM_ALLOW_IRC_PUBLIC 0x00000001 |
| This plag means the command can be used via IRC channel message (ie. publically) More... | |
| #define | CM_ALLOW_IRC_PRIVATE 0x00000002 |
| This plag means the command can be used via IRC private message. More... | |
| #define | CM_ALLOW_CONSOLE_PUBLIC 0x00000004 |
| This plag means the command can be used in channels/groups via 'console' interfaces. These include DCC chat, Skype, Jabber, Twitter, SMS, etc. More... | |
| #define | CM_ALLOW_CONSOLE_PRIVATE 0x00000008 |
| This plag means the command can be used in private message via 'console' interfaces. These include DCC chat, Skype, Jabber, Twitter, SMS, etc. More... | |
| #define | CM_FLAG_FROM_TEXT 0x20000000 |
| This flag means the command was loaded from ircbot.text, this is used by the rehash function to wipe out old commands before loading the new text file. More... | |
| #define | CM_FLAG_SLOW 0x10000000 |
| This flag is set on slow interfaces or ones with limited speed, such as SMS. Commands supporting this flag can adjust themselves accordingly. More... | |
| #define | CM_FLAG_ASYNC 0x40000000 |
| This flag is set on functions that take a long time to execute so they will be run in a separate thread. More... | |
| #define | CM_FLAG_NOHANG 0x80000000 |
| This flag is set on interfaces that buffer output until the command is done, so the USER_PRESENCE should not be held on to for a long time because the user won't see any output until the command is done. More... | |
| #define | CM_NO_FLAGS(x) (x & 0x0000000F) |
| #define | CM_ALLOW_ALL_PUBLIC CM_ALLOW_IRC_PUBLIC|CM_ALLOW_CONSOLE_PUBLIC |
| #define | CM_ALLOW_ALL_PRIVATE CM_ALLOW_IRC_PRIVATE|CM_ALLOW_CONSOLE_PRIVATE |
| #define | CM_ALLOW_ALL CM_ALLOW_ALL_PUBLIC|CM_ALLOW_ALL_PRIVATE |
| #define | MAX_FIND_RESULTS 100 |
| #define | REQUESTS_ON(x) (x >= REQ_MODE_NORMAL) |
| #define | HAVE_DJ(x) (x >= REQ_MODE_DJ_NOREQ) |
| #define | SendIRC(x, y, z) SendIRC_Priority(x,y,z,PRIORITY_DEFAULT) |
| #define | SendSock(x, y, z) SendSock_Priority(x,y,z,PRIORITY_DEFAULT) |
| #define | BOTAPI_DEF BOTAPI |
| #define | API_SS SOUND_SERVER |
| #define | _(x) api->GetLangString(x) |
| #define | ib_printf(x,...) ib_printf2(pluginnum, x, ##__VA_ARGS__) |
Typedefs | |
| typedef signed long long | int64 |
| typedef unsigned long long | uint64 |
| typedef signed int | int32 |
| typedef unsigned int | uint32 |
| typedef signed short | int16 |
| typedef unsigned short | uint16 |
| typedef signed char | int8 |
| typedef unsigned char | uint8 |
| typedef void * | T_SOCKET |
| typedef void * | DS_CONFIG_SECTION |
| typedef int(* | CommandProcType )(const char *command, const char *parms, USER_PRESENCE *ut, uint32 type) |
| type is one of the CM_ALLOW_* defines below More... | |
| typedef void(* | find_finish_type )(USER_PRESENCE *ut, FIND_RESULTS *qRes, int max) |
| typedef bool(* | EnumUsersByLastHostmaskCallback )(USER *user, void *ptr) |
Enumerations | |
| enum | SS_TYPES { SS_TYPE_SHOUTCAST = 0x00, SS_TYPE_SHOUTCAST2 = 0x01, SS_TYPE_ICECAST = 0x02, SS_TYPE_STEAMCAST = 0x03, SS_TYPE_SP2P = 0x04 } |
| enum | { PRIORITY_LOWEST = 0, PRIORITY_SPAM = 1, PRIORITY_DEFAULT = 10, PRIORITY_INTERACTIVE = 60, PRIORITY_IMMEDIATE = 99 } |
| enum | REQUEST_MODES { REQ_MODE_OFF = 0, REQ_MODE_DJ_NOREQ = 1, REQ_MODE_NORMAL = 2, REQ_MODE_REMOTE = 3, REQ_MODE_HOOKED = 4 } |
| #define IRCBOT_PLUGIN_VERSION 0x0E |
| #define IRCBOT_VERSION_FLAG_DEBUG 0x00000001 |
| #define IRCBOT_VERSION_FLAG_LITE 0x00000002 |
| #define VOID void |
| #define SOCKET int |
| #define BYTE unsigned char |
| #define HANDLE void * |
| #define DL_HANDLE HANDLE |
| #define DSL_CC |
| #define SQLITE3_DLL |
| #define PLUGIN_EXPORT extern "C" |
| #define DEPRECATE |
| #define PLUGIN_EXPORT_NAME GetIRCBotPlugin |
| #define PLUGIN_EXPORT_FULL PLUGIN_EXPORT PLUGIN_PUBLIC * PLUGIN_EXPORT_NAME() { return &plugin; } |
| #define MAX_IRC_SERVERS 16 |
| #define MAX_IRC_CHANNELS 16 |
| #define MAX_PLUGINS 32 |
| #define MAX_SOUND_SERVERS 32 |
| #define MAX_HOSTMASKS 16 |
| #define MAX_TIMERS 32 |
| #define REF_TRACKING_DEPTH 16 |
| #define RefUser | ( | x | ) | (x)->ref(x) |
| #define UnrefUser | ( | x | ) | (x)->unref(x) |
| #define REQUESTS_ON | ( | x | ) | (x >= REQ_MODE_NORMAL) |
| #define HAVE_DJ | ( | x | ) | (x >= REQ_MODE_DJ_NOREQ) |
| #define BOTAPI_DEF BOTAPI |
| #define API_SS SOUND_SERVER |
| #define _ | ( | x | ) | api->GetLangString(x) |
| #define ib_printf | ( | x, | |
| ... | |||
| ) | ib_printf2(pluginnum, x, ##__VA_ARGS__) |
| typedef signed long long int64 |
| typedef unsigned long long uint64 |
| typedef signed int int32 |
| typedef unsigned int uint32 |
| typedef signed short int16 |
| typedef unsigned short uint16 |
| typedef signed char int8 |
| typedef unsigned char uint8 |
| typedef void* T_SOCKET |
| typedef void* DS_CONFIG_SECTION |
| typedef int(* CommandProcType)(const char *command, const char *parms, USER_PRESENCE *ut, uint32 type) |
type is one of the CM_ALLOW_* defines below
| typedef void(* find_finish_type)(USER_PRESENCE *ut, FIND_RESULTS *qRes, int max) |
| typedef bool(* EnumUsersByLastHostmaskCallback)(USER *user, void *ptr) |
| enum REQUEST_MODES |
1.8.8