results = db.query_one? "select character_id, user_id, character_name, DATE_FORMAT(created, '%b:%d:%Y:%l:%i:%p') AS created, level, cc, equipped from rpg_characters where character_id = ? and user_id = ? ", char_id, client.user_id,
as: DB_Character
return client.send ERRORS["invalid_character_id_supplied"] if !results
player_stats = {level: results.level, user_id: client.user_id, acct_name: client.username, character_id: results.character_id, character_name: results.character_name}
client.send player_stats, "ENTERLOBBY"
# client send looks like this
def send(msg, cmd = "SERV")
msg_buffer = {cmd: cmd, message: msg}
new_message = msg_buffer.to_json
socket.write_bytes(new_message.bytesize)
socket.send new_message
end