- Ошибка
-
Плагин перестает работать
- ОС
- Linux
- Билд
-
ReHLDS version: 3.4.0.639-dev
- ReGamedll
-
ReGameDLL version: 5.7.0.295-dev
- Список метамодулей
-
[ 1] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.0.9 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 4] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3 ini ANY ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386. v1.8.3-d ini Start ANY
[ 6] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i38 v1.5.695 ini Chlvl ANY
[ 8] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[ 9] POD-Bot mm RUN - podbot_mm_i386.s vV3B22 ini Chlvl ANY
[10] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[11] MySQL RUN - mysql_amxx_i386. v1.8.3-d pl5 ANY ANY
[12] SQLite RUN - sqlite_amxx_i386 v1.8.3-d pl5 ANY ANY
[13] ReAimDetector RUN - reaimdetector_am v0.2.2 pl5 ANY Never
[14] FakeMeta RUN - fakemeta_amxx_i3 v1.8.3-d pl5 ANY ANY
[15] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-d pl5 ANY ANY
[16] ReAPI RUN - reapi_amxx_i386. v5.5.0.1 pl5 ANY Never
[17] Engine RUN - engine_amxx_i386 v1.8.3-d pl5 ANY ANY
[18] Fun RUN - fun_amxx_i386.so v1.8.3-d pl5 ANY ANY
[19] CStrike RUN - cstrike_amxx_i38 v1.8.3-d pl5 ANY ANY
[20] CSX RUN - csx_amxx_i386.so v1.8.3-d pl5 ANY ANY
- Список плагинов
-
[ 1] fb_forwards 0.1.5 Kanagava & Realu fb_forwards.amx running
[ 2] FreshBans 1.3.8b kanagava fresh_bans_138_ running
[ 3] DopBan 3.0.3b kanagava dop_ban303_.amx running
[ 4] Admin Loader 3.2 neygomon admin_loader.am running
[ 5] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 6] Spam & Mat Control 0.4 Freedo.m sm_control.amxx running
[ 7] Stop the Bastards 1.6.6 F@nt0M stop_the_bastar running
[ 8] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 9] Admin Spectator ESP mi 1.6_eng KoST, Asmodai admin_spec_esp_ running
[ 10] Steam Bonus 1.3e Gudaus steam_b.amxx running
[ 11] Admin Commands 1.8.3-dev+ AMXX Dev Team admincmd.amxx running
[ 12] Menus Front-End 1.5 neugomon menufront_end.a running
[ 13] Players Menu 1.8.3-dev+ AMXX Dev Team plmenu.amxx running
[ 14] Maps Menu 1.4.1 neugomon mapsmenu_new.am running
[ 15] Admin Chat 1.8.3-dev+ AMXX Dev Team adminchat.amxx running
[ 16] Anti Flood 1.8.3-dev+ AMXX Dev Team antiflood.amxx running
[ 17] Admin Votes 1.8.3-dev+ AMXX Dev Team adminvote.amxx running
[ 18] Stats Configuration 1.8.3-dev+ AMXX Dev Team statscfg.amxx running
[ 19] Restrict Weapons 1.8.3-Re AMXX Dev Team restmenu.amxx running
[ 20] StatsX GUI 2.0 AMXX Dev Team statsx_gui1.amx running
[ 21] CS Misc. Stats 1.8.3-Re AMXX Dev Team miscstats.amxx running
[ 22] ReChecker Logging freesrv AMXX rc_logging.amxx running
[ 23] RC BaseChanger freesrv AMXX rc_basechanger. running
- Исходный код
-
#include <amxmodx>
new g_File[32] = "addons/rechecker/resources.ini";
new g_Path[24] = "addons/rechecker/bases";
new g_PrecFile[32];
new Array:g_Files;
public plugin_precache()
{
register_plugin("RC BaseChanger", "freesrv", "AMXX");
new gfile[32], gfile_path[64], prec_buff[34], gfile_buff[34];
new gdir = open_dir(g_Path, gfile, charsmax(gfile)), maxarr = 0;
#if AMXX_VERSION_NUM < 183
md5_file(g_File, prec_buff);
#else
hash_file(g_File, Hash_Md5, prec_buff, charsmax(prec_buff));
#endif
g_Files = ArrayCreate(32);
do
{
if(strlen(gfile) > 3)
{
formatex(gfile_path, charsmax(gfile_path), "%s/%s", g_Path,gfile);
#if AMXX_VERSION_NUM < 183
md5_file(gfile_path, gfile_buff);
#else
hash_file(gfile_path, Hash_Md5, gfile_buff, charsmax(gfile_buff));
#endif
if(equal(prec_buff, gfile_buff))
copy(g_PrecFile, charsmax(g_PrecFile), gfile);
ArrayPushString(g_Files, gfile); maxarr += 1;
}
}
while(next_file(gdir, gfile, charsmax(gfile)));
close_dir(gdir);
new listfile[128];
format(listfile, charsmax(listfile), "addons/rechecker/baselist.txt");
if(!file_exists(listfile))
{
write_file(listfile, g_PrecFile, 0);
write_file(listfile, "0", 1);
}
new i, chk, lstfile[36], chkfile[36], arrfile[32], maxlst, len;
for(i = 0 ; i < maxarr ; i++)
{
ArrayGetString(g_Files, i, arrfile, charsmax(arrfile));
formatex(chkfile, charsmax(chkfile), "@%s", arrfile);
chk = 0;
new j; maxlst = file_size(listfile, 1);
for(j = 2; j < maxlst - 1; j++)
{
read_file(listfile, j, lstfile, charsmax(lstfile), len);
if (strfind(lstfile, chkfile) != -1) chk += 1;
}
if(chk == 0)
{
format(chkfile, charsmax(chkfile), "0%s", chkfile);
write_file(listfile, chkfile, -1);
}
}
new nextfile[32], setfile[32], pos;
read_file(listfile, 0, nextfile, charsmax(nextfile), len);
read_file(listfile, 1, setfile, charsmax(setfile), len);
if(strlen(setfile) < 2)
{
if(maxlst > 3)
{
i = 0;
for(i = 0; i < maxarr; i++)
{
ArrayGetString(g_Files, i, chkfile, charsmax(chkfile));
if(strfind(nextfile, chkfile) != -1)
{
if (i == maxarr-1) pos = 0;
else pos = i + 1;
}
}
ArrayGetString(g_Files, pos, nextfile, charsmax(nextfile));
log_amx("^tПроверка ведется по базе ^"%s^"", nextfile);
}
else copy(nextfile, charsmax(nextfile), g_PrecFile);
formatex(gfile_path, charsmax(gfile_path), "%s/%s", g_Path,nextfile);
write_file(listfile, nextfile, 0);
}
else formatex(gfile_path, charsmax(gfile_path), "%s/%s", g_Path,setfile);
ArrayDestroy(g_Files);
file_copy(gfile_path, g_File);
//pause("ad");
}
stock bool:file_copy(SOURCE[], TARGET[])
{
new source = fopen(SOURCE, "rb");
new target = fopen(TARGET, "wb");
for(new buffer, eof = feof(source); !eof; !eof && fputc(target, buffer))
{
buffer = fgetc(source);
eof = feof(source);
}
fclose(source);
fclose(target);
return true;
}
Всем привет!
При аптайме сервера свыше 14-15 дней плагин перестает работать. До этого аптайма работает без проблем.
Сам плагин запущен, в лог амхх инфу перестает давать по какой базе проверяет. Баны не идут.
При аптайме сервера свыше 14-15 дней плагин перестает работать. До этого аптайма работает без проблем.
Сам плагин запущен, в лог амхх инфу перестает давать по какой базе проверяет. Баны не идут.