-
Notifications
You must be signed in to change notification settings - Fork 407
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
Don't show ips to non-administrators, Fixes #694 #739
Conversation
There is probably something related to mute you are missing. Otherwise looks good. |
There's also a bit missing wrt. players joining and leaving. If you want to solve it this way, you could search for |
Now it should cover all cases, also i renamed the var c to a more descriptive name "ClientID" :) |
Well I might've used a wrapper for |
The newly added cases (player joining, etc.) only show the IP addresses of admins to everyone, instead of only showing the IP addresses of everyone to admins. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix that the blacklist output is only shown if the affected person is an administrator. Otherwise, this looks good to me.
src/engine/server/server.cpp
Outdated
char aBuf[256]; | ||
str_format(aBuf, sizeof(aBuf), "client dropped. cid=%d addr=%s reason='%s'", ClientID, aAddrStr, pReason); | ||
|
||
char aBuf[256];str_format(aBuf, sizeof(aBuf), "client dropped. cid=%d addr=%s reason='%s'", ClientID, aAddrStr, pReason); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A newline was accidently deleted here.
src/engine/server/server.cpp
Outdated
str_format(aBuf, sizeof(aBuf), "ClientID=%d addr=%s secure=%s blacklisted", ClientID, aAddrStr, m_NetServer.HasSecurityToken(ClientID)?"yes":"no"); | ||
else | ||
str_format(aBuf, sizeof(aBuf), "ClientID=%d secure=%s blacklisted", ClientID, m_NetServer.HasSecurityToken(ClientID) ? "yes" : "no"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still only shows the IP addresses of admins, and of no one else, if I read the code correctly.
I finally got it, wathever string you print to the level IConsole::OUTPUT_LEVEL_STANDARD will be shown to all staff levels, But if you print to the IConsole::OUTPUT_LEVEL_ADDINFO only rcon admins and server console will see it So now should be fine. |
What I read from the code was that no one sees console output unless you're admin or someone has just executed a command on your level. |
Thanks! |
People with non-administrator rights won't be able to see ips (mod, helper).