Move PRIVS command from extensions to modules (shows effective oper privs).
This commit is contained in:
parent
889b032125
commit
8e0633f56f
|
@ -55,7 +55,6 @@ SRCS = \
|
|||
m_okick.c \
|
||||
m_omode.c \
|
||||
m_opme.c \
|
||||
m_privs.c \
|
||||
m_webirc.c \
|
||||
no_locops.c \
|
||||
no_oper_invis.c \
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
PRIVS [nick]
|
||||
|
||||
PRIVS displays effective operator privileges for
|
||||
the specified nick, or for yourself if no nick is
|
||||
given. This includes all privileges from the operator
|
||||
block, the name of the operator block and those
|
||||
privileges from the auth block that have an effect
|
||||
after the initial connection.
|
||||
|
||||
If the remote server does not support this
|
||||
extension, you will not receive a reply.
|
|
@ -118,6 +118,8 @@ extern const char *form_str(int);
|
|||
#define RPL_LOCALUSERS 265
|
||||
#define RPL_GLOBALUSERS 266
|
||||
|
||||
#define RPL_PRIVS 270 /* from ircu */
|
||||
|
||||
#define RPL_ACCEPTLIST 281
|
||||
#define RPL_ENDOFACCEPT 282
|
||||
|
||||
|
|
|
@ -85,6 +85,7 @@ TSRCS = \
|
|||
m_ping.c \
|
||||
m_pong.c \
|
||||
m_post.c \
|
||||
m_privs.c \
|
||||
m_rehash.c \
|
||||
m_restart.c \
|
||||
m_resv.c \
|
||||
|
|
|
@ -40,8 +40,6 @@
|
|||
#include "s_conf.h"
|
||||
#include "s_newconf.h"
|
||||
|
||||
#define RPL_PRIVS 270 /* from ircu */
|
||||
|
||||
static int me_privs(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
|
||||
static int mo_privs(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
|
||||
|
||||
|
@ -134,7 +132,8 @@ static void show_privs(struct Client *source_p, struct Client *target_p)
|
|||
}
|
||||
p++;
|
||||
}
|
||||
sendto_one_numeric(source_p, RPL_PRIVS, "%s :%s", target_p->name, buf);
|
||||
sendto_one_numeric(source_p, RPL_PRIVS, form_str(RPL_PRIVS),
|
||||
target_p->name, buf);
|
||||
}
|
||||
|
||||
static int me_privs(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
|
@ -291,7 +291,7 @@ static const char * replies[] = {
|
|||
/* 267 */ NULL,
|
||||
/* 268 */ NULL,
|
||||
/* 269 */ NULL,
|
||||
/* 270 */ NULL,
|
||||
/* 270 RPL_PRIVS, */ "%s :%s",
|
||||
/* 271 */ NULL,
|
||||
/* 272 */ NULL,
|
||||
/* 273 */ NULL,
|
||||
|
|
Loading…
Reference in New Issue