1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 20:36:38 +02:00

Made os_sxline and os_akill use a stored value to curent time to prevent the off-chance of time changing while executing the function which can mess up our globops/log messages

This commit is contained in:
Adam
2011-08-23 19:29:59 -04:00
parent 783f77d367
commit fa833766a0
5 changed files with 11 additions and 10 deletions
+2 -2
View File
@@ -85,7 +85,7 @@ int do_akill(User * u)
if (!stricmp(cmd, "ADD")) {
int deleted = 0;
char *expiry, *mask, *reason;
time_t expires;
time_t expires, now = time(NULL);
mask = strtok(NULL, " ");
if (mask && *mask == '+') {
@@ -155,7 +155,7 @@ int do_akill(User * u)
if (!expires) {
strcpy(buf, "does not expire");
} else {
int wall_expiry = expires - time(NULL);
int wall_expiry = expires - now;
char *s = NULL;
if (wall_expiry >= 86400) {
+3 -3
View File
@@ -85,7 +85,7 @@ int do_sgline(User * u)
if (!stricmp(cmd, "ADD")) {
int deleted = 0;
char *expiry, *mask, *reason;
time_t expires;
time_t expires, now = time(NULL);
mask = strtok(NULL, ":");
if (mask && *mask == '+') {
@@ -110,7 +110,7 @@ int do_sgline(User * u)
notice_lang(s_OperServ, u, BAD_EXPIRY_TIME);
return MOD_CONT;
} else if (expires > 0) {
expires += time(NULL);
expires += now;
}
if (mask && (reason = strtok(NULL, ""))) {
@@ -142,7 +142,7 @@ int do_sgline(User * u)
if (!expires) {
strcpy(buf, "does not expire");
} else {
int wall_expiry = expires - time(NULL);
int wall_expiry = expires - now;
char *s = NULL;
if (wall_expiry >= 86400) {
+2 -2
View File
@@ -84,7 +84,7 @@ int do_sqline(User * u)
if (!stricmp(cmd, "ADD")) {
int deleted = 0;
char *expiry, *mask, *reason;
time_t expires;
time_t expires, now = time(NULL);
mask = strtok(NULL, " ");
if (mask && *mask == '+') {
@@ -137,7 +137,7 @@ int do_sqline(User * u)
if (!expires) {
strcpy(buf, "does not expire");
} else {
int wall_expiry = expires - time(NULL);
int wall_expiry = expires - now;
char *s = NULL;
if (wall_expiry >= 86400) {
+2 -2
View File
@@ -83,7 +83,7 @@ int do_szline(User * u)
if (!stricmp(cmd, "ADD")) {
int deleted = 0;
char *expiry, *mask, *reason;
time_t expires;
time_t expires, now = time(NULL);
mask = strtok(NULL, " ");
if (mask && *mask == '+') {
@@ -134,7 +134,7 @@ int do_szline(User * u)
if (!expires) {
strcpy(buf, "does not expire");
} else {
int wall_expiry = expires - time(NULL);
int wall_expiry = expires - now;
char *s = NULL;
if (wall_expiry >= 86400) {
+2 -1
View File
@@ -8,9 +8,10 @@ VERSION_MAJOR="1"
VERSION_MINOR="8"
VERSION_PATCH="7"
VERSION_EXTRA="-git"
VERSION_BUILD="3081"
VERSION_BUILD="3082"
# $Log$ # Changes since 1.8.6 Release
#Revision 3082 - Made os_sxline and os_akill use a stored value to curent time to prevent the off-chance of time changing while executing the function which can mess up our globops/log messages
#Revision 3081 - Added event to warn modules a nickcore gets a new display nick or is about to be dropped. (This should enable modules to more easily link their data to anopes core data.)
#Revision 3080 - Send DROP event when forbidding nicks and channels, if applicable.
#Revision 3079 - Bug #1318 - #1320 - Added support for Hybrid's +S and +O channel modes, and removed support for +a