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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user