diff --git a/extensions/Makefile.in b/extensions/Makefile.in index 17c3b47..55c6977 100644 --- a/extensions/Makefile.in +++ b/extensions/Makefile.in @@ -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 \ diff --git a/help/opers/privs b/help/opers/privs new file mode 100644 index 0000000..08badd9 --- /dev/null +++ b/help/opers/privs @@ -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. diff --git a/include/numeric.h b/include/numeric.h index 55dcdb4..c535008 100644 --- a/include/numeric.h +++ b/include/numeric.h @@ -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 diff --git a/modules/Makefile.in b/modules/Makefile.in index c2de26f..8426792 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -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 \ diff --git a/extensions/m_privs.c b/modules/m_privs.c similarity index 97% rename from extensions/m_privs.c rename to modules/m_privs.c index d005be2..35c2f10 100644 --- a/extensions/m_privs.c +++ b/modules/m_privs.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[]) diff --git a/src/messages.tab b/src/messages.tab index c7fe3b4..d4f1486 100644 --- a/src/messages.tab +++ b/src/messages.tab @@ -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,