added basic ssl support to ircu
[ircu2.10.12-pk.git] / ircd / m_die.c
index 228813087ec64a8f7d34d816300e63bf984431b6..e8f9ccc2e1667ca61c12e6d228204d88460803d3 100644 (file)
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
-#if 0
-/*
- * No need to include handlers.h here the signatures must match
- * and we don't need to force a rebuild of all the handlers everytime
- * we add a new one to the list. --Bleep
- */
-#include "handlers.h"
-#endif /* 0 */
+#include "config.h"
+
 #include "client.h"
 #include "ircd.h"
+#include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "msg.h"
@@ -97,7 +92,7 @@
 #include "s_bsd.h"
 #include "send.h"
 
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
 
 
 /*
  */
 int mo_die(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
-#if defined(OPER_DIE) || defined(LOCOP_DIE)
   struct Client *acptr;
   int i;
 
-#ifndef LOCOP_DIE
-  if (!MyUser(sptr) || !IsOper(sptr))
-#else
-#ifdef  OPER_DIE
-  if (!MyUser(sptr) || !IsAnOper(sptr))
-#else
-  if (!MyUser(sptr) || !IsLocOp(sptr))
-#endif
-#endif
-  {
+  if (!HasPriv(sptr, PRIV_DIE))
     return send_reply(sptr, ERR_NOPRIVILEGES);
-  }
 
   for (i = 0; i <= HighestFd; i++)
   {
@@ -134,49 +118,6 @@ int mo_die(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
                    get_client_name(sptr, HIDE_IP));
   }
   server_die("received DIE");
-#endif /* defined(OPER_DIE) || defined(LOCOP_DIE) */
-  return 0;
-}
-
-  
-#if 0
-#if defined(OPER_DIE) || defined(LOCOP_DIE)
-/*
- * m_die
- */
-int m_die(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
-{
-  struct Client *acptr;
-  int i;
 
-#ifndef LOCOP_DIE
-  if (!MyUser(sptr) || !IsOper(sptr))
-#else
-#ifdef  OPER_DIE
-  if (!MyUser(sptr) || !IsAnOper(sptr))
-#else
-  if (!MyUser(sptr) || !IsLocOp(sptr))
-#endif
-#endif
-  {
-    sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]); /* XXX DEAD */
-    return 0;
-  }
-
-  for (i = 0; i <= HighestFd; i++)
-  {
-    if (!(acptr = LocalClientArray[i]))
-      continue;
-    if (IsUser(acptr))
-      sendto_one(acptr, ":%s NOTICE %s :Server Terminating. %s", /* XXX DEAD */
-                 me.name, acptr->name, get_client_name(sptr, HIDE_IP));
-    else if (IsServer(acptr))
-      sendto_one(acptr, ":%s ERROR :Terminated by %s", /* XXX DEAD */
-                 me.name, get_client_name(sptr, HIDE_IP));
-  }
-  server_die("received DIE");
   return 0;
 }
-#endif
-#endif /* 0 */
-