/[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.26 by flashcode, Sun Oct 16 21:47:43 2005 UTC revision 1.27 by flashcode, Mon Oct 17 11:53:46 2005 UTC
# Line 747  int plugin_auto_load_file (t_weechat_plu Line 747  int plugin_auto_load_file (t_weechat_plu
747    
748  void plugin_auto_load ()  void plugin_auto_load ()
749  {  {
750      char *dir_name;      char *ptr_home, *dir_name;
751            
752        /* auto-load plugins in WeeChat home dir */
753        if (cfg_plugins_path && cfg_plugins_path[0])
754        {
755            if (cfg_plugins_path[0] == '~')
756            {
757                ptr_home = getenv ("HOME");
758                dir_name = (char *)malloc (strlen (cfg_plugins_path) + strlen (ptr_home) + 2);
759                if (dir_name)
760                {
761                    strcpy (dir_name, ptr_home);
762                    strcat (dir_name, cfg_plugins_path + 1);
763                    plugin_exec_on_files (NULL, dir_name, &plugin_auto_load_file);
764                    free (dir_name);
765                }
766            }
767            else
768                plugin_exec_on_files (NULL, cfg_plugins_path, &plugin_auto_load_file);
769        }
770        
771        /* auto-load plugins in WeeChat global lib dir */
772      dir_name = (char *)malloc (strlen (WEECHAT_LIBDIR) + 16);      dir_name = (char *)malloc (strlen (WEECHAT_LIBDIR) + 16);
773      if (dir_name)      if (dir_name)
774      {      {

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

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