* 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 "s_conf.h"
#include "send.h"
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
/*
* mo_rehash - oper message handler
*/
int mo_rehash(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
-#if defined(OPER_REHASH) || defined(LOCOP_REHASH)
int flag = 0;
-# if !defined(OPER_REHASH) || !defined(LOCOP_REHASH)
- if (
-# ifdef OPER_REHASH
- !IsOper(sptr)
-# else
- !IsLocOp(sptr)
-# endif
- )
+ if (!HasPriv(sptr, PRIV_REHASH))
return send_reply(sptr, ERR_NOPRIVILEGES);
-# endif
if (parc > 1) { /* special processing */
if (*parv[1] == 'm') {
log_write(LS_SYSTEM, L_INFO, 0, "REHASH From %#C", sptr);
return rehash(cptr, flag);
-#endif /* defined(OPER_REHASH) || defined(LOCOP_REHASH) */
- return 0;
}