diff options
author | TingPing <tingping@tingping.se> | 2013-04-05 10:12:33 -0400 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2013-04-05 10:12:33 -0400 |
commit | d964af81428a6d768aeb96906eb0538a30d919ca (patch) | |
tree | dd11a42043d858ddf86ff387f3f0517a78b1b413 /src/fe-text/fe-text.c | |
parent | 7746ff9a122fdecc512e560b2a0608cc949ff2b6 (diff) |
Fix root user warning running before g_type_init
closes #504
Diffstat (limited to 'src/fe-text/fe-text.c')
-rw-r--r-- | src/fe-text/fe-text.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/fe-text/fe-text.c b/src/fe-text/fe-text.c index 371ce5b8..f5f7e6f8 100644 --- a/src/fe-text/fe-text.c +++ b/src/fe-text/fe-text.c @@ -486,8 +486,6 @@ fe_args (int argc, char *argv[]) g_option_context_add_main_entries (context, gopt_entries, GETTEXT_PACKAGE); g_option_context_parse (context, &argc, &argv, &error); - g_type_init (); - if (error) { if (error->message) @@ -537,6 +535,17 @@ fe_args (int argc, char *argv[]) g_free (arg_cfgdir); } + g_type_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 */ + return -1; } |