DAK Server Admin Mod

18911131427

Comments

  • ZEROibisZEROibis Join Date: 2009-10-30 Member: 69176Members, Constellation Posts: 992 Fully active user
    QUOTE (xDragon @ Jan 4 2013, 01:57 PM) »
    Updated the github and workshop builds, now admin commands will work from other mods (and work with the expanded serveradmin system from DAK like admins queried from the web).

    Min and Max players can be defined per map in mapcycle, see below example:
    CODE
    { "map": "ns2_co_Core", "mods": [ "57f5f9a" ], "minPlayers": 5, "maxPlayers": 10 }


    I also setup most of the code for the shared bans system, and also fixed a couple logic issues with how queries are cached/merged in with standard systems. As a note, on temporary bans will the system automatically expire them? Or should DAK also trigger an 'unban' update to the DB when that case is encountered?


    I think it should look at the ban list and the remote server should be handling the ban length and expiration. On a related note I hope to begin work on the sourcebans bridge to allow for DAK to post to that database structure within the next week. I will try to make it match up identical or as close as possible to the existing remote script so that sourcebans connectivity can be integrated into DAK as well.
    image
    Server IP: NS2.IBISGaming.com
    Server IP: NS2CO.IBISGaming.com
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members Posts: 197
    QUOTE (xDragon @ Jan 4 2013, 06:57 PM) »
    Updated the github and workshop builds, now admin commands will work from other mods (and work with the expanded serveradmin system from DAK like admins queried from the web).

    Min and Max players can be defined per map in mapcycle, see below example:
    CODE
    { "map": "ns2_co_Core", "mods": [ "57f5f9a" ], "minPlayers": 5, "maxPlayers": 10 }


    I also setup most of the code for the shared bans system, and also fixed a couple logic issues with how queries are cached/merged in with standard systems. As a note, on temporary bans will the system automatically expire them? Or should DAK also trigger an 'unban' update to the DB when that case is encountered?


    The php script checks for expired bans every time it's called, DAK doesn't have to do anything. I'm making good progress on it, i'm hoping to have it finished (or at least in a usable beta) by the end of this weekend.

    By the way, i'm not quite understanding what you mean by this:

    QUOTE (xDragon @ Jan 2 2013, 01:59 AM) »
    Regarding multiple groups, that is doable but i may just be easier to setup the generate page to mirror the file then, for an example look at the server's web admin page without index.htm at the end - IE YOURSERVERADDRESS:8080 - see below as an example. Then I can just read this just like the admin files and it allows for greater flexibility/more consistency.

    CODE
    { "map": "ns2_veil", "cheats": "false", "marines": 0, "aliens": 0, "player_list": [  ], "frame_rate": 29.999166488647, "devmode": "false", "marine_res": 100, "uptime": 1916, "server_name": "NS2:C Classic Mod #1 [MODDED]", "alien_res": 0, "webport": "8080", "players_online": 0, "webdomain": "ns2cmod.com" }
    NG | TechnIckS image
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow Posts: 1,954 Fully active user
    Basically the ServerAdmin query (and bans query) could be setup to read from a page that is pre-formatted to match a valid json file, where there is no html.

    I made an example, you can see it at http://ns2cmod.com/ns2admin2.html

    However for the interim I also made it so you can just separate the groups with \, and it will treat them as separate groups.

    You can see an example of that at http://ns2cmod.com/ns2admin.html
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members Posts: 197
    edited January 2013
    Oh yeah, i can EASILY generate that, that's cake. I understand now, you were talking about the format only lol! Ok i feel dumb :)

    By the way, i got it to assign a player to multiple groups by just emulating the syntax by force. Take a look:

    CODE
    <div id="username"> TechnIckS </div> <div id="steamid"> 5922566 </div> <div id="group"> tech", "skull </div> <br>


    Off course, if it accepts standard json formatting that would be even easier!

    Edit: The code above (tested a few days ago) WILL THROW ERRORS if the group is empty - i.e. when you use Player Badges and define a group called "skull" for example with no arguments as instructed here by Huze: http://i.imgur.com/ROrC8.png

    See my next post (typing it now) for more issues i found with DAK - badges incompatibility.
    NG | TechnIckS image
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members Posts: 197
    edited January 2013
    So now i have another issue - i'm trying to get badges to work (Player Badges plugin) with the web-generated file.

    Here's the catch - other than the error above (where i simply add some non-admin commands to the list to avoid - so this isn't a critical fix yet as it can be worked around) - i am having issues with Player Badges plugin recognizing admins and groups whenever they are pulled from a web query.
    If i define admins locally, both DAK and Player Badges work fine. And really i'm not sure where to begin looking.

    I *think* this is what's going on, but i could be wrong:

    1. Server initializes - Reads ServerAdmin.json file.
    2. Player Badges and DAK initialize - Player Badges sees the admin list as blank.
    3. Client connects - DAK checks online list and updates ServerAdmin.json.
    4. Player Badges checks to see if player needs to have a badge, but it does NOT re-read the admins, uses the initial reading.

    Or something along this line.

    So - is it possible to get DAK to read the admins immediately and add them on server start/map change as well, not just when a player connects? I think this is how it works now where it checks just when a player connects, but i could be wrong.

    Or maybe someone has a better idea :)
    NG | TechnIckS image
  • Florp_IncarnateFlorp_Incarnate Join Date: 2002-11-01 Member: 3045Members Posts: 67 Fully active user
    edited January 2013
    Hello, I have a question about the ReservedSlots plugin.

    1) The server is sometimes being locked at 17/19, when it ought to only be locked at 18/19 to allow password-holding players to join.
    2) The server is sometimes full at 19/19 for minutes at a time, when a player ought to have been kicked to bring it down to 18/19.

    I am wondering if the 'delay' variables are involved here. What time measurement are they using? If I am using the number 1, does that mean it should wait for a minute before kicking or locking? What is the point of a delay? If it is not mandatory I'll change it to 0 and be done with it.

    For background, my settings are currently:

    CODE
        "ReservedSlots": {
          "kReserveSlotServerFullDisconnectReason": "Server is full. Visit OldF.NET to get a reserved slot!",
          "kReservedSlots": 1,
          "kMaximumSlots": 19,
          "kMinimumSlots": 1,
          "kDelayedSyncTime": 1,
          "kReserveSlotServerFull": "Server is full - You must have a reserved slot to connect. Visit OldF.NET to get one!",
          "kReserveSlotKickedForRoom": "**You're being kicked due to a reserved slot, this is automatically determined**",
          "kReservePassword": "****",
          "kDelayedKickTime": 1,
          "kReserveSlotKickedDisconnectReason": "Kicked due to a reserved slot. Visit OldF.NET to get a reserved one!"
        },


    Thanks for your time!
    [OldF] Florp Incarnate
    old fogies
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members Posts: 197
    +1 @ above, i'm seeing the same thing but never asked about it.
    NG | TechnIckS image
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow Posts: 1,954 Fully active user
    edited January 2013
    Yea the delay variables are in seconds, and were used to keep the cached lists in Sync. There used to be alot of issues with the playerlist reporting fake players, and also having disconnected players stick around for long periods of time. I did some testing recently, and it seems to overall be more accurate using the playerlist from the engine now, as the cached list also has a tendency to be inaccurate (mainly because disconnected clients have already been partly destroyed so you no longer have access to their steamID). The new version of the reserveslot plugin doesnt cache the playerlist anymore, and also I have fixed a couple issues that could have been causing the password to remain set even when it shouldnt have (there is still the possibility for issues, I still dont believe every client disconnect actually triggers the disconnect event).

    You will want to leave the delays at their defaults most likely, going forward they will be used to check if the password should be set by that many seconds after clients connect/disconnect. It may actually benefit from increased delays (~5) seconds.

    As for the server reporting its full (19/19 or w.e), that generally stems from the fact that once a new player connects, they occupy that slot. If it takes them a long time to load (2+ minutes is easily possible), the server will remain at 19/19. You can offset that by increasing the minimum slots to 2, but obviously that lowers your available slots.

    Regarding the Badges mod, it actually reads the ServerAdmin.json file directly, and DAK doesnt update that with the admins pulled from the web. It stores those admins in a separate file to make sure any locally defined admins always have their rights, and so it knows who to remove when it updates from the web. I could make it use the single file but then there wouldnt be any locally defined admins.
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members Posts: 197
    Must... find... workaround... :D
    NG | TechnIckS image
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow Posts: 1,954 Fully active user
    Well i made a plugin to modify the badges mod to work with the DAKAdmin list. You will still need to have the badges mod installed like normal, and then just enabling the 'badges' plugin should hopefully make it work.... I cant test it as I cannot see my own icon :<

    I updated github with this version, but as a slight warning it contains quite a few other changes to the entire event system, so while I tested alot of things to make sure it all survived, I cannot be that sure as I do not have the resources to test as thoroughly anymore.
  • SeeVeeSeeVee Join Date: 2012-10-31 Member: 165206Members Posts: 425 Advanced user
    I do not see LoadFromServerLUA in the DAKconfig.json Have you removed that feature (loading from the server.lua)?
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow Posts: 1,954 Fully active user
    I removed that config option, but DAK automatically determines if Server.lua was loaded before it (it looks for a variable from Globals.lua). So the feature works as before, just now it requires no config changes.
  • SeeVeeSeeVee Join Date: 2012-10-31 Member: 165206Members Posts: 425 Advanced user
    Nice, thanks!
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members Posts: 197
    edited January 2013
    QUOTE (xDragon @ Jan 8 2013, 03:34 AM) »
    Well i made a plugin to modify the badges mod to work with the DAKAdmin list. You will still need to have the badges mod installed like normal, and then just enabling the 'badges' plugin should hopefully make it work.... I cant test it as I cannot see my own icon :<

    I updated github with this version, but as a slight warning it contains quite a few other changes to the entire event system, so while I tested alot of things to make sure it all survived, I cannot be that sure as I do not have the resources to test as thoroughly anymore.


    Sweet, i'll test it ASAP!!!!

    <3

    By the way, why can't you see your own icon??
    NG | TechnIckS image
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members Posts: 197
    edited January 2013
    Ignore post, i made a booboo.
    Post edited by Unknown User on
    NG | TechnIckS image
  • Silent262Silent262 Join Date: 2012-09-21 Member: 160267Members Posts: 51
    CODE
    "ReservedSlots": {
          "kReserveSlotServerFullDisconnectReason": "Server is full.",
          "kReservedSlots": 2,
          "kReserveSlotKickedDisconnectReason": "Kicked due to a reserved slot.",
          "kMaximumSlots": 20,
          "kDelayedSyncTime": 3,
          "kReserveSlotKickedForRoom": "**You're being kicked due to a reserved slot, this is automatically determined**",
          "kReserveSlotServerFull": "Server is full - You must have a reserved slot to connect.",
          "kReservePassword": "TPNewReserve",
          "kDelayedKickTime": 2,
          "kMinimumSlots": 1
        },


    So, my server is trying to maintain 17 players online and not allowing an 18th as I would expect it to. Am I missing something?
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow Posts: 1,954 Fully active user
    It will subtract the kMinimumSlots and the kReservedSlots from the Maximum players. There always needs to be atleast 1 Slot Minimum to allow new connections, with the kReservedSlots allowing you to define how many extra slots are held for potential reserve slot players, so that they can join existing games and no one needs to be kicked.

    Let me know if that clears it up, its kinda confusing :<
  • FuhrerDarqueSydeFuhrerDarqueSyde Join Date: 2004-10-04 Member: 32076Members, Constellation Posts: 100 Advanced user
    plugin_enhancedlogging.lua:

    if setting a time offset such as -6, a situation seems to occur where for example gmt time is 02:11 and the code will make Hours variable = Hours + DST + Offset which essentially does 02 + 0 + -6 and does not adjust for negative values so my hours portion seems to equal -4 rather than 20.

    Solution would be if Hours < 0 then Hours = Hours + 24 but there would also need to be adjustments for going back to the previous day (feb 1st would be january 31st then, etc).

    Just an observation. :)
    Gorge gone wild!
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow Posts: 1,954 Fully active user
    Hmmm yea I dont think it did any provisioning for that, should be an easy fix.
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members Posts: 197
    Minor issue: I have kPregameLength set to 30, since last update it starts after 15 sec. I do have ns2stats installed as well, not sure if this is part of the issue (i haven't updated the other servers yet, been busy programming).

    It starts the count, displays game start time from 30, 25, 20, then game starts.
    NG | TechnIckS image
  • Florp_IncarnateFlorp_Incarnate Join Date: 2002-11-01 Member: 3045Members Posts: 67 Fully active user
    New discovered issue: When doing a map vote, when the vote to extend the current map wins, the next map in the cycle still loads. Any thoughts on this?
    [OldF] Florp Incarnate
    old fogies
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow Posts: 1,954 Fully active user
    That was a glitch with a previous version of the mapvote plugin which should be fixed now.

    I also just updated the github build to fix the issues with events not blocking correctly, and added some language related options.
  • whocareswhowhocareswho Join Date: 2012-07-13 Member: 154104Members Posts: 10
    Rockthevote/Mapvote seems to disable all plugins on our server once the map changes, and then we cannot get the plugins to reload unless we restart the entire server.
    When the map changes automatically, the plugins still load fine. When we use sv_changemap, again the plugins still work. Only breaks when rockthevote is used. Any help would be appreciated!

    From our DAKConfig File
    QUOTE
    "MapVote": {
    "kVoteMapRockTheVote": "%s rock'd the vote. (%s votes, needed %s).",
    "kRTVMinimumPercentage": 50,
    "kMapsToSelect": 7,
    "kPregameLength": 15,
    "kDontRepeatFor": 4,
    "kVoteChatCommands": [ "vote" ],
    "kVoteMapExtended": "****** Voting has ended, extending current map for %s minutes. ",
    "kVoteMapNoWinner": "****** Voting has ended, no map won. ",
    "kVoteMapStarted": "******* Map vote has begun. (%s%% votes needed to win) ******",
    "kVoteStartDelay": 8,
    "kVoteMapBeginning": "****** Map vote will begin in %s seconds. ******",
    "kTimeleftChatCommands": [ "timeleft" ],
    "kVoteMapMapListing": "****** vote %s for %s ",
    "kVoteMapWinner": "****** Voting has ended, %s won with %s votes. ",
    "kVoteMinimumPercentage": 25,
    "kExtendDuration": 15,
    "kVoteMapTie": "****** Voting has ended with a tie, A new vote will start in %s seconds ******",
    "kVoteMapInsufficientMaps": "****** Not enough maps for a vote. ******",
    "kVoteMapCurrentMapVotes": "****** %s votes for %s (to vote, type vote %s) ******",
    "kVoteNotifyDelay": 6,
    "kVotingDuration": 30,
    "kVoteMapCancelled": "****** Map vote has been cancelled. ******",
    "kVoteMapHowToVote": "****** You can vote for the map you want by typing vote # ******",
    "kVoteMapAutomaticChange": "****** Advancing to next map in mapcycle. ",
    "kRockTheVoteChatCommands": [ "rtv", "rockthevote" ],
    "kVoteChangeDelay": 4,
    "kPregameNotifyDelay": 5,
    "kPregameNotification": "****** %.1f seconds remaing before game begins! ******",
    "kRoundEndDelay": 2,
    "kVoteMapMinimumNotMet": "******%s had the most votes with %s, but the minimum required is %s.******",
    "kMaximumExtends": 3,
    "kVoteMapTimeLeft": "****** %.1f seconds are left to vote ******"
    },


    Are we missing something? Or is this a known bug and is there a work around?
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow Posts: 1,954 Fully active user
    It uses the same function to build the mods list and change the map regardless of how the map is changed, so im not sure how this would happen... Can you post your mapcycle.json?
  • whocareswhowhocareswho Join Date: 2012-07-13 Member: 154104Members Posts: 10
    Yeah, we noticed now that on mapchange we are having a problem.

    Here's the mapcycle.json

    QUOTE
    {
    "mods": [ "5f4f178" "m5fd7a38" ],
    "mode": "random",
    "time": 30,
    "maps": [ { "map": "ns2_mineshaft", "mods": [ ] },
    { "map": "ns2_tram", "mods": [ ] },
    { "map": "ns2_docking", "mods": [ ] },
    { "map": "ns2_summit", "mods": [ ] },
    { "map": "ns2_veil", "mods": [ ] },
    { "map": "ns2_refinery", "mods": [ ] },
    { "map": "ns2_chuteout", "mods": [ ] }
    ],
    }
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow Posts: 1,954 Fully active user
    I think your issue in in the mapcycle there, you would want the initial mods line to look more like

    "mods": [ "5f4f178", "5fd7a38" ],

    You had an m in front of the second modId, and no comma seperating them.
  • whocareswhowhocareswho Join Date: 2012-07-13 Member: 154104Members Posts: 10
    That worked, thanks!
  • SeeVeeSeeVee Join Date: 2012-10-31 Member: 165206Members Posts: 425 Advanced user
    xDragon,

    I have changed the MOTD in the config_motd to the following,

    CODE
    kDAKRevisions["MOTD"] = 1.8
    local function SetupDefaultConfig(Save)
        local MOTDTable = { }
        table.insert(MOTDTable, "********************************************************************")
        table.insert(MOTDTable, "* Commands: These can be entered via chat or the console (~)        ")
        table.insert(MOTDTable, "* rtv: To initiate a map vote aka Rock The Vote                     ")
        table.insert(MOTDTable, "* surrender: To initiate or vote in a surrender vote for your team. ")
        table.insert(MOTDTable, "* acceptmotd: To accept and suppress this message                   ")
        table.insert(MOTDTable, "* stuck: To have your player teleported to be unstuck.              ")
        table.insert(MOTDTable, "********************************************************************")


    and it appears in my DAKConfig as the following,

    CODE
          "kMOTDMessage": [ "********************************************************************", "* Commands: These can be entered via chat or the console (~)        ", "* rtv: To initiate a map vote aka Rock The Vote                     ", "* surrender: To initiate or vote in a surrender vote for your team. ", "* acceptmotd: To accept and suppress this message                   ", "* stuck: To have your player teleported to be unstuck.              ", "********************************************************************" ],


    and my plugin list is as follows,

    CODE
    "kPluginsList": [ "afkkick", "baseadmincommands", "mapvote", "motd", "unstuck", "automapcycle", "votesurrender" ]
        },



    When I join the server the MOTD is the default as you made it. If you look at my adjustments, I deleted the lines in the config_motd regarding the timeleft and voterandom. No matter what I do the MOTD will not change. Am I missing something?
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow Posts: 1,954 Fully active user
    If your using the newest version published on GitHub, it uses language based files now. If you look in the lang folder you should see one I created for EN. You would want to edit any messages there now.

    There isnt much documentation on this yet because I just implemented in (lastnight).
  • Florp_IncarnateFlorp_Incarnate Join Date: 2002-11-01 Member: 3045Members Posts: 67 Fully active user
    edited January 2013
    Thanks for the Support, xDragon.

    QUOTE (xDragon @ Jan 10 2013, 09:49 AM) »
    That was a glitch with a previous version of the mapvote plugin which should be fixed now.

    I also just updated the github build to fix the issues with events not blocking correctly, and added some language related options.


    The last time I upgraded it took a long time to re-generate a default dakconfig and re-configure it. Am I safe to simply update the DAK files in the /lua folder and leave my config files as-is?
    [OldF] Florp Incarnate
    old fogies
Sign In or Register to comment.