Move PRIVS command from extensions to modules (shows effective oper privs).

This commit is contained in:
Jilles Tjoelker 2008-03-31 00:39:14 +02:00
parent 22f2f68a07
commit 7b7e1640de
6 changed files with 17 additions and 5 deletions

View file

@ -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 \

11
help/opers/privs Normal file
View file

@ -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.

View file

@ -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

View file

@ -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 \

View file

@ -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[])

View file

@ -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,