Documentation — MxChat Moderation

Version 2.1.3 · Updated 4 hours ago

MxChat Chat Moderation

Block bad actors out of your chatbot by email address or IP. One-click bans from any transcript, a searchable ban list, and a dashboard that shows every active ban at a glance.

Overview

MxChat Moderation gives site owners a simple, durable way to keep abusive or spammy users out of their chatbot. Every banned email or IP is stored in a dedicated wp_mxchat_bans table with a timestamp, the admin who placed the ban, and optional notes. When you spot a bad actor in your Chat Transcripts, a single click bans them — no copy/pasting addresses, no modal popups. Bans are permanent until you remove them, so they keep working long after you've forgotten the incident.

This add-on focuses on identity-based blocking (email + IP). It does not run text through an external moderation API or scan messages for forbidden words — that's a different problem, and one MxChat handles via its core content controls and other add-ons.

Setup

  1. Install the plugin via WordPress admin or upload the mxchat-moderation ZIP.
  2. Activate via Plugins → Installed Plugins.
  3. Activate your MxChat Pro license under MxChat → Activation if you haven't already — moderation features stay locked otherwise.
  4. Find the admin UI under MxChat → Moderation.

On activation the plugin creates the wp_mxchat_bans table automatically. No further configuration is required to start banning.

Settings

The Moderation admin page is built around the ban list itself, not a settings form. The pieces:

Dashboard

Top-of-page stat cards show total active bans, count of email bans, and count of IP bans. Useful for a quick sense of how much abuse you're absorbing week over week.

Add New Ban

Click "Add New Ban" to open the inline form. Fields:

  • Identifier: the email address or IP to block. Sanitized as a text field.
  • Type: email or ip. Auto-detected when banning from Chat Transcripts; chosen manually here.
  • Notes: optional free-text reason for the ban (spam, abuse, harassment, etc.). Stored verbatim so you remember why the ban exists.

Ban List

Every active ban as a searchable, sortable table. Per-row actions:

  • Edit notes — update the reason without removing the ban.
  • Delete — unban the user. Two clicks, instant.

Search and Filter

A search box matches against both the identifier and the notes column. A type filter narrows the list to email-only or IP-only bans for quick triage.

Features

  • Email-based bans: Block specific email addresses from chatting with your bot. Useful for repeat offenders you've identified via lead capture or signed-in users.
  • IP-based bans: Block by IP address for anonymous abusers without a captured email. Stops the same source before it lands in your transcripts again.
  • One-click ban from Chat Transcripts: A "Ban" button appears on every transcript row. It auto-detects whether the value is an email or an IP and creates the ban inline with a toast confirmation.
  • Modern sidebar admin UI: The page uses the same shared admin shell as MxChat core, so the moderation experience matches the rest of the plugin's design.
  • Searchable ban table: Full-text search across identifier and notes columns, plus a dropdown filter for ban type, makes it fast to find any specific ban among hundreds.
  • Notes per ban: Each ban can carry an admin-facing note explaining why it exists, so the reason survives turnover and time.
  • Dashboard with ban statistics: Top-of-page cards show total bans, email count, and IP count at a glance.
  • Edit + remove inline: Quick actions on every row mean unbanning a user (or updating the reason) is a two-click operation.

API & Integration

The plugin exposes its ban logic through the MX_Chat_Ban_Handler class in includes/class-ban-handler.php. Useful methods for custom integrations:

  • add_ban($identifier, $type, $notes = '') — programmatically add a ban. $type must be 'email' or 'ip'.
  • check_ban($identifier, $type) — returns true if a matching ban exists. Use this if you're enforcing bans in a custom request flow.
  • remove_ban($id) — delete a ban by its row ID.
  • get_bans($args) — paginated query with search, type filter, and sort options.

Bans live in the {prefix}mxchat_bans table; reading directly is fine for reporting dashboards, but writes should go through MX_Chat_Ban_Handler so the data stays consistently sanitized.

There are no REST endpoints or public-facing filters in the current release.

Requirements

  • MxChat (mxchat-basic): Required. The plugin shows an admin error and refuses to load if MxChat is not active.
  • MxChat Pro License: Required. Without an active Pro license the menu and features stay hidden behind an admin notice. See pricing.
  • WordPress: 5.0 or newer.
  • PHP: 7.2 or newer.
  • Third-party: None. All ban storage is local to your WordPress database.

Troubleshooting

"MxChat Moderation requires MxChat Pro to be activated" notice

The plugin checks mxchat_license_status (and the network-wide equivalent on multisite). If it's not active, the entire feature set stays disabled. Activate your license under MxChat → Activation and reload — the menu item should appear.

"Moderation" menu doesn't appear

Confirm both MxChat (mxchat-basic) and your Pro license are active. The submenu is only registered when both checks pass.

Wrong user got banned from Chat Transcripts

The one-click ban auto-detects email vs IP based on the value in the transcript row. If a transcript captured the wrong identifier (e.g. the visitor was behind a shared proxy IP), find the ban in MxChat → Moderation and delete it. Add a note on any related bans explaining the false-positive context for future reference.

Ban-list pagination shows no results

The search box matches both identifier and notes. If you've typed a partial term that doesn't exist in either column, the table will empty out. Clear the search to see all bans.

Need to clear all bans

Deactivating + deleting the plugin removes the data per its privacy policy. For a softer reset, drop the {prefix}mxchat_bans table contents with a database tool — the table will be repopulated as you create new bans.


Last reviewed by Sage on 2026-05-21. Spotted an issue? Open a ticket and we'll patch the doc.