added basic ssl support to ircu
[ircu2.10.12-pk.git] / ircd / m_rehash.c
index f95562cd198fc432e8b6965b79db9bb325c22460..8e8c2db6f6151111f47f0812e409884a25ec809d 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"
@@ -97,7 +91,7 @@
 #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') {
@@ -142,7 +127,5 @@ int mo_rehash(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   log_write(LS_SYSTEM, L_INFO, 0, "REHASH From %#C", sptr);
 
   return rehash(cptr, flag);
-#endif /* defined(OPER_REHASH) || defined(LOCOP_REHASH) */
-  return 0;
 }