def restart_map(): 
    response.flash = T('Restart Map')
    try: 
        rcon.rcon("restart")
    except:
        return dict(message="rcon failed. check the server setup")
    
    return dict(message="Map restarted")
def status(): 
    response.flash = T('Server Status')
    try:
        status = rcon.rcon("status")
    except:
        return dict(message="rcon failed. check the server setup")

    return dict(message=status)
def console():
    response.flash = T('Server Console')
    if session.log == None:
        session.log = ""
        
    max_log_size = 16384
    if request.vars.command:
        session.log = "" or rcon.rcon(request.vars.command) + "\n-----------\n" + session.log
        if len(session.log) > max_log_size:
            session.log = session.log[0:max_log_size]
        
    return dict()