Allow normal users to do PRIVS on themselves.
This basically shows a subset of the information shown by the notices on connect like "*** You are exempt from K/X lines".
This commit is contained in:
parent
3e910a1847
commit
ed11b18f0f
1 changed files with 15 additions and 1 deletions
|
@ -40,12 +40,13 @@
|
||||||
#include "s_conf.h"
|
#include "s_conf.h"
|
||||||
#include "s_newconf.h"
|
#include "s_newconf.h"
|
||||||
|
|
||||||
|
static int m_privs(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
|
||||||
static int me_privs(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
|
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[]);
|
static int mo_privs(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
|
||||||
|
|
||||||
struct Message privs_msgtab = {
|
struct Message privs_msgtab = {
|
||||||
"PRIVS", 0, 0, 0, MFLG_SLOW,
|
"PRIVS", 0, 0, 0, MFLG_SLOW,
|
||||||
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, {me_privs, 0}, {mo_privs, 0}}
|
{mg_unreg, {m_privs, 0}, mg_ignore, mg_ignore, {me_privs, 0}, {mo_privs, 0}}
|
||||||
};
|
};
|
||||||
|
|
||||||
mapi_clist_av1 privs_clist[] = {
|
mapi_clist_av1 privs_clist[] = {
|
||||||
|
@ -151,3 +152,16 @@ static int mo_privs(struct Client *client_p, struct Client *source_p, int parc,
|
||||||
use_id(target_p));
|
use_id(target_p));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int m_privs(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
||||||
|
{
|
||||||
|
if (parc >= 2 && !EmptyString(parv[1]) &&
|
||||||
|
irccmp(parv[1], source_p->name)) {
|
||||||
|
sendto_one_numeric(source_p, ERR_NOPRIVILEGES,
|
||||||
|
form_str(ERR_NOPRIVILEGES));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
show_privs(source_p, source_p);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue