AdminChat and ChatManager [Help please]

Въпроси и проблеми свързани с AMXModX.
Аватар
Shaka Zulu
Извън линия
Foreigner
Foreigner
Мнения: 9
Регистриран на: 27 Апр 2021, 18:36
Местоположение: Belgrade
Се отблагодари: 2 пъти
Обратна връзка:

AdminChat and ChatManager [Help please]

Мнение от Shaka Zulu » 27 Апр 2021, 19:45

Respected OciXCrom,

I need help with these two plugins:
  • OciXCrom's Admin Chat
  • Chat Manager [Admin Prefix & Color Chat]
I am interested in whether it is possible to create / modify a plugin to log all possible commands, e.g. (amx_say, amx_asay, amx_psay..) in the configs directory (e.g. in a specific folder named "a_LOGOVI") and how can I do that?

Currently, the plugin only logs commands (say and say_team). I tried to add commands in both ".ini" files, but failed. Also, try to recompile plugin with add some commands for example:

register_clcmd("say_team @", "OnSay")
register_clcmd("say #", "OnAdminCmd")
register_concmd("amx_say", "OnAdminCmd")
register_concmd("amx_asay", "OnAdminCmd")
register_concmd("amx_psay", "OnAdminCmd")

".ini" files try to add:
CHAT_LOG_SAY_FORMAT = log_say
CHAT_LOG_TEAM_FORMAT = log_team
Try to add:
AMX_ASAY_FORMAT = amx_asay
AMX_PSAY_FORMAT = amx_psay
AMX_SAY_SHORTCUT = say #
amx_psay = [ $ip$ | $steam$ ] (amx_psay) $name$ salje --> $target$: $message$
amx_asay = [ $ip$ | $steam$ ] (amx_chat) $name$: $message$
say_team @ = (amx_chat) $name$: $message$
say # = (amx_say) $name$: $message$

I'm wondering, if this is possible, how to set logs to be deleted automatically for 7 days?

Configs directory:
  • "addons/amxmodx/configs/a_LOGOVI"
LOG_FILE = !
  • "addons/amxmodx/configs/a_LOGOVI/Chat-Logovi"
CHAT_LOG_FILE = Chat-Log_%d.%m.%Y.log
  • "addons/amxmodx/configs/a_LOGOVI/Greske"
ERROR_TEXT = ?

EXPIRATION_DATE_FORMAT = 7 days - 1 week

Best regards, thank you in advance! :surrender:
Shaka Zulu
Последно промяна от OciXCrom на 27 Апр 2021, 20:17, променено общо 1 път.
Причина: Moved to correct section!
Server name: Buxna Public
IP: 185.119.91.213:27044
Forum: http://www.buxna-public.com/
Contact/email: [email protected]

Аватар
m0ney
Извън линия
Потребител
Потребител
Мнения: 285
Регистриран на: 13 Апр 2020, 11:36
Се отблагодари: 83 пъти
Получена благодарност: 39 пъти
Обратна връзка:

AdminChat and ChatManager [Help please]

Мнение от m0ney » 27 Апр 2021, 19:52

Hi, possible alternative since plugin like this exists but not integrated with oci's plugins https://forums.alliedmods.net/showthread.php?p=394600 We use this in our server.
Изображение
Изображение

Аватар
Shaka Zulu
Извън линия
Foreigner
Foreigner
Мнения: 9
Регистриран на: 27 Апр 2021, 18:36
Местоположение: Belgrade
Се отблагодари: 2 пъти
Обратна връзка:

AdminChat and ChatManager [Help please]

Мнение от Shaka Zulu » 27 Апр 2021, 20:11

