SB-MaterialAdmin / NewServer

New server side for SourceBans Material Admin
GNU General Public License v3.0
42 stars 26 forks source link

Plugins don't run (sm 1.11) 20.10.2022 #154

Closed hirowatch closed 1 year ago

hirowatch commented 1 year ago

Builds 5333388

изображение Plugins don't run

oleg35hp commented 1 year ago

L 10/23/2022 - 20:50:23: [SM] Exception reported: Handle 1c401c4 is invalid (error 3) L 10/23/2022 - 20:50:23: [SM] Blaming: materialadmin.smx L 10/23/2022 - 20:50:23: [SM] Call stack trace: L 10/23/2022 - 20:50:23: [SM] [0] CloseHandle L 10/23/2022 - 20:50:23: [SM] [1] Line 302, materialadmin/config.sp::SetupCustomMenuForReasons L 10/23/2022 - 20:50:23: [SM] [2] Line 234, materialadmin/config.sp::NewSectionReason L 10/23/2022 - 20:50:23: [SM] [4] SMCParser.ParseFile L 10/23/2022 - 20:50:23: [SM] [5] Line 53, materialadmin/config.sp::ReadConfig L 10/23/2022 - 20:50:23: [SM] [6] Line 376, materialadmin.sp::OnConfigsExecuted

CrazyHackGUT commented 1 year ago

@oleg35hp attach, please, your time_reason.cfg. I can't reproduce this with default config and my custom.

oleg35hp commented 1 year ago

я вроде не менял `"materialadmin" { /***RU** Причины для мута "Own Reason" не торгать иначе не будет работать должным образом эта причина ****EN** Reasons for Mute "Own Reason" don't touch otherwise won't work properly this reason */

"MuteReasons" // RU
{
    "Нарушение правил сервера"  "Нарушение правил сервера"
    "Неподобающее поведение"    "Неподобающее поведение"
    "Чат спам"                  "Чат спам"
    "Голосовой спам"            "Голосовой спам"
    "Шумы"                      "Шумы"
    "Реклама"                   "Реклама"
    "Own Reason"                "Другая причина"
}

/*"MuteReasons" // EN
{
    "Violation of server rules" "Violation of server rules"
    "Inappropriate behavior"    "Inappropriate behavior"
    "Chat spam"                 "Chat spam"
    "Voice spam"                "Voice spam"
    "Noises"                    "Noises"
    "Advertising"               "Advertising"
    "Own Reason"                "Own Reason"
}*/

/*******RU******
 Причины для бана
 Общие опции меню, причина которые указываете при бане
 Без причины бан не будет записан в базу данных
 "Hacking" и "Own Reason" не торгать иначе не будет работать должным образом эти причины
********EN******
 Reasons for a ban
 The general options of the menu, the reason which you specify at the ban
 Without the reason the ban won't be written down in the database
 "Hacking" and "Own Reason" do not touch otherwise these reasons will not work properly
*/
"BanReasons" // RU
{   
    "Hacking"                   "Читерство"
    "Exploits"                  "Exploits"
    "Взлом сервера"             "Взлом сервера"
    "Нарушение правил сервера"  "Нарушение правил сервера"
    "Игнор админа"              "Игнор админа"
    "Неуважение админа"         "Неуважение админа"
    "Мат/Оскорбления"           "Мат/Оскорбления"
    "Спам в Мик/Чат"            "Спам в Мик/Чат"
    "Запрещённый ник"           "Запрещённый ник"
    "Запрещённый спрей"         "Запрещённый спрей"
    "Убийство своих"            "Убийство своих"
    "Кемпинг"                   "Кемпинг"
    "Лагер"                     "Лагер"
    "Реклама"                   "Реклама"
    "Малолетка"                 "Малолетка"
    "Расизм"                    "Расизм"
    "Own Reason"                "Другая причина"
}

/*"BanReasons" // EN
{   
    "Hacking"                   "Cheats"
    "Exploits"                  "Exploits"
    "Server hacking"            "Server hacking"
    "Server policy violation"   "Server policy violation"
    "Ignoring Admin"            "Ignoring Admin"
    "Disrespect of the admin"   "Disrespect of the admin"
    "Offensive language / Insults"          "Offensive language / Insults"
    "Spam in Mic/voice"         "Spam in Mic/voice"
    "The forbidden nickname"    "The forbidden nickname"
    "The forbidden spray"       "The forbidden spray"
    "Teamkill"                  "Teamkill"
    "Camping"                   "Camping"
    "Lags"                      "Lags"
    "Advertising"               "Advertising"
    "Youngster"                 "Youngster"
    "Racism"                    "Racism"
    "Own Reason"                "Own Reason"
}*/

/*******RU******
 Опции подменю "Hacking"
 Если "Hacking" удален из меню выше то подменю будет недоступно
********EN******
 Submenu options "Hacking"
 If "Hacking" removed from the menu above that submenu will be unavailable
*/
"HackingReasons"
{
    "AimBot"                    "Aim Bot"
    "SilentAim"                 "Silent Aim"
    "WallHack"                  "Wall Hack"
    "BhopHack"                  "Bhop Hack"
    "Multi-Hack"                "Multi-Hack"
    "Antirecoil"                "Anti Recoil"
    "SpinHack"                  "Spin Hack"
}

/*******RU******
 Время
********EN******
 Time
*/
"Time" // RU
{
    "-1"                        "Временный"
    "0"                         "Навсегда"
    "5"                         "На 5 мин."
    "30"                        "На 30 мин."
    "60"                        "На 1 час"
    "1440"                      "На 1 день"
    "10080"                     "На неделю"
    "43200"                     "На месяц"
    "129600"                    "На 3 месяца"
}

/*"Time" // EN
{
    "-1"                        "Temporary"
    "0"                         "Permanent"
    "5"                         "5 min."
    "30"                        "30 min."
    "60"                        "1 hour"
    "1440"                      "1 day"
    "10080"                     "1 week"
    "43200"                     "1 month"
    "129600"                    "3 months"
}*/

}`

