diff --git a/plugins/basebans.sp b/plugins/basebans.sp index 95a21efe..668b0ace 100644 --- a/plugins/basebans.sp +++ b/plugins/basebans.sp @@ -52,18 +52,40 @@ new g_BanTarget[MAXPLAYERS+1]; new g_BanTargetUserId[MAXPLAYERS+1]; new g_BanTime[MAXPLAYERS+1]; +new g_IsWaitingForChatReason[MAXPLAYERS+1]; +new Handle:g_hKvBanReasons; +new String:g_BanReasonsPath[PLATFORM_MAX_PATH]; + #include "basebans/ban.sp" +public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max) +{ + BuildPath(Path_SM, g_BanReasonsPath, sizeof(g_BanReasonsPath), "configs/banreasons.txt"); + if(LoadBanReasons()) + { + return APLRes_Success; + } + else + { + Format(error, err_max, "Couldn't load file %s: See log for details.", g_BanReasonsPath); + return APLRes_Failure; + } +} + public OnPluginStart() { LoadTranslations("common.phrases"); LoadTranslations("basebans.phrases"); + LoadTranslations("core.phrases"); RegAdminCmd("sm_ban", Command_Ban, ADMFLAG_BAN, "sm_ban <#userid|name> [reason]"); RegAdminCmd("sm_unban", Command_Unban, ADMFLAG_UNBAN, "sm_unban "); RegAdminCmd("sm_addban", Command_AddBan, ADMFLAG_RCON, "sm_addban