/[weechat]/weechat/src/plugins/plugins.c
ViewVC logotype

Diff of /weechat/src/plugins/plugins.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.34 by flashcode, Fri Oct 28 07:31:22 2005 UTC revision 1.35 by flashcode, Sun Oct 30 09:56:24 2005 UTC
# Line 226  plugin_msg_handler_add (t_weechat_plugin Line 226  plugin_msg_handler_add (t_weechat_plugin
226      }      }
227      else      else
228      {      {
229          irc_display_prefix (NULL, PREFIX_ERROR);          irc_display_prefix (NULL, NULL, PREFIX_ERROR);
230          gui_printf (NULL,          gui_printf (NULL,
231                      _("%s plugin %s: unable to add handler for IRC command \"%s\" (not enough memory)\n"),                      _("%s plugin %s: unable to add handler for IRC command \"%s\" (not enough memory)\n"),
232                      WEECHAT_ERROR, plugin->name, irc_command);                      WEECHAT_ERROR, plugin->name, irc_command);
# Line 261  plugin_cmd_handler_add (t_weechat_plugin Line 261  plugin_cmd_handler_add (t_weechat_plugin
261            
262      if (plugin_cmd_handler_search (command))      if (plugin_cmd_handler_search (command))
263      {      {
264          irc_display_prefix (NULL, PREFIX_ERROR);          irc_display_prefix (NULL, NULL, PREFIX_ERROR);
265          gui_printf (NULL,          gui_printf (NULL,
266                      _("%s plugin %s: unable to add handler for \"%s\" command "                      _("%s plugin %s: unable to add handler for \"%s\" command "
267                        "(already exists)\n"),                        "(already exists)\n"),
# Line 298  plugin_cmd_handler_add (t_weechat_plugin Line 298  plugin_cmd_handler_add (t_weechat_plugin
298      }      }
299      else      else
300      {      {
301          irc_display_prefix (NULL, PREFIX_ERROR);          irc_display_prefix (NULL, NULL, PREFIX_ERROR);
302          gui_printf (NULL,          gui_printf (NULL,
303                      _("%s plugin %s: unable to add handler for \"%s\" command (not enough memory)\n"),                      _("%s plugin %s: unable to add handler for \"%s\" command (not enough memory)\n"),
304                      WEECHAT_ERROR, plugin->name, command);                      WEECHAT_ERROR, plugin->name, command);
# Line 546  plugin_load (char *filename) Line 546  plugin_load (char *filename)
546      handle = dlopen (full_name, RTLD_GLOBAL | RTLD_NOW);      handle = dlopen (full_name, RTLD_GLOBAL | RTLD_NOW);
547      if (!handle)      if (!handle)
548      {      {
549          irc_display_prefix (NULL, PREFIX_ERROR);          irc_display_prefix (NULL, NULL, PREFIX_ERROR);
550          gui_printf (NULL, _("%s unable to load plugin \"%s\": %s\n"),          gui_printf (NULL, _("%s unable to load plugin \"%s\": %s\n"),
551                      WEECHAT_ERROR, full_name, dlerror());                      WEECHAT_ERROR, full_name, dlerror());
552          free (full_name);          free (full_name);
# Line 557  plugin_load (char *filename) Line 557  plugin_load (char *filename)
557      if (!name)      if (!name)
558      {      {
559          dlclose (handle);          dlclose (handle);
560          irc_display_prefix (NULL, PREFIX_ERROR);          irc_display_prefix (NULL, NULL, PREFIX_ERROR);
561          gui_printf (NULL, _("%s symbol \"plugin_name\" not found in plugin \"%s\", failed to load\n"),          gui_printf (NULL, _("%s symbol \"plugin_name\" not found in plugin \"%s\", failed to load\n"),
562                      WEECHAT_ERROR, full_name);                      WEECHAT_ERROR, full_name);
563          free (full_name);          free (full_name);
# Line 567  plugin_load (char *filename) Line 567  plugin_load (char *filename)
567      if (plugin_search (name))      if (plugin_search (name))
568      {      {
569          dlclose (handle);          dlclose (handle);
570          irc_display_prefix (NULL, PREFIX_ERROR);          irc_display_prefix (NULL, NULL, PREFIX_ERROR);
571          gui_printf (NULL,          gui_printf (NULL,
572                      _("%s unable to load plugin \"%s\": a plugin with "                      _("%s unable to load plugin \"%s\": a plugin with "
573                        "same name already exists\n"),                        "same name already exists\n"),
# Line 580  plugin_load (char *filename) Line 580  plugin_load (char *filename)
580      if (!description)      if (!description)
581      {      {
582          dlclose (handle);          dlclose (handle);
583          irc_display_prefix (NULL, PREFIX_ERROR);          irc_display_prefix (NULL, NULL, PREFIX_ERROR);
584          gui_printf (NULL, _("%s symbol \"plugin_description\" not found in plugin \"%s\", failed to load\n"),          gui_printf (NULL, _("%s symbol \"plugin_description\" not found in plugin \"%s\", failed to load\n"),
585                      WEECHAT_ERROR, full_name);                      WEECHAT_ERROR, full_name);
586          free (full_name);          free (full_name);
# Line 591  plugin_load (char *filename) Line 591  plugin_load (char *filename)
591      if (!version)      if (!version)
592      {      {
593          dlclose (handle);          dlclose (handle);
594          irc_display_prefix (NULL, PREFIX_ERROR);          irc_display_prefix (NULL, NULL, PREFIX_ERROR);
595          gui_printf (NULL, _("%s symbol \"plugin_version\" not found in plugin \"%s\", failed to load\n"),          gui_printf (NULL, _("%s symbol \"plugin_version\" not found in plugin \"%s\", failed to load\n"),
596                      WEECHAT_ERROR, full_name);                      WEECHAT_ERROR, full_name);
597          free (full_name);          free (full_name);
# Line 602  plugin_load (char *filename) Line 602  plugin_load (char *filename)
602      if (!init_func)      if (!init_func)
603      {      {
604          dlclose (handle);          dlclose (handle);
605          irc_display_prefix (NULL, PREFIX_ERROR);          irc_display_prefix (NULL, NULL, PREFIX_ERROR);
606          gui_printf (NULL, _("%s function \"weechat_plugin_init\" not found in plugin \"%s\", failed to load\n"),          gui_printf (NULL, _("%s function \"weechat_plugin_init\" not found in plugin \"%s\", failed to load\n"),
607                      WEECHAT_ERROR, full_name);                      WEECHAT_ERROR, full_name);
608          free (full_name);          free (full_name);
# Line 655  plugin_load (char *filename) Line 655  plugin_load (char *filename)
655              weechat_plugins = new_plugin;              weechat_plugins = new_plugin;
656          last_weechat_plugin = new_plugin;          last_weechat_plugin = new_plugin;
657                    
658          irc_display_prefix (NULL, PREFIX_PLUGIN);          irc_display_prefix (NULL, NULL, PREFIX_PLUGIN);
659          gui_printf (NULL,          gui_printf (NULL,
660                      _("Initializing plugin \"%s\" %s\n"),                      _("Initializing plugin \"%s\" %s\n"),
661                      new_plugin->name, new_plugin->version);                      new_plugin->name, new_plugin->version);
# Line 663  plugin_load (char *filename) Line 663  plugin_load (char *filename)
663          /* init plugin */          /* init plugin */
664          if (((t_weechat_init_func *)init_func) (new_plugin) < 0)          if (((t_weechat_init_func *)init_func) (new_plugin) < 0)
665          {          {
666              irc_display_prefix (NULL, PREFIX_ERROR);              irc_display_prefix (NULL, NULL, PREFIX_ERROR);
667              gui_printf (NULL,              gui_printf (NULL,
668                          _("%s unable to initialize plugin \"%s\"\n"),                          _("%s unable to initialize plugin \"%s\"\n"),
669                          WEECHAT_ERROR, full_name);                          WEECHAT_ERROR, full_name);
# Line 674  plugin_load (char *filename) Line 674  plugin_load (char *filename)
674      }      }
675      else      else
676      {      {
677          irc_display_prefix (NULL, PREFIX_ERROR);          irc_display_prefix (NULL, NULL, PREFIX_ERROR);
678          gui_printf (NULL,          gui_printf (NULL,
679                      _("%s unable to load plugin \"%s\" (not enough memory)\n"),                      _("%s unable to load plugin \"%s\" (not enough memory)\n"),
680                      WEECHAT_ERROR, full_name);                      WEECHAT_ERROR, full_name);
# Line 682  plugin_load (char *filename) Line 682  plugin_load (char *filename)
682          return NULL;          return NULL;
683      }      }
684            
685      irc_display_prefix (NULL, PREFIX_PLUGIN);      irc_display_prefix (NULL, NULL, PREFIX_PLUGIN);
686      gui_printf (NULL,      gui_printf (NULL,
687                  _("Plugin \"%s\" (%s) loaded.\n"),                  _("Plugin \"%s\" (%s) loaded.\n"),
688                  name, full_name);                  name, full_name);
# Line 823  plugin_unload_name (char *name) Line 823  plugin_unload_name (char *name)
823      if (ptr_plugin)      if (ptr_plugin)
824      {      {
825          plugin_unload (ptr_plugin);          plugin_unload (ptr_plugin);
826          irc_display_prefix (NULL, PREFIX_PLUGIN);          irc_display_prefix (NULL, NULL, PREFIX_PLUGIN);
827          gui_printf (NULL, _("Plugin \"%s\" unloaded.\n"), name);          gui_printf (NULL, _("Plugin \"%s\" unloaded.\n"), name);
828      }      }
829      else      else
830      {      {
831          irc_display_prefix (NULL, PREFIX_ERROR);          irc_display_prefix (NULL, NULL, PREFIX_ERROR);
832          gui_printf (NULL,          gui_printf (NULL,
833                      _("%s plugin \"%s\" not found\n"),                      _("%s plugin \"%s\" not found\n"),
834                      WEECHAT_ERROR, name);                      WEECHAT_ERROR, name);

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26