SAS_Storebror Posted July 28, 2018 Posted July 28, 2018 Hi folks, We've got an idiot a player on our server who should receive a temporary ban for constantly violating our server rules. However, as luck would have it, he's always online when I'm not, so I can't just hit the "ban" button on DServer right now. I thought I could find a config file somewhere on DServer that lists all banned players, but couldn't find anything so far. Test-banned myself, which works, but I somehow get the feeling like the bans are stored on Master Server only. Is this correct? Either case, these two questions come up for me: How do I ban someone who's currently not on my server? How do I dynamically adjust the ban timeout without having to restart the whole server (i.e. reload the SFS file)? Mike
coconut Posted July 28, 2018 Posted July 28, 2018 51 minutes ago, SAS_Storebror said: Either case, these two questions come up for me: How do I ban someone who's currently not on my server? How do I dynamically adjust the ban timeout without having to restart the whole server (i.e. reload the SFS file)? You need to use their player GUID, which you get via rcon I don't think you can. What I do is that I just automatically (using my SturmovikServerControl tool) re-ban players when they log in, until the date/time of end of ban for that player has been reached
SAS_Storebror Posted July 29, 2018 Author Posted July 29, 2018 Thanks for the feedback coconut. Banning a player by GUID (i.e. player ID, profile ID) or name doesn't seem to work when he's offline, status is always 9 = "unknown user". Doing this "on demand" will probably work, but is your SturmovikServerControl suitable for normal (non-dynamic campaign) dogfight servers as well? Mike
coconut Posted July 29, 2018 Posted July 29, 2018 (edited) 14 minutes ago, SAS_Storebror said: name doesn't seem to work when he's offline, status is always 9 = "unknown user". Right, now that you mention that it's possible I never tested that. I just expected it to work that way. 14 minutes ago, SAS_Storebror said: Doing this "on demand" will probably work, but is your SturmovikServerControl suitable for normal (non-dynamic campaign) dogfight servers as well? Yes, the campaign system is an optional plugin, SSC can run without it. Edited July 29, 2018 by coconut
SAS_Storebror Posted July 30, 2018 Author Posted July 30, 2018 Thanks again for your help coconut. I finally found time to get SturmovikServerControl up and running, looks quite promising. I would love to dive into the source code, however even as a professional .Net programmer myself, F# is all greek to me - I'm a C# type of guy you know Nevertheless, back to topic... Two things: I still can't seem to find a way to ban someone who's not online. Sure I have the buttons to ban someone for a day or a month if he's online, but what about banning someone just by his name or GUID? Tried to enter it in the search field but it yields no results. I understand that SturmovikServerControl consumes DServer's logfiles. IL2 Stats does the same. If I leave "LogDirectory" empty, will SturmovikServerControl leave logs completely untouched? Otherwise, if I leave "CompactedLogDirectory" and/or "ProcessedLogDirectory", will SturmovikServerControl at least leave the logfiles where they are? Mike
coconut Posted July 30, 2018 Posted July 30, 2018 1 there is a search field in the status page. You must be logged in for it to work 2 latest version has the log parsing removed, best to use that one. For older versions, leave these fields empty and that should leave the logs in place.
SAS_Storebror Posted July 30, 2018 Author Posted July 30, 2018 I guess "latest version" refers to 1.11.1.0 as of now, in that case I have it already. I have been logged in when I've searched for the name, however I guess that in order to be aware of that user, SturmovikServerControl must have "seen" him first, meaning that it must have been running while he's been online, correct? Mike
coconut Posted July 30, 2018 Posted July 30, 2018 Latest one is 1.15.0.0, with 1.16.0.0 coming out soon https://bitbucket.org/johdex/sturmovikservercontrol/downloads/SturmovikServerControl-30772a5f3103d5a7ba1ba2e2bfba3a2ad2b23732-23.zip Link above is a weekly build, somewhere in between 1.15 and 1.16 I grew tired of manually publishing builds after 1.11, and spent some time automating that, so now it should be easier to get up-to-date versions. Yes, SSC must have been running and connected to DServer when the player in question was online.
SAS_Storebror Posted July 30, 2018 Author Posted July 30, 2018 Eww... Immediately after installing that weekly build, I remembered why I'm so reluctant to install anything that hasn't got the "release" status yet. So, this is what I get after updating: 1st run starts like this: > SturmovikServerControl.exe 2018-07-30 13:20:28.6755|INFO|<StartupCode$SturmovikServerControl>.$SturmovikServerControl.Database|Updated database from 0 to 1 2018-07-30 13:20:28.7736|INFO|<StartupCode$SturmovikServerControl>.$SturmovikServerControl.Database|Updated database from 1 to 2 Failed to load symbols: C:\IL2\SturmovikServerControl\FsPickler.pdb 2018-07-30 13:20:31.5013|INFO|<StartupCode$SturmovikServerControl>.$Main|main: Listening on http://localhost:8083/ 2018-07-30 13:20:31.5013|INFO|<StartupCode$SturmovikServerControl>.$Main|main: Ban checker started looks fine to me. Ctrl+C and restart gets me this: > SturmovikServerControl.exe 2018-07-30 13:22:46.8798|ERROR|<StartupCode$SturmovikServerControl>.$SturmovikServerControl.Database|Exception while trying to update database: The file 'sscontrol-v0-1.sdf' already exists. Unhandled Exception: System.Exception: Failed to update database ---> System.IO.IOException: The file 'sscontrol-v0-1.sdf' already exists. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost) at SturmovikServerControl.Database.work@91-12(Entities ctx, Int32 v) in D:\a\1\s\SturmovikServerControl\Database.fs:line 103 --- End of inner exception stack trace --- at SturmovikServerControl.Database.work@91-12(Entities ctx, Int32 v) in D:\a\1\s\SturmovikServerControl\Database.fs:line 115 at SturmovikServerControl.Database.upgradeDb() in D:\a\1\s\SturmovikServerControl\Database.fs:line 116 at <StartupCode$SturmovikServerControl>.$Main.main@() in D:\a\1\s\SturmovikServerControl\Main.fs:line 288 Okay... so the program update it's database, but didn't remember doing so already. I've removed "sscontrol.sdf" and "sscontrol-v0-1.sdf" and now SturmovikServerControl starts again, however the web interface looks completely different and I've got no idea what to do with it anymore. Please see the attached image for the user interface... no SPS visible anymore, no status, and nothing to login to (entering the password into the right field alone doesn't work).
SAS_Storebror Posted July 30, 2018 Author Posted July 30, 2018 Think I figured it out myself. For some reason, per default you get redirected to the "Players' site", but with no trace how to get elsewhere. After looking at the sourcecode, I've added "/loging" to the url and got to the Admin login. Ever since then, the "Players' site" has a blue "Admin" link on top, but I cannot logout anymore... Well then, at least I have my old status page back Mike
coconut Posted July 30, 2018 Posted July 30, 2018 Sorry for then inconvenience, glad you figured it out. I'll try to polish those rough corners.
SAS_Storebror Posted July 30, 2018 Author Posted July 30, 2018 No problem coconut, I appreciate that tool very much! It's a work in progress and a bit tough to get used to in the beginning, but it does it's job quite well. The ban worked perfectly fine after the regarding player came online. I only wish it would be possible to set custom ban times, but that's no biggie. Editing the sdf file is not that hard to do Cheers for the great tool! Mike
Alonzo Posted April 30, 2019 Posted April 30, 2019 Hello @coconut and @SAS_Storebror - I also have an idiot that I need to ban, but they are no longer connected to the server. SSC I believe recorded their GUID. The button in the SSC web console doesn't seem to do anything, and if I try to manually ban via rcon that also doesn't seem to work. Forgive me for being very dim, but let's say I just know the player's GUID. Can I ban them via the plain old remote console? Or any other way?
SAS_Storebror Posted April 30, 2019 Author Posted April 30, 2019 (edited) This is what I did: Download a viewer/editor for Microsoft SQL Server Compact databases, e.g. CompactView Run your SQL Compact editor (I'll just call it "CompactView" now) and open up the "sscontrol.sdf" database file in your Sturmovik Server Control folder. Switch CompactView to "Allow Editing" mode in the upper left corner. Open up the "PlayerNames" table to find the ID of the player you want to ban (not the GUID, here you need Sturmovik Server Control's internal ID which is just a counter) Open up the "Bans" table and add an entry accordingly, where "ID" is just a counter, "PlayerGuid" is the "ID" from the "PlayerNames" table, "Expiration" is any given expiration date for the ban, and "Comment" is any comment of your choice for the ban: Mike Edited April 30, 2019 by SAS_Storebror screenshot edit 1
coconut Posted May 1, 2019 Posted May 1, 2019 (edited) On 4/30/2019 at 5:43 AM, Alonzo said: Hello @coconut and @SAS_Storebror - I also have an idiot that I need to ban, but they are no longer connected to the server. SSC I believe recorded their GUID. The button in the SSC web console doesn't seem to do anything, and if I try to manually ban via rcon that also doesn't seem to work. Forgive me for being very dim, but let's say I just know the player's GUID. Can I ban them via the plain old remote console? Or any other way? Go to the login page, enter the admin password Go to the status page. There's a player search function, which uses the player's name or their GUID. Fill in the relevant input field, click search If the player is found, there should be a number of ban buttons. If this is a really undesirable troll, I suggest "ban century" There will be no feedback in the UI, which I now realize is confusing, but it should work nevertheless Next time this player joins, they'll be in for at most one minute, at which point the polling procedure will notice them and ban kick them. This advice was for version 1.19.1.0 of the controller Edited May 1, 2019 by coconut 1
616Sqn_SpocksOddSocks Posted August 2, 2019 Posted August 2, 2019 (edited) On 4/30/2019 at 6:42 AM, SAS_Storebror said: This is what I did: Download a viewer/editor for Microsoft SQL Server Compact databases, e.g. CompactView Run your SQL Compact editor (I'll just call it "CompactView" now) and open up the "sscontrol.sdf" database file in your Sturmovik Server Control folder. Switch CompactView to "Allow Editing" mode in the upper left corner. Open up the "PlayerNames" table to find the ID of the player you want to ban (not the GUID, here you need Sturmovik Server Control's internal ID which is just a counter) Open up the "Bans" table and add an entry accordingly, where "ID" is just a counter, "PlayerGuid" is the "ID" from the "PlayerNames" table, "Expiration" is any given expiration date for the ban, and "Comment" is any comment of your choice for the ban: Mike Very helpful information, not just for amending a ban, but for being able to check it's in place as well. However, just from checking, it appears that the PlayerGuid is actually the ID from the PlayerGuid table, but doesn't necessarily match the id number on the PlayerName table. Just thought that might be helpful for any one else stumbling across this. I'm not certain where the player name table added someone that isn't on the Guid table, but it seems to have. I don't think it's stopping this from working though, but it might be best not to add one based on the PlayerName table manually, thinking that the IDs on both tables match. Edited August 2, 2019 by SpocksOddSocks Additional info
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now