Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / m_rehash.c
index f95562cd198fc432e8b6965b79db9bb325c22460..28864e7846763669952367503553f73451e52827 100644 (file)
  */
 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 +133,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;
 }