|
@@ -9,7 +9,7 @@
|
|
|
#pragma newdecls required
|
|
|
#include "source_cbl/webapi.sp"
|
|
|
|
|
|
-#define PLUGIN_VERSION "0.2.0"
|
|
|
+#define PLUGIN_VERSION "0.2.1"
|
|
|
public Plugin myinfo = {
|
|
|
name = "[CSRD] SourceCBL Integration",
|
|
|
author = "nosoop",
|
|
@@ -33,13 +33,15 @@ public void OnPluginStart() {
|
|
|
char portString[6];
|
|
|
IntToString(port, portString, sizeof(portString));
|
|
|
|
|
|
-
|
|
|
RegAdminCmd("cbl_check_steamid", CheckCBLStatus, ADMFLAG_ROOT);
|
|
|
|
|
|
BuildPath(Path_SM, g_CommunityKickLog, sizeof(g_CommunityKickLog), "logs/sourcecbl.log");
|
|
|
}
|
|
|
|
|
|
-public void OnClientAuthorized(int client) {
|
|
|
+/**
|
|
|
+ * Called once authorized and SourceMod is able to check the client's admin flags.
|
|
|
+ */
|
|
|
+public void OnClientPostAdminCheck(int client) {
|
|
|
if (!IsFakeClient(client) && !SkipCommunityBanListCheck(client)) {
|
|
|
RequestClientBanStatus(client);
|
|
|
}
|
|
@@ -47,7 +49,7 @@ public void OnClientAuthorized(int client) {
|
|
|
|
|
|
bool SkipCommunityBanListCheck(int client) {
|
|
|
// TODO check if account is whitelisted (command group / keyvalues / clientprefs cache, etc.)
|
|
|
- return CheckCommandAccess(client, "cbl_whitelist", 0);
|
|
|
+ return CheckCommandAccess(client, "cbl_whitelist", ADMFLAG_ROOT);
|
|
|
}
|
|
|
|
|
|
void RequestClientBanStatus(int client) {
|