Go to file
Blair Bonnett 66854bc204 Add UCMD extension methods to plugin API.
The user command (UCMD) extension to the ADC protocol allows for sending
hub-specific commands to clients. These commands have a name (which
generally appears in a menu in the client) and a command string which
the client sends back to the hub when the command is selected. These
command strings can contain keyword substitutions for useful
information, such as the SID of another user that was selected in the
client.

This commit adds some support for sending user commands to the uhub
plugin API. It currently restricts the command string to containing main
chat messages (BMSG commands in ADC parlance).

A plugin_ucmd structure is added to store the details of a user command,
and four methods are added to the plugin_handle.hub structure:

* plugin->hub.ucmd_create(plugin, name, length) creates a new user
  command.
* plugin->hub.ucmd_add_chat(plugin, ucmd, message, me) adds a main chat
  message to the list of commands to be run when the user command is
  selected. The me flag allows IRC /me style messages.
* plugin->hub.ucmd_send(plugin, user, ucmd) sends the command to a user.
* plugin->hub.ucmd_free(plugin, ucmd) frees the memory taken by a user
  command.

The structure has a number of flags (categories, remove, separator,
constrained) which correspond to the flags in the UCMD specification.
The categories flag must be set prior to sending to one (or more, via
a logical OR) of the ucmd_category_* enumeration values defined in
plugin_api/types.h.

The PLUGIN_API_VERSION has been increased to 2 to mark the change.
2012-08-02 02:26:54 +12:00
admin Cleanup after creating debian packages. 2009-03-24 23:16:09 +01:00
autotest Cleaned up command handling code, by splitting into multiple files. 2012-05-01 20:15:49 +02:00
debian Updated init script in debian package. 2012-05-08 23:40:16 +03:00
doc Add upstart script to run uHub as a service. 2012-07-29 16:22:38 +12:00
src Add UCMD extension methods to plugin API. 2012-08-02 02:26:54 +12:00
thirdparty Added sqlite as a git submodule. 2011-12-28 18:08:11 +01:00
tools convert_to_sqlite.pl: Update to the latest SQL schema + be more Perlish 2012-05-14 19:06:11 +02:00
vs2010 Fix VS2010 project file - missing .c file. 2012-05-13 23:59:27 +02:00
.gitignore ignore files generated by dpkg-buildpackage 2012-04-19 02:54:21 +02:00
.gitmodules Added sqlite as a git submodule. 2011-12-28 18:08:11 +01:00
AUTHORS Added support for dynamic commands. 2011-12-09 10:29:50 +01:00
BSDmakefile kqueue() BSD fixes 2010-01-27 17:50:02 +01:00
BUGS Document new bugs strategies 2009-03-16 17:35:08 +01:00
ChangeLog Updated changelog. 2012-05-29 22:57:02 +02:00
COPYING First git commit. 2009-02-19 17:14:09 +01:00
COPYING.OpenSSL Fix bug #183 - Added proper OpenSSL license exception for the GPL. 2012-04-22 22:23:11 +02:00
GNUmakefile Add UCMD extension methods to plugin API. 2012-08-02 02:26:54 +12:00
README update client software link 2012-04-19 02:43:59 +02:00
TODO Add TODO file. Some modify example uhub.conf 2010-01-14 09:46:55 +03:00
version.h Updated the copyright to 2012 and git version display. 2012-01-04 11:08:07 +01:00

Welcome and thanks for downloading uHub, a high performance ADC p2p hub.

For the official documentation, bugs and other information, please visit:
http://www.uhub.org/

For a list of compatible ADC clients, see:
http://en.wikipedia.org/wiki/Advanced_Direct_Connect#Client_software