]> granicus.if.org Git - sudo/commitdiff
broke out insults into separate include files
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 2 May 1995 05:34:59 +0000 (05:34 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 2 May 1995 05:34:59 +0000 (05:34 +0000)
insults.h

index 0846bb83cbbc4eb29921cd757d009ed3cb08ca75..1a7283059697047b9ec7b0fcb12b3b81a36a3f8c 100644 (file)
--- a/insults.h
+++ b/insults.h
  *  $Id$
  */
 
-#ifdef USE_INSULTS
-
 #ifndef _SUDO_INSULTS_H
 #define _SUDO_INSULTS_H
 
+#ifdef USE_INSULTS
+
 /*
- * To add insult to injury, just add to the following strings and
- * adjust NOFINSULTS accordingly.  This code taken from the original
- * sudo(8).  HAL insults from 2001.
+ * Choose a set of insults, the default is to use the insults from
+ * "sudo classic" (in the original edition of the Sys Admin book).
  */
-
-#ifdef HAL
-char *insults[] = {
-    "Just what do you think you're doing Dave?",
-    "It can only be attributed to human error.",
-    "That's something I cannot allow to happen.",
-    "My mind is going. I can feel it.",
-    "Sorry about this, I know it's a bit silly.",
-    "Take a stress pill and think things over.",
-    "This mission is too important for me to allow you to jeopardize it.",
-    "I feel much better now."
-};
-
-#define NOFINSULTS 8   /* number of insults */
-
-#else /* HAL */
-char *insults[] = {
-    "Wrong!  You cheating scum!",
-    "No soap, honkie-lips.",
-    "Where did you learn to type?",
-    "Are you on drugs?",
-    "My pet ferret can type better than you!",
-    "You type like i drive.",
-    "Do you think like you type?",
-    "Your mind just hasn't been the same since the electro-shock, has it?"
-};
-
-#define NOFINSULTS 8   /* number of insults */
-
-#endif /* HAL */
+#if defined(HAL)
+#include "ins_2001.h"
+#elif defined(GOONS)
+#include "ins_goons.h"
+#else
+#include "ins_classic.h"
+#endif
 
 /*
- *     return a random insult.
+ * return a pseudo-random insult.
  */
-
 #define INSULT         (insults[time(NULL) % NOFINSULTS])
 
-#endif /* _SUDO_INSULTS_H */
-
 #endif /* USE_INSULTS */
+
+#endif /* _SUDO_INSULTS_H */