* 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"
#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++)
{
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 */
-