- Ошибка
-
L 08/26/2019 - 11:58:50: [forum_presents.amxx] MySQL connection failed
L 08/26/2019 - 11:58:50: [forum_presents.amxx] [ 2003 ] Can't connect to MySQL server on '185.13.5.122' (4)
L 08/26/2019 - 11:58:50: [forum_presents.amxx] Query state: 2
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5249 (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 19 2019 13:31:53
Built from: https://github.com/alliedmodders/amxmodx/commit/6cecb34
Build ID: 5249:6cecb34
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.7.0.685-dev
Build date: 16:27:16 Aug 11 2019 (1947)
Build from: https://github.com/dreamstalker/rehlds/commit/5b68568
- ReGamedll
-
ReGameDLL version: 5.9.0.379-dev
Build date: 21:25:38 Aug 13 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/411a028
- Версия 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.2 Beta ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.130 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 5] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5249 ini Start ANY
[ 6] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 8] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC3 ini ANY ANY
[ 9] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[10] MySQL RUN - mysql_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[11] SQLite RUN - sqlite_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[12] Fun RUN - fun_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[13] Engine RUN - engine_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[14] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[15] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[16] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[17] CSX RUN - csx_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[18] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5249 pl5 ANY ANY
[19] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl5 ANY Never
[20] ReAPI RUN - reapi_amxx_i386.so v5.7.0.162-dev pl5 ANY Never
20 plugins, 20 running
- Список плагинов
-
Currently loaded plugins:
name version author file status
[ 1] FreshBans 1.4.0b kanagava fresh_bans_140_ running
[ 2] AIM detector 0.9.4.1b kanagava aim_detector_09 running
[ 3] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 4] fb_forwards 0.1 kanagava & Renai fb_forwards.amx running
[ 5] DopBan 3.0.1b kanagava dop_ban.amxx running
[ 6] Admin Loader 2.9 neygomon admin_loader_ne running
[ 7] Aliases checker 1.0.3 kanagava alias_detector- running
[ 8] Prefix Manger 0.1 serfreeman1337 prefixManager.a running
[ 9] block_changelevel 0.2 MiXa block_changelev running
[ 10] Advanced MapChooser 1.1.1 neygomon map_chooser23.a debug
[ 11] Admin Commands 1.9.0.5235 AMXX Dev Team admincmd.amxx running
[ 12] Admin Help 1.9.0.5235 AMXX Dev Team adminhelp.amxx running
[ 13] Slots Reservation 1.9.0.5235 AMXX Dev Team adminslots.amxx running
[ 14] Multi-Lingual System 1.9.0.5235 AMXX Dev Team multilingual.am running
[ 15] Menus Front-End 1.9.0.5235 AMXX Dev Team menufront.amxx running
[ 16] Commands Menu 1.9.0.5235 AMXX Dev Team cmdmenu.amxx running
[ 17] Players Menu 1.9.0.5235 AMXX Dev Team plmenu.amxx running
[ 18] Teleport Menu 1.9.0.5235 AMXX Dev Team telemenu.amxx running
[ 19] Maps Menu 1.9.0.5235 AMXX Dev Team mapsmenu.amxx running
[ 20] Restrict Weapons 1.9.0.5235 AMXX Dev Team restmenu.amxx running
[ 21] Admin Chat 1.9.0.5235 AMXX Dev Team adminchat.amxx running
[ 22] Anti Flood 1.9.0.5235 AMXX Dev Team antiflood.amxx running
[ 23] Scrolling Message 1.9.0.5235 AMXX Dev Team scrollmsg.amxx running
[ 24] Info. Messages 1.9.0.5235 AMXX Dev Team imessage.amxx running
[ 25] Admin Votes 1.9.0.5235 AMXX Dev Team adminvote.amxx running
[ 26] TimeLeft 1.9.0.5235 AMXX Dev Team timeleft.amxx running
[ 27] Pause Plugins 1.9.0.5235 AMXX Dev Team pausecfg.amxx running
[ 28] Stats Configuration 1.9.0.5235 AMXX Dev Team statscfg.amxx running
[ 29] gameME Plugin 2.3 TTS Oetzel & Goe gameme_cstrike. running
[ 30] TOP15 1.0 Yukki gameme_top.amxx running
[ 31] AES Bonus: Flags by aN 1.2 neugomon aes_bonus_flags debug
[ 32] [ReAPI] No Team Flash 1.0 ReHLDS Team noteamflash.amx running
[ 33] WMC 0.1 Alienware wmc.amxx debug
[ 34] Admin ESP 1.5b_mini KoST admin_esp_mini. running
[ 35] Admin Check 1.51 OneEyed admin_check.amx running
[ 36] c4 timer 1.1 cheap_suit c4timer.amxx running
[ 37] AdminListen 2.5 /dev/ urandom V amx_adminlisten debug
[ 38] FM ResetScore 0.1 neygomon fm_rs.amxx running
[ 39] Admin Screen 2 1.1 uTg | bigpapajig admin_screen2.a running
[ 40] Ping Control 1.31 neygomon Ping_Control3.a running
[ 41] Auto Restart KNIFE 1.6 Leo_[BH] & Finto rozminka2.amxx running
[ 42] AMX SSBan 2.6 God@Dorin\Fysiks amx_ssban.amxx running
[ 43] Descriptive 'Fire in t 0.1 VEN descriptive_fir running
[ 44] Vip_online 1.51 OneEyed Vip_online.amxx running
[ 45] VIP Is Coming 1.0 AndrewZ vipconnect.amxx running
[ 46] [ReAPI] IDEAL VIP by W 1.4.7 Wikiname (Remake reapi_ideal_vip debug
[ 47] SpartAAA KNife Kill 1.0 Shidla KNife_SpartAAA2 running
[ 48] Admin Player Name 1.5 Sutar admin_player_na running
[ 49] Steam_Grenade 0.1 Okorok bonus_za_st2.am running
[ 50] Parachute 1.4 for th KRoT@L/JTP10181 parachute.amxx running
[ 51] Advanced Gag 1.9.0 neygomon amx_gag5.amxx running
[ 52] Vampire 1.0c Shalfey & SKAJIb vampire.amxx running
[ 53] unknown unknown unknown dmg.amxx running
[ 54] Screen Fade 0.1 neygomon Screen_Fade.amx running
[ 55] Kills Counter 1.0 Safety1st killscounter.am running
[ 56] Smoke FIX 0.1 many smoke_fix.amxx running
[ 57] STEAM BONUS FIX 0.2 Leo_[BH] steam_bonus.amx running
[ 58] Key & Say Guardian 1.3b AndrewZ / noskil ksg.amxx running
[ 59] Say Admin 1.0 Ghost contact.amxx running
[ 60] Weapon Menu 0.1 Subb98 weaponmenu_cl.a debug
[ 61] Team Balancer 1.8b3 Ptahhotep ptb_rus.amxx running
[ 62] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 63] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 64] Map Spawns Editor 1.0.16 iG_os map_spawns_edit running
[ 65] Advert Messages 1.2 neygomon adverts.amxx running
[ 66] MOTD 1.0 Unknown infomotd.amxx running
[ 67] Back Weapons 1.87 hoboman313/cheap backweapons.amx debug
[ 68] Mode 2x2 1.9 s1lent mode.amxx running
[ 69] Amx Four Messages 1.1 Stimul chelovechek_182 running
[ 70] Say me and Say hp 1.4 neygomon sayme.amxx running
[ 71] ipb_bonus 2.3 ex3m777 | neugom bonus_system.am running
[ 72] Forum Presents 0.1 neygomon forum_presents. running
[ 73] SF Warn Menu 0.1.4f serfreeman1337 sf_admin_warns. running
[ 74] unknown unknown unknown adminfreelook.a running
[ 75] unknown unknown unknown ShowChangerName running
[ 76] WebHS 0.1 kanagava fb_web_online.a running
[ 77] StopSay 0.3 kanagava & Finto StopSay.amxx running
[ 78] unknown unknown unknown spam_block.amxx running
[ 79] SteamID Limiter 0.4 Mistrick steamid_limiter running
[ 80] BanIP Fakes 0.2 Safety1st banip_fakes.amx running
[ 81] Kick Spamers 0.5a gyxoBka KickSpamer.amxx running
[ 82] Advanced Experience Sy 0.5 Vega serfreeman1337 aes_main.amxx running
[ 83] AES: CStrike Addon 0.5 Vega serfreeman1337 aes_exp_cstrike running
[ 84] AES: Informer 0.5 Vega serfreeman1337 aes_informer.am running
[ 85] AES: Admin Tools 0.5 Vega serfreeman1337 aes_exp_editor. running
[ 86] AES: Bonus System 0.5 Vega serfreeman1337 aes_bonus_syste running
[ 87] AES: Bonus CSTRIKE 0.5 Vega serfreeman1337 aes_bonus_cstri running
87 plugins, 87 running
- Автор плагина
- neygomon
- Версия плагина
- 0.1
- Исходный код
-
#include <amxmodx>
#include <sqlx>
#define FORUM 1 // 1 - Xenforo; 2 - IPB 3.x | поддержку 4-ой ветки пока что некогда лепить.
#define HOST ""
#define USER ""
#define PASSWD ""
#define DB ""
#if FORUM == 2
#define STEAM_FIELD "steam_id" // поле с steamid игрока
#endif
new Handle:g_SqlTuple;
new data[1];
new fwdHandle;
public plugin_init()
{
register_plugin("Forum Presents", "0.1", "neygomon");
fwdHandle = CreateMultiForward("client_forum_info", ET_IGNORE, FP_CELL, FP_CELL, FP_STRING, FP_CELL, FP_CELL, FP_STRING, FP_CELL);
g_SqlTuple = SQL_MakeDbTuple(HOST, USER, PASSWD, DB);
#if AMXX_VERSION_NUM < 183
data[0] = 0;
SQL_ThreadQuery(g_SqlTuple, "SQL_Handler", "SET NAMES utf8", data, sizeof(data));
#else
SQL_SetCharset(g_SqlTuple, "utf8");
#endif
}
public plugin_end() SQL_FreeHandle(g_SqlTuple);
public client_putinserver(id)
{
if(is_user_bot(id) || is_user_hltv(id))
return;
static sAuth[25], sQuery[1024];
get_user_authid(id, sAuth, charsmax(sAuth));
#if FORUM == 1
formatex(sQuery, charsmax(sQuery), "SELECT `xf_user`.`user_id`, `xf_user`.`username`, `xf_user`.`message_count`, (SELECT COUNT(*) FROM `xf_thread` WHERE `xf_thread`.`user_id` = `xf_user`.`user_id`) AS topics, `xf_user`.`custom_title`, `xf_user`.`last_activity` FROM `xf_user`, `xf_user_profile`, `xf_user_field_value` WHERE `xf_user`.`user_id` = `xf_user_field_value`.`user_id` AND `xf_user_field_value`.`field_value` = '%s'", sAuth);
#endif
#if FORUM == 2
formatex(sQuery, charsmax(sQuery), "SELECT `members`.`member_id`, `members`.`name`, \
`members`.`posts`, (SELECT COUNT(*) FROM `topics` WHERE `topics`.`starter_id` = `members`.`member_id`) AS topics, \
`members`.`title`, `members`.`last_visit` FROM `pfields_content`, `members` \
WHERE `members`.`member_id` = `pfields_content`.`member_id` AND `pfields_content`.`%s` = '%s'", STEAM_FIELD, sAuth);
#endif
data[0] = id;
SQL_ThreadQuery(g_SqlTuple, "SQL_Handler", sQuery, data, sizeof(data));
}
public SQL_Handler(failstate, Handle:query, err[], errcode, data[], datasize)
{
switch(failstate)
{
case TQUERY_CONNECT_FAILED:
{
log_amx("MySQL connection failed");
log_amx("[ %d ] %s",errcode, err);
log_amx("Query state: %d", data[0]);
return PLUGIN_CONTINUE;
}
case TQUERY_QUERY_FAILED:
{
log_amx("MySQL query failed");
log_amx("[ %d ] %s", errcode, err);
log_amx("Query state: %d", data[0]);
return PLUGIN_CONTINUE;
}
}
static ret, id; id = data[0];
if(is_user_connected(id))
{
if(SQL_NumResults(query))
{
static sName[64]; SQL_ReadResult(query, 1, sName, charsmax(sName));
static sTitle[64]; SQL_ReadResult(query, 4, sTitle, charsmax(sTitle));
replace_all(sName, charsmax(sName), "!", "!");
ExecuteForward(fwdHandle, ret, id,
SQL_ReadResult(query, 0),
sName,
SQL_ReadResult(query, 2),
SQL_ReadResult(query, 3),
sTitle,
SQL_ReadResult(query, 5)
);
}
else ExecuteForward(fwdHandle, ret, id, 0, "", 0, 0, "", 0);
}
return PLUGIN_CONTINUE;
}
Раньше плагин работал с форумом xenforo 1.5
Решил его обновить до версии 2.1.3 и перенести на нормальный хостинг.
Доступ к бд открыт и удаленный доступ тоже а вот плагин не хочет подключатся.
Для данной версии форума заменил кусок кода
Решил его обновить до версии 2.1.3 и перенести на нормальный хостинг.
Доступ к бд открыт и удаленный доступ тоже а вот плагин не хочет подключатся.
Для данной версии форума заменил кусок кода
C++:
#if FORUM == 1
formatex(sQuery, charsmax(sQuery), "SELECT `xf_user`.`user_id`, `xf_user`.`username`, `xf_user`.`message_count`, (SELECT COUNT(*) FROM `xf_thread` WHERE `xf_thread`.`user_id` = `xf_user`.`user_id`) AS topics, `xf_user`.`custom_title`, `xf_user`.`last_activity` FROM `xf_user`, `xf_user_profile`, `xf_user_field_value` WHERE `xf_user`.`user_id` = `xf_user_field_value`.`user_id` AND `xf_user_field_value`.`field_value` = '%s'", sAuth);
#endif