From: ThiefMaster Date: Fri, 27 Jun 2008 20:04:52 +0000 (+0200) Subject: Add outrank check to chanserv.myaccess X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;h=3ca1d9ee3d4c59a95f88896a12c02e60e68e9b39;p=srvx.git Add outrank check to chanserv.myaccess --- diff --git a/src/chanserv.c b/src/chanserv.c index e039fbf..7f21d44 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -23,6 +23,7 @@ #include "global.h" #include "modcmd.h" #include "opserv.h" /* for opserv_bad_channel() */ +#include "nickserv.h" /* for oper_outranks() */ #include "saxdb.h" #include "timeq.h" @@ -3626,7 +3627,7 @@ static CHANSERV_FUNC(cmd_myaccess) if(argc < 2) target_handle = user->handle_info; - else if(!IsHelping(user)) + else if(!IsStaff(user)) { reply("CSMSG_MYACCESS_SELF_ONLY", argv[0]); return 0; @@ -3634,6 +3635,9 @@ static CHANSERV_FUNC(cmd_myaccess) else if(!(target_handle = modcmd_get_handle_info(user, argv[1]))) return 0; + if(!oper_outranks(user, target_handle)) + return 0; + if(!target_handle->channels) { reply("CSMSG_SQUAT_ACCESS", target_handle->handle);