Fix welcome plugin handle, and build issues.
This commit is contained in:
parent
2a190859bd
commit
24e2c2090e
@ -226,8 +226,8 @@ plugin_auth_sqlite_SOURCES := src/plugins/mod_auth_sqlite.c
|
||||
plugin_auth_sqlite_TARGET := mod_auth_sqlite.so
|
||||
plugin_auth_sqlite_LIBS := -lsqlite3
|
||||
|
||||
plugin_chat_history_SOURCE := src/plugins/mod_chat_history.c
|
||||
plugin_chat_history_TARGET := mod_chat_history.so
|
||||
# plugin_chat_history_SOURCE := src/plugins/mod_chat_history.c
|
||||
# plugin_chat_history_TARGET := mod_chat_history.so
|
||||
|
||||
# Source to objects
|
||||
libuhub_OBJECTS := $(libuhub_SOURCES:.c=.o)
|
||||
@ -240,7 +240,7 @@ uhub-passwd_OBJECTS := $(uhub-passwd_SOURCES:.c=.o)
|
||||
adcrush_OBJECTS := $(adcrush_SOURCES:.c=.o)
|
||||
admin_OBJECTS := $(admin_SOURCES:.c=.o)
|
||||
|
||||
all_plugins := $(plugin_example_TARGET) $(plugin_logging_TARGET) $(plugin_auth_TARGET) $(plugin_auth_sqlite_TARGET) $(plugin_chat_history_TARGET) $(plugin_welcome_TARGET)
|
||||
all_plugins := $(plugin_example_TARGET) $(plugin_logging_TARGET) $(plugin_auth_TARGET) $(plugin_auth_sqlite_TARGET) $(plugin_welcome_TARGET)
|
||||
all_OBJECTS := $(libuhub_OBJECTS) $(uhub_OBJECTS) $(libutils_OBJECTS) $(adcrush_OBJECTS) $(autotest_OBJECTS) $(admin_OBJECTS) $(libadc_common_OBJECTS) $(libadc_client_OBJECTS)
|
||||
all_OBJECTS += $(all_plugins)
|
||||
|
||||
|
@ -127,7 +127,7 @@ static struct welcome_data* parse_config(const char* line, struct plugin_handle*
|
||||
}
|
||||
|
||||
data->cmd_motd = hub_malloc_zero(sizeof(struct plugin_command_handle));
|
||||
PLUGIN_COMMAND_INITIALIZE(data->cmd_motd, (void*) data, "msg", "", auth_cred_guest, command_handler_motd, "Show the message of the day.");
|
||||
PLUGIN_COMMAND_INITIALIZE(data->cmd_motd, (void*) data, "motd", "", auth_cred_guest, command_handler_motd, "Show the message of the day.");
|
||||
}
|
||||
else if (strcmp(cfg_settings_get_key(setting), "rules") == 0)
|
||||
{
|
||||
@ -142,7 +142,7 @@ static struct welcome_data* parse_config(const char* line, struct plugin_handle*
|
||||
}
|
||||
|
||||
data->cmd_rules = hub_malloc_zero(sizeof(struct plugin_command_handle));
|
||||
PLUGIN_COMMAND_INITIALIZE(data->cmd_rules, (void*) data, "rule", "", auth_cred_guest, command_handler_rules, "Show the hub rules.");
|
||||
PLUGIN_COMMAND_INITIALIZE(data->cmd_rules, (void*) data, "rules", "", auth_cred_guest, command_handler_rules, "Show the hub rules.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -255,13 +255,13 @@ static void on_user_login(struct plugin_handle* plugin, struct plugin_user* user
|
||||
static int command_handler_motd(struct plugin_handle* plugin, struct plugin_user* user, struct plugin_command* cmd)
|
||||
{
|
||||
send_motd(plugin, user);
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int command_handler_rules(struct plugin_handle* plugin, struct plugin_user* user, struct plugin_command* cmd)
|
||||
{
|
||||
send_rules(plugin, user);
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int plugin_register(struct plugin_handle* plugin, const char* config)
|
||||
|
Loading…
Reference in New Issue
Block a user