KICK user only if he's really in the channel!
[srvx.git] / src / proto-p10.c
index 29bf7ac7f515cf2f8b14764c47901fdf07fbdb66..1e4702726fd9fcfe080c4f9a21beb34588056f24 100644 (file)
@@ -702,12 +702,16 @@ irc_introduce(const char *passwd)
 void
 irc_gline(struct server *srv, struct gline *gline)
 {
+    //<prefix> GL <target> [!][+|-|>|<]<mask> [<expiration>] [<lastmod>] [<lifetime>] [:<reason>]
+    //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
@@ -1773,9 +1777,11 @@ static CMD_FUNC(cmd_relay)
              } else {
                 devnull[0] = 0;
              }
+             /*
              if(!HANDLE_FLAGGED(hi, AUTOHIDE)) {
                 sprintf(tmp,"%s LA %s 0 %s\n",argv[3],hi->handle,devnull);
-             } else if(getfakehost(argv[4])) {
+             } else */ 
+             if(getfakehost(argv[4])) {
                 sprintf(tmp,"%s LA %s %s %s\n",argv[3],hi->handle,getfakehost(argv[4]),devnull);
              } else {
                 extern const char *hidden_host_suffix;