VAC Ban Status stack error

Сообщения
169
Реакции
51
Помог
6 раз(а)
Ошибка
[AMXX] Displaying debug trace (plugin "vacbans_041_beta.amxx", version "0.41")
[AMXX] Run time error 3: stack error
ОС
Linux
Amx Mod X
1.9.0.5294
Билд
3.13.0.788-dev
ReGamedll
5.22.0.593-dev
Версия Metamod
1.3.0.128
Список метамодулей
description      stat pend  file                        vers             src  load  unload
[ 1] Accuracy Fix RUN - accuracyfix_mm.so v1.0.2 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.137 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 5] Rechecker RUN - rechecker_mm_i386.so v2.7 ini Chlvl ANY
[ 6] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5294 ini Start ANY
[ 7] ReSemiclip RUN - resemiclip_mm_i386.so v2.4.3 ini Chlvl ANY
[ 8] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 9] YaPB RUN - yapb.so v4.3.734 ini Chlvl ANY
[10] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5294 pl6 ANY ANY
[11] Engine RUN - engine_amxx_i386.so v1.9.0.5294 pl6 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5294 pl6 ANY ANY
[13] Fun RUN - fun_amxx_i386.so v1.9.0.5294 pl6 ANY ANY
[14] CURL AMXX RUN - curl_amxx_i386.so v1.1.1 pl6 ANY ANY
[15] ReAPI RUN - reapi_amxx_i386.so v5.22.0.254-dev pl6 ANY Never
[16] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5294 pl6 ANY ANY
[17] CSX RUN - csx_amxx_i386.so v1.9.0.5294 pl6 ANY ANY
[18] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5294 pl6 ANY ANY
[19] IPHub Client RUN - iphubclient_amxx_i386.so v1.0.1 pl6 ANY Never
[20] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl6 ANY Never
[21] MySQL RUN - mysql_amxx_i386.so v1.9.0.5294 pl6 ANY ANY
21 plugins, 21 running
Список плагинов
name                    version     author            file             status   
[ 1] Admin Commands 1.9.0.5294 AMXX Dev Team admincmd.amxx running
[ 2] Slots Reservation 1.9.0.5294 AMXX Dev Team adminslots.amxx running
[ 3] Multi-Lingual System 1.9.0.5294 AMXX Dev Team multilingual.am running
[ 4] Restrict Weapons 1.9.0.5294 AMXX Dev Team restmenu.amxx running
[ 5] New Kick Menu 1.4.2 Radius newkickmenu.amx running
[ 6] Commands Menu 1.9.0.5294 AMXX Dev Team cmdmenu.amxx running
[ 7] Players Menu 1.9.0.5294 AMXX Dev Team plmenu.amxx running
[ 8] Maps Menu 1.9.0.5294 AMXX Dev Team mapsmenu.amxx running
[ 9] Plugin Menu 1.9.0.5294 AMXX Dev Team pluginmenu.amxx running
[ 10] Admin Chat 1.9.0.5294 AMXX Dev Team adminchat.amxx running
[ 11] Scrolling Message 1.9.0.5294 AMXX Dev Team scrollmsg.amxx running
[ 12] Info. Messages 1.9.0.5294 AMXX Dev Team imessage.amxx running
[ 13] Admin Votes 1.9.0.5294 AMXX Dev Team adminvote.amxx running
[ 14] Pause Plugins 1.9.0.5294 AMXX Dev Team pausecfg.amxx running
[ 15] VAC Ban Status 0.41 bugsy vacbans_041_bet debug
[ 16] MOTD Model 1.1.0 fl0wer motd_model.amxx running
[ 17] Mode 2x2 2.5re s1lent mode.amxx running
[ 18] [ReAPI] Silly C4 2.0 F@ntoM & Cheap_S reapi_sillyc4.a running
[ 19] Ultimate Gore 1.6 JTP10181 amx_gore_ultima running
[ 20] Welcom 1.0 4el welcome_music.a running
[ 21] Admin Spectator ESP 1.3 KoST admin_spec_esp. running
[ 22] Top Bomber 0.2.0 Albertio top_bomber.amxx stopped
[ 23] Style C4 Timer 2.0 OciXCrom crx_c4timer.amx running
[ 24] [RP] Connect Info 1.0.0 Nordic Warrior geoip_connect_i running
[ 25] AFK Control 1.0 mx?! afk_control.amx running
[ 26] [ReAPI] Block 'Fire in 0.0.1 sergrib reapi_block_FIT running
[ 27] [ReAPI] Colored Flash 1.0 ReHLDS Team colored_flash.a running
[ 28] [ReAPI:AMXX] Buy Nades 0.0.3a steelzorrr buy_nades_limit running
[ 29] Quick Defuse Bomb 0.0.2 Albertio quick_defuse_bo stopped
[ 30] C4 CD Voice 1.1 c4timer_by_msk18 c4_cd_voice.amx running
[ 31] Knife Duel with Telepo 1.2 neygomon knife_duel.amxx running
[ 32] [ReAPI] No Team Flash 0.0.3 Vaqtincha no_team_flash.a running
[ 33] KiLL Assist poka_4to_b PRoSToTeM@ Kill_assist_rea running
[ 34] Reset Score 1.1.1 Nordic Warrior reset_score.amx running
[ 35] [BG] Provider: IPHub-C 1.1 mx?! bg_provider_iph running
[ 36] [BG] Provider: GeoIP 0.2 mx?! bg_provider_geo running
[ 37] Bypass Guard 1.0.1 mx?! bypass_guard.am running
[ 38] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 39] Unreal Demo Plugin 1.54 karaulov unreal_demo_plu running
[ 40] HPP_BLOCK 1.1 UNKNOWN + bristo hpp_blocker.amx running
[ 41] UNREAL ANTI-ESP 2.7 Karaulov anti_esp.amxx running
[ 42] Client Autoexec 1.2 miRror client_autoexec running
[ 43] Weapon Kill 1.2 Slove. & AcE weaponkill.amxx running
[ 44] Knife kill 1.0.1 MurLemur knife_kill_soun running
[ 45] unknown unknown unknown Server-Side_Smo running
[ 46] [ReAPI] Best player of 1.1.2 F@nt0M best_player_of_ running
[ 47] Back Weapons New 0.1 Vaqtincha backweapon.amxx running
[ 48] Kills Counter 0.3 serfreeman1337 kills_counter.a running
[ 49] Weapons Skins Manager 0.0.1 Vaqtincha weapons_skins_m running
[ 50] Time for info 1.0 neugomon time_for_info.a running
[ 51] [GM] Weapon Models 0.0.1.0 [GM] NWC gm_weapon_model running
[ 52] Game Description Advan 1.0 fl0wer gamedesc_advanc running
[ 53] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc running
[ 54] C4 & Grenade Explode S 1.0 BodyBuilder | Ma c4_grenade_expl running
[ 55] Unreal Spawn Fixer 1.1 karaulov unreal_spawn_fi running
[ 56] Fix rehlds rate 1.0 Spartanec fix_rehlds.amxx running
[ 57] [190] AMXBans RBS 22.12.08BE SKAJIbnEJIb & La amxbans_rbs.amx running
[ 58] Menus Front-End 20.06.06 SKAJIbnEJIb & AM amxmodmenu_rbs. running
[ 59] [190] Army Ranks Ultim 20.06.06 SKAJIbnEJIb army_ranks_ulti running
[ 60] [ReAMX] Ultimate Gag 17.12.22BE SKAJIbnEJIb ultimate_gag.am running
[ 61] [190] Chat RBS 22.12.07BE SKAJIbnEJIb chat_rbs.amxx running
[ 62] [190] CsStats MySQL 22.11.15 SKAJIbnEJIb csstats_mysql.a running
[ 63] [190] Damager RBS 20.06.06 SKAJIbnEJIb damager_rbs.amx running
[ 64] [190] First Players Re 20.06.06 SKAJIbnEJIb FirstPlayersRes paused
[ 65] [190] Maps Helper 20.06.06 SKAJIbnEJIb maps_helper.amx running
[ 66] [190] Parachute RBS 22.12.07BE SKAJIbnEJIb & KR parachute_rbs.a running
[ 67] [190] Skill ELO 22.11.15 SKAJIbnEJIb skill_elo.amxx running
[ 68] [190] StatsX Unlimited 22.12.08 SKAJIbnEJIb statsx_unlimite running
[ 69] [190] Stats Configurat 20.06.06 SKAJIbnEJIb & AM statscfg_rbs.am running
[ 70] [190] StatsX RBS 21.03.23 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 71] [190] Top Award RBS 20.06.06 SKAJIbnEJIb topaward_rbs.am running
[ 72] [190] Ultimate Flags 22.11.15 SKAJIbnEJIb ultimate_flags. running
[ 73] [190] Ultimate Weapons 22.11.15 SKAJIbnEJIb ultimate_weapon running
[ 74] [190] Vanga Detector 23.07.29 SKAJIbnEJIb & Pr vanga_detector. running
[ 75] [190] VIP RBS 22.12.08BE SKAJIbnEJIb vip_rbs.amxx running
[ 76] [190] RestMenu RBS 20.06.06 SKAJIbnEJIb & AM restmenu_rbs.am running
[ 77] [190] High Ping Kicker 20.06.06 SKAJIbnEJIb hpk_rbs.amxx running
[ 78] [190] SlayLosers RBS 20.06.06 SKAJIbnEJIb & d3 slaylosers_rbs. running
[ 79] [190] DemoRecorder RBS 20.06.06 SKAJIbnEJIb demorecorder_rb running
[ 80] [190] VoteBan RBS 20.06.06 SKAJIbnEJIb voteban_rbs.amx running
[ 81] Map Manager: Core 3.2.1 Mistrick map_manager_cor running
[ 82] Map Manager: Scheduler 0.2.1 Mistrick map_manager_sch running
[ 83] Map Manager: Rtv 0.1.5 Mistrick map_manager_rtv running
[ 84] Map Manager: Nominatio 0.3.5 Mistrick map_manager_nom running
[ 85] Map Manager: BlockList 0.0.4 Mistrick map_manager_blo running
[ 86] Map Manager: Online so 0.0.4 Mistrick map_manager_onl running
[ 87] Map Manager: Effects 0.1.3 Mistrick map_manager_eff running
[ 88] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 89] Map Manager: Sounds 0.0.3 Mistrick map_manager_sou running
89 plugins, 86 running
Автор плагина
bugsy
Версия плагина
0.41
Исходный код
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <curl>
#include <nvault>

new const Version[] = "0.41";

#define VAULT "vacbanstatus"

enum //Check method
{
AUTO_CHECK,
MANUAL_NAME,
MANUAL_STEAMID
}

enum //Punishments
{
LOG_ONLY,
KICK_ONLY,
KICK_BAN_ID,
KICK_BAN_IP,
KICK_AMXBAN,
SHOOTBLANKS,
KICK_KDRATIO,
KICK_BAN_ID_KDRATIO,
KICK_BAN_IP_KDRATIO,
KICK_AMXBAN_KDRATIO,
SHOOTBLANKS_KDRATIO
}

enum //Database ban values
{
NO_DB_ENTRY,
NOT_BANNED,
BANNED,
NOT_BANNED_WHITELIST,
BANNED_WHITELIST
}

//Global vars
new g_VACBanned[ MAX_PLAYERS + 1 ]; //1 if VAC banned
new g_Punished[ MAX_PLAYERS + 1 ]; //1 when player punished
new g_ShootsBlanks[ MAX_PLAYERS + 1 ]; //1 if player shoots blanks
new g_JoinedTeam[ MAX_PLAYERS + 1 ]; //1 when joins a team (T or CT)
new g_IsBot[ MAX_PLAYERS + 1 ]; //1 if player is bot
new g_NotifyFlag[ MAX_PLAYERS + 1 ]; //1 if user has notify admin flag
new g_FMTraceLine; //FM traceline forward handle.
new g_NumShootsBlanks; //# of players who shoot blanks.
new g_Vault; //nVault handle
new g_MaxPlayers; //Max players server holds
new g_szSteamName[ MAX_PLAYERS + 1 ][65]; //Steam community name
new g_szFriendID[ MAX_PLAYERS + 1 ][65]; //Steam community ID#
new g_szAuthID[ MAX_PLAYERS + 1 ][35]; //Steam ID
new g_szName[ MAX_PLAYERS + 1 ][33]; //Name
new g_BodyHits[ MAX_PLAYERS + 1 ][33]; //For fm_set_user_hitzones

enum _:RequestData
{
RequestorID,
PlayerID,
RequestType,
SteamID64[ 32 ]
}
new g_CurlRequests[ CURL:33 ][ RequestData ]; //Request ID (handle of curl request)
const CURL_BUFFERSIZE = 4096;
new g_szCurlErrorBuffer[ CURL_ERROR_SIZE ];
new g_szCurlSSLCert[ 64 ];

//Cvar pointers
new g_pAutoCheck; //CVAR Enable\disable autocheck
new g_pVACCheck; //CVAR Specifies when to check player (0=connect or 1=team join)
new g_pExpireDays; //CVAR Days at which a saved VAC ban is removed
new g_pKDRatio; //CVAR Kill\Death ratio used for kdratio punishments
new g_pKDMin; //CVAR Min kills required before checking kdratios
new g_pPunishment; //CVAR Type of punishment to issue
new g_pBanTime; //CVAR Number of minutes a player is banned for ban punishments
new g_pNotifyFlag; //CVAR Notify flag required for notifications

public plugin_init()
{
register_plugin( "VAC Ban Status" , Version , "bugsy" );
register_cvar( "VAC Ban Status" , Version , FCVAR_SERVER , 0.0 );

register_concmd( "amx_vacban" , "CommandHandler" , ADMIN_BAN , "<Player\SteamID> - Check if player\steamid is VAC banned." );
register_concmd( "amx_vacquery" , "CommandHandler" , ADMIN_BAN , "<Player\SteamID>- Query a player\steamid database entry." );
register_concmd( "amx_vacaddwhitelist" , "CommandHandler" , ADMIN_BAN , "<Player\SteamID>- Add player\steamid to whitelist." );
register_concmd( "amx_vacremovewhitelist" , "CommandHandler" , ADMIN_BAN , "<Player\SteamID>- Remove player\steamid from whitelist." );
register_concmd( "amx_vacremoveentry" , "CommandHandler" , ADMIN_BAN , "<Player\SteamID>- Remove VAC ban status from database." );
register_concmd( "amx_vacclearall" , "CommandHandler" , ADMIN_BAN , "- Clear all database entries" );
register_concmd( "amx_vacclearnotbanned" , "CommandHandler" , ADMIN_BAN , "- Clear database entries for players that are not VAC banned." );

g_pAutoCheck = register_cvar( "vbs_autocheck" , "1" );
g_pVACCheck = register_cvar( "vbs_vaccheck" , "0" );
g_pPunishment = register_cvar( "vbs_punishment" , "0" );
g_pNotifyFlag = register_cvar( "vbs_notifyflag" , "d" );
g_pKDRatio = register_cvar( "vbs_kdratio" , "3" );
g_pKDMin = register_cvar( "vbs_kdminkills" , "15" );
g_pExpireDays = register_cvar( "vbs_expiredays" , "15" );
g_pBanTime = register_cvar( "vbs_bantime" , "0" );

register_event( "DeathMsg" , "fwEvDeathMsg" , "a" );
register_event( "TeamInfo" , "fwPlayerJoinedTeam" , "a" , "2=TERRORIST" , "2=CT" );

g_MaxPlayers = get_maxplayers();
}

public plugin_cfg()
{
new szConfigDir[ 64 ] , iLen;

iLen = get_modname( g_szCurlSSLCert , charsmax( g_szCurlSSLCert ) );
g_szCurlSSLCert[ iLen++ ] = '/';
copy( g_szCurlSSLCert[ ( iLen += get_datadir( g_szCurlSSLCert[ iLen ] , charsmax( g_szCurlSSLCert ) - iLen ) ) ] , charsmax( g_szCurlSSLCert ) - iLen , "/curl_cert/cacert.pem" );

if ( !file_exists( g_szCurlSSLCert , true ) )
{
set_fail_state( "curl SSL certificate not found. Place here: %s^nVisit: https://curl.se/docs/caextract.html" , g_szCurlSSLCert );
return;
}

get_configsdir( szConfigDir , charsmax( szConfigDir ) );
server_cmd( "exec %s/vacbanstatus.cfg" , szConfigDir );
server_exec();

if ( ( g_Vault = nvault_open( VAULT ) ) == INVALID_HANDLE )
set_fail_state( "Error opening nVault" );
else
nvault_prune( g_Vault , 0 , get_systime() - ( get_pcvar_num( g_pExpireDays ) * 86400 ) );
}

public plugin_end()
{
nvault_close( g_Vault );
}

public client_connect( id )
{
fm_hitzones_reset( id );
}

public client_putinserver( id )
{
if ( ( g_IsBot[ id ] = is_user_bot( id ) ) )
return PLUGIN_CONTINUE;

//Get users name and steamid and store it in global variable so it will
//not need to be retrieved again if needed later.
get_user_name( id , g_szName[ id ] , charsmax( g_szName[] ) );
get_user_authid( id , g_szAuthID[ id ], charsmax( g_szAuthID[] ) );

//For testing with a known banned steamid
//if ( id == get_user_index("bugsy") )
// g_szAuthID[id] = "STEAM_0:0:100";

//If auto-checking and check-on-connect are enabled, check player for VAC ban
if ( get_pcvar_num( g_pAutoCheck ) && !get_pcvar_num( g_pVACCheck ) )
AutoCheckPlayer(id);

//An admin has connected, check if has the required admin flag needed for notification.
//If so, notify him of any players that are connected that have a VAC ban on record.
if ( is_user_admin( id ) )
{
new szFlag[2];
get_pcvar_string( g_pNotifyFlag , szFlag , 1 );

//If player has admin flag specified in cvar vbs_notifyflag
if ( ( g_NotifyFlag[ id ] = ( get_user_flags( id ) & read_flags( szFlag ) ) ) )
set_task( 8.0 , "NotifyAdmin" , id );
}

return PLUGIN_CONTINUE;
}

public fwPlayerJoinedTeam()
{
new id = read_data( 1 );

if ( g_JoinedTeam[id] || g_IsBot[id] || !get_pcvar_num( g_pAutoCheck ) || !get_pcvar_num( g_pVACCheck ) )
return PLUGIN_CONTINUE;

g_JoinedTeam[ id ] = 1;

AutoCheckPlayer( id );

return PLUGIN_CONTINUE;
}

public fwEvDeathMsg()
{
new iPunishment = get_pcvar_num( g_pPunishment );
new iKiller = read_data( 1 );
new iVictim = read_data( 2 );

if( ( iPunishment < KICK_KDRATIO ) || !iKiller || !g_VACBanned[ iKiller ] || ( iKiller == iVictim ) || g_Punished[ iKiller ] )
return PLUGIN_CONTINUE;

new iKills = get_user_frags( iKiller );
new iDeaths = get_user_deaths( iKiller );

if ( ( iKills >= get_pcvar_num( g_pKDMin ) ) && ( ( float( iKills ) / get_pcvar_float( g_pKDRatio ) ) >= float( iDeaths ) ) )
{
iPunishment -= KICK_KDRATIO;
PunishPlayer( iKiller , iPunishment );
}

return PLUGIN_CONTINUE;
}

