From d2c5bda0b81282c18a6d9ddcf21f4f1afc64b5ee Mon Sep 17 00:00:00 2001 From: "berkeviktor@aol.com" Date: Tue, 25 Jan 2011 23:54:31 +0100 Subject: some mpcinfo cosmetics and deinit() --- plugins/mpcinfo/makefile.mak | 2 +- plugins/mpcinfo/mpcInfo.c | 33 ++++++++++++++++++++------------- 2 files changed, 21 insertions(+), 14 deletions(-) (limited to 'plugins/mpcinfo') diff --git a/plugins/mpcinfo/makefile.mak b/plugins/mpcinfo/makefile.mak index 8c693dbf..4a8a2763 100644 --- a/plugins/mpcinfo/makefile.mak +++ b/plugins/mpcinfo/makefile.mak @@ -6,7 +6,7 @@ all: mpcinfo.obj mpcinfo.def mpcinfo.def: echo EXPORTS > mpcinfo.def echo xchat_plugin_init >> mpcinfo.def -# echo xchat_plugin_deinit >> mpcinfo.def + echo xchat_plugin_deinit >> mpcinfo.def mpcinfo.obj: mpcinfo.c makefile.mak cl $(CFLAGS) $(GLIB) /I.. mpcinfo.c diff --git a/plugins/mpcinfo/mpcInfo.c b/plugins/mpcinfo/mpcInfo.c index 92a6d357..5b491e73 100644 --- a/plugins/mpcinfo/mpcInfo.c +++ b/plugins/mpcinfo/mpcInfo.c @@ -123,18 +123,25 @@ static int mpc_tell(char *word[], char *word_eol[], void *userdata){ } int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg){ - ph = plugin_handle; - *plugin_name = "mpcInfo"; - *plugin_desc = "Information-Script for Media Player Classic"; - *plugin_version=VERSION; + ph = plugin_handle; + *plugin_name = "mpcInfo"; + *plugin_desc = "Information-Script for Media Player Classic"; + *plugin_version=VERSION; - xchat_hook_command(ph, "tell", XCHAT_PRI_NORM, mpc_tell,"no help text", 0); - xchat_hook_command(ph, "mpc_themes", XCHAT_PRI_NORM, print_themes,"no help text", 0); - xchat_hook_command(ph, "mpc_reloadthemes", XCHAT_PRI_NORM, mpc_themeReload,"no help text", 0); - - xchat_print(ph,"\n-----------------------------\n"); - themeInit();loadThemes(); - xchat_printf(ph, "%s %s loaded successfully!\n",*plugin_name, VERSION); - xchat_print(ph,"-----------------------------\n"); - return 1; + xchat_hook_command(ph, "tell", XCHAT_PRI_NORM, mpc_tell,"no help text", 0); + xchat_hook_command(ph, "mpc_themes", XCHAT_PRI_NORM, print_themes,"no help text", 0); + xchat_hook_command(ph, "mpc_reloadthemes", XCHAT_PRI_NORM, mpc_themeReload,"no help text", 0); + + themeInit(); + loadThemes(); + xchat_printf(ph, "%s %s plugin loaded\n",*plugin_name, VERSION); + + return 1; +} + +int +xchat_plugin_deinit (void) +{ + xchat_print (ph, "mpcInfo plugin unloaded\n"); + return 1; } -- cgit 1.4.1