Plugin API

From IRCBotWiki

Jump to: navigation, search

Contents

IRCBot API Functions in BOTAPI_DEF

Version Functions

uint32 GetVersion()

char * GetVersionString()

IRC Functions

char * GetBotNick(int net)

bool IsNetworkReady(int num)

bool LogToChan(char * buf)

int NumNetworks()

int SendIRC(int netno, char * buf, size_t datalen)

Socket Functions

void ClearSockEntries(T_SOCKET * sock)

void SendRemoteReply(T_SOCKET * socket, REMOTE_HEADER * rHead, char * data)

int SendSock(T_SOCKET * sock, char * buf, size_t datalen)

Configuration Functions

DS_CONFIG_SECTION * GetConfigSection(DS_CONFIG_SECTION * parent, char * name)

long GetConfigSectionLong(DS_CONFIG_SECTION * section, char * name)

char * GetConfigSectionValue(DS_CONFIG_SECTION * section, char * name)

bool GetConfigSectionValueBuf(DS_CONFIG_SECTION * section, char * name, char * buf, unsigned long bufSize)

Sound Server Functions

void EnableRequests(bool activate)

int GetSSInfo(int ssnum, API_SS * ss)

STATS * GetStreamInfo()

Misc Functions

API_commands * commands (functions related to the new commands/triggers system)

API_textfunc * textfunc (pointer to a few handy text functions)

API_db * db (pointer to IRCBot DB functions)

PLUGIN_PUBLIC * GetPlugin(int plugnum)

IRCBOT_UI * GetUI()

int GetUserLevel(char * hostmask, char * pass)

char * GetUserPass(char * nick)

void ib_printf(char * fmt, ...)

bool LoadMessage(char * name, char * msgbuf, long bufSize)

int NumPlugins()

void ProcText(char * text, long bufsize)

void safe_sleep_seconds(int sleepfor) DEPRECATING

void safe_sleep_milli(int sleepfor) DEPRECATING

int SendMessage(int toplug, unsigned int MsgID, void * data, long datalen)

DEPRECATED Functions That No Longer Exist In IRCBot v3

char * GetBotNick() (replaced with GetBotNick(-1))

char * GetParameter(int num)

void PushMessage(unsigned int MsgID, void * data, unsigned int datalen) (replaced by SendMessage)

void * PopMessage(unsigned int MsgID) (replaced by SendMessage)

void MessageFreeData(void * data) (replaced by SendMessage)

void safe_sleep(int sleepfor, bool inmilli) (this is still provided by the Drift Standard Libraries)

int SendSock(int netno, char * buf, long datalen) (replaced with SendIRC)


IRCBot vde

IRCBot main pages
Main PageInstallationChangelogCommandsPluginsFAQConfigurationCreditsRemote ClientBuffered SendBuilt-In VariablesMulti Sound Server Mode
Auto DJ Pages
Auto DJ Main PageWebRequest SystemSchedulerMP3 EncoderVoice SupportMySQL Plugin
IRCBot Programming vde

IRCBot Programming
Plugin APIIPC MessagesRemote CommandsPlugin InitializationIRCBot DB
Plugin API Functions (in Basic and Full)
ClearSockEntriesib_printfGetBotNickGetConfigSectionGetConfigSectionLongGetConfigSectionValueGetConfigSectionValueBufGetPluginGetUIGetUserLevelGetUserPassGetVersionGetVersionStringIsNetworkReadyLoadMessageLogToChanNumNetworksNumPluginsProcTextsafe_sleep_secondssafe_sleep_milliSendIRCSendMessageSendRemoteReplySendSock
Plugin API Functions (in Full only)
EnableRequestsGetSSInfoGetStreamInfo
Tcl Functions
Tcl ScriptingTcl Events
Plugin API Structures
API_commandsAPI_dbAPI_textfuncAPI_SSIRCBOT_UIPLUGIN_PUBLICSTATST_SOCKET

All structure references on this site are here as an aid and to give an idea of bot usage and may change drastically with IRCBot versions. Each copy of plugins.h is tied to a specific version of the bot, and other versions of structures may not be interchanged.

Personal tools