Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[NEED HELP] Locked down Xonotic build for use in schools?

#1
Question 
Good Morning

I have 20 schools that are looking to do some internal (All schools are VPN'd together) multiplayer gaming.  Xonotic looks like a good fit, and as I've spent far too much of my youth playing Q1 - Q3, I've been assigned the task of making this work.

My current plan is to investigate the feasibility of the following;
  1. In game chat to either be logged centrally, or disabled.
  2. The ability to host a game server to be disabled.  I assume this would also need the in game console to be restricted?
  3. The user's display name to be set to their Windows login username.
  4. The ability to change their display name to be disabled.
  5. Internal recording of multiplayer game stats (kills/deaths, flag captures, total damage, total playtime etc.)

It has been a very long time since I did anything with PAK files, but would I be right in assuming that some of these restrictions could be made without needing to edit the original game files, and instead just deploying an additional PAK?

For setting the user's display name, I was thinking of just launching a PS script at game launch that updated the relevant field on the user's config file - If there's a more elegant solution, I'm all ears.

The students won't have write access to the folder containing the Xonotic executables, but would have write access to the folder containing their config file.  I assume any PAK files placed in the user's config folder would not be read unless it was referenced on the server side?

I have not looked at the server admin side yet, but would assume there are tools our IT Teachers can use to balance teams or kick players?

If there's anything that I haven't considered, please let me know.  I'd prefer to not have to spend the next few months being outsmarted by a few thousand students.........

My plan for the next few days is to go over any documentation and start trying to figure out what changes I need to make.  If anyone has any tips/advice this would be greatly appreciated.

Regards

Shaun
Reply

#2
You'd almost 100% have do some QuakeC coding to do.

This is unlikely to be something that settings alone can do. You'll have to code it.

If you have a budget, you might try to recruit a coder on Xonotic's discord or such.

A couple of thimgs are easier, but without a coder you'd not achieve those I don't think, Xonotic has the name changer in the menu gui.

Code:
void SV_ParseClientCommand (string s) // krimzon - see also CSQC_ConsoleCommand
{
    // Find in source ...
    float argc = tokenize_console(s);

    string cmd = argv(0); // say parses each word so "say hi mom" is 3
    string arg1 = argv(1);

    if (cmd == "say") {
        return; // Refuse chat
    }
    
    if (cmd == "name") {
        return; // Refuse name chg
    }
}

My thoughts and I am not necessrily right ...
Reply

#3
(08-20-2023, 01:27 PM)Baker Wrote: You'd almost 100% have do some QuakeC coding to do.

This is unlikely to be something that settings alone can do.  You'll have to code it.

If you have a budget, you might try to recruit a coder on Xonotic's discord or such.

A couple of thimgs are easier, but without a coder you'd not achieve those I don't think, Xonotic has the name changer in the menu gui.

Code:
void SV_ParseClientCommand (string s) // krimzon - see also CSQC_ConsoleCommand
{
    // Find in source ...
    float argc = tokenize_console(s);

    string cmd = argv(0); // say parses each word so "say hi mom" is 3
    string arg1 = argv(1);

    if (cmd == "say") {
        return; // Refuse chat
    }
    
    if (cmd == "name") {
        return; // Refuse name chg
    }
}

My thoughts and I am  not necessrily right ...

Thanks Baker - I was expecting to need to do a bit of code adjustment.
Reply

#4
(08-21-2023, 01:15 AM)Shaun_Dark_Lord Wrote: Thanks Baker - I was expecting to need to do a bit of code adjustment.

Good luck, may your coding go well.
Reply

#5
So far, so good - I've compiled a new menu.dat file, and have so far removed the ability to access the "create" multiplayer menu, change the player name and turn gore back on.

Still need to remove console access and find out if chat is logged anywhere......
Reply

#6
Hi Shaun,
as Baker already said, you will need to touch QuakeC for this, but some parts can be achieved with cvars. https://xonotic.org/tools/cacs/#0a/0/ is a searchable list of all cvars.
(08-20-2023, 04:42 AM)Shaun_Dark_Lord Wrote: 1. In game chat to either be logged centrally, or disabled.
"g_chat_allowed 0" on the servers is one way. The other is to use "log_dest_udp <ip:port of a server>" to send all the gameserver logs to a central server. You need to write an application to filter and organize the logs.
Don't forget about the "tell" command as these messages are by default not send to the server console.

(08-20-2023, 04:42 AM)Shaun_Dark_Lord Wrote: 2. The ability to host a game server to be disabled.  I assume this would also need the in game console to be restricted?
You could edit the Menu code to remove the "Create" tab. To disable to console, you might need to touch the engine. Maybe you can override the "toggleconsole" command with an empty alias, but I doubt that this would be enough. You probably also need to change the key binding widget in the settings.

(08-20-2023, 04:42 AM)Shaun_Dark_Lord Wrote: 3. The user's display name to be set to their Windows login username.
We definitely have nothing like that, but you could set the name directly in the config before starting Xonotic.

(08-20-2023, 04:42 AM)Shaun_Dark_Lord Wrote: 4. The ability to change their display name to be disabled.
Maybe edit the multiplayer profile tab and override the "name" command. Again that might not be enough.

(08-20-2023, 04:42 AM)Shaun_Dark_Lord Wrote: 5. Internal recording of multiplayer game stats (kills/deaths, flag captures, total damage, total playtime etc.)
You can use XonStat for this, write your own application that parses and uses the same data that is normally sent to XonStat or parse the console output on the servers (maybe even aggregated with "log_dest_udp").
Reply

#7
Those good people here will not let you down, a solution will surely be found.

For the chat, there are also bots for Discord, like Erebus: https://github.com/incognico/erebus

Discord could give you something already made available, but I'm not into it so much myself.
FAF - FERIS - COPENHAGEN - DENMARK - GNU/Linux  Heart
Homepage: https://feris-xonotic.net
Reply

#8
(08-21-2023, 09:54 AM)Freddy Wrote:
(08-20-2023, 04:42 AM)Shaun_Dark_Lord Wrote: 2. The ability to host a game server to be disabled.  I assume this would also need the in game console to be restricted?
You could edit the Menu code to remove the "Create" tab. To disable to console, you might need to touch the engine. Maybe you can override the "toggleconsole" command with an empty alias, but I doubt that this would be enough. You probably also need to change the key binding widget in the settings.

I've done the key bindings - Just trying to find where to turn off "toggleconsole".  Might be a job for tomorrow........
Reply

#9
In theory ...

-noconsole

Add that command line.

I've never tried it. It's in the DarkPlaces engine code, however the engine loves showing the console so I have no idea how well it works or if it still comes up from time to time.

The name could probably be set from the commandline like ... +set _cl_name Yourname

The "probably" is I don't know if the QC would override it somewhere somehow. I would think that would work.
Reply

#10
(08-21-2023, 12:30 PM)Baker Wrote: In theory ...

-noconsole

Add that command line.

I've never tried it.  It's in the DarkPlaces engine code, however the engine loves showing the console so I have no idea how well it works or if it still comes up from time to time.

The name could probably be set from the commandline like ... +set  _cl_name Yourname

The "probably" is I don't know if the QC would override it somewhere somehow.  I would think that would work.

Thanks - -noconsole seems to work.

I'm writing a small launcher that checks the user's game config for the expected name, changes it if required, checks that the pak file I created exists, and then launches the game.  So far, so good.

Might get into the server side stuff today - Which will obviously require a lot of "testing"  Big Grin
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Rainbow What's your favorite color? Or which color you use in game? Kotangens 1 1,537 09-01-2022, 06:52 PM
Last Post: ballerburg9005
  Teamspeak and/or mumble servers to use for Xonotic? rocknroll237 7 10,582 06-06-2013, 05:18 AM
Last Post: Smilecythe
Bug Does anyone actually use the laser alt-fire? W4RP1G 20 17,003 04-08-2012, 12:35 PM
Last Post: ==Troy==
  [Poll] How often do you use Rocket Launcher's Alt Fire? Loafers 9 9,511 04-05-2012, 07:38 AM
Last Post: Majki
  Xplosives so reliable: How do I do rand(); or use it in quake C? XonoxSeven 4 5,624 09-27-2011, 01:24 AM
Last Post: PinkRobot
  Use Xfire and share Xonotic! Exitium 13 16,626 05-09-2011, 02:13 PM
Last Post: BARTUC
  Problems with git build mepper[NoSkillsOnlyLuck] 15 15,310 04-14-2011, 02:25 PM
Last Post: Mepper
  Omploader probably going down Silverburn 4 5,334 10-04-2010, 10:11 AM
Last Post: Minkovsky

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-