From: pk910 Date: Tue, 19 Jul 2011 21:22:40 +0000 (+0200) Subject: fixed P10_GLINE protocol violation (expiration has to be the relative time, not a... X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;ds=sidebyside;h=da8961e06d120c3bebd8d4155a091a87b52696dd;p=srvx.git fixed P10_GLINE protocol violation (expiration has to be the relative time, not a timestamp) --- diff --git a/src/proto-p10.c b/src/proto-p10.c index 29bf7ac..00a5165 100644 --- a/src/proto-p10.c +++ b/src/proto-p10.c @@ -702,12 +702,16 @@ irc_introduce(const char *passwd) void irc_gline(struct server *srv, struct gline *gline) { + // GL [!][+|-|>|<] [] [] [] [:] + //expiration = relative time (seconds) + //lastmod = timestamp + //livetime = timestamp if (gline->lastmod) - putsock("%s " P10_GLINE " %s +%s %lu %lu %lu :%s", - self->numeric, (srv ? srv->numeric : "*"), gline->target, gline->expires, gline->lastmod, gline->lifetime, gline->reason); + putsock("%s " P10_GLINE " %s +%s %lu %lu %lu :%s", self->numeric, (srv ? srv->numeric : "*"), + gline->target, gline->expires-now, gline->lastmod, gline->lifetime, gline->reason); else - putsock("%s " P10_GLINE " %s +%s %lu :%s", - self->numeric, (srv ? srv->numeric : "*"), gline->target, gline->expires, gline->reason); + putsock("%s " P10_GLINE " %s +%s %lu :%s", self->numeric, (srv ? srv->numeric : "*"), + gline->target, gline->expires-now, gline->reason); } void