- The big forward port. I probably broke lots of stuff, so please look over any
[ircu2.10.12-pk.git] / ircd / m_admin.c
index e9b44883fd70c2973ebccd73c291f3fc555161ac..dd8d0f4b4a3674759feb871e9736d4555df99c57 100644 (file)
@@ -84,7 +84,7 @@
 #include "client.h"
 #include "hash.h"
 #include "ircd.h"
-#include "ircd_policy.h"
+#include "ircd_features.h"
 #include "ircd_reply.h"
 #include "msg.h"
 #include "numeric.h"
@@ -115,10 +115,12 @@ static int send_admin_info(struct Client* sptr)
  */
 int m_admin(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
+  struct Client *acptr;
+
   assert(0 != cptr);
   assert(cptr == sptr);
 
-  if (parc > 1)
+  if (parc > 1  && (!(acptr = find_match_server(parv[1])) || !IsMe(acptr)))
     return send_reply(sptr, ERR_NOPRIVILEGES);
 
   return send_admin_info(sptr);
@@ -135,8 +137,8 @@ int mo_admin(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   assert(0 != cptr);
   assert(cptr == sptr);
 
-  if (hunt_server_cmd(sptr, CMD_ADMIN, cptr, HEAD_IN_SAND_REMOTE, ":%C", 1,
-                     parc, parv) != HUNTED_ISME)
+  if (hunt_server_cmd(sptr, CMD_ADMIN, cptr, feature_int(FEAT_HIS_REMOTE), 
+                      ":%C", 1, parc, parv) != HUNTED_ISME)
     return 0;
   return send_admin_info(sptr);
 }