X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-oper.c;fp=src%2Fngircd%2Firc-oper.c;h=74f17cc0dec9343483ec7844e9b9570a83ba57c0;hp=4d17085f4ac3ce7a264bfa900e940d17512f5c5c;hb=eccbd97e1f2599bfb76818fe6bc32967ed07e0c7;hpb=ec5ab4fcd1bc361cacb56e999b2b8f0a00caf5a9 diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index 4d17085f..74f17cc0 100644 --- a/src/ngircd/irc-oper.c +++ b/src/ngircd/irc-oper.c @@ -90,12 +90,10 @@ IRC_OPER( CLIENT *Client, REQUEST *Req ) Client_ID(Client)); } - if (!Client_OperByMe(Client)) - Log(LOG_NOTICE|LOG_snotice, - "Got valid OPER for \"%s\" from \"%s\", user is an IRC operator now.", - Req->argv[0], Client_Mask(Client)); + Log(LOG_NOTICE|LOG_snotice, + "Got valid OPER for \"%s\" from \"%s\", user is an IRC operator now.", + Req->argv[0], Client_Mask(Client)); - Client_SetOperByMe(Client, true); return IRC_WriteStrClient(Client, RPL_YOUREOPER_MSG, Client_ID(Client)); } /* IRC_OPER */ @@ -357,9 +355,8 @@ IRC_WALLOPS( CLIENT *Client, REQUEST *Req ) switch (Client_Type(Client)) { case CLIENT_USER: - if (!Client_OperByMe(Client)) - return IRC_WriteErrClient(Client, ERR_NOPRIVILEGES_MSG, - Client_ID(Client)); + if (!Op_Check(Client, Req)) + return Op_NoPrivileges(Client, Req); from = Client; break; case CLIENT_SERVER: