RSX++ Plugin API
About Plugins
RSX++ provide a simpe Plugin Interface to extend client functions.
- Language: C++
- Compiler: Microsoft Visual C++ (2003 .NET, 2005, 2008, including Express Editions)
- STL: Any suitable, RSX++ uses own string implementation (rString class)
RSX++ export functions to interact with core to external library called RSXPlusPlus.lib - provided with API package (you can also get it by compiling RSX++ code).
Additionally, all actions are passed trought PluginInterface class (plugin must export pointer to this class, you must override functions to handle certain actions).
There are two Interface Classes to represent main RSX++ objects:
iClient - this class represents Hub (Client class). By this interface you can get basic info about hub, find user or store settings for certain hubs. iOnlineUser - this class represents User connected to hub (OnlineUser). By this class we get access to user variables. Most of them are available via p_get function which returns values from Identity Field's Map for given field name (for example: NI represents Nick, DE represents description).
Plugin IDs
List of used Plugin IDs (each plugin must have own, unique ID). If someone made a plugin for RSX++, please send to me used ID to place it here.
- TestAPI - 10
- MediaPlayers - 11
- SnapWindow - 12
PluginAPI
This class is used to interact with Core (Plugin -> RSX++).
API Revision: 1.2.0.1
Header: PluginAPI.h
Members
logMessage
Send a message to status log (shown in status toolbar at the bottom of RSX++ window).
getDataPath
Get a path to root directory (where RSXPlusPlus.exe is placed).
getVersion
argument: int Get version as a string for given type.
getMainWnd
argument: HWND Set Main Window Handle for the argument.
getSetting
argument: int, rString Get a setting as string. First argument is a plugin ID, second is a setting name (you can access other plugin's settings).
setSetting
argument: int, rString, rString Set a setting as a string. First argument is plugin ID, second is a setting name, third is a setting value.
getClientSetting
argument: rString, bool Get a RSX++ setting as a string. First argument is a setting name, second one tells where function should search for given setting (RSX++ uses two settings managers which results in two config files - RSXSettings.xml and DCPlusPlus.xml), true for RSX++ Manager, false for Default Manager.
getClientSettingInt
argument: rString, bool Get a RSX++ setting as a int. Same rule as for getClientSetting.
OpenHub
argument: rString Open a new hub window and connect to given address.
CloseHub
argument: rString Close an existing hub window and disconnect from hub with given address.
showToolTip
argument: rString, rString, int Show a ToolTip (it respect RSX++ settings about showing notifications). First argument is a ToolTip name, second is a message content, third is a Icon type (see Enums in header file).
RegexMatch
argument: rString, rString Do a simple Regex match (using boost regex). First argument is a string that have to be matched and second is a regular expression (if expression is invalid, false is returned).
WildcardMatch
argument: rString, rString, char, bool Do a Wildard Match. First argument is a string that have to be matched, second is a pattern, third is a delimiter/separator, fourth is option to use set or not.
Enums
Chat Message Style ToolTip Style Version Type
iOnlineUser
Class represents OnlineUser object (a connected to at least one hub user). Header: UserInterface.h
Members
p_get
argument: char Get a Identity Field value for given field name.
p_set
argument: char, rString Set a Identity Field value for given field name.
p_isClientType
argument: int Check user Client Type. First argument is a mask which contains values that should be checked. Default values for certain client type: 1: Bot, 2: Registered (ADC only), 4: Operator, 8: SuperUser (ADC only), 16: Owner (ADC only), 32: Hub (ADC only)
p_isTcpActive
Returns true if user can handle active connections (have public IP and opened port for DC connections).
p_sendPM
argument: rString, bool Send a Private Message to user. First argument is a message content, second argument tells if this message should be sent in third person form.
p_getUserClient
Get a pointer to iClient (Hub/Client Iterface) which user is connected to.
p_inc
Increment a reference counter to prevent OnlineUser and iOnlineUser class destruction. Use wisely.
p_dec
Decrement a reference counter. Use it, if you have used p_inc somewhere in code to balance reference count.