]>
jfr.im git - irc/quakenet/newserv.git/blob - chanserv/usercmds/deluser.c
7db62f4f98bc739436db26ea4f222f9b19d77570
1 /* Automatically generated by refactor.pl.
7 * CMDDESC: Removes a user from the bot.
8 * CMDFUNC: csu_dodeluser
9 * CMDPROTO: int csu_dodeluser(void *source, int cargc, char **cargv);
10 * CMDHELP: Usage: deluser <username>
11 * CMDHELP: Removes the specified username from the bot.
14 #include "../chanserv.h"
15 #include "../../lib/irc_string.h"
19 int csu_dodeluser(void *source
, int cargc
, char **cargv
) {
21 reguser
*rup
=getreguserfromnick(sender
), *target
;
27 chanservstdmessage(sender
, QM_NOTENOUGHPARAMS
, "deluser");
31 if (!(target
=findreguser(sender
, cargv
[0])))
34 if(UHasHelperPriv(target
)) {
35 cs_log(sender
,"DELUSER FAILED username %s (%s)",target
->username
,cargc
>1?cargv
[1]:"");
36 chanservwallmessage("%s (%s) just FAILED using DELUSER on %s (%s)", sender
->nick
, rup
->username
, target
->username
, cargc
>1?cargv
[1]:"");
37 chanservsendmessage(sender
, "Sorry, that user is privileged.");
41 cs_log(sender
,"DELUSER OK username %s (%s)",target
->username
,cargc
>1?cargv
[1]:"");
42 chanservwallmessage("%s (%s) just used DELUSER on %s (%s)", sender
->nick
, rup
->username
, target
->username
, cargc
>1?cargv
[1]:"");
44 cs_removeuser(target
);
46 chanservstdmessage(sender
, QM_DONE
);