diff --git a/plugins/basebans.sp b/plugins/basebans.sp index 363a2f5b..f3a8d53e 100644 --- a/plugins/basebans.sp +++ b/plugins/basebans.sp @@ -301,7 +301,13 @@ public Action:Command_AddBan(client, args) } /* Verify steamid */ - if (strncmp(authid, "STEAM_", 6) != 0 || authid[7] != ':') + new bool:idValid = false; + if (!strncmp(authid, "STEAM_", 6) && authid[7] == ':') + idValid = true; + else if (!strncmp(authid, "[U:", 3)) + idValid = true; + + if (!idValid) { ReplyToCommand(client, "[SM] %t", "Invalid SteamID specified"); return Plugin_Handled; @@ -342,13 +348,13 @@ public Action:Command_Unban(client, args) ReplaceString(arg, sizeof(arg), "\"", ""); new ban_flags; - if (strncmp(arg, "STEAM_", 6) == 0 && arg[7] == ':') + if (IsCharNumeric(arg[0])) { - ban_flags |= BANFLAG_AUTHID; + ban_flags |= BANFLAG_IP; } else { - ban_flags |= BANFLAG_IP; + ban_flags |= BANFLAG_AUTHID; } LogAction(client, -1, "\"%L\" removed ban (filter \"%s\")", client, arg);