Admin Commands Log Interupting Task Scheduler

Сообщения
213
Реакции
71
Помог
2 раз(а)
Ошибка
In Comments.
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5271 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Jun 24 2020 13:53:30
Built from: https://github.com/alliedmodders/amxmodx/commit/5eea3e5
Build ID: 5271:5eea3e5
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.7.0.696-dev
Build date: 18:46:47 May 18 2020 (2228)
Build from: https://github.com/dreamstalker/rehlds/commit/987ee51
ReGamedll
ReGameDLL version: 5.18.0.470-dev
Build date: 16:42:40 Jun 17 2020
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/3878f46
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.135 ini Start Never
[ 3] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5270 ini Start ANY
[ 4] Print Center Fix RUN - printcenterfix_mm_i386.so v1.0.1 ini ANY Never
[ 5] Revoice RUN - revoice_mm_i386.so v0.1.0.34 ini Start Never
[ 6] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 8] Fun RUN - fun_amxx_i386.so v1.9.0.5270 pl3 ANY ANY
[ 9] Engine RUN - engine_amxx_i386.so v1.9.0.5270 pl3 ANY ANY
[10] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5270 pl3 ANY ANY
[11] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5270 pl3 ANY ANY
[12] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5270 pl3 ANY ANY
[13] CSX RUN - csx_amxx_i386.so v1.9.0.5270 pl3 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5270 pl3 ANY ANY
[15] ReAPI RUN - reapi_amxx_i386.so v5.14.0.195-dev pl3 ANY Never
[16] hackdetector RUN - hackdetector_amxx_i386.so v0.15.328.lite pl3 ANY ANY
[17] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl3 ANY Never
[18] MySQL RUN - mysql_amxx_i386.so v1.9.0.5270 pl3 ANY ANY
18 plugins, 18 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] My Ban System 1.1.2 K@[L]@uz kalauz_ban_syst running
[ 2] Admin Commands Log 1.2.1 twisterniq admin_commands_ running
[ 3] ServerNamePlay 1.8.2 Rock Rocky PSL_hostname.am running
[ 4] Scan_Say 12/May/202 General Memer scan_say.amxx running
[ 5] Task Scheduler 0.2 JustinHoMi task_scheduler. running
[ 6] Mode 2x2 2.5re-19-0 s1lent PSL_mode_edit.a running
[ 7] Online Logger 06.04.18 mx?! PSL_online_logg running
[ 8] Free Look Crosshair Fi 1.3 Numb free_look_cross running
[ 9] Admin Base 1.9.0.5271 AMXX Dev Team admin.amxx running
[ 10] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 11] Admin Help 1.9.0.5271 AMXX Dev Team adminhelp.amxx running
[ 12] Multi-Lingual System 1.9.0.5271 AMXX Dev Team multilingual.am running
[ 13] Menus Front-End 1.9.0.5271 AMXX Dev Team menufront.amxx running
[ 14] Commands Menu 1.9.0.5271 AMXX Dev Team cmdmenu.amxx running
[ 15] New KickMenu 2.0 Flash kickmenu.amxx running
[ 16] Players Menu 1.9.0.5271 AMXX Dev Team plmenu.amxx running
[ 17] Maps Menu 1.9.0.5271 AMXX Dev Team mapsmenu.amxx running
[ 18] Plugin Menu 1.9.0.5271 AMXX Dev Team pluginmenu.amxx running
[ 19] Chat Manager 1.1.1-11 Mistrick PSL_GREEN_chatm running
[ 20] Chat Manager: Addon 0.0.4-70 Mistrick PSL_chatmanager running
[ 21] Anti Flood 1.9.0.5271 AMXX Dev Team antiflood.amxx running
[ 22] Admin Votes 1.9.0.5271 AMXX Dev Team adminvote.amxx running
[ 23] NextMap 1.9.0.5271 AMXX Dev Team nextmap.amxx running
[ 24] Roundsleft 0.2 JGHG roundsleft_nosp running
[ 25] Stats Configuration 1.9.0.5271 AMXX Dev Team statscfg.amxx running
[ 26] Restrict Weapons 1.9.0.5271 AMXX Dev Team restmenu.amxx running
[ 27] StatsX 1.9.0.5271 AMXX Dev Team statsx.amxx running
[ 28] CS Misc. Stats 1.9.0.5270 AMXX Dev Team miscstats.amxx running
[ 29] CS Stats Logging 1.9.0.5271 AMXX Dev Team stats_logging.a running
[ 30] Accuracy Fix 3.0 Numb accuracy_fix.am running
[ 31] [PSL] Admin Color Chat 1.0 Edit By Alber PSL_admin_color running
[ 32] Admin Chat 1.9.0.5271 AMXX Dev Team adminchat.amxx running
[ 33] Team Balancer 1.8b3 Ptahhotep ptb.amxx running
[ 34] Block IP Messages 1.0 Alpha Alik Inline Asla PSL_BlockIpInNi running
[ 35] Admin Spectator ESP 1.5 KoST admin_spectator running
[ 36] FragCounter 1.01 Scarzzurs fragcounter.amx running
[ 37] KGB Bots 2.3 OvidiuS & Desika kgbbots.amxx running
[ 38] Steamers Info 1.0 K@[L]@uz steamers_info.a running
[ 39] Map Spawns Editor 1.0.16 iG_os Map_Spawns_Edit running
[ 40] Reset Score 0.0.2f wopox1337 PSL_ResetScore. running
[ 41] Fast Sniper Switch 1.3 Numb fast_sniper_swi running
[ 42] Spec Money Save 0.2 F@nt0M spec_money_save running
[ 43] AMX Slay Losers 1.1 [email protected] slaylosers.amxx running
[ 44] Autoresponder/Advertis 0.5 MaximusBrood ad_manager5.amx running
[ 45] Auto Join on Connect 0.1 VEN auto_join_on_co running
[ 46] Ping Faker 1.5a MeRcyLeZZ pingfaker.amxx running
[ 47] c4 timer 1.1 cheap_suit c4timer.amxx running
[ 48] [PSL] Info Rounds By A 1.0 K@[L]@uz PSL_inforounds. running
[ 49] Descriptive 'Fire in t 0.1 VEN colored_radio.a running
[ 50] WalkGuard 1.3.2 mogel walkguard.amxx running
[ 51] VIP Eng Version 3.0 Dunno PSL_VIP_FREE_WO running
[ 52] AMX Client Exec 0.03 v3x amx_exec.amxx running
[ 53] CS AFK Manager 1.0.6 (amx Freeman afk_manager.amx running
[ 54] AMXX Gag 1.5.0 xPaw & Exolent amx_gag.amxx running
[ 55] Boost Server 1.0 K@[L]@UZ boost_server.am running
[ 56] Invisible Spectator 0.2 ConnorMcLeod PSL_Invis_Spec. running
[ 57] unknown unknown unknown pslgamename.amx running
[ 58] [ReAPI] No Team Flash 0.0.3 Vaqtincha no_team_flash.a running
[ 59] ReAimDetector API 0.2.1 ReHLDS Team reaimdetector.a running
[ 60] Permanent message 1.1 He3aBuCuM permanent_messa running
[ 61] Played Time 1.4 Alka > Edit By A PSL_played_time running
[ 62] Anti sv_password Chang 1.0 BesT autopassremover running
[ 63] Block Advertising 1.3 Alka block_advertisi running
[ 64] Block IP 1.0 bad_boy Anti_IP_With_Sp running
[ 65] xREDIRECT 1.0.3.3 x0R xredirect.amxx running
65 plugins, 65 running
Автор плагина
twisterniq
Версия плагина
1.2.1
Исходный код
/*
* - Official resource topic: https://dev-cs.ru/resources/575/
*
* Credits to:
* - DrStrange (the idea)
* - mx?!
* - wopox1337
* - F@nt0m (reloadcfg/readcfg methods)
*/

#include <amxmodx>

#pragma semicolon 1

public stock const PluginName[] = "Admin Commands Log";
public stock const PluginVersion[] = "1.2.1";
public stock const PluginAuthor[] = "twisterniq";
public stock const PluginURL[] = "https://github.com/twisterniq/amxx-admin-commands-log";
public stock const PluginDescription[] = "Adds the ability to log the commands that put players with access";

new const CONFIG_NAME[] = "admin_commands_log";
new const LIST_CONFIG_NAME[] = "acl_list.ini";

new Trie:g_tCommands;

new g_iType;

enum _:TYPES
{
TYPE_START_AMX = 0,
TYPE_FILE,
TYPE_COMBINED
};

new g_iAccess = (ADMIN_KICK|ADMIN_BAN|ADMIN_CFG|ADMIN_RCON|ADMIN_LEVEL_A);
new g_iReloadCfgAccess = ADMIN_CFG;
new g_szLogFile[PLATFORM_MAX_PATH];

public plugin_init()
{
#if AMXX_VERSION_NUM == 190
register_plugin(
.plugin_name = PluginName,
.version = PluginVersion,
.author = PluginAuthor);
#endif

register_dictionary("admin_commands_log.txt");

register_concmd("acl_reloadcfg", "@func_ConCmdReloadCfg");

g_tCommands = TrieCreate();

new pCvar, iLogType;

pCvar = create_cvar(
.name = "acl_type",
.string = "0",
.flags = FCVAR_NONE,
.description = fmt("%L", LANG_SERVER, "ACL_CVAR_TYPE"),
.has_min = true,
.min_val = 0.0,
.has_max = true,
.max_val = 2.0);
g_iType = get_pcvar_num(pCvar);

pCvar = create_cvar(
.name = "acl_access",
.string = "cdhlm",
.flags = FCVAR_NONE,
.description = fmt("%L", LANG_SERVER, "ACL_CVAR_ACCESS"));
set_pcvar_string(pCvar, "");
hook_cvar_change(pCvar, "@OnAccessChange");

pCvar = create_cvar(
.name = "acl_log_type",
.string = "0",
.flags = FCVAR_NONE,
.description = fmt("%L", LANG_SERVER, "ACL_CVAR_LOG_TYPE"),
.has_min = true,
.min_val = 0.0,
.has_max = true,
.max_val = 2.0);
iLogType = get_pcvar_num(pCvar);

pCvar = create_cvar(
.name = "acl_reloadcfg_access",
.string = "h",
.flags = FCVAR_NONE,
.description = fmt("%L", LANG_SERVER, "ACL_CVAR_RELOADCFG_ACCESS"));
set_pcvar_string(pCvar, "");
hook_cvar_change(pCvar, "@OnReloadCfgAccessChange");

AutoExecConfig(true, "admin_commands_log");

new szPath[PLATFORM_MAX_PATH];

get_localinfo("amxx_configsdir", szPath, charsmax(szPath));
server_cmd("exec %s/plugins/%s.cfg", szPath, CONFIG_NAME);
server_exec();

if (g_iType != TYPE_START_AMX && !func_ReadCfgFile())
{
set_fail_state("[ACL]: An error ocurred loading cfg ^"%s^"", LIST_CONFIG_NAME);
}

new szFileName[64];
get_localinfo("amxx_logs", szPath, charsmax(szPath));

enum { LOG_ALL = 0, LOG_DAILY, LOG_MONTHLY };

switch (iLogType)
{
case LOG_ALL:
{
g_szLogFile = "admin_commands.log";
}
case LOG_DAILY:
{
szFileName = "/admin_commands_%d-%m-%Y.log";
}
case LOG_MONTHLY:
{
szFileName = "/admin_commands_%m-%Y.log";
}
}

if (iLogType != LOG_ALL)
{
add(szPath, charsmax(szPath), "/admin_commands");

if (!dir_exists(szPath))
{
mkdir(szPath);
}

add(szPath, charsmax(szPath), szFileName);
get_time(szPath, g_szLogFile, charsmax(g_szLogFile));
}
}

public client_command(id)
{
if (g_iAccess > 0 && !(get_user_flags(id) & g_iAccess))
{
return PLUGIN_CONTINUE;
}

enum { arg_command = 0 };

new szCommand[64];
read_argv(arg_command, szCommand, charsmax(szCommand));

switch (g_iType)
{
case TYPE_START_AMX:
{
if (containi(szCommand, "amx_") == -1 || !szCommand[4])
{
return PLUGIN_CONTINUE;
}
}
case TYPE_FILE:
{
if (!TrieKeyExists(g_tCommands, szCommand))
{
return PLUGIN_CONTINUE;
}
}
case TYPE_COMBINED:
{
if (!TrieKeyExists(g_tCommands, szCommand) && containi(szCommand, "amx_") == -1)
{
return PLUGIN_CONTINUE;
}
}
}

new szArgs[64];
read_args(szArgs, charsmax(szArgs));

func_LogToFile(id, szCommand, szArgs[0] ? szArgs : "");
return PLUGIN_CONTINUE;
}

func_LogToFile(const id, szCommand[], szArgs[] = "")
{
new szAuthID[MAX_AUTHID_LENGTH], szIP[MAX_IP_LENGTH];
get_user_authid(id, szAuthID, charsmax(szAuthID));
get_user_ip(id, szIP, charsmax(szIP), 1);

log_to_file(g_szLogFile, "%n (<%s> <%s>) ---> %s %s", id, szAuthID, szIP, szCommand, szArgs);
}

// thx to F@nt0m (https://dev-cs.ru/threads/2672/#post-30421)
@func_ConCmdReloadCfg(const id)
{
if (!(get_user_flags(id) & g_iReloadCfgAccess))
{
console_print(id, "[ACL]: You have no access to use this command");
}
else if (!func_ReadCfgFile())
{
console_print(id, "[ACL]: An error ocurred loading cfg ^"%s^"", LIST_CONFIG_NAME);
}
else
{
console_print(id, "[ACL]: Reloading cfg ^"%s^"", LIST_CONFIG_NAME);
}

return PLUGIN_HANDLED;
}

bool:func_ReadCfgFile()
{
new szPath[PLATFORM_MAX_PATH];
get_localinfo("amxx_configsdir", szPath, charsmax(szPath));
format(szPath, charsmax(szPath), "%s/%s", szPath, LIST_CONFIG_NAME);

new iFileHandle = fopen(szPath, "rt");

if (!iFileHandle)
{
return false;
}

new szString[256];

while(!feof(iFileHandle))
{
fgets(iFileHandle, szString, charsmax(szString));
trim(szString);

if (szString[0] == EOS || szString[0] == ';')
{
continue;
}

remove_quotes(szString);

TrieSetCell(g_tCommands, szString, 0);
}

fclose(iFileHandle);

return true;
}

@OnAccessChange(const iHandle, const szOldValue[], const szNewValue[])
{
g_iAccess = read_flags(szNewValue);
}

@OnReloadCfgAccessChange(const iHandle, const szOldValue[], const szNewValue[])
{
g_iReloadCfgAccess = read_flags(szNewValue);
}
Hi, I was worried from few days and had in my mind, may be AMXX is fishy but Thanks to Arkshine for co-operating till last & let me excluded that amxx is not fishy look for some else, I found out Admin Commands Log 1.2.1 by twisterniq is blocking Task Scheduler by Justin Homi.

I performed following tests and found Admin Commands Log needs to be fix

1st test: Removed Admin Commands Log > Issue Fixed.
2nd test: Added Commands Log >Issue Returned.
3rd test: Put Task Schedular above Admin Commands Log > Issue Fixed.

These all sorted. There was no problem with AMXX but plugin I had.

Task Scheduler By Justin Homi: https://forums.alliedmods.net/showthread.php?t=1263
May Help: https://github.com/alliedmodders/amxmodx/issues/873

Other then this I found some error logs too but I don't have debug for it yet so once I will get I will provide but till yet here are rough logs:

Код:
L 06/16/2020 - 22:39:15: Start of error session.
L 06/16/2020 - 22:39:15: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20200616.log")
L 06/16/2020 - 22:39:15: Client index 15 is invalid
L 06/16/2020 - 22:39:15: [AMXX] Run time error 10 (plugin "admin_commands_log.amxx") (native "log_to_file") - debug not enabled!
L 06/16/2020 - 22:39:15: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

L 06/20/2020 - 01:02:23: Start of error session.
L 06/20/2020 - 01:02:23: Info (map "de_nuke32") (file "addons/amxmodx/logs/error_20200620.log")
L 06/20/2020 - 01:02:23: Client index 28 is invalid
L 06/20/2020 - 01:02:23: [AMXX] Run time error 10 (plugin "admin_commands_log.amxx") (native "log_to_file") - debug not enabled!
L 06/20/2020 - 01:02:23: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

L 06/21/2020 - 20:12:32: Start of error session.
L 06/21/2020 - 20:12:32: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20200621.log")
L 06/21/2020 - 20:12:32: Client index 14 is invalid
L 06/21/2020 - 20:12:32: [AMXX] Run time error 10 (plugin "admin_commands_log.amxx") (native "log_to_file") - debug not enabled!
L 06/21/2020 - 20:12:32: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

L 06/25/2020 - 22:16:25: Start of error session.
L 06/25/2020 - 22:16:25: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20200625.log")
L 06/25/2020 - 22:16:25: Client index 18 is invalid
L 06/25/2020 - 22:16:25: [AMXX] Run time error 10 (plugin "admin_commands_log.amxx") (native "log_to_file") - debug not enabled!
L 06/25/2020 - 22:16:25: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
 
Сообщения
213
Реакции
71
Помог
2 раз(а)
Hi, I'm back with Debug Trace.
Plugin Arthur Tag: twisterniq
Код:
L 07/02/2020 - 21:20:31: Start of error session.
L 07/02/2020 - 21:20:31: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20200702.log")
L 07/02/2020 - 21:20:31: Client index 16 is invalid
L 07/02/2020 - 21:20:31: [AMXX] Displaying debug trace (plugin "admin_commands_log.amxx", version "1.2.1")
L 07/02/2020 - 21:20:31: [AMXX] Run time error 10: native error (native "log_to_file")
L 07/02/2020 - 21:20:31: [AMXX]    [0] admin_commands_log.sma::func_LogToFile (line 192)
L 07/02/2020 - 21:20:31: [AMXX]    [1] admin_commands_log.sma::client_command (line 182)

L 07/06/2020 - 00:12:16: Start of error session.
L 07/06/2020 - 00:12:16: Info (map "de_westwood") (file "addons/amxmodx/logs/error_20200706.log")
L 07/06/2020 - 00:12:16: Client index 26 is invalid
L 07/06/2020 - 00:12:16: [AMXX] Displaying debug trace (plugin "admin_commands_log.amxx", version "1.2.1")
L 07/06/2020 - 00:12:16: [AMXX] Run time error 10: native error (native "log_to_file")
L 07/06/2020 - 00:12:16: [AMXX]    [0] admin_commands_log.sma::func_LogToFile (line 192)
L 07/06/2020 - 00:12:16: [AMXX]    [1] admin_commands_log.sma::client_command (line 182)
 
Сообщения
1,419
Реакции
2,508
Помог
59 раз(а)
You can try adding this. Maybe it'll solve it.

Код:
public client_command(id)
{
-    if (g_iAccess > 0 && !(get_user_flags(id) & g_iAccess))
+    if (!is_user_connected(id) || g_iAccess > 0 && !(get_user_flags(id) & g_iAccess))
 
Сообщения
213
Реакции
71
Помог
2 раз(а)
& What about the plugin interruption with other plugins? That too?
 
Сообщения
1,419
Реакции
2,508
Помог
59 раз(а)
I have no idea how it can interrupt other plugins, perhaps it's the other plugin's issue. You can do what you said, put it above.
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу