<p><strong>CSB Chat Logger</strong> writes a permanent record of in-game chat for moderation. Every <code>say</code> and <code>say_team</code> line is captured with a timestamp, channel, team, player name and SteamID and appended to a per-day file (<code>csb_chat_YYYY-MM-DD.log</code>) with <code>write_file()</code>. The last 20 lines are also kept in memory so an admin can run <code>amx_lastchat</code> and read recent chat straight in their console without opening a file.</p><h2>Features</h2><ul><li>Hooks <code>say</code> and <code>say_team</code> without swallowing them — messages still reach normal chat.</li><li>Per-day log file, one line per message: <code>[HH:MM:SS] (ALL) TEAM Name <STEAM_ID>: text</code>.</li><li><code>amx_lastchat</code> prints an in-memory ring buffer of the most recent 20 lines to the caller's console.</li><li>Skips empty messages and <code>/</code> or <code>!</code> command-style lines so the log is not polluted by other plugins' menus.</li><li><code>csb_chatlog_tofile</code> lets you keep only the in-memory buffer if you do not want files on disk.</li></ul><h2>Installation</h2><ol><li>Compile <code>csb_chat_logger.sma</code> and copy it to <code>addons/amxmodx/plugins/</code>.</li><li>Add it to <code>plugins.ini</code> and change the map.</li></ol><p>Log files are written under <code>addons/amxmodx/logs/</code> (the AMXX logs directory) by default. <code>amx_lastchat</code> needs the <code>ADMIN_KICK</code> flag (<code>c</code>).</p>









