Admin stuff: usergroups.dat


(DrFunkenstein) #1

We’re running into some trouble configuring the Bullet Hell server. We created our own usergroups.dat, everything seems to be working like it should except the “protection levels” for each group we created.

We have 4 groups:

  • Default
  • Protected
  • Trusted
  • Admin

Each group should have different levels of protection, but it’s only working the way we intended it for the Admin group. The Protected and the Trusted group have no protection at all.

Here’s the current file. The passwords are obviously fake, hi Raccoon!, the rest is like we’re using it right now.



// *************************************************************************
// NOTE: MAKE SURE TO SET YOUR PASSWORD BELOW
// If the password is not set, you will not be able to log in
// *************************************************************************

// *************************************************************************
// NOTE: The server must be fully restarted for changes to take effect
// *************************************************************************


// Players may only log into a group with a password

// votelevel controls the type of votes that each user group can call
// these levels are setup in the "votes" block at the end of this file

// *************************************************************************
// NOTE: Negative values for voteLevel are not currently supported
// The default vote level is 0
// *************************************************************************

group Default {
//	This controls which votes a player within this group may issue
	voteLevel	1
}

group Protected {
	password	12345
	control {
		Protected
		Default
	}

	// these control what other groups may not do to users in this group
//	noBan
	noKick
	noMute
//	noWarn

//	This controls which votes a player within this group may issue
	voteLevel	1
}

group Trusted {
	password	23456
	control {
		Trusted
		Protected
		Default
	}

	// these control the actions that can be carried out by this group
	adminKick
//	adminBan
	adminSetTeam
	adminChangeCampaign
//	adminChangeMap
//	adminGlobalMute
//	adminGlobalVOIPMute
	adminPlayerMute
	adminPlayerVOIPMute
	adminWarn
	adminRestartMap
	adminRestartCampaign
//	adminStartMatch
//	adminExecConfig
	adminShuffleTeams
//	adminAddBot
//	adminDisableProficiency
//	adminSetTimeLimit
//	adminSetTeamDamage
//	adminSetTeamBalance
//	adminAdjustBots
	
	// these control what other groups may not do to users in this group
//	noBan
	noKick
	noMute
//	noWarn

//	This controls which votes a player within this group may issue
	voteLevel	2
}

group Admin {
	password	34567
	
	// This sets which groups people in this group may move other people into
	control {
		Admin
		Trusted
		Protected
		Default
	}
	
	// these control the actions that can be carried out by this group
	adminKick
	adminBan
	adminSetTeam
	adminChangeCampaign
	adminChangeMap
	adminGlobalMute
	adminGlobalVOIPMute
	adminPlayerMute
	adminPlayerVOIPMute
	adminWarn
	adminRestartMap
	adminRestartCampaign
//	adminStartMatch
//	adminExecConfig
	adminShuffleTeams
//	adminAddBot
//	adminDisableProficiency
//	adminSetTimeLimit
//	adminSetTeamDamage
//	adminSetTeamBalance
//	adminAdjustBots
	
	// these control what other groups may not do to users in this group
	noBan
	noKick
	noMute
	noWarn

// This controls which votes a player within this group may issue
	voteLevel	5
}


// typing "listvotes" in the game console will list all existing votes and their vote level

votes {

	"setobjectivemap"	"5"		// vote to change map in Objective Mode or to change the RulesSet to Objective
	"setstopwatchmap"	"5"		// vote to change map in StopWatch Mode or to change the RulesSet to StopWatch
	"setcampaign"		"5"		// vote to change campaign in Campaign Mode or to change the RulesSet to Campaign
	"shufflexp"		"1"		// vote to rebalance teams by XP
	"shufflerandom"		"2"		// vote to rebalance teams randomly
	"swapteams"		"5"		// vote to swap teams
	"balancedteams"		"5"		// vote to enable/disable teamForceBalance
	"teamdamage"		"5"		// vote to enable/disable teamdamage
	"noxp"			"5"		// vote to enable/disable upgrades
	"timelimit"		"5"		// vote to change the timelimit
	"servermode"		"5"		// vote a cfg to be executed (specified in usergroups.dat in 'configs')
	"kickplayer"		"1"		// vote to kick a player 
	"muteplayer"		"2"		// vote to mute a player
	"muteplayervoip"	"2"		// vote to mute a player chat
	"maprestart"		"2"		// vote to restart the map
	"campaignreset"		"2"		// vote to restart the campaign

}

When we tested this today, I could be kicked by a vote even if I joined the Protected group or in the Trusted group, but not when I was in the Admin group. All 3 groups have “noKick” in the protection part of the file, but it only seems to work for the admin group.

