]> jfr.im git - irc/freenode/syn.git/commitdiff
If we abort gateway checking because a user caused a kline to be added, then skip...
authorStephen Bennett <redacted>
Sat, 22 Aug 2009 21:19:23 +0000 (22:19 +0100)
committerStephen Bennett <redacted>
Sat, 22 Aug 2009 21:19:23 +0000 (22:19 +0100)
gateways.c

index 2ce7a229f075c0d2b7edebb6e4c9aad62076f7ae..c85bb7f614e5daa9541eac011d6d040ab04daf3b 100644 (file)
@@ -80,7 +80,13 @@ static void gateway_newuser(hook_user_nick_t *data)
         // If a kline was added by this, then we got called again and have already killed the user if we should.
         // Don't do any more.
         if (d.added)
+        {
+            // On the off-chance that a kline was added that doesn't in fact kill this user, this will cause
+            // subsequent checks (facilities etc) to be skipped. That's better than crashing or running amok
+            // because we tried to gateway-cloak an already-dead user, though.
+            data.u = NULL;
             return;
+        }
     }
 
     char gecos[GECOSLEN];