mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
log_amx: remove .amx from plugin names
This commit is contained in:
parent
8ffcb98ce7
commit
db278c390d
@ -2056,7 +2056,13 @@ static cell AMX_NATIVE_CALL log_amx(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
CPluginMngr::CPlugin *plugin = g_plugins.findPluginFast(amx);
|
CPluginMngr::CPlugin *plugin = g_plugins.findPluginFast(amx);
|
||||||
int len;
|
int len;
|
||||||
UTIL_Log("[%s] %s", plugin->getName(), format_amxstring(amx, params, 1, len));
|
// remove extension (.amx for example)
|
||||||
|
std::string name = plugin->getName();
|
||||||
|
size_t pos = name.rfind('.');
|
||||||
|
if (pos != std::string::npos)
|
||||||
|
name.erase(pos);
|
||||||
|
|
||||||
|
UTIL_Log("[%s] %s", name.c_str(), format_amxstring(amx, params, 1, len));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user