From 2e1cc95b0a1dc2747396c76085d3dac290bd2cf1 Mon Sep 17 00:00:00 2001 From: stpohle Date: Wed, 26 May 2004 22:42:11 +0000 Subject: [PATCH] Passwort protection wasn't working right.. fixed it. --- src/packets.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/packets.c b/src/packets.c index 4ab01ba..0c458c5 100644 --- a/src/packets.c +++ b/src/packets.c @@ -111,8 +111,10 @@ do_joingame (struct pkg_joingame *p_jg, _net_addr * addr) send_error (addr, text); return; } + /* 3) check if we have a password */ - if (bman.passwordenabled && !strncmp (bman.password, p_jg->password, LEN_PASSWORD)) { + d_printf ("Password Check Server:\"%s\" Client:\"%s\" %d, %d\n", bman.password, p_jg->password, strlen (bman.password), strlen (p_jg->password)); + if (bman.passwordenabled && (strncmp (bman.password, p_jg->password, LEN_PASSWORD) || strlen (bman.password) != strlen (p_jg->password))) { send_error (addr, "This game is Password protected. Your Password is wrong."); return; }