Any suggestions?

Dr. Funkenstein


(light_sh4v0r) #2

My first suggestion would be to remove the passwords from the file, but I suppose they’re not your real passwords :wink:


(singing_fish) #3

Hi DrFunkenstein,
at first look it looks very close to our .dat

If you like I can send the usergroups.dat file from our -/-Villa-/- to you.
Like Alpenschrat_CH said ‘one of the few guys you can trust in QW’ :slight_smile:

rock the night (CET),
>(((*<


(timestart) #4

What happens if you rename the admin group? Are you still protected from kick?


(f34n0r) #5

I will put you in touch with our tech staff, we use auto login for guidstates because we have so many members and constantly changing pws would be impractical whenever one of them leaves.


(DrFunkenstein) #6

@Light Sh4v0r:

I made sure that the passwords were fake when I posted this, we kinda have a history of trouble with passwords :slight_smile: .

@Singing_fish:

Thanks! I’d love to have a look at the file you are using.

@Taw_FeanorL

Every help is appreciated.

Dr. Funkenstein


(singing_fish) #7

PM sent mate :slight_smile:


(Brainless) #8

Maybe you can give this a try.
you have this in your config.
// noBan
noKick
noMute
// noWarn

Change it into
noKick
noMute
It’s doesn’t matter anything to our reading. But maybe it does to the game. It’s the only difference.


(light_sh4v0r) #9

That doesn’t make sense, the game shouldn’t be reading lines that start with //


(sereNADE) #10

I remember reading up on Usergroups.dat before I opened our server. I forget who from SD but the dev specifically mentioned that “//” did not comment out lines. Is my memory fake or real?


(Scrupus) #11

Pretty sure // will comment out lines, but not sure why it doesn’t work for you.

But as alternative solution, set “kickplayer” “2”, so default user can’t kick anyone.

Most votekicks by non-trusted users are bad or will fail anyway :wink:


(DrFunkenstein) #12

Singing_fish was kind enough to send me their file, but when I test it, I get the same results as with the one we’re using. I can’t kick myself when I’m in the group with the most protection (noKick, noBan, noMute, noWarn) but when I join any of the other groups, I can get kicked.

I’m testing this on my local pc btw. I start a server, join that server and then try to kick myself with power admin.

?

Dr. Funkenstein


(DrFunkenstein) #13

This is getting weird.

I gave each group the maximum protection levels (noKick, noBan, noWarn, noMute) and when I do that everything works as advertised. I can’t warn, kick, mute or ban myself with power admin if I connect to my local server and join one of the groups with protection.

I’m volunteering for a kick vote on the Villa server if someone is willing to put me in one of their groups with some protection but not the maximum level. I wanna see if this works or not.

Dr. Funkenstein


(Susefreak) #14

Make sure that the usergroups in your /save do not conflict with the usergroups located elsewhere.

The game searches for the usergroups.dat in this order:
rootodfir/save
rootofdir/base


(AnthonyDa) #15

Watch out susefreak, the path to those folders are set by cvar starting by fs_*** so you can move them to wherever you want it to. You might have posted default settings, but it’s not the path for all configuration :wink:


(DrFunkenstein) #16

I think I’ve narrowed it down: “noKick” doesn’t actually do anything. As far as I can tell anyways. It doesn’t matter if I use our config or the Villa file on my local server, it doesn’t work. It doesn’t work on our server. I think it’s broken.

The rest just works like it should, btw.

As an aside. I don’t recall seeing it in a file posted here or on the old community forums, but there’s another level of protection you can add to a group: noMuteVoip. It protects someone from “mute player X VOIP” votes. I never realized you could stop that until I was testing some things today with Power Admin. There’s a button for it, so I figured there would be protection for it as well :slight_smile: .

The complete list of protection levels as far as I’m aware:

  • noBan
  • noKick //doesn’t work!
  • noMute
  • noWarn
  • noMuteVoip

If you want to protect certain groups from kick votes, you will need to add “noBan”.

Dr. Funkenstein


(timestart) #17

[QUOTE=DrFunkenstein;209218]I think I’ve narrowed it down: “noKick” doesn’t actually do anything. As far as I can tell anyways. It doesn’t matter if I use our config or the Villa file on my local server, it doesn’t work. It doesn’t work on our server. I think it’s broken.

The rest just works like it should, btw.

As an aside. I don’t recall seeing it in a file posted here or on the old community forums, but there’s another level of protection you can add to a group: noMuteVoip. It protects someone from “mute player X VOIP” votes. I never realized you could stop that until I was testing some things today with Power Admin. There’s a button for it, so I figured there would be protection for it as well :slight_smile: .

The complete list of protection levels as far as I’m aware:

  • noBan
  • noKick //doesn’t work!
  • noMute
  • noWarn
  • noMuteVoip

If you want to protect certain groups from kick votes, you will need to add “noBan”.

Dr. Funkenstein[/QUOTE]

From the ETQW SDK gamecode:


permissionName_t permissionNames[] = {
	permissionName_t( "adminKick", PF_ADMIN_KICK ),
	permissionName_t( "adminBan", PF_ADMIN_BAN ),
	permissionName_t( "adminSetTeam", PF_ADMIN_SETTEAM ),
	permissionName_t( "adminChangeCampaign", PF_ADMIN_CHANGE_CAMPAIGN ),
	permissionName_t( "adminChangeMap", PF_ADMIN_CHANGE_MAP ),
	permissionName_t( "adminGlobalMute", PF_ADMIN_GLOBAL_MUTE ),
	permissionName_t( "adminGlobalVOIPMute", PF_ADMIN_GLOBAL_MUTE_VOIP ),
	permissionName_t( "adminPlayerMute", PF_ADMIN_PLAYER_MUTE ),
	permissionName_t( "adminPlayerVOIPMute", PF_ADMIN_PLAYER_MUTE_VOIP ),
	permissionName_t( "adminWarn", PF_ADMIN_WARN ),
	permissionName_t( "adminRestartMap", PF_ADMIN_RESTART_MAP ),
	permissionName_t( "adminRestartCampaign", PF_ADMIN_RESTART_CAMPAIGN ),
	permissionName_t( "adminStartMatch", PF_ADMIN_START_MATCH ),
	permissionName_t( "adminExecConfig", PF_ADMIN_EXEC_CONFIG ),
	permissionName_t( "adminShuffleTeams", PF_ADMIN_SHUFFLE_TEAMS ),
	permissionName_t( "adminAddBot", PF_ADMIN_ADD_BOT ),
	permissionName_t( "adminAdjustBots", PF_ADMIN_ADJUST_BOTS ),
	permissionName_t( "adminDisableProficiency", PF_ADMIN_DISABLE_PROFICIENCY ),
	permissionName_t( "adminSetTimeLimit", PF_ADMIN_SET_TIMELIMIT ),
	permissionName_t( "adminSetTeamDamage", PF_ADMIN_SET_TEAMDAMAGE ),
	permissionName_t( "adminSetTeamBalance", PF_ADMIN_SET_TEAMBALANCE ),
	permissionName_t( "noBan", PF_NO_BAN ),
	permissionName_t( "noKick", PF_NO_KICK ),
	permissionName_t( "noMute", PF_NO_MUTE ),
	permissionName_t( "noMuteVOIP", PF_NO_MUTE_VOIP ),
	permissionName_t( "noWarn", PF_NO_WARN ),
	permissionName_t( "quietLogin", PF_QUIET_LOGIN )
};

I think the problem is due to this in sdAdminSystemCommand_Kick::PerformCommand in AdminSystem.cpp, line 85:


const sdUserGroup& kickGroup = sdUserGroupManager::GetInstance().GetGroup( kickPlayer->GetUserGroup() );
	if ( kickGroup.HasPermission( PF_NO_BAN ) || gameLocal.IsLocalPlayer( kickPlayer ) ) {
		Print( player, "guis/admin/system/cannotkickplayer" );
		return false;
	}

As you can see, it checks for PF_NO_BAN not PF_NO_KICK.


(DrFunkenstein) #18

Thanks for posting this! Is it something that’s in the SDK?

While browsing through the list of permissions in the first part of the code, I saw something funny: permissionName_t( “quietLogin”, PF_QUIET_LOGIN )

Does this mean there’s a way to disable the whistle sound when you join a group?

Dr. Funkenstein


(timestart) #19

[QUOTE=DrFunkenstein;209235]Thanks for posting this! Is it something that’s in the SDK?

While browsing through the list of permissions in the first part of the code, I saw something funny: permissionName_t( “quietLogin”, PF_QUIET_LOGIN )

Does this mean there’s a way to disable the whistle sound when you join a group?

Dr. Funkenstein[/QUOTE]

I’d assume that’s what it is, yeah.

EDIT: And yeah, all that is from the SDK.


(Brainless) #20

LOL
I know it doesn’t make sense but it’s something to try. If i read other posts, i come to the conclusion that no one tried this before and Funk had to discover it.