]>
jfr.im git - irc/quakenet/newserv.git/blob - chanserv/chancmds/unbanmask.c
1 /* Automatically generated by refactor.pl.
5 * CMDLEVEL: QCMD_AUTHED
7 * CMDDESC: Removes bans matching a particular mask from a channel.
8 * CMDFUNC: csc_dounbanmask
9 * CMDPROTO: int csc_dounbanmask(void *source, int cargc, char **cargv);
10 * CMDHELP: Usage: UNBANMASK <channel> <mask>
11 * CMDHELP: Removes any bans on the channel which are overlapped by the named mask. Can
12 * CMDHELP: remove both channel bans and registered bans. Where:
13 * CMDHELP: channel - channel to use
14 * CMDHELP: mask - mask to remove. Any ban subsumed by this mask will be removed. For
15 * CMDHELP: example, UNBANMASK *!*@*.isp.net would remove *!*@host1.isp.net and
16 * CMDHELP: *!*@host2.isp.net and *!user@*.isp.net.
17 * CMDHELP: UNBANMASK requires operator (+o) access on the named channel.
18 * CMDHELP: Removing registered bans requires master (+m) access on the named channel.
21 #include "../chanserv.h"
22 #include "../../nick/nick.h"
23 #include "../../lib/flags.h"
24 #include "../../lib/irc_string.h"
25 #include "../../channel/channel.h"
26 #include "../../parser/parser.h"
27 #include "../../irc/irc.h"
28 #include "../../localuser/localuserchannel.h"
32 int csc_dounbanmask(void *source
, int cargc
, char **cargv
) {
35 struct chanban
*theban
;
38 chanservstdmessage(sender
, QM_NOTENOUGHPARAMS
, "unbanmask");
42 if (!(cip
=cs_checkaccess(sender
, cargv
[0], CA_OPPRIV
, NULL
, "unbanmask", 0, 0)))
45 theban
=makeban(cargv
[1]);
47 cs_unbanfn(sender
, cip
, (UnbanFN
)banoverlap
, theban
, 1, 0);
48 cs_log(sender
,"UNBANMASK %s",bantostring(theban
));
51 chanservstdmessage(sender
, QM_DONE
);