51 for k in pairs(session) do |
51 for k in pairs(session) do |
52 if k ~= "trace" then |
52 if k ~= "trace" then |
53 session[k] = nil; |
53 session[k] = nil; |
54 end |
54 end |
55 end |
55 end |
56 end |
|
57 |
|
58 function send_to_session(session, data) |
|
59 log("debug", "Sending: %s", tostring(data)); |
|
60 session.conn.write(tostring(data)); |
|
61 end |
56 end |
62 |
57 |
63 function make_authenticated(session, username) |
58 function make_authenticated(session, username) |
64 session.username = username; |
59 session.username = username; |
65 if session.type == "c2s_unauthed" then |
60 if session.type == "c2s_unauthed" then |