From bc718af42e21112f168a114eb9840b54976f6179 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 11 Jun 2010 21:30:24 +0500 Subject: sessionmanager: Fixed a traceback on invalid usernames (typo in previous commit). --- core/sessionmanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua index db32a0bc..e1f1a802 100644 --- a/core/sessionmanager.lua +++ b/core/sessionmanager.lua @@ -111,7 +111,7 @@ end 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"; -- cgit v1.2.3