Now hexchat doesn't abnormally terminal when started as root.

This fixes #589/#504.
This commit is contained in:
Diogo Sousa 2013-05-12 16:37:38 +01:00
parent 4c307f6ac9
commit 6a8cad6f94
2 changed files with 10 additions and 9 deletions

View File

@ -827,15 +827,6 @@ load_config (void)
} else } else
{ {
#ifndef WIN32
#ifndef __EMX__
/* OS/2 uses UID 0 all the time */
if (getuid () == 0)
fe_message (_("* Running IRC as root is stupid! You should\n"
" create a User Account and use that to login.\n"), FE_MSG_WARN|FE_MSG_WAIT);
#endif
#endif /* !WIN32 */
g_mkdir (prefs.hex_dcc_dir, 0700); g_mkdir (prefs.hex_dcc_dir, 0700);
g_mkdir (prefs.hex_dcc_completed_dir, 0700); g_mkdir (prefs.hex_dcc_completed_dir, 0700);

View File

@ -1053,6 +1053,7 @@ main (int argc, char *argv[])
#if ! GLIB_CHECK_VERSION (2, 36, 0) #if ! GLIB_CHECK_VERSION (2, 36, 0)
g_type_init (); g_type_init ();
#endif #endif
load_config (); load_config ();
#ifdef WIN32 #ifdef WIN32
@ -1244,6 +1245,15 @@ main (int argc, char *argv[])
fe_init (); fe_init ();
#ifndef WIN32
#ifndef __EMX__
/* OS/2 uses UID 0 all the time */
if (getuid () == 0)
fe_message (_("* Running IRC as root is stupid! You should\n"
" create a User Account and use that to login.\n"), FE_MSG_WARN|FE_MSG_WAIT);
#endif
#endif /* !WIN32 */
xchat_init (); xchat_init ();
fe_main (); fe_main ();