m0ney написа: 27 Апр 2021, 19:52 Hi, possible alternative since plugin like this exists but not integrated with oci's plugins https://forums.alliedmods.net/showthread.php?p=394600 We use this in our server.
Unfortunately,
that plugin cannot be edited in .log format, believe me I have already tried.
I also tried the following plugins but failed: :(
https://forums.alliedmods.net/showthread.php?t=137514
https://forums.alliedmods.net/showthrea ... 42?t=15642
https://forums.alliedmods.net/showthread.php?t=77350
Server name: Buxna Public
IP: 185.119.91.213:27044
Forum: http://www.buxna-public.com/
Contact/email: [email protected]

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

AdminChat and ChatManager [Help please]

Мнение от OciXCrom » 27 Апр 2021, 20:17

I don't understand what your problem is. Both plugins have options to set the log destination.

Admin Chat:

Код за потвърждение: Избери целия код

# File where the messages will be logged.
# Use ! to log in the default AMXX log file.
LOG_FILE = !
Chat Manager:

Код за потвърждение: Избери целия код

# This is the file where chat messages will be logged. If you want to disable logging, leave this setting blank.
# Time formatting is available. Exmaple: chatmanager%m-%d-%Y.log
CHAT_LOG_FILE = chatmanager.log
You can easily specify a folder folder_name/file_name.log. The path is in the logs folder by default. Where is the logic behind logging in configs?

--------------------------------
Currently, the plugin only logs commands (say and say_team). I tried to add commands in both ".ini" files, but failed. Also, try to recompile plugin with add some commands for example:

register_clcmd("say_team @", "OnSay")
register_clcmd("say #", "OnAdminCmd")
register_concmd("amx_say", "OnAdminCmd")
register_concmd("amx_asay", "OnAdminCmd")
register_concmd("amx_psay", "OnAdminCmd")
What?!

Аватар
Shaka Zulu
Извън линия
Foreigner
Foreigner
Мнения: 9
Регистриран на: 27 Апр 2021, 18:36
Местоположение: Belgrade
Се отблагодари: 2 пъти
Обратна връзка:

AdminChat and ChatManager [Help please]

Мнение от Shaka Zulu » 27 Апр 2021, 20:56

OciXCrom написа: 27 Апр 2021, 20:17 I don't understand what your problem is. Both plugins have options to set the log destination.
You can easily specify a folder folder_name/file_name.log. The path is in the logs folder by default. Where is the logic behind logging in configs?
I tried that way too, but I didn't succeed. Anyway, I'll try again the way you wrote me, thank you.
I will try to explain to you, the reason is simple. Administrators in Hosting where we rent a server, they delete our chat logs every day, supposedly not taking up their memory, because people probably use plugins that just create .log files and they don't have automatic deletion, so those files accumulate in addons/amxmodx/logs/L20210427.log.
OciXCrom написа: 27 Апр 2021, 20:17 What?!
Your two plugins I listed log only two commands in the addons/amxmodx/logs/file_name.log, commands say and say_team. Is there a possibility to log all other commands in that log file and how do I define them ChatManager.ini?

I would like all these commands to be logged in my log file..

Код за потвърждение: Избери целия код

amx_say
amx_chat
amx_asay
amx_psay
amx_teamsay
amx_rawsay
amx_tsay
amx_csay
amx_bsay
amx_rsay
amx_tsay2
amx_csay2
amx_bsay2
amx_rsay2
amx_centersay
Also, I would like to log in to that same file when an ordinary player writes to the admins say_team:@ text, is that possible?
Server name: Buxna Public
IP: 185.119.91.213:27044
Forum: http://www.buxna-public.com/
Contact/email: [email protected]

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

AdminChat and ChatManager [Help please]

Мнение от OciXCrom » 28 Апр 2021, 00:15

That is not true.
Chat Manager logs "say" and "say_team".
Admin Chat logs ALL admin chat commands.

Since both plugins have a setting to set the log file, you can obviously easily set them to use the same file.
they delete our chat logs every day, supposedly not taking up their memory
A chat log from 1 day is ~50 KB. Do they run their servers on toasters?

Аватар
Shaka Zulu
Извън линия
Foreigner
Foreigner
Мнения: 9
Регистриран на: 27 Апр 2021, 18:36
Местоположение: Belgrade
Се отблагодари: 2 пъти
Обратна връзка:

AdminChat and ChatManager [Help please]

Мнение от Shaka Zulu » 29 Апр 2021, 02:01

OciXCrom написа: 28 Апр 2021, 00:15 That is not true.
Chat Manager logs "say" and "say_team".
Admin Chat logs ALL admin chat commands.

Since both plugins have a setting to set the log file, you can obviously easily set them to use the same file.
Sorry OciXCrom, I mispronounced. Your plugins work perfectly and really log every command. I noticed one "bug", and I would like to give you a suggestion for an update in a new version, when you have time.

Explanation:
AdminChat defines a command inside the plugin g_eSettings[LOG_FILE][0] == '!')
ChatManager defines a command inside the plugin g_eSettings[CHAT_LOG_FILE][0] == '!')
If I put the same save path for the first plugin LOG_FILE and the second CHAT_LOG_FILE, with the same file name.log, an error occurs as in the image.
Изображение
I tried to edit your admin plugin by renaming those partitions and adding time (format_time), as in ChatManager, but the plugin didn't work. I also noticed that admin does not have the EXPIRATION_DATE_FORMAT function.

