2007-12-25 12:56:05 +00:00
|
|
|
/*
|
|
|
|
* Treat cmode +-R as +-q $~a.
|
|
|
|
* -- jilles
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "stdinc.h"
|
|
|
|
#include "modules.h"
|
|
|
|
#include "client.h"
|
|
|
|
#include "hook.h"
|
|
|
|
#include "ircd.h"
|
2008-04-08 19:39:35 +00:00
|
|
|
#include "chmode.h"
|
2007-12-25 12:56:05 +00:00
|
|
|
|
|
|
|
static int _modinit(void);
|
|
|
|
static void _moddeinit(void);
|
|
|
|
static void chm_quietunreg(struct Client *source_p, struct Channel *chptr,
|
2014-08-03 17:38:55 +00:00
|
|
|
int alevel, int parc, int *parn,
|
|
|
|
const char **parv, int *errors, int dir, char c, long mode_type);
|
2007-12-25 12:56:05 +00:00
|
|
|
|
|
|
|
DECLARE_MODULE_AV1(chm_quietunreg_compat, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision$");
|
|
|
|
|
|
|
|
static int
|
|
|
|
_modinit(void)
|
|
|
|
{
|
2014-08-03 17:38:55 +00:00
|
|
|
chmode_table['R'].set_func = chm_quietunreg;
|
|
|
|
chmode_table['R'].mode_type = 0;
|
2007-12-25 12:56:05 +00:00
|
|
|
|
2014-08-03 17:38:55 +00:00
|
|
|
return 0;
|
2007-12-25 12:56:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_moddeinit(void)
|
|
|
|
{
|
2014-08-03 17:38:55 +00:00
|
|
|
chmode_table['R'].set_func = chm_nosuch;
|
|
|
|
chmode_table['R'].mode_type = 0;
|
2007-12-25 12:56:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
chm_quietunreg(struct Client *source_p, struct Channel *chptr,
|
2014-08-03 17:38:55 +00:00
|
|
|
int alevel, int parc, int *parn,
|
|
|
|
const char **parv, int *errors, int dir, char c, long mode_type)
|
2007-12-25 12:56:05 +00:00
|
|
|
{
|
2014-08-03 17:38:55 +00:00
|
|
|
int newparn = 0;
|
|
|
|
const char *newparv[] = { "$~a" };
|
|
|
|
|
|
|
|
if (MyClient(source_p))
|
|
|
|
chm_ban(source_p, chptr, alevel, 1, &newparn, newparv,
|
|
|
|
errors, dir, 'q', CHFL_QUIET);
|
|
|
|
else
|
|
|
|
chm_nosuch(source_p, chptr, alevel, parc, parn, parv,
|
|
|
|
errors, dir, c, mode_type);
|
2007-12-25 12:56:05 +00:00
|
|
|
}
|