#if AMXX_VERSION_NUM < 190
public client_disconnect( id )
#else
public client_disconnected( id )
#endif
{
if( g_IsBot[ id ] )
return PLUGIN_CONTINUE;

if ( g_ShootsBlanks[ id ] )
SetShootBlanks( id , 0 );

//Clear all vars for player index
g_szSteamName[ id ][ 0 ] = EOS;
g_szFriendID[ id ][ 0 ] = EOS;
g_szAuthID[ id ][ 0 ] = EOS;
g_szName[ id ][ 0 ] = EOS;
g_VACBanned[ id ] = 0;
g_JoinedTeam[ id ] = 0;
g_NotifyFlag[ id ] = 0;
g_Punished[ id ] = 0;

return PLUGIN_CONTINUE;
}

public AutoCheckPlayer(id)
{
new iBanVal = nvault_get( g_Vault , g_szAuthID[ id ] );

//No entry exists in database for player, send VAC check request to steam server
if ( iBanVal == NO_DB_ENTRY )
{
SendRequest( 0 , id , AUTO_CHECK );
}
//Entry found in database and player is VAC banned, punish and notify admins
else if ( iBanVal == BANNED )
{
static szHUD[ 256 ];
new iPlayers[ 32 ];
new iPlayersNum;
new iPlayer;

g_VACBanned[ id ] = 1;

get_players( iPlayers , iPlayersNum , "c" );

formatex( szHUD , charsmax( szHUD ) , "[VAC Ban Status]^n^n%s has a VAC ban on record. [Database]^nSteamID: %s" , g_szName[ id ] , g_szAuthID[ id ] );
set_hudmessage( 255 , 255 , 255 , 0.10 , 0.35 , 0 , 2.0 , 4.0 , 0.5 , 0.5 , 3 );

//Notify all connected admins that this player has connected and is banned
for ( new i = 0 ; ( i < iPlayersNum ) ; i++ )
{
iPlayer = iPlayers[ i ];
if ( g_NotifyFlag[ iPlayer ] )
{
show_hudmessage( iPlayer , szHUD );
client_cmd( iPlayer , "spk buttons/blip1.wav" );
}
}

//If punishment is not a kd-ratio punishment, issue punishment now.
new iPunishment = get_pcvar_num( g_pPunishment );

if ( iPunishment <= SHOOTBLANKS )
{
//VAC check done on client connect so we need a little pause to allow player to
//fully initialize into game or else some punishments will not work.
if ( !get_pcvar_num( g_pVACCheck ) )
{
new params[ 2 ];
params[ 0 ] = id;
params[ 1 ] = iPunishment;
set_task( 0.5 , "DelayPunishment" , _ , params , sizeof( params ) );
}
else
{
PunishPlayer( id , iPunishment );
}
}
}
}

public DelayPunishment( params[ 2 ] )
{
PunishPlayer( params[ 0 ] , params[ 1 ] );
}

public CommandHandler( id , level , cid )
{
if( !cmd_access( id , level , cid , 1 ) )
return PLUGIN_HANDLED;

//amx_vacban
//amx_vacremoveentry
//amx_vacaddwhitelist
//amx_vacremovewhitelist
//amx_vacquery
//amx_vacclearall
//amx_vacclearnotbanned

new szCmd[ 23 ];

read_argv( 0 , szCmd , charsmax( szCmd ) );

if ( equal( szCmd , "amx_vacclearnotbanned" ) )
{
nvault_prune( g_Vault , 0 , get_systime() );
console_print( id , "*[VAC BAN Status] Все записи, не запрещенные VAC, были удалены." );

return PLUGIN_HANDLED;
}
else if ( equal( szCmd , "amx_vacclearall" ) )
{
new szVaultFile[ 65 ] , iLen;
formatex( szVaultFile[ ( iLen = get_datadir( szVaultFile , charsmax( szVaultFile ) ) ) ] , charsmax( szVaultFile ) - iLen , "/vault/%s.vault" , VAULT );

nvault_close( g_Vault );

if ( delete_file( szVaultFile ) )
{
if ( ( g_Vault = nvault_open( VAULT ) ) != INVALID_HANDLE )
{
console_print( id , "*[VAC Ban Status] База данных успешно очищена." );
return PLUGIN_HANDLED;
}
}

set_fail_state( "Error clearing nvault" );

return PLUGIN_HANDLED;
}

new iPlayer;
new szVal[2];
new iBanVal;
new iTimestamp;
new szArgs[46];
new iRequestType;

read_args( szArgs , charsmax( szArgs ) );

//The below commands all require a parameter (name\steamid) so we determine which is
//being specified by the user.
if( !equali( szArgs , "STEAM_0:" , 8 ) )
{
iPlayer = cmd_target( id , szArgs , ( CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS ) );

if( !is_user_connected( iPlayer ) || g_IsBot[ iPlayer ] )
return PLUGIN_HANDLED;
}
else
{
iPlayer = 0;

trim( szArgs );

copy( g_szAuthID[ iPlayer ] , charsmax( g_szAuthID[] ) , szArgs[ strfind( szArgs , " " ) + 1 ] );

strtoupper( g_szAuthID[ iPlayer ] );

if ( ( strlen( g_szAuthID[ iPlayer ] ) <= 10 ) )
{
console_print( id , "*[VAC Ban Status] Недопустимый SteamID [%s]." , g_szAuthID[ iPlayer ] );
return PLUGIN_HANDLED;
}

if ( g_szAuthID[ iPlayer ][ 10 ] == '0' )
formatex( g_szAuthID[ iPlayer ][ 10 ] , charsmax( g_szAuthID[] ) - 10 , "%d" , str_to_num( g_szAuthID[ iPlayer ][ 10 ] ) );
}

if ( nvault_lookup( g_Vault , g_szAuthID[iPlayer] , szVal , charsmax( szVal ) , iTimestamp ) )
iBanVal = str_to_num( szVal );

if ( equal( szCmd , "amx_vacban" ) )
{
//if( g_Socket[id] )
//{
// console_print( id , "*[VAC Ban Status] Предыдущая проверка все еще выполняется, повторите попытку, когда она завершится." );
// return PLUGIN_HANDLED;
//}

if ( iPlayer )
{
console_print( id , "*[VAC Ban Status] Проверка %s [%s]." , g_szName[iPlayer] , g_szAuthID[iPlayer] );
iRequestType = MANUAL_NAME;
}
else
{
console_print( id , "*[VAC Ban Status] Проверка SteamID [%s]." , g_szAuthID[iPlayer] );
iRequestType = MANUAL_STEAMID;
}

SendRequest( id , iPlayer , iRequestType );

return PLUGIN_HANDLED;
}
else if ( equal( szCmd , "amx_vacquery" ) )
{
switch ( iBanVal )
{
case NO_DB_ENTRY: console_print( id , "*[VAC Ban Status] Запрос: В базе данных не существует записи для %s." , !iPlayer ? g_szAuthID[iPlayer] : g_szName[iPlayer] );
case NOT_BANNED:
{
new Float:fExpireDays = ( ( get_pcvar_float( g_pExpireDays ) * 86400.0 ) - ( float(get_systime()) - float(iTimestamp) ) ) / 86400.0;
console_print( id , "*[VAC Ban Status] Запрос: %s не заблокирован VAC. Срок действия записи истекает через %d дней." , !iPlayer ? g_szAuthID[iPlayer] : g_szName[iPlayer] , floatround(fExpireDays) );
}
case BANNED: console_print( id , "*[VAC Ban Status] Запрос: %s имеет VAC-бан на запись." , !iPlayer ? g_szAuthID[iPlayer] : g_szName[iPlayer] );
case NOT_BANNED_WHITELIST: console_print( id , "*[VAC Ban Status] Запрос: %s занесен в белый список без запрета VAC на запись." , !iPlayer ? g_szAuthID[iPlayer] : g_szName[iPlayer] );
case BANNED_WHITELIST: console_print( id , "*[VAC Ban Status] Запрос: %s занесен в белый список с запретом VAC на запись." , !iPlayer ? g_szAuthID[iPlayer] : g_szName[iPlayer] );
}

return PLUGIN_HANDLED;
}
else if ( equal( szCmd , "amx_vacaddwhitelist" ) )
{
if ( iBanVal <= BANNED )
{
if ( !iBanVal )
iBanVal = NOT_BANNED;

szVal[0] = '0' + ( iBanVal + 2 );

nvault_pset( g_Vault , g_szAuthID[iPlayer] , szVal );

console_print( id , "*[VAC Ban Status] %s был внесен в белый список." , !iPlayer ? g_szAuthID[iPlayer] : g_szName[iPlayer] );
}
else
{
console_print( id , "*[VAC Ban Status] %s уже внесен в белый список." , !iPlayer ? g_szAuthID[iPlayer] : g_szName[iPlayer] );
}

return PLUGIN_HANDLED;
}

//The below commands involve removing existing entries so we verify that an entry exists first.
if ( !iBanVal )
{
console_print( id , "*[VAC Ban Status] Для %s не существует записи в базе данных." , !iPlayer ? g_szAuthID[iPlayer] : g_szName[iPlayer] );
return PLUGIN_HANDLED;
}

if ( equal( szCmd , "amx_vacremoveentry" ) )
{
//Player has VAC status in db and is not whitelisted
if ( iBanVal <= BANNED )
{
nvault_remove( g_Vault , g_szAuthID[iPlayer] );
console_print( id , "*[VAC Ban Status] Запись базы данных VAC ban для %s была удалена." , !iPlayer ? g_szAuthID[iPlayer] : g_szName[iPlayer] );
}
else
{
console_print( id , "*[VAC Ban Status] %s занесен в белый список, необходимо использовать команду amx_vacremovewhitelist." , !iPlayer ? g_szAuthID[iPlayer] : g_szName[iPlayer] );
}
}
else if ( equal( szCmd , "amx_vacremovewhitelist" ) )
{
//Player is on whitelist, set appropriate ban status by subtracting 2 from whitelist status
if ( iBanVal >= NOT_BANNED_WHITELIST )
{
szVal[0] = '0' + ( iBanVal - 2 );

if ( iBanVal == NOT_BANNED_WHITELIST )
nvault_set( g_Vault , g_szAuthID[iPlayer] , szVal );
else
nvault_pset( g_Vault , g_szAuthID[iPlayer] , szVal );

console_print( id , "*[VAC Ban Status] %s был удален из белого списка; игрок %s забанен VAC." , !iPlayer ? g_szAuthID[iPlayer] : g_szName[iPlayer] , ( iBanVal == NOT_BANNED_WHITELIST ) ? " not" : "" );
}
else
{
console_print( id , "*[VAC Ban Status] %s имеет запись в базе данных, но не занесен в белый список. Используйте команду amx_vac удалить запись" , !iPlayer ? g_szAuthID[iPlayer] : g_szName[iPlayer] );
}
}


return PLUGIN_HANDLED;
}


