1 From 5f655f9a25a377c01cb15517859eb514628a43d4 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
3 Date: Wed, 6 Apr 2011 04:10:23 +0200
4 Subject: [PATCH] Move the root check to after config parsing
7 main.cpp | 27 ++++++++++++++-------------
8 1 files changed, 14 insertions(+), 13 deletions(-)
12 @@ -211,19 +211,6 @@ int main(int argc, char** argv) {
17 - CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid");
18 - CUtils::PrintError("reasons for this and it can, in theory, cause great damage!");
23 - CUtils::PrintError("You have been warned.");
24 - CUtils::PrintError("Hit CTRL+C now if you don't want to run ZNC as root.");
25 - CUtils::PrintError("ZNC will start in 30 seconds.");
30 if (!pZNC->WriteNewConfig(sConfig)) {
32 @@ -244,6 +231,20 @@ int main(int argc, char** argv) {
37 + CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid");
38 + CUtils::PrintError("reasons for this and it can, in theory, cause great damage!");
43 + CUtils::PrintError("You have been warned.");
44 + CUtils::PrintError("Hit CTRL+C now if you don't want to run ZNC as root.");
45 + CUtils::PrintError("ZNC will start in 30 seconds.");
52 CUtils::PrintMessage("Staying open for debugging [pid: " + CString(iPid) + "]");