Author Topic: ServerMode (recode) error  (Read 1312 times)

0 Members and 1 Guest are viewing this topic.

Offline Tomzen

  • Full Member
  • ***
  • Posts: 115
  • Karma: -1
  • A new lua adventurer
    • Thirdage Gaming
ServerMode (recode) error
« on: May 09, 2015, 11:22:40 AM »
Sup, I didn't like my servermode so I decided to recode it... and well, I goofed and now my server is <majorly broken> until the staff come online hahah :P

So... SOURCE:

Code: [Select]
function ulx.mode( calling_ply, mode )
   
    if mode == "m" or mode == "main" or mode == "maintenance" then
        if not ULib.fileExists( "cfg/maintenance.cfg" ) then
            ULib.tsayError( calling_ply, "Maintenance config not found.", true )
                return
            end
        ulx.fancyLogAdmin( calling_ply, true, "#A changed the server to maintenance mode!" )
        ULib.execFile( "cfg/maintenance.cfg" )
    return
end

    if mode == "p" or mode == "play" then
            if not ULib.fileExists( "cfg/server.cfg" ) then
                ULib.tsayError( calling_ply, "Server config not found.", true )
                return
            end
        ulx.fancyLogAdmin( calling_ply, true, "#A changed the server to default mode!" )
        ULib.execFile( "cfg/server.cfg" )
        return
    end
   
    modes = { "p", "play", "m", "main", "mode" }
    found = false
   
    for _, v in ipairs(modes) do
        if v == mode then
            found = true
            break
        end
    end

if not found then
        ULib.tsayError( calling_ply, "Mode/config not found, sorry!", true )
        ulx.fancyLogAdmin( calling_ply, true, "#A attempted to change the server mode..." )
end end

local mode = ulx.command( "Custom", "ulx mode", ulx.mode, "!mode" )
mode:addParam{ type=ULib.cmds.StringArg, hint="mode" }
mode:addParam{ type=ULib.cmds.BoolArg, invisible=true }
mode:defaultAccess( ULib.ACCESS_SUPERADMIN )
mode:help( "Change the server mode!" )

And well, when I ran !mode m, the server basically got stuck on trying to set the password, and did it like 100 times a second and failed every time..? lol

cfg:

Code: [Select]
log on

hostname "[AU] ThirdageGaming | Maintenence Mode"
sv_password "#####"
rcon_password "#####"
sv_region 255
sv_lan 0
sv_logbans 0
sv_logecho 0
sv_logfile 1
sv_log_onefile 0
sv_noclipspeed 5
sv_noclipaccelerate 5
sv_downloadurl         "http://bris-02.wombatserve.rs/fastdl/#####/4446/"
sv_alltalk              3
net_maxfilesize 30
mp_show_voice_icons     0
utime_welcome 0

sv_minrate 0
sv_maxrate 20000
decalfrequency 10
sv_maxupdaterate 128
sv_minupdaterate 10

// execute ban files
exec banned_ip.cfg
exec banned_user.cfg

mp_restart_game 1

If I could access control panel I would take a screenshot or display the exact error.

UPDATE: its back now

Code: [Select]
Warning: Skipping command sv_password "####"
Basically that a trillion times over.

JamminR Edit - Don't use profanity please, we try to keep it all ages parental approved.
« Last Edit: May 09, 2015, 03:07:26 PM by JamminR »
Finished:
Impersonate
<==> FakePromote/Demote <==> RandomMap <==> ForceMic <==> Search <==> PlayMenu <==
WIP:
ServerMode <==

Offline Tomzen

  • Full Member
  • ***
  • Posts: 115
  • Karma: -1
  • A new lua adventurer
    • Thirdage Gaming
Re: ServerMode (recode) error
« Reply #1 on: May 09, 2015, 07:34:54 PM »
Bump -.-
Finished:
Impersonate
<==> FakePromote/Demote <==> RandomMap <==> ForceMic <==> Search <==> PlayMenu <==
WIP:
ServerMode <==