Added support for dynamic commands.

Dynamic commands are user commands that can be added dynamically to
the hub by a plugin.

The example plugin (mod_example.c) adds a !example command that when
invoked send a message to the user who invoked it.
This commit is contained in:
Jan Vidar Krey
2011-12-09 10:29:50 +01:00
parent 78ed83840b
commit 318163c066
23 changed files with 907 additions and 461 deletions

View File

@@ -30,6 +30,7 @@ static int handle(struct ADC_client* client, enum ADC_client_callback_type type,
case ADC_CLIENT_PASSWORD_REQ:
puts("*** Requesting password.");
break;
case ADC_CLIENT_LOGGED_IN:
puts("*** Logged in.");
@@ -84,10 +85,7 @@ int main(int argc, char** argv)
ADC_client_set_callback(&client, handle);
ADC_client_connect(&client, argv[1]);
while (running)
{
net_backend_process();
}
while (running && net_backend_process()) { }
ADC_client_destroy(&client);
net_destroy();