oleg35hp commented 1 year ago

с последним time_reason.cfg проблема та же

oleg35hp commented 1 year ago

@CrazyHackGUT Я не очень понял как оно должно работать, но сейчас происходит так (файл configs.sp): функция ReadConfig() вызывается несколько раз, которая коллбэком из парсера вызывает SetupCustomMenuForReasons; на втором вызове функции SetupCustomMenuForReasons с аргументом 'materialadmin' происходит падение, т.к. хэндл, соответствующий 'materialadmin' не валидный (уже был освобожден в цикле config.sp:39). если после этого цикла добавить g_hReasonsSubmenus.Clear(), то ошибка уходит

CrazyHackGUT commented 1 year ago

Should be solved in 5948ecb

hirowatch commented 1 year ago

L 10/26/2022 - 23:51:44: [SM] Exception reported: Error: Config Setting invalid. L 10/26/2022 - 23:51:44: [SM] Blaming: staff/materialadmin.smx L 10/26/2022 - 23:51:44: [SM] Call stack trace: L 10/26/2022 - 23:51:44: [SM] [0] ThrowNativeError L 10/26/2022 - 23:51:44: [SM] [1] Line 152, materialadmin/native.sp::Native_GetConfigSetting L 10/26/2022 - 23:51:44: [SM] [3] MAGetConfigSetting L 10/26/2022 - 23:51:44: [SM] [4] Line 70, ma_checker.sp::MAOnConfigSetting L 10/26/2022 - 23:51:44: [SM] [6] Call_Finish L 10/26/2022 - 23:51:44: [SM] [7] Line 492, materialadmin/native.sp::FireOnConfigSetting L 10/26/2022 - 23:51:44: [SM] [8] Line 386, materialadmin.sp::OnConfigsExecuted

hirowatch commented 1 year ago

sorry to say, I saw the comment 27a7520 and 52a3d7a and updated the configs