From a33ccbbe4280439e0bf26580962aa0206e84648f Mon Sep 17 00:00:00 2001 From: ac_stef Date: Thu, 6 Aug 2009 13:08:19 +0000 Subject: [PATCH] fix match mode reconnect git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4604 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/src/server.cpp b/source/src/server.cpp index b318d954..11146d49 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -285,7 +285,7 @@ savedscore *findscore(client &c, bool insert) loopv(clients) { client &o = *clients[i]; - if(o.type!=ST_TCPIP) continue; + if(o.type!=ST_TCPIP || !o.isauthed) continue; if(o.clientnum!=c.clientnum && o.peer->address.host==c.peer->address.host && !strcmp(o.name, c.name)) { static savedscore curscore; @@ -2204,7 +2204,7 @@ void process(ENetPacket *packet, int sender, int chan) cl->isauthed = true; logline(ACLOG_INFO, "[%s] %s logged in (reconnect to match)%s", cl->hostname, cl->name, tags); } - if(wl == NWL_IPFAIL || wl == NWL_PWDFAIL) + else if(wl == NWL_IPFAIL || wl == NWL_PWDFAIL) { // nickname matches whitelist, but IP is not in the required range or PWD doesn't match logline(ACLOG_INFO, "[%s] '%s' matches nickname whitelist: wrong %s%s", cl->hostname, cl->name, wl == NWL_IPFAIL ? "IP" : "PWD", tags); disconnect_client(sender, DISC_BADNICK);