public NotifyAdmin( id )
{
static szNames[513];
new iPlayers[32];
new iPlayersNum;
new iPlayer;
new iPos;
new iFound;

iPos = formatex( szNames , 512 , "[VAC Ban Status]^nThe following players have^na VAC ban on record:^n^n" );

get_players( iPlayers , iPlayersNum , "c" );

//Cycle through all players and create a list of VAC banned players
for ( new i = 0 ; i < iPlayersNum ; i++ )
{
iPlayer = iPlayers[ i ];

if( g_VACBanned[ iPlayer ] )
{
iFound++;
iPos += formatex( szNames[ iPos ] , charsmax( szNames ) - iPos , "%s^n" , g_szName[ iPlayer ] );
}
}

//If we have found any, display to admin
if( iFound )
{
set_hudmessage( 255 , 255 , 255 , 0.10 , 0.35 , 0 , 2.0 , 4.0 , 0.5 , 0.5 , 3 );
show_hudmessage( id , szNames );
client_cmd( id , "spk buttons/blip1.wav" );
}
}

public SendRequest( id , idCheck , iRequestType )
{
new szURL[ 128 ];
new CURL:cURLHandle , CURLcode:ccRetVal;

GetFriendID( g_szAuthID[ idCheck ] , g_szFriendID[ idCheck ] , charsmax( g_szFriendID[] ) );
formatex( szURL , charsmax( szURL ) , "https://steamcommunity.com/profiles/%s?xml=1" , g_szFriendID[ idCheck ] );

cURLHandle = curl_easy_init();

curl_easy_setopt( cURLHandle , CURLOPT_URL , szURL );

g_CurlRequests[ cURLHandle ][ RequestorID ] = id;
g_CurlRequests[ cURLHandle ][ PlayerID ] = idCheck;
g_CurlRequests[ cURLHandle ][ RequestType ] = iRequestType;
copy( g_CurlRequests[ cURLHandle ][ SteamID64 ] , charsmax( g_CurlRequests[][ SteamID64 ] ) , g_szFriendID[ idCheck ] );

curl_easy_setopt( cURLHandle , CURLOPT_WRITEFUNCTION , "ResponseReceived" );
curl_easy_setopt( cURLHandle , CURLOPT_ERRORBUFFER , g_szCurlErrorBuffer );
curl_easy_setopt( cURLHandle , CURLOPT_BUFFERSIZE , CURL_BUFFERSIZE );
curl_easy_setopt( cURLHandle , CURLOPT_SSL_VERIFYPEER, 1);
curl_easy_setopt( cURLHandle , CURLOPT_CAINFO , g_szCurlSSLCert );

if ( ( ccRetVal = CURLcode:curl_easy_perform( cURLHandle , "CurlCallback" , g_CurlRequests[ cURLHandle ] , sizeof( g_CurlRequests[] ) ) ) != CURLE_OK )
{
if ( g_szCurlErrorBuffer[ 0 ] == EOS )
{
curl_easy_strerror( ccRetVal , g_szCurlErrorBuffer , charsmax( g_szCurlErrorBuffer ) );
}

set_fail_state( "curl request failed with error %d [%s]" , ccRetVal , g_szCurlErrorBuffer );
}

return PLUGIN_HANDLED;
}

public ResponseReceived( const szBuffer[] , iSize , iNumMemb , sd )
{
new iBannedPos = strfind( szBuffer , "<vacBanned>" );
new szBanVal[ 2 ];
new szStatus[ 2 ];
new szName[ 32 ];
new szSteamID64[ 32 ];
new CURL:cSlot;

if ( iBannedPos != -1 )
{
new iSteamNamePos = strfind( szBuffer , "<steamID><![CDATA[" );
new iSteamNameEnd = strfind( szBuffer , "]]></steamID>" );
new iSteamID64 = strfind( szBuffer , "<steamID64>" );
new iSteamID64End = strfind( szBuffer , "</steamID64>" );

copy( szStatus , charsmax( szStatus ) , szBuffer[ iBannedPos + 11 ] );
copy( szName , iSteamNameEnd - ( iSteamNamePos + 18 ) , szBuffer[ iSteamNamePos + 18 ] );
copy( szSteamID64 , iSteamID64End - ( iSteamID64 + 11 ) , szBuffer[ iSteamID64 + 11 ] );

cSlot = GetSlotBySteam64( szSteamID64 );

new id = g_CurlRequests[ cSlot ][ RequestorID ];
new idCheck = g_CurlRequests[ cSlot ][ PlayerID ];
new iRequestType = g_CurlRequests[ cSlot ][ RequestType ];

if ( szStatus[ 0 ] == '1' )
{
g_VACBanned[idCheck] = 1;

switch ( iRequestType )
{
case AUTO_CHECK:
{
szBanVal[0] = '0' + BANNED;
nvault_pset( g_Vault , g_szAuthID[idCheck] , szBanVal );

log_to_file( "vacstatus.log", "%s is VAC banned. [SteamID: %s] [CommunityName: %s] [CommunityID: %s]", g_szName[ idCheck ], g_szAuthID[ idCheck ] , szName , szSteamID64 );

static szHUD[479];
new iPlayers[32];
new iPlayersNum;
new iPlayer;

formatex( szHUD , charsmax( szHUD ) , "[VAC Ban Status]^n^n%s has a VAC ban on record.^nSteamID: %s^nSteamCommunity Name: %s" , g_szName[ idCheck ] , g_szAuthID[ idCheck ] , szName );


set_hudmessage( 255 , 255 , 255 , 0.10 , 0.35 , 0 , 2.0 , 4.0 , 0.5 , 0.5 , 3 );

get_players( iPlayers, iPlayersNum , "c" );

for ( new i = 0 ; i < iPlayersNum ; i++ )
{
iPlayer = iPlayers[ i ];

if ( g_NotifyFlag[iPlayer] )
{
show_hudmessage( iPlayer , szHUD );
client_cmd( iPlayer , "spk buttons/blip1.wav" );
}
}
}
case MANUAL_NAME: console_print( id , "*[VAC Ban Status] %s is VAC banned!" , g_szName[ idCheck ] );
case MANUAL_STEAMID: console_print( id , "*[VAC Ban Status] SteamID [%s] is VAC banned!" , g_szAuthID[ idCheck ] );
}

//Issue punishment if non kill:death ratio punishment selected
new iPunishment = get_pcvar_num( g_pPunishment );
if ( iPunishment <= SHOOTBLANKS )
PunishPlayer( idCheck , iPunishment );
}
else if ( szStatus[ 0 ] == '0' )
{
g_VACBanned[idCheck] = 0;

switch ( iRequestType )
{
case AUTO_CHECK:
{
szBanVal[ 0 ] = '0' + NOT_BANNED;
nvault_set( g_Vault , g_szAuthID[ idCheck ] , szBanVal );

}
case MANUAL_NAME: console_print( id , "*[VAC Ban Status] %s is not VAC banned." , g_szName[ idCheck ] );
case MANUAL_STEAMID: console_print( id , "*[VAC Ban Status] SteamID [%s] is not VAC banned." , g_szAuthID[ idCheck ] );
}
}

}

return ( iSize * iNumMemb );
}

public CurlCallback( CURL:cURLHandle , CURLcode:code )
{
curl_easy_cleanup( cURLHandle );
}

