Skip to content

Instantly share code, notes, and snippets.

@hgl
Last active May 4, 2020 06:44
Show Gist options
  • Select an option

  • Save hgl/dbc40c6f98181fc3a60f42b331c83815 to your computer and use it in GitHub Desktop.

Select an option

Save hgl/dbc40c6f98181fc3a60f42b331c83815 to your computer and use it in GitHub Desktop.
--- src/main.cpp
+++ src/main.cpp
@@ -433,20 +433,15 @@
}
if (isRoot()) {
- CUtils::PrintError(
- "You are running ZNC as root! Don't do that! There are not many "
- "valid");
- CUtils::PrintError(
- "reasons for this and it can, in theory, cause great damage!");
if (!bAllowRoot) {
+ CUtils::PrintError(
+ "You are running ZNC as root! Don't do that! There are not many "
+ "valid");
+ CUtils::PrintError(
+ "reasons for this and it can, in theory, cause great damage!");
CZNC::DestroyInstance();
return 1;
}
- CUtils::PrintError("You have been warned.");
- CUtils::PrintError(
- "Hit CTRL+C now if you don't want to run ZNC as root.");
- CUtils::PrintError("ZNC will start in 30 seconds.");
- sleep(30);
}
if (bMakeConf) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment