Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
910 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Provides names for GC message types for TF
  4. //
  5. //=============================================================================
  6. #include "cbase.h"
  7. #include "gcsdk/gcsdk_auto.h"
  8. #include "tf_gcmessages.h"
  9. // memdbgon must be the last include file in a .cpp file!!!
  10. #include "tier0/memdbgon.h"
  11. uint32 GetKickBanPlayerReason( const char *pReasonString )
  12. {
  13. if ( Q_strncmp( pReasonString, "other", 5 ) == 0 )
  14. {
  15. return kVoteKickBanPlayerReason_Other;
  16. }
  17. else if ( Q_strncmp( pReasonString, "cheating", 8 ) == 0 )
  18. {
  19. return kVoteKickBanPlayerReason_Cheating;
  20. }
  21. else if ( Q_strncmp( pReasonString, "idle", 4 ) == 0 )
  22. {
  23. return kVoteKickBanPlayerReason_Idle;
  24. }
  25. else if ( Q_strncmp( pReasonString, "scamming", 8 ) == 0 )
  26. {
  27. return kVoteKickBanPlayerReason_Scamming;
  28. }
  29. return kVoteKickBanPlayerReason_Other;
  30. }