sbpp / sourcebans-pp

Admin, ban, and comms management system for the Source engine
https://sbpp.github.io/
Creative Commons Attribution Share Alike 4.0 International
333 stars 174 forks source link

[Comms] Valid user are sometime flase flagged #870

Closed Rushaway closed 1 year ago

Rushaway commented 1 year ago

What are the steps to reproduce this issue?

  1. Connect on your server
  2. Sometimes you can't comms someone bcs it's return as g_bPlayerStatus[target] = false;

What happens?

image

What were you expecting to happen?

Don't have false flag detection for g_bPlayerStatus

Any logs, error output, etc.?

N/A

Any other comments?

Issue was found by Metric#0062

What versions of software are you using?

Operating System: Ubuntu 20.04 SourceBans++ Version: 1.8.0 SourceMod Version: 1.11 MetaMod Version: 1.11

gotgameio commented 1 year ago

I got same issue when i tried to mute myself, i was always getting this message, but this was excatly due to:

sbppcomms.sp line 2249: `if (strncmp(auth[6], "ID", 3) != 0 )`

Should be: if (strncmp(auth[6], "ID_", 3) != -1)

strncmp returns -1 when string not found. But okay this PR fixes it anyway.