Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion game/addons/sourcemod/scripting/sbpp_sleuth.sp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#define LENGTH_CUSTOM 2
#define LENGTH_DOUBLE 3
#define LENGTH_NOTIFY 4
#define LENGTH_KICK 5

#define PREFIX "[SourceSleuth] "

Expand Down Expand Up @@ -72,7 +73,7 @@ public void OnPluginStart()

CreateConVar("sm_sourcesleuth_version", PLUGIN_VERSION, "SourceSleuth plugin version", FCVAR_SPONLY | FCVAR_REPLICATED | FCVAR_NOTIFY | FCVAR_DONTRECORD);

g_cVar_actions = CreateConVar("sm_sleuth_actions", "3", "Sleuth Ban Type: 1 - Original Length, 2 - Custom Length, 3 - Double Length, 4 - Notify Admins Only", 0, true, 1.0, true, 4.0);
g_cVar_actions = CreateConVar("sm_sleuth_actions", "3", "Sleuth Ban Type: 1 - Original Length, 2 - Custom Length, 3 - Double Length, 4 - Notify Admins Only, 5 - Kick Client", 0, true, 1.0, true, 5.0);
g_cVar_banduration = CreateConVar("sm_sleuth_duration", "0", "Required: sm_sleuth_actions 1: Bantime to ban player if we got a match (0 = permanent (defined in minutes) )", 0);
g_cVar_sbprefix = CreateConVar("sm_sleuth_prefix", "sb", "Prexfix for sourcebans tables: Default sb", 0);
g_cVar_bansAllowed = CreateConVar("sm_sleuth_bansallowed", "0", "How many active bans are allowed before we act", 0);
Expand Down Expand Up @@ -230,6 +231,10 @@ public void SQL_CheckHim(Database db, DBResultSet results, const char[] error, D
/* Notify Admins when a client with an ip on the bans list connects */
PrintToAdmins("%s%t", PREFIX, "sourcesleuth_admintext", client, steamid, IP);
}
case LENGTH_KICK:
{
KickClient(client, "%s%t", PREFIX, "sourcesleuth_kicktext");
}
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions game/addons/sourcemod/translations/sbpp_sleuth.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,9 @@
"chi" "玩家 {1} (ID: {2} | IP: {3}) 目前有多次IP封禁"
"tr" "Oyuncu {1} (ID: {2} | IP: {3}) IP adresinde aktif yasaklaması var."
}
"sourcesleuth_kicktext"
{
"#format" ""
"en" "You have been kicked for having an active ban on your IP"
}
}