Formatting messages within amx_log in AdminChat plugin:
Suggestion -> The $target$ function is missing in this context.
For example, I tried to add to ChatManager.ini and AdminChat.ini, but fail:

Код за потвърждение: Избери целия код

AMX_PSAY_FORMAT = amx_psay
amx_psay = [ $ip$ | $steam$ ] $name$ send PM --> $target$: $message$
I tried several ways to test the same principle, but the result was always the same. Also, I used the Rcon amx_rcon amx_psay "shak" "text" command in the console and the regular amx_psay "name" "text", and of course a shortcut say_team #, the results were identical:
Изображение
:huh: :headbang:
OciXCrom написа: 28 Апр 2021, 00:15 A chat log from 1 day is ~50 KB. Do they run their servers on toasters?
Hahahah you just made me laugh with your statement xD I don't think it would be correct for me to evaluate their decisions, but what is inevitable is that their panel is critical. A few weeks ago, the domain where the panel is stationed burned down, luckily in an accident, I didn't have to make all the plugins again..
Server name: Buxna Public
IP: 185.119.91.213:27044
Forum: http://www.buxna-public.com/
Contact/email: [email protected]

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

AdminChat and ChatManager [Help please]

Мнение от OciXCrom » 29 Апр 2021, 13:16

AdminChat defines a command inside the plugin g_eSettings[LOG_FILE][0] == '!')
ChatManager defines a command inside the plugin g_eSettings[CHAT_LOG_FILE][0] == '!')
If I put the same save path for the first plugin LOG_FILE and the second CHAT_LOG_FILE, with the same file name.log, an error occurs as in the image.
This is not a bug and it does not matter what the variable names inside the plugins are. This happens because the Admin Chat plugin doesn't support time formatting as Chat Manager does so you can't use %d-%m-%Y for the moment. I will add this feature in the next update.
Formatting messages within amx_log in AdminChat plugin:
Suggestion -> The $target$ function is missing in this context.
For example, I tried to add to ChatManager.ini and AdminChat.ini, but fail:
What are those things you added and where?! How is Chat Manager related to amx_psay?! You need to understand that these are two different plugins that have nothing in common. You can't just add the option from one .ini file into the other. The $target$ argument in Admin Chat logs the exact thing you wrote in the target field so it's working as intended. Maybe you want it to be replaced with the matched player's name?
I also noticed that admin does not have the EXPIRATION_DATE_FORMAT function.
Expiration date for what?! Admin Chat doesn't provide any player extras so what could you possibly want to expire inside it?!

Аватар
Shaka Zulu
Извън линия
Foreigner
Foreigner
Мнения: 9
Регистриран на: 27 Апр 2021, 18:36
Местоположение: Belgrade
Се отблагодари: 2 пъти
Обратна връзка:

AdminChat and ChatManager [Help please]

Мнение от Shaka Zulu » 29 Апр 2021, 19:42

I'm sorry, I accidentally wrote two identical messages
Последно промяна от Shaka Zulu на 29 Апр 2021, 19:51, променено общо 2 пъти.
Server name: Buxna Public
IP: 185.119.91.213:27044
Forum: http://www.buxna-public.com/
Contact/email: [email protected]

