chanservaddcommand("login", QCMD_SECURE | QCMD_NOTAUTHED | QCMD_ALIAS, 2, csa_doauth, "Authenticates you on the bot.", "Usage: LOGIN <username> <password>\nAuthenticates you on the bot, where:\nusername - your username\npassword - your password\nIf you do not have a username and password, see HELLO.\nNote: due to the sensitive nature of this command, you must send the message\nto Q@CServe.quakenet.org when using it.\nNote: the preferred way to authenticate is to use the /AUTH command.\n");
chanservaddcommand("newpass", QCMD_SECURE | QCMD_AUTHED, 3, csa_donewpw, "Change your password.", "Usage: NEWPASS <oldpassword> <newpassword> <newpassword>\nChanges your account password. Your new password must be at least 6 characters\nlong, contain at least one number and one letter, and may not contain sequences\nof letters or numbers. Your new password will be sent to your registered email\naddress. Where:\noldpassword - your existing account password\nnewpassword - your desired new password. Must be entered the same both times.\nNote: due to the sensitive nature of this command, you must send the message to\nQ@CServe.quakenet.org when using it.\n");
chanservaddcommand("requestpassword", QCMD_NOTAUTHED, 1, csa_doreqpw, "Requests the current password by email.", "Usage: REQUESTPASSWORD <email>\nSends your current password to your registered email address, where:\nemail - your registered email address\n");
- chanservaddcommand("sendpassword", QCMD_OPER, 1, csa_dosendpw, "Sends the users current password by email.", "Usage: SENDPASSWORD <username>\nSends the password for the specified account to the specified users email address.\n");
+ chanservaddcommand("sendpassword", QCMD_HELPER, 1, csa_dosendpw, "Sends the users current password by email.", "Usage: SENDPASSWORD <username>\nSends the password for the specified account to the specified users email address.\n");
chanservaddcommand("setemail", QCMD_OPER, 2, csa_dosetmail, "Set the email address.", "");
chanservaddcommand("setpassword", QCMD_OPER, 2, csa_dosetpw, "Set a new password.", "");
}
CSetSuspended(rcp);
rcp->suspendreason = getsstring(cargv[1], 250);
rcp->suspendby = rup->ID;
+ rcp->suspendtime = time(NULL);
cs_log(sender,"SUSPENDCHAN %s (%s)",cip->name->content,rcp->suspendreason->content);
if(cip->channel)
chanservjoinchan(cip->channel);
chanindex *cip;
regchan *rcp;
int i;
- char *bywhom;
+ char *bywhom, buf[200];
unsigned int count=0;
-
+ struct tm *tmp;
if (!rup)
return CMD_ERROR;
bywhom="unknown";
}
count++;
- chanservsendmessage(sender, "%-30s %-15s %s", cip->name->content, bywhom, rcp->suspendreason->content);
+
+ tmp=gmtime(&(rcp->suspendtime));
+ strftime(buf,15,"%d/%m/%y %H:%M",tmp);
+
+ chanservsendmessage(sender, "%-30s %-15s %-15s %s", cip->name->content, bywhom, buf, rcp->suspendreason->content);
if (count >= 2000) {
chanservstdmessage(sender, QM_TOOMANYRESULTS, 2000, "channels");
return CMD_ERROR;
/* 126*/ "Found %u %s%s.",
/* 127*/ "Attention: Your Q account has been suspended. You are being disconnected.",
/* 128*/ "Username: Flags: Suspended: Email: Last user@host:",
- /* 129*/ "Username: Suspend type: Suspended by: Expires: Reason:",
- /* 130*/ "Channel: Suspended by: Reason:",
+ /* 129*/ "Username: Suspend type: Suspended by: Date suspended: Expires: Reason:",
+ /* 130*/ "Channel: Suspended by: Date suspended: Reason:",
/* 131*/ "You cannot request ownership of %s as there is a channel %s present.",
/* 132*/ "You have been granted ownership of %s.",
/* 133*/ "#: User: Authed: Disconnected: Reason:",
vrup->flags|=QUFLAG_SUSPENDED;
vrup->suspendby=rup->ID;
vrup->suspendexp=expires;
+ vrup->suspendtime=time(NULL);
vrup->suspendreason=getsstring(reason, strlen(reason)+1);
killtheusers(sender,vrup);
vrup->flags|=QUFLAG_SUSPENDED;
vrup->suspendby=rup->ID;
vrup->suspendexp=expires;
+ vrup->suspendtime=time(NULL);
vrup->suspendreason=getsstring(reason, strlen(reason)+1);
killtheusers(sender,vrup);
vrup->flags|=QUFLAG_SUSPENDED;
vrup->suspendby=rup->ID;
vrup->suspendexp=expires;
+ vrup->suspendtime=time(NULL);
vrup->suspendreason=getsstring(reason, strlen(reason)+1);
chanservwallmessage("%s (%s) %s %s (expires: %s)", sender->nick, rup->username, (gline)?((gline == 2)?"instantly glined":"delayed glined"):"suspended", vrup->username, expires?buf:"never");
int i;
unsigned int count=0;
struct tm *tmp;
- char buf[200];
+ char buf[200], buf2[200];
if (!rup)
return CMD_ERROR;
strftime(buf,15,"%d/%m/%y %H:%M",tmp);
}
+ tmp=gmtime(&(dbrup->suspendtime));
+ strftime(buf2,15,"%d/%m/%y %H:%M",tmp);
+
count++;
- chanservsendmessage(sender, "%-15s %-13s %-15s %-15s %s", dbrup->username, suspendtype, UHasOperPriv(rup)?(bywhom?bywhom:"unknown"):"not shown", (dbrup->suspendexp)?((time(0) >= dbrup->suspendexp)?"next auth":buf):"never", dbrup->suspendreason->content);
+ chanservsendmessage(sender, "%-15s %-13s %-15s %-15s %-15s %s", dbrup->username, suspendtype, UHasOperPriv(rup)?(bywhom?bywhom:"unknown"):"not shown", buf2, (dbrup->suspendexp)?((time(0) >= dbrup->suspendexp)?"next auth":buf):"never", dbrup->suspendreason->content);
if (count >= 2000) {
chanservstdmessage(sender, QM_TOOMANYRESULTS, 2000, "users");
return CMD_ERROR;