]>
jfr.im git - irc/quakenet/newserv.git/blob - chanserv/chancmds/permban.c
1 /* Automatically generated by refactor.pl.
5 * CMDLEVEL: QCMD_AUTHED
7 * CMDDESC: Permanently bans a hostmask on a channel.
8 * CMDFUNC: csc_dopermban
9 * CMDPROTO: int csc_dopermban(void *source, int cargc, char **cargv);
12 #include "../chanserv.h"
13 #include "../../nick/nick.h"
14 #include "../../lib/flags.h"
15 #include "../../lib/irc_string.h"
16 #include "../../channel/channel.h"
17 #include "../../parser/parser.h"
18 #include "../../irc/irc.h"
19 #include "../../localuser/localuserchannel.h"
23 int csc_dopermban(void *source
, int cargc
, char **cargv
) {
28 reguser
*rup
=getreguserfromnick(sender
);
31 chanservstdmessage(sender
, QM_NOTENOUGHPARAMS
, "permban");
35 if (!(cip
=cs_checkaccess(sender
, cargv
[0], CA_MASTERPRIV
, NULL
, "permban",0, 0)))
38 rcp
=cip
->exts
[chanservext
];
42 rbp
->cbp
=makeban(cargv
[1]);
46 rbp
->reason
=getsstring(cargv
[2],200);
52 cs_setregban(cip
, rbp
);
53 csdb_createban(rcp
, rbp
);
55 chanservstdmessage(sender
, QM_DONE
);