# HG changeset patch # User Waqas Hussain # Date 1276273824 -18000 # Node ID 5ea90ee96022b9c106e7e79b4a1d8b2ee99d45dc # Parent 362b94fa5a30245c7032234942e7191642706a6d sessionmanager: Fixed a traceback on invalid usernames (typo in previous commit). diff -r 362b94fa5a30 -r 5ea90ee96022 core/sessionmanager.lua --- a/core/sessionmanager.lua Fri Jun 11 21:01:17 2010 +0500 +++ b/core/sessionmanager.lua Fri Jun 11 21:30:24 2010 +0500 @@ -111,7 +111,7 @@ function make_authenticated(session, username) username = nodeprep(username); - if not username and #username > 0 then return nil, "Invalid username"; end + if not username or #username == 0 then return nil, "Invalid username"; end session.username = username; if session.type == "c2s_unauthed" then session.type = "c2s";