]> jfr.im git - irc/quakenet/newserv.git/blobdiff - chanserv/usercmds/suspenduser.c
move some more data/log paths missed before
[irc/quakenet/newserv.git] / chanserv / usercmds / suspenduser.c
index b20f0852e505b47cd85865b1a9f508c62a9a6370..2df538607aa491e136b60182d0765158ea1c85df 100644 (file)
@@ -7,6 +7,18 @@
  * CMDDESC: Suspend/Delay GLINE/Instantly GLINE a user.
  * CMDFUNC: csu_dosuspenduser
  * CMDPROTO: int csu_dosuspenduser(void *source, int cargc, char **cargv);
+ * CMDHELP: Usage: suspenduser <username> [<duration>] <reason>
+ * CMDHELP:                    -nokill <username> [<duration>] <reason>
+ * CMDHELP:                    -gline <username> [<duration>] <reason>
+ * CMDHELP:                    -instantgline <username> [<duration>] <reason>
+ * CMDHELP:                    -password <password> [<duration>] <reason>
+ * CMDHELP:                    -email <email address> [<duration>] <reason>
+ * CMDHELP: Suspends one or more users, either based on username, email
+ * CMDHELP: address or password.
+ * CMDHELP: By default the user will be immediately disconnected unless
+ * CMDHELP: nokill is specified.
+ * CMDHELP: gline will gline the user at some random period of time after
+ * CMDHELP: they auth, instantgline will gline them the moment they auth.
  */
 
 #include "../chanserv.h"
@@ -135,7 +147,7 @@ int csu_dosuspenduser(void *source, int cargc, char **cargv) {
   
   if (expires) {
     tmp=gmtime(&expires);
-    strftime(buf,15,"%d/%m/%y %H:%M",tmp);
+    strftime(buf,sizeof(buf),Q9_FORMAT_TIME,tmp);
   }
   
   if (email) {
@@ -147,7 +159,7 @@ int csu_dosuspenduser(void *source, int cargc, char **cargv) {
           if (UHasSuspension(vrup))
             continue;
           
-          if (UHasOperPriv(vrup) && !UHasAdminPriv(rup))
+          if (UHasHelperPriv(vrup))
             continue;
           
           hitcount++;
@@ -174,7 +186,7 @@ int csu_dosuspenduser(void *source, int cargc, char **cargv) {
           if (UHasSuspension(vrup))
             continue;
           
-          if (UHasOperPriv(vrup) && !UHasAdminPriv(rup))
+          if (UHasHelperPriv(vrup))
             continue;
           
           hitcount++;
@@ -206,7 +218,7 @@ int csu_dosuspenduser(void *source, int cargc, char **cargv) {
       return CMD_ERROR;
     }
     
-    if (UHasOperPriv(vrup) && !UHasAdminPriv(rup)) {
+    if (UHasHelperPriv(vrup)) {
       snprintf(buf, 199, "suspenduser on %s", vrup->username);
       chanservstdmessage(sender, QM_NOACCESS, buf);
       chanservwallmessage("%s (%s) FAILED to suspend %s", sender->nick, rup->username, vrup->username);