Аватар
Shaka Zulu
Извън линия
Foreigner
Foreigner
Мнения: 9
Регистриран на: 27 Апр 2021, 18:36
Местоположение: Belgrade
Се отблагодари: 2 пъти
Обратна връзка:

AdminChat and ChatManager [Help please]

Мнение от Shaka Zulu » 29 Апр 2021, 19:47

OciXCrom написа: 29 Апр 2021, 13:16 This is not a bug and it does not matter what the variable names inside the plugins are. This happens because the Admin Chat plugin doesn't support time formatting as Chat Manager does so you can't use %d-%m-%Y for the moment. I will add this feature in the next update.
Suggestion -> Maybe it would be good if you manage to make both plugins in one, and that there is only one configuration file in which everything will be configured (example only one ChatManager.ini, provided that something like this is feasible. My wish was to have one .log file in which all messages will be archived (say, say_team, and all admin messages), so that everything is in one place in one file. Also, I would like the .log file to be created separately every day and all these logs to be automatically deleted for 7, 15 or 30 days.

Maybe you will find an idea or inspiration in this plugin and upgrade your own. Your chat plugins are convincingly the best, because they have greater possibilities than others, the ranks and text of these messages can be created in different colors.
https://forums.alliedmods.net/showthread.php?t=137514
OciXCrom написа: 29 Апр 2021, 13:16 What are those things you added and where?! How is Chat Manager related to amx_psay?! You need to understand that these are two different plugins that have nothing in common. You can't just add the option from one .ini file into the other. The $target$ argument in Admin Chat logs the exact thing you wrote in the target field so it's working as intended. Maybe you want it to be replaced with the matched player's name?
I understand that these two plugins are completely separate and work separately. I tried to format the admin command e.g. amx_psay in the same way as you defined say and say_team, but I failed. When I added it to AdminChat.ini, the plugin did not load any of the admin commands on the server. My wish was that in my Chat-Log_%d.%M.%Y.log admin command amx_psay (like all other admin commands), to be formatted as I want, as you gave the option in ChatManager.ini to the say and say_team commands are formatted. An example of how I wanted the message to look in a .log file:

Код за потвърждение: Избери целия код

Private messages:
AMX_PSAY_FORMAT = amx_psay
amx_psay = [ $ip$ | $steam$ ] (amx_psay) $name$ send PM to --> $target$: $message$
in the log file it looks like this
L date - time | [steamID] [IP] (amx_psay) Buxna Public send PM to --> Shaka Zulu: message
AMX_PSAY_SHORTCUT = say_team #
say_team # = (amx_psay) $name$ send PM to --> $target$: $message$
-------------------------------------------------------------------------------------------------------------------------------
I would like there to be a possibility for Head Admins (eg with the K flag) to have a special admin chat such as amx_chat, in your plugin is defined as amx_asay, I will write you an example instead of VIP chat.
AMX_CHAT_FORMAT = amx_head
amx_head = (HEAD CHAT) $name$: $message$
L date - time | [steamID] [IP] (HEAD CHAT) Shaka Zulu: message
OciXCrom написа: 29 Апр 2021, 13:16 Expiration date for what?! Admin Chat doesn't provide any player extras so what could you possibly want to expire inside it?!
First, I would like all logs to be formatted in one .log file and to be created every new day. When 7, 15 or 30 days have passed, they should be deleted automatically, and we should not be in a situation where someone else deletes our chat logs. In the plugin that you created (AdminChat), it seems to me that there is no possibility when the .log file will be deleted, ie that there is no expiration time, as there is for the ChatManager plugin.

Is there a possibility to make (modify) a plugin like this for me? I believe that there will be many people who would use it, because the one you made is simply perfect, and you have all the praise from me!
Server name: Buxna Public
IP: 185.119.91.213:27044
Forum: http://www.buxna-public.com/
Contact/email: [email protected]

Публикувай отговор
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Поддръжка / Помощ”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 12 госта