Added /plugins load command

This commit is contained in:
James Booth
2016-04-10 01:15:11 +01:00
parent 21aa08fdb1
commit 03ab8baf4d
8 changed files with 176 additions and 41 deletions

View File

@@ -74,10 +74,8 @@ c_plugin_create(const char *const filename)
return NULL;
}
gchar *module_name = g_strndup(filename, strlen(filename) - 3);
plugin = malloc(sizeof(ProfPlugin));
plugin->name = strdup(module_name);
plugin->name = strdup(filename);
plugin->lang = LANG_C;
plugin->module = handle;
plugin->init_func = c_init_hook;
@@ -110,7 +108,6 @@ c_plugin_create(const char *const filename)
plugin->on_room_win_focus = c_on_room_win_focus_hook;
g_string_free(path, TRUE);
g_free(module_name);
return plugin;
}