Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutes should stay after map change #127

Open
bretonium opened this issue Mar 14, 2019 · 4 comments
Open

Mutes should stay after map change #127

bretonium opened this issue Mar 14, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@bretonium
Copy link
Collaborator

Today if map gets changed mutes get lost. It is not an issue for teeworlds where it is typical to play only 1 map all the time, but is bad for infclass where maps are changed frequently

@teoman002
Copy link
Collaborator

So it seems, mutes have to be mapped to IP addresses.
If a player with an IP-Adress joins the game he will be muted again.

@ResamVi
Copy link
Collaborator

ResamVi commented Mar 29, 2019

There is a solution to a different problem that I think can be reused here:
If I remember correctly to combat people leaving/joining to change their zombie class a session was created that persists the lifespan of a client connection

//The client already participated to this round,
//and he exit the game as infected.
//To avoid cheating, we assign to him the same class again.
if(
  m_InfectedStarted &&
  pSession->m_RoundId == m_RoundId &&
  pSession->m_Class > END_HUMANCLASS
)
{
  Iter.Player()->SetClass(pSession->m_Class);
}

You can add another field to the Session struct with a list of muted ClientIDs I guess.
(To clarify m_MuteTick is when an admin mutes this player)

struct CClientSession
{
  int m_RoundId;
  int m_Class;
  int m_MuteTick;
};

EDIT: I had to think about this again. Sessions only stay for for a specifc amount of time. So mutes will stay for that specifc amount of time as well. The next day these people would have to be re-muted again basically.

@teoman002
Copy link
Collaborator

I thought a session ends, if the server is turned off.
Or is a session 4 rounds in a row?
If it is the former, we can write all muted Ids into a text file, if it is the latter we can back them up in an instance array of CGameContext::muted_IDs[]

@NewRedsquare
Copy link

can mutes be registered on the database to make them persistent ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants