summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/fe-gtk.c52
1 files changed, 9 insertions, 43 deletions
diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c
index d1f23002..edec9a0b 100644
--- a/src/fe-gtk/fe-gtk.c
+++ b/src/fe-gtk/fe-gtk.c
@@ -132,7 +132,7 @@ static const GOptionEntry gopt_entries[] =
  {"no-auto",	'a', 0, G_OPTION_ARG_NONE,	&arg_dont_autoconnect, N_("Don't auto connect to servers"), NULL},
  {"cfgdir",	'd', 0, G_OPTION_ARG_STRING,	&arg_cfgdir, N_("Use a different config directory"), "PATH"},
  {"no-plugins",	'n', 0, G_OPTION_ARG_NONE,	&arg_skip_plugins, N_("Don't auto load any plugins"), NULL},
- {"plugindir",	'p', 0, G_OPTION_ARG_NONE,	&arg_show_autoload, N_("Show plugin auto-load directory"), NULL},
+ {"plugindir",	'p', 0, G_OPTION_ARG_NONE,	&arg_show_autoload, N_("Show plugin/script auto-load directory"), NULL},
  {"configdir",	'u', 0, G_OPTION_ARG_NONE,	&arg_show_config, N_("Show user config directory"), NULL},
  {"url",	 0,  0, G_OPTION_ARG_STRING,	&arg_url, N_("Open an irc://server:port/channel URL"), "URL"},
 #ifndef WIN32	/* uses DBUS */
@@ -223,53 +223,31 @@ fe_args (int argc, char *argv[])
 
 	if (arg_show_version)
 	{
-#ifdef WIN32
 		buffer = g_strdup_printf (DISPLAY_NAME " " PACKAGE_VERSION "\n");
 		gtk_init (&argc, &argv);
 		create_msg_dialog ("Version Information", buffer);
 		g_free (buffer);
-#else
-		printf (PACKAGE_TARNAME" "PACKAGE_VERSION"\n");
-#endif
+
 		return 0;
 	}
 
 	if (arg_show_autoload)
 	{
-#ifdef WIN32
-		/* see the chdir() below */
-		char *sl, *exe = strdup (argv[0]);
-		sl = strrchr (exe, '\\');
-		if (sl)
-		{
-			*sl = 0;
-			buffer = g_strdup_printf ("%s\\plugins\n", exe);
-			gtk_init (&argc, &argv);
-			create_msg_dialog ("Plugin Auto-load Directory", buffer);
-		}
-		else
-		{
-			buffer = g_strdup(".\\plugins\n");
-			gtk_init (&argc, &argv);
-			create_msg_dialog ("Plugin Auto-load Directory", buffer);
-		}
+		buffer = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "addons\n", get_xdir ());
+		gtk_init (&argc, &argv);
+		create_msg_dialog ("Plugin/Script Auto-load Directory", buffer);
 		g_free (buffer);
-#else
-		printf ("%s\n", HEXCHATLIBDIR"/plugins");
-#endif
+
 		return 0;
 	}
 
 	if (arg_show_config)
 	{
-#ifdef WIN32
-		buffer = g_strdup_printf ("%s\n", get_xdir ());
+		buffer = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "\n", get_xdir ());
 		gtk_init (&argc, &argv);
 		create_msg_dialog ("User Config Directory", buffer);
 		g_free (buffer);
-#else
-		printf ("%s\n", get_xdir ());
-#endif
+
 		return 0;
 	}
 
@@ -282,7 +260,7 @@ fe_args (int argc, char *argv[])
 		char *tmp = strdup (argv[0]);
 		char *sl;
 
-		sl = strrchr (tmp, '\\');
+		sl = strrchr (tmp, G_DIR_SEPARATOR);
 		if (sl)
 		{
 			*sl = 0;
@@ -292,18 +270,6 @@ fe_args (int argc, char *argv[])
 	}
 #endif
 
-	if (arg_cfgdir)
-	{
-		if (xdir)
-			g_free (xdir);
-		xdir = strdup (arg_cfgdir);
-		if (xdir[strlen (xdir) - 1] == '/')
-		{
-			xdir[strlen (xdir) - 1] = 0;
-		}
-		g_free (arg_cfgdir);
-	}
-
 	gtk_init (&argc, &argv);
 
 #ifdef USE_XLIB