public PunishPlayer( id , iPunishment )
{
new szMsg[ 30 ];

g_Punished[id] = 1;

switch ( iPunishment )
{
case LOG_ONLY:
{
return PLUGIN_HANDLED;
}
case KICK_ONLY:
{
KickPlayer( id , "[VAC Ban Status]", "A VAC ban record was found on your steam account." , "You have been kicked" ) ;
formatex( szMsg , charsmax( szMsg ) , "was kicked" );
}
case KICK_BAN_ID:
{
server_cmd("amx_ban ^"#%d^" ^"%d^" ^"VAC Banned^"" , get_user_userid( id ) , get_pcvar_num( g_pBanTime ) );
formatex( szMsg , charsmax( szMsg ) , "was kicked and banned" );
}
case KICK_BAN_IP:
{
server_cmd( "amx_banip ^"#%d^" ^"%d^" ^"VAC Banned^"" , get_user_userid( id ) , get_pcvar_num( g_pBanTime ) );
formatex( szMsg , charsmax( szMsg ) , "was kicked and banned" );
}
case KICK_AMXBAN:
{
server_cmd( "amx_ban %d %s VAC Banned", get_pcvar_num( g_pBanTime ) , g_szAuthID[ id ] );
formatex( szMsg , charsmax( szMsg ) , "was kicked and banned" );
}
case SHOOTBLANKS:
{
SetShootBlanks( id , 1 );
formatex( szMsg , charsmax( szMsg ) , "will now shoot blanks" );
}
}

new iPlayers[ 32 ];
new iPlayersNum;
new iPlayer;

get_players( iPlayers, iPlayersNum , "c" );

for ( new i = 0 ; i < iPlayersNum ; i++ )
{
iPlayer = iPlayers[ i ];

if ( g_NotifyFlag[ iPlayer ] )
client_print( iPlayer , print_chat , "[VAC Ban Status] %s %s for being VAC banned%s" , g_szName[ id ] , szMsg , ( get_pcvar_num( g_pPunishment ) >= 6 ) ? " with a high kill:death ratio." : "." );
}

return PLUGIN_HANDLED;
}

public SetShootBlanks( id , iVal )
{
//iVal = 1 - Set shoot blanks on player and enable traceline forward if not yet enabled.
//iVal = 0 - Remove shoot blanks for player id and disable forward if no other players shoot blanks.

if ( iVal )
{
fm_set_user_hitzones( id , 0 , 0 );

g_ShootsBlanks[ id ] = 1;
g_NumShootsBlanks++;

if ( !g_FMTraceLine )
g_FMTraceLine = register_forward( FM_TraceLine , "fw_TraceLine" , 1 );
}
else
{
g_ShootsBlanks[ id ] = 0;
g_NumShootsBlanks--;

if ( !g_NumShootsBlanks && g_FMTraceLine )
{
unregister_forward( FM_TraceLine , g_FMTraceLine , 1 );
g_FMTraceLine = 0;
}
}
}

//fm_set_user_hitzones
public fw_TraceLine( Float:v1[ 3 ] , Float:v2[ 3 ], NoMonsters , shooter , ptr )
{
if ( !( 1 <= shooter <= g_MaxPlayers ) )
return FMRES_IGNORED;

new iPlayerHit = get_tr2( ptr , TR_pHit );

if ( !( 1 <= iPlayerHit <= g_MaxPlayers ) )
return FMRES_IGNORED;

new iHitzone = get_tr2( ptr , TR_iHitgroup );

if ( !( g_BodyHits[ shooter ][ iPlayerHit ] & ( 1 << iHitzone ) ) )
set_tr2( ptr , TR_flFraction , 1.0 );

return FMRES_IGNORED;
}

public fm_set_user_hitzones(index, target, body)
{
if ( !index && !target )
{
for ( new i = 1 ; i <= g_MaxPlayers ; i++ )
for (new j = 1 ; j <= g_MaxPlayers ; j++ )
g_BodyHits[i][j] = body;
}
else if ( !index && target )
{
for ( new i = 1 ; i <= g_MaxPlayers ; i++ )
g_BodyHits[i][target] = body;
}
else if ( index && !target )
{
for ( new i = 1 ; i <= g_MaxPlayers ; i++ )
g_BodyHits[index][i] = body;
}
else if ( index && target )
{
g_BodyHits[index][target] = body;
}
}

public fm_hitzones_reset(index)
{
for ( new i = 1 ; i <= g_MaxPlayers ; i++ )
{
g_BodyHits[index][i] = (1<<HIT_GENERIC) | (1<<HIT_HEAD) | (1<<HIT_CHEST) |
(1<<HIT_STOMACH) | (1<<HIT_LEFTARM) | (1<<HIT_RIGHTARM)|
(1<<HIT_LEFTLEG) | (1<<HIT_RIGHTLEG);
}

}

// Credit to Teyut for multi-line kick message
KickPlayer( target , szReason[] , szLine2[] , szLine3[] )
{
static msg_content[1024];

formatex(msg_content, charsmax( msg_content ) , "%s^n%s^n%s", szReason, szLine2, szLine3);
message_begin(MSG_ONE_UNRELIABLE, 2 , _, target);
write_string(msg_content);
message_end() ;
}

CURL:GetSlotBySteam64( const szSteam64[] )
{
new CURL:cSlot;

for ( new CURL:cIndex = CURL:1 ; cIndex < CURL:sizeof( g_CurlRequests ) ; cIndex++ )
{
if ( equal( g_CurlRequests[ CURL:cIndex ][ SteamID64 ] , szSteam64 ) )
{
cSlot = cIndex;
break;
}
}

return cSlot;
}

// Credit to danielkza for the code below
GetFriendID( const szAuthID[] ,szReturn[] ,iRetLen )
{
static const szFriendsBaseNum[] = "76561197960265728";

new szServer[2], szSteamID[64];

new iServerPos = containi(szAuthID,":");
if(iServerPos < 0)
return 0;

strtok(szAuthID[iServerPos+1],szServer,charsmax(szServer),szSteamID,charsmax(szSteamID),':',1);

if(!is_str_num(szServer) || !is_str_num(szSteamID))
return 0;

// AuthID * 2
NumString_Add(szSteamID,szSteamID,szSteamID,charsmax(szSteamID));

// AuthID + Base Number + Server Number
NumString_Add(szSteamID,szFriendsBaseNum,szSteamID,charsmax(szSteamID));
NumString_Add(szSteamID,szServer,szSteamID,charsmax(szSteamID));

return (copy(szReturn,iRetLen,szSteamID) > 0);
}

NumString_Add(const szString1[],const szString2[],szReturn[], iRetLen)
{
new iLen1 = strlen(szString1), iLen2=strlen(szString2);
if(!iLen1 || !iLen2)
return;

static szTemp1[64];
copy(szTemp1,iLen1,szString1);

static szTemp2[64];
copy(szTemp2,iLen2,szString2);

static szTemp3[64];

new iTempNum,iCarry;
new iCharPos=0;

do
{
iTempNum = 0;

if(--iLen1 >= 0 && isdigit(szTemp1[iLen1]))
iTempNum += char_to_num(szTemp1[iLen1]);
if(--iLen2 >= 0 && isdigit(szTemp2[iLen2]))
iTempNum += char_to_num(szTemp2[iLen2]);

iTempNum += iCarry;
iTempNum -= ((iCarry = iTempNum / 10) * 10);

szTemp3[iCharPos++] = num_to_char(iTempNum);
}
while(iLen1 >= 0 || iLen2 >= 0);

new bool:iNumStarted = false;
new iLastChar = min(iRetLen, iCharPos),i;

if(iLastChar)
{
while(--iCharPos >= 0 && i < iLastChar)
{
if(szTemp3[iCharPos] == '0' && !iNumStarted)
continue;
else
{
iNumStarted = true;
szReturn[i++] = szTemp3[iCharPos];
}
}
}
}

num_to_char(num)
{
return ( (num < 0) || (num > 9) ) ? '^0' : '0' + num;
}

char_to_num(chr)
{
return ( (chr < '0') || (chr > '9') ) ? 0 : (chr - '0');
}
Оригинальная тема тут , к сожалению последнее сообщение датировано 04-07-2021
Собственно вопрос, как можно пофикисть работу плагина?
В логах есть сообщение об ошибке:
Код:
[AMXX] Displaying debug trace (plugin "vacbans_041_beta.amxx", version "0.41")
[AMXX] Run time error 3: stack error
 
Сообщения
3,582
Реакции
1,570
Помог
137 раз(а)
В ошибке обычно указывается строка в исходнике, где произошла ошибка.
 
Сообщения
169
Реакции
51
Помог
6 раз(а)
Nordic Warrior, конкретно для этого плагина нет сообщения о строке ошибки (ниже как было до вкл дебаг и после)
L 11/13/2023 - 09:35:16: [AMXX] Run time error 3 (plugin "vacbans_041_beta.amxx") - debug not enabled!
L 11/13/2023 - 09:35:16: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 11/13/2023 - 09:37:17: Start of error session.
L 11/13/2023 - 09:37:17: Info (map "aim_map") (file "addons/amxmodx/logs/error_20231113.log")
L 11/13/2023 - 09:37:17: [AMXX] Displaying debug trace (plugin "vacbans_041_beta.amxx", version "0.41")
L 11/13/2023 - 09:37:17: [AMXX] Run time error 3: stack error
L 11/13/2023 - 09:53:12: [AMXX] Displaying debug trace (plugin "vacbans_041_beta.amxx", version "0.41")
L 11/13/2023 - 09:53:12: [AMXX] Run time error 3: stack error
 
Последнее редактирование:
Сообщения
3,582
Реакции
1,570
Помог
137 раз(а)
А в какой момент появляется ошибка?
 
Сообщения
169
Реакции
51
Помог
6 раз(а)
Nordic Warrior, могу только предположить сопоставив лог сервера и лог ошибки, видимо ошибка возникает при подключении клиента, и судя по всему в этот момент должна быть запущена процедура проверки на VAC Ban
Код:
L 11/13/2023 - 12:04:36: "B O O M<61><STEAM_1:0:1688260032><>" entered the game
L 11/13/2023 - 12:04:36: [VTC] Client B O O M with old codec connected
Код:
L 11/13/2023 - 12:04:36: [AMXX] Displaying debug trace (plugin "vacbans_041_beta.amxx", version "0.41")
L 11/13/2023 - 12:04:36: [AMXX] Run time error 3: stack error
хотя время ошибки не всегда коррелируется с подключением, это если смотреть на другие временные рамки
 
Сообщения
169
Реакции
51
Помог
6 раз(а)
к ошибке добавились еще и падения
Код:
L 11/13/2023 - 20:07:39: [AMXX] Displaying debug trace (plugin "vacbans_041_beta.amxx", version "0.41")
L 11/13/2023 - 20:07:39: [AMXX] Run time error 5: memory access 
L 11/13/2023 - 20:07:39: [AMXX]    [0] vacbans_041_beta.sma::ResponseReceived (line 749)
 
Сообщения
65
Реакции
12
D1esel, Строка с ошибкой, не сходиться с приложенным кодом, похоже где-то за пределы массива вылазит
 
Сообщения
65
Реакции
12
D1esel,
C++:
public ResponseReceived( szBuffer[] , iSize , iNumMemb[4096] , sd )
{   
    new iBannedPos = strfind( szBuffer , "<vacBanned>" );
    new szBanVal[ 2 ];
    new szStatus[ 2 ];
    new szName[ 32 ];
    new szSteamID64[ 32 ];
    new CURL:cSlot;
    
    if ( iBannedPos != -1 )
    {
        new iSteamNamePos = strfind( szBuffer , "<steamID><![CDATA[" );
        new iSteamNameEnd = strfind( szBuffer , "]]></steamID>" );
        new iSteamID64 = strfind( szBuffer , "<steamID64>" );
        new iSteamID64End = strfind( szBuffer , "</steamID64>" );
    
        copy( szStatus , charsmax( szStatus ) , szBuffer[ iBannedPos + 11 ] );
        copy( szName , iSteamNameEnd - ( iSteamNamePos + 18 ) , szBuffer[ iSteamNamePos + 18 ] );
        copy( szSteamID64 , iSteamID64End - ( iSteamID64 + 11 ) , szBuffer[ iSteamID64 + 11 ] );
        
        cSlot = GetSlotBySteam64( szSteamID64 );

        new id = g_CurlRequests[ cSlot ][ RequestorID ];
        new idCheck = g_CurlRequests[ cSlot ][ PlayerID ];
        new iRequestType = g_CurlRequests[ cSlot ][ RequestType ];
        
        if ( szStatus[ 0 ] == '1' )
        {
            g_VACBanned[idCheck] = 1;
            
            switch ( iRequestType )
            {
                case AUTO_CHECK:
                {
                    szBanVal[0] = '0' + BANNED;
                    nvault_pset( g_Vault , g_szAuthID[idCheck] , szBanVal );
                    
                    log_to_file( "vacstatus.log", "%s is VAC banned. [SteamID: %s] [CommunityName: %s] [CommunityID: %s]", g_szName[ idCheck ], g_szAuthID[ idCheck ] , szName , szSteamID64 );
    
                    static szHUD[512];
                    new iPlayers[32];
                    new iPlayersNum;
                    new iPlayer;
                    
                    formatex( szHUD , charsmax( szHUD ) , "[VAC Ban Status]^n^n%s has a VAC ban on record.^nSteamID: %s^nSteamCommunity Name: %s" , g_szName[ idCheck ] , g_szAuthID[ idCheck ] , szName );
                    
                    
                    set_hudmessage( 255 , 255 , 255 , 0.10 , 0.35 , 0 , 2.0 , 4.0 , 0.5 , 0.5 , 3 );
    
                    get_players( iPlayers, iPlayersNum , "h" );   
                    
                    for ( new i = 0 ; i < iPlayersNum ; i++ )
                    {   
                        iPlayer = iPlayers[ i ];
                        
                        if ( g_NotifyFlag[iPlayer] )
                        {
                            show_hudmessage( iPlayer , szHUD );
                            client_cmd( iPlayer , "spk buttons/blip1.wav" );
                        }
                    }   
                }
                case MANUAL_NAME: console_print( id , "*[VAC Ban Status] %s is VAC banned!" , g_szName[ idCheck ] );
                case MANUAL_STEAMID: console_print( id , "*[VAC Ban Status] SteamID [%s] is VAC banned!" , g_szAuthID[ idCheck ] );
            }
            
            //Issue punishment if non kill:death ratio punishment selected
            new iPunishment = get_pcvar_num( g_pPunishment );
            if ( iPunishment <= SHOOTBLANKS )
                PunishPlayer( idCheck , iPunishment );
        }
        else if ( szStatus[ 0 ] == '0' )
        {
            g_VACBanned[idCheck] = 0;
            
            switch ( iRequestType )
            {
                case AUTO_CHECK:
                {
                    szBanVal[ 0 ] = '0' + NOT_BANNED;
                    nvault_set( g_Vault , g_szAuthID[ idCheck ] , szBanVal );

                }
                case MANUAL_NAME: console_print( id , "*[VAC Ban Status] %s is not VAC banned." , g_szName[ idCheck ] );
                case MANUAL_STEAMID: console_print( id , "*[VAC Ban Status] SteamID [%s] is not VAC banned." , g_szAuthID[ idCheck ] );
            }
        }
        
    }
        
    return charsmax(iNumMemb);
}
 
Сообщения
201
Реакции
20
Помог
5 раз(а)
Сам автор подозревает, что это из-за модуля; Увеличение буфера, похоже, не решает эту проблему, все дело в исключении возможностей...
 
Сообщения
169
Реакции
51
Помог
6 раз(а)
Georg, спасибо за попытку помочь, но к сожалению это не помогло, ошибка всё так же сохраняется:
Код:
L 11/18/2023 - 23:00:05: [AMXX] Displaying debug trace (plugin "vacbans_042_beta.amxx", version "0.41")
L 11/18/2023 - 23:00:05: [AMXX] Run time error 5: memory access
L 11/18/2023 - 23:00:05: [AMXX]    [0] vacbans_042_beta.sma::ResponseReceived (line 749)

L 11/19/2023 - 19:26:00: [AMXX] Displaying debug trace (plugin "vacbans_042_beta.amxx", version "0.41")
L 11/19/2023 - 19:26:00: [AMXX] Run time error 5: memory access
L 11/19/2023 - 19:26:00: [AMXX]    [0] vacbans_042_beta.sma::ResponseReceived (line 749)

L 11/19/2023 - 21:21:29: [AMXX] Displaying debug trace (plugin "vacbans_042_beta.amxx", version "0.41")
L 11/19/2023 - 21:21:29: [AMXX] Run time error 5: memory access
L 11/19/2023 - 21:21:29: [AMXX]    [0] vacbans_042_beta.sma::ResponseReceived (line 749)
что приводит к падениям
Код:
----------------------------------------------
CRASH: Sun Nov 19 23:38:31 MSK 2023
Start Line: ./hlds_linux -game cstrike +ip 127.0.0.1 +port 27015 +map aim_map +maxplayers 32 +sys_ticrate 1000 -pingboost 4 -noipx -debug -norestart -heapsize 128000 -pidfile game.pid
[New LWP 16252]
[New LWP 16255]
[New LWP 16258]
[New LWP 16262]
[New LWP 16263]
[New LWP 16264]
[New LWP 16265]
[New LWP 16266]
[New LWP 16256]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./hlds_linux -game cstrike +ip 127.0.0.1 +port 27015 +map aim_map +maxplayer'.
Program terminated with signal 11, Segmentation fault.
#0  0xb70ad016 in _int_free () from /lib/libc.so.6
#0  0xb70ad016 in _int_free () from /lib/libc.so.6
#1  0xad0f309f in unload_amxscript(tagAMX*, void**) () from /home/server1253/game/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
#2  0x0b1cd208 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
No symbol table info available.
From        To          Syms Read   Shared Object Library
0xb7267914  0xb72adc78  Yes         ./libstdc++.so.6
0xb7214a90  0xb721597c  Yes (*)     /lib/libdl.so.2
0xb71fd780  0xb7209857  Yes (*)     /lib/libpthread.so.0
0xb704f320  0xb719591b  Yes (*)     /lib/libc.so.6
0xb6f957a0  0xb7002254  Yes (*)     /lib/preload++.so.6
0xb6f11460  0xb6f3bc06  Yes (*)     /lib/libm.so.6
0xb6ef9e04  0xb6f09490  Yes         ./libgcc_s.so.1
0xb77638a0  0xb777e261  Yes (*)     /lib/ld-linux.so.2
0xb6ee4a50  0xb6eebfb9  Yes (*)     /lib/libnss_files.so.2
0xb6814cd0  0xb68c7a5e  Yes (*)     /home/server1253/game/engine_i486.so
0xb678e900  0xb6791dca  Yes (*)     /lib/librt.so.1
0xb677c5c0  0xb6786d74  Yes (*)     /home/server1253/game/./libsteam_api.so
0xb6713e00  0xb672f838  Yes (*)     /home/server1253/game/filesystem_stdio.so
0xb55b3d00  0xb6232780  Yes (*)     /home/server1253/.steam/sdk32/steamclient.so
0xad79d6a0  0xad7dff70  Yes (*)     /home/server1253/game/./cstrike/addons/metamod/dlls/metamod.so
0xad5368c0  0xad6cf0b0  Yes (*)     /home/server1253/game/cstrike/dlls/cs.so
0xad3e6a90  0xad3ecb8e  Yes (*)     /home/server1253/game/cstrike/addons/accuracyfix/dlls/accuracyfix_mm.so
0xad3ae850  0xad3d2550  Yes (*)     /home/server1253/game/cstrike/addons/reunion/reunion_mm_i386.so
0xad383b40  0xad38d0b0  Yes (*)     /home/server1253/game/cstrike/addons/reauthcheck/reauthcheck_mm_i386.so
0xad2ea7b0  0xad354bc4  Yes (*)     /home/server1253/game/cstrike/addons/VoiceTranscoder/VoiceTranscoder.so
0xad2bd300  0xad2d3cab  Yes (*)     /home/server1253/game/cstrike/addons/rechecker/rechecker_mm_i386.so
0xad0e7a20  0xad14adb7  Yes (*)     /home/server1253/game/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
0xad0bfb90  0xad0c92f0  Yes (*)     /home/server1253/game/cstrike/addons/resemiclip/resemiclip_mm_i386.so
0xad00f340  0xad02248e  Yes (*)     /home/server1253/game/cstrike/addons/whblocker/whblocker_mm_i386.so
0xacef77c0  0xacfd5475  Yes (*)     /home/server1253/game/cstrike/addons/yapb/bin/yapb.so
0xacc3ed50  0xacc4e460  Yes (*)     cstrike/addons/amxmodx/modules/cstrike_amxx_i386.so
0xacc1f290  0xacc2b80c  Yes (*)     cstrike/addons/amxmodx/modules/engine_amxx_i386.so
0xac9429d0  0xac96ed6c  Yes (*)     cstrike/addons/amxmodx/modules/fakemeta_amxx_i386.so
0xacc00660  0xacc04f84  Yes (*)     cstrike/addons/amxmodx/modules/fun_amxx_i386.so
0xac4e4ae0  0xac737e78  Yes (*)     cstrike/addons/amxmodx/modules/curl_amxx_i386.so
0xac4309b0  0xac434a08  Yes (*)     cstrike/addons/amxmodx/modules/nvault_amxx_i386.so
0xac3c0020  0xac409180  Yes (*)     cstrike/addons/amxmodx/modules/reapi_amxx_i386.so
0xac33cb60  0xac384624  Yes (*)     cstrike/addons/amxmodx/modules/hamsandwich_amxx_i386.so
0xac2ab120  0xac2b1404  Yes (*)     cstrike/addons/amxmodx/modules/csx_amxx_i386.so
0xac28aa50  0xac2908e4  Yes (*)     cstrike/addons/amxmodx/modules/geoip_amxx_i386.so
0xa7c8e520  0xa7d389e9  Yes (*)     cstrike/addons/amxmodx/modules/iphubclient_amxx_i386.so
0xa7c2d130  0xa7c33810  Yes (*)     cstrike/addons/amxmodx/modules/reaimdetector_amxx_i386.so
0xa7382790  0xa741afc5  Yes (*)     cstrike/addons/amxmodx/modules/mysql_amxx_i386.so
0xa7270c00  0xa727406e  Yes (*)     /lib/libnss_dns.so.2
0xa72586a0  0xa7267694  Yes (*)     /lib/libresolv.so.2
0xa0a769c0  0xa1b8aa44  Yes (*)     ./steamclient.so
0xa7076670  0xa70ec020  Yes (*)     ./crashhandler.so
0xaca735d0  0xacabc548  Yes (*)     cstrike/addons/amxmodx/modules/regex_amxx_i386.so
0xaca32160  0xaca33954  Yes (*)     cstrike/addons/amxmodx/modules/sockets2_amxx_i386.so
(*): Shared library is missing debugging information.
Stack level 0, frame at 0xbfb4d890:
eip = 0xb70ad016 in _int_free; saved eip 0xad0f309f
called by frame at 0xbfb4d8a4
Arglist at 0xbfb4d828, args:
Locals at 0xbfb4d828, Previous frame's sp is 0xbfb4d890
Saved registers:
  ebx at 0xbfb4d87c, ebp at 0xbfb4d888, esi at 0xbfb4d880, edi at 0xbfb4d884, eip at 0xbfb4d88c
End of crash report
----------------------------------------------


-------- LAST 200 LINES FROM screen.log--------------------------------------
RamizRonaldo : лан от души
L 11/19/2023 - 22:24:23: "RamizRonaldo<658><STEAM_2:1:38703524><CT>" say "лан от души"
RamizRonaldo : нех ловить
L 11/19/2023 - 22:24:29: "RamizRonaldo<658><STEAM_2:1:38703524><CT>" say "нех ловить"
L 11/19/2023 - 22:24:36: "RamizRonaldo<658><STEAM_2:1:38703524><CT>" disconnected
Dropped RamizRonaldo from server
Reason:  Client sent 'drop'
Connecting Bot...
L 11/19/2023 - 22:24:36: "Max Z<659><BOT><>" entered the game
L 11/19/2023 - 22:24:36: "Max Z<659><BOT><>" joined team "CT"
L 11/19/2023 - 22:24:36: World triggered "Game_Commencing"
L 11/19/2023 - 22:24:36: World triggered "Game_Commencing" (CT "99") (T "120")
L 11/19/2023 - 22:24:36: World triggered "Round_End"
L 11/19/2023 - 22:24:39: "13<657><STEAM_2:0:2002433280><TERRORIST>" triggered "Spawned_With_The_Bomb"
L 11/19/2023 - 22:24:39: World triggered "Round_Start"
L 11/19/2023 - 22:24:47: Server cvar "sv_restartround" = "1"
L 11/19/2023 - 22:24:47: World triggered "Restart_Round_(1_second)"
L 11/19/2023 - 22:24:47: Team "CT" scored "0" with "1" players
L 11/19/2023 - 22:24:47: Team "TERRORIST" scored "0" with "1" players
L 11/19/2023 - 22:24:47: Server cvar "sv_restartround" = "0"
L 11/19/2023 - 22:24:48: "13<657><STEAM_2:0:2002433280><TERRORIST>" triggered "Spawned_With_The_Bomb"
L 11/19/2023 - 22:24:48: World triggered "Round_Start"
L 11/19/2023 - 22:25:17: "Max Z<659><BOT><CT>" attacked "13<657><STEAM_2:0:2002433280><TERRORIST>" with "grenade" (damage "25") (damage_armor "12") (health "74") (armor "87")
L 11/19/2023 - 22:25:20: "13<657><STEAM_2:0:2002433280><TERRORIST>" attacked "Max Z<659><BOT><CT>" with "glock18" (damage "13") (damage_armor "0") (health "86") (armor "0")
L 11/19/2023 - 22:25:21: "Max Z<659><BOT><CT>" attacked "13<657><STEAM_2:0:2002433280><TERRORIST>" with "usp" (damage "120") (damage_armor "0") (health "-45") (armor "87")
L 11/19/2023 - 22:25:21: "Max Z<659><BOT><CT>" killed "13<657><STEAM_2:0:2002433280><TERRORIST>" with "usp"
L 11/19/2023 - 22:25:21: Team "CT" triggered "CTs_Win" (CT "1") (T "0")
L 11/19/2023 - 22:25:21: World triggered "Round_End"
L 11/19/2023 - 22:25:25: "13<657><STEAM_2:0:2002433280><TERRORIST>" triggered "Spawned_With_The_Bomb"
L 11/19/2023 - 22:25:25: World triggered "Round_Start"
L 11/19/2023 - 22:26:11: "13<657><STEAM_2:0:2002433280><TERRORIST>" triggered "Dropped_The_Bomb"
L 11/19/2023 - 22:26:22: "13<657><STEAM_2:0:2002433280><TERRORIST>" committed suicide with "world"
L 11/19/2023 - 22:26:22: Team "CT" triggered "CTs_Win" (CT "2") (T "0")
L 11/19/2023 - 22:26:22: World triggered "Round_End"
L 11/19/2023 - 22:26:22: "13<657><STEAM_2:0:2002433280><TERRORIST>" joined team "SPECTATOR"
Bot 'Max Z' kicked.
L 11/19/2023 - 22:26:22: Kick: "Max Z<659><STEAM_0:0:109189773><>" was kicked by "Console"
L 11/19/2023 - 22:26:22: "Max Z<659><BOT><CT>" disconnected
Dropped Max Z from server
Reason:  Kicked
L 11/19/2023 - 22:26:26: World triggered "Round_Start"
L 11/19/2023 - 22:26:26: "13<657><STEAM_2:0:2002433280><SPECTATOR>" disconnected
L 11/19/2023 - 22:26:26: World triggered "Round_Draw" (CT "2") (T "0")
L 11/19/2023 - 22:26:26: World triggered "Round_End"
Dropped 13 from server
Reason:  Timed out
L 11/19/2023 - 22:26:30: World triggered "Round_Start"
L 11/19/2023 - 22:28:12: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:28:12: World triggered "Round_End"
L 11/19/2023 - 22:28:16: World triggered "Round_Start"
L 11/19/2023 - 22:29:58: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:29:58: World triggered "Round_End"
L 11/19/2023 - 22:30:02: World triggered "Round_Start"
L 11/19/2023 - 22:31:44: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:31:44: World triggered "Round_End"
L 11/19/2023 - 22:31:48: World triggered "Round_Start"
L 11/19/2023 - 22:33:30: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:33:30: World triggered "Round_End"
L 11/19/2023 - 22:33:34: World triggered "Round_Start"
L 11/19/2023 - 22:35:16: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:35:16: World triggered "Round_End"
L 11/19/2023 - 22:35:20: World triggered "Round_Start"
L 11/19/2023 - 22:37:02: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:37:02: World triggered "Round_End"
L 11/19/2023 - 22:37:06: World triggered "Round_Start"
L 11/19/2023 - 22:38:48: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:38:48: World triggered "Round_End"
L 11/19/2023 - 22:38:52: World triggered "Round_Start"
L 11/19/2023 - 22:40:34: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:40:34: World triggered "Round_End"
L 11/19/2023 - 22:40:38: World triggered "Round_Start"
L 11/19/2023 - 22:42:20: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:42:20: World triggered "Round_End"
L 11/19/2023 - 22:42:24: World triggered "Round_Start"
L 11/19/2023 - 22:44:06: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:44:06: World triggered "Round_End"
L 11/19/2023 - 22:44:10: World triggered "Round_Start"
L 11/19/2023 - 22:45:52: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:45:52: World triggered "Round_End"
L 11/19/2023 - 22:45:56: World triggered "Round_Start"
L 11/19/2023 - 22:47:38: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:47:38: World triggered "Round_End"
L 11/19/2023 - 22:47:42: World triggered "Round_Start"
L 11/19/2023 - 22:49:24: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:49:24: World triggered "Round_End"
L 11/19/2023 - 22:49:28: World triggered "Round_Start"
L 11/19/2023 - 22:51:10: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:51:10: World triggered "Round_End"
L 11/19/2023 - 22:51:14: World triggered "Round_Start"
L 11/19/2023 - 22:52:56: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:52:56: World triggered "Round_End"
L 11/19/2023 - 22:53:00: World triggered "Round_Start"
L 11/19/2023 - 22:54:42: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:54:42: World triggered "Round_End"
L 11/19/2023 - 22:54:46: World triggered "Round_Start"
L 11/19/2023 - 22:56:28: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:56:28: World triggered "Round_End"
L 11/19/2023 - 22:56:32: World triggered "Round_Start"
L 11/19/2023 - 22:58:14: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 22:58:14: World triggered "Round_End"
L 11/19/2023 - 22:58:18: World triggered "Round_Start"
L 11/19/2023 - 23:00:00: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:00:00: World triggered "Round_End"
L 11/19/2023 - 23:00:04: World triggered "Round_Start"
L 11/19/2023 - 23:01:46: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:01:46: World triggered "Round_End"
L 11/19/2023 - 23:01:50: World triggered "Round_Start"
L 11/19/2023 - 23:03:32: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:03:32: World triggered "Round_End"
L 11/19/2023 - 23:03:36: World triggered "Round_Start"
L 11/19/2023 - 23:05:18: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:05:18: World triggered "Round_End"
L 11/19/2023 - 23:05:22: World triggered "Round_Start"
L 11/19/2023 - 23:07:04: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:07:04: World triggered "Round_End"
L 11/19/2023 - 23:07:08: World triggered "Round_Start"
L 11/19/2023 - 23:08:50: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:08:50: World triggered "Round_End"
L 11/19/2023 - 23:08:54: World triggered "Round_Start"
L 11/19/2023 - 23:10:36: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:10:36: World triggered "Round_End"
L 11/19/2023 - 23:10:40: World triggered "Round_Start"
L 11/19/2023 - 23:12:22: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:12:22: World triggered "Round_End"
L 11/19/2023 - 23:12:26: World triggered "Round_Start"
L 11/19/2023 - 23:14:08: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:14:08: World triggered "Round_End"
L 11/19/2023 - 23:14:12: World triggered "Round_Start"
L 11/19/2023 - 23:15:54: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:15:54: World triggered "Round_End"
L 11/19/2023 - 23:15:58: World triggered "Round_Start"
L 11/19/2023 - 23:17:40: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:17:40: World triggered "Round_End"
L 11/19/2023 - 23:17:44: World triggered "Round_Start"
L 11/19/2023 - 23:19:26: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:19:26: World triggered "Round_End"
L 11/19/2023 - 23:19:30: World triggered "Round_Start"
L 11/19/2023 - 23:21:12: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:21:12: World triggered "Round_End"
L 11/19/2023 - 23:21:16: World triggered "Round_Start"
L 11/19/2023 - 23:22:58: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:22:58: World triggered "Round_End"
L 11/19/2023 - 23:23:02: World triggered "Round_Start"
L 11/19/2023 - 23:24:44: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:24:44: World triggered "Round_End"
L 11/19/2023 - 23:24:48: World triggered "Round_Start"
L 11/19/2023 - 23:26:30: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:26:30: World triggered "Round_End"
L 11/19/2023 - 23:26:34: World triggered "Round_Start"
L 11/19/2023 - 23:28:16: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:28:16: World triggered "Round_End"
L 11/19/2023 - 23:28:20: World triggered "Round_Start"
L 11/19/2023 - 23:30:02: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:30:02: World triggered "Round_End"
L 11/19/2023 - 23:30:06: World triggered "Round_Start"
L 11/19/2023 - 23:31:48: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:31:48: World triggered "Round_End"
L 11/19/2023 - 23:31:52: World triggered "Round_Start"
L 11/19/2023 - 23:33:34: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:33:34: World triggered "Round_End"
L 11/19/2023 - 23:33:38: World triggered "Round_Start"
L 11/19/2023 - 23:35:20: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:35:20: World triggered "Round_End"
L 11/19/2023 - 23:35:24: World triggered "Round_Start"
L 11/19/2023 - 23:37:06: Team "CT" triggered "Target_Saved" (CT "2") (T "0")
L 11/19/2023 - 23:37:06: World triggered "Round_End"
L 11/19/2023 - 23:37:10: World triggered "Round_Start"
L 11/19/2023 - 23:37:28: [REUNION]: Крутой (185.17.128.101) authorized as RevEmu
L 11/19/2023 - 23:37:28: "Крутой<660><STEAM_2:1:491125298><>" connected, address "185.17.128.101:2355"
L 11/19/2023 - 23:37:33: "Крутой<660><STEAM_2:1:491125298><>" entered the game
L 11/19/2023 - 23:37:33: [Check] Крутой | 185.17.128.101:2355 | STEAM_2:1:491125298 | AS196742 | EKRAN-AS | RU | Russia
L 11/19/2023 - 23:37:34: [VTC] Client Крутой with new codec connected
L 11/19/2023 - 23:37:38: "Крутой<660><STEAM_2:1:491125298><>" joined team "TERRORIST"
Connecting Bot...
L 11/19/2023 - 23:37:38: "yasha<661><BOT><>" entered the game
L 11/19/2023 - 23:37:38: "yasha<661><BOT><>" joined team "CT"
L 11/19/2023 - 23:37:38: World triggered "Round_Draw" (CT "2") (T "0")
L 11/19/2023 - 23:37:38: World triggered "Round_End"
L 11/19/2023 - 23:37:42: "Крутой<660><STEAM_2:1:491125298><TERRORIST>" triggered "Spawned_With_The_Bomb"
L 11/19/2023 - 23:37:42: World triggered "Round_Start"
L 11/19/2023 - 23:38:01: Server cvar "amx_nextmap" = "aim_map"
L 11/19/2023 - 23:38:01: [map_manager_scheduler.amxx] [vote_finished]: nextmap is aim_map.
L 11/19/2023 - 23:38:01: Server cvar "mp_timelimit" = "0.000000"
L 11/19/2023 - 23:38:24: "Крутой<660><STEAM_2:1:491125298><TERRORIST>" attacked "yasha<661><BOT><CT>" with "ak47" (damage "105") (damage_armor "15") (health "-5") (armor "84")
L 11/19/2023 - 23:38:24: "Крутой<660><STEAM_2:1:491125298><TERRORIST>" killed "yasha<661><BOT><CT>" with "ak47"
L 11/19/2023 - 23:38:24: World triggered "Game_Commencing"
L 11/19/2023 - 23:38:24: World triggered "Game_Commencing" (CT "2") (T "0")
L 11/19/2023 - 23:38:24: World triggered "Round_End"
L 11/19/2023 - 23:38:24: "yasha<661><BOT><CT>" attacked "Крутой<660><STEAM_2:1:491125298><TERRORIST>" with "grenade" (damage "21") (damage_armor "10") (health "78") (armor "89")
L 11/19/2023 - 23:38:27: Server cvar "mp_chattime" = "3.000000"
L 11/19/2023 - 23:38:27: Server cvar "mp_chattime" = "4.000000"
L 11/19/2023 - 23:38:27: "Крутой<660><STEAM_2:1:491125298><TERRORIST>" triggered "Spawned_With_The_Bomb"
L 11/19/2023 - 23:38:27: World triggered "Round_Start"
L 11/19/2023 - 23:38:30: Server cvar "mp_chattime" = "3.000000"
L 11/19/2023 - 23:38:30: "yasha<661><BOT><CT>" disconnected
Dropped yasha from server
Reason:  Dropping fakeclient on level change
L 11/19/2023 - 23:38:30: Server cvar "mp_winlimit" = "50"
Successfully saved Bots Practice data.
./hlds_run: line 272: 16252 Segmentation fault      (core dumped) $HL_CMD
есть ли вариант как-то оптимизировать данный код (плагин) оставив только проверку валидности steamid по которому будет осуществляться проверка клиента с последующим выводом информации для админа о подключаемом клиенте, что он имеет VAC ban?
 
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
D1esel, перед 749 строкой посмотри что передают
server_print("******* %i, %i", iSize, iNumMemb);
 
Сообщения
169
Реакции
51
Помог
6 раз(а)
Nordic Warrior, в лог сыпет ошибками типа:
Код:
L 11/28/2023 - 13:15:12: [AMXX] Displaying debug trace (plugin "vacbans_042_beta.amxx", version "0.41")
L 11/28/2023 - 13:15:12: [AMXX] Run time error 3: stack error
 
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
D1esel, на 2 поста выше я писал, сделал?
Надо же понять, что получаем от сюда curl_easy_setopt( cURLHandle , CURLOPT_WRITEFUNCTION , "ResponseReceived" );
 
Последнее редактирование:
Сообщения
169
Реакции
51
Помог
6 раз(а)
Code_0xABC, я твоё сообщение понял как необходимость добавления в исходник перед 749 строкой
Код:
    }
    server_print("******* %i, %i", iSize, iNumMemb);   
    return charsmax(iNumMemb);
}
если всё правильно, то я скомпилировал плагин и закинул, с того момента в логах никаких дополнительных записей не было
 
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
D1esel, если ты заменишь 749 строку как например return 10, то ошибка пропадет, идет превышение какого то лимита или значение передается не то. Возможно,опять же к примеру, передается строка, вот я и попросил вывести 2 значения в консоль
28 Ноя 2023
Code_0xABC, я твоё сообщение понял как необходимость добавления в исходник перед 749 строкой
Код:
    }
    server_print("******* %i, %i", iSize, iNumMemb);  
    return charsmax(iNumMemb);
}
если всё правильно, то я скомпилировал плагин и закинул, с того момента в логах никаких дополнительных записей не было
И я не так писал, как ты тут указал
28 Ноя 2023
Code_0xABC, я твоё сообщение понял как необходимость добавления в исходник перед 749 строкой
Код:
    }
    server_print("******* %i, %i", iSize, iNumMemb);  
    return charsmax(iNumMemb);
}
если всё правильно, то я скомпилировал плагин и закинул, с того момента в логах никаких дополнительных записей не было
Если ошибок небыло, то значит проблема исходит из переменной iSize, но все ровно в консоль должно было писать значение
 

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

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