PHPackages                             wildphp/module-antispam - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. wildphp/module-antispam

AbandonedArchivedLibrary[Security](/categories/security)

wildphp/module-antispam
=======================

Automatically kick users when a message pattern is matched

010PHP

Since Apr 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/WildPHP/module-antispam)[ Packagist](https://packagist.org/packages/wildphp/module-antispam)[ RSS](/packages/wildphp-module-antispam/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

AntiSpam Module
===============

[](#antispam-module)

[![Build Status](https://camo.githubusercontent.com/624bbefe1c928a8adf003219d12ebbed94fd95bcf65eed30e00b9091c7874548/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f57696c645048502f6d6f64756c652d616e74697370616d2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/WildPHP/module-antispam/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/fca07afe1b8f7b05d4945444784259538636287e51d7d5003027151404070284/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f57696c645048502f6d6f64756c652d616e74697370616d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/WildPHP/module-antispam/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/21ecff65fbf98ad9b7f7265977c58999174e1bdb1ce56eaee9c98a3a7e10090a/68747470733a2f2f706f7365722e707567782e6f72672f77696c647068702f6d6f64756c652d616e74697370616d2f762f737461626c65)](https://packagist.org/packages/wildphp/module-antispam)[![Latest Unstable Version](https://camo.githubusercontent.com/f09410656b4af6f33c1aaaaab7d563504011e7f790e1d77cec1f0960d9a903a9/68747470733a2f2f706f7365722e707567782e6f72672f77696c647068702f6d6f64756c652d616e74697370616d2f762f756e737461626c65)](https://packagist.org/packages/wildphp/module-antispam)[![Total Downloads](https://camo.githubusercontent.com/030143944777d0e2bf9192dfc979ff37a51d923c590499ec7ecf29d7d0103d09/68747470733a2f2f706f7365722e707567782e6f72672f77696c647068702f6d6f64756c652d616e74697370616d2f646f776e6c6f616473)](https://packagist.org/packages/wildphp/module-antispam)

Automatically kick users when a message pattern is matched.

System Requirements
-------------------

[](#system-requirements)

If your setup can run the main bot, it can run this module as well.

Installation
------------

[](#installation)

To install this module, we will use `composer`:

`composer require wildphp/module-antispam`

That will install all required files for the module. In order to activate the module, add the following line to your modules array in `config.neon`:

```
- WildPHP\Modules\AntiSpam\AntiSpam

```

The bot will run the module the next time it is started.

Usage
-----

[](#usage)

The AntiSpam module relies on a blacklist to do its work. To manipulate the blacklist, the following commands are available. All patterns must be given as valid regular expressions. See [the php manual on PCRE syntax](https://secure.php.net/manual/en/reference.pcre.pattern.syntax.php) for more details.

In addition to a blacklist the module maintains a list of exempted *nicknames*. These nicknames are exempted from checks and will not be kicked even if their message contains a blacklisted pattern.

If the bot is not a channel OP, it will still detect the spam and give a single notice per nickname in the channel asking users to inform channel OPs.

- `blacklist [pattern]`
    - Required permission: `sa_blacklist`
- `unblacklist [pattern]`
    - Required permission: `sa_blacklist`
- `exempt [nickname]`
    - Required permission: `sa_exempt`
- `unexempt [nickname]`
    - Required permission: `sa_exempt`

### Use case: Blocking messages with multiple consecutive spaces

[](#use-case-blocking-messages-with-multiple-consecutive-spaces)

Since the bot trims given arguments (removes extra whitespace), it is not as straightforward to blacklist a pattern of multiple consecutive spaces.

**Do not blacklist messages with consecutive spaces by giving the spaces as argument to `blacklist`**. This will cause the bot to block every message containing a space, making it virtually impossible to undo the blacklist if you are not exempted.

Instead, the following command illustrates the best solution for this problem:

- `blacklist [ ]{8}` where 8 is the number of spaces that need to be matched.

License
-------

[](#license)

This module is licensed under the MIT license. Please see `LICENSE` to read it.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/64cbefa2b33116fa8d909bbeb6add16b949cd91864b693cd9c4797430ee7eb6d?d=identicon)[Yoshi2889](/maintainers/Yoshi2889)

---

Top Contributors

[![NanoSector](https://avatars.githubusercontent.com/u/1280380?v=4)](https://github.com/NanoSector "NanoSector (2 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/wildphp-module-antispam/health.svg)

```
[![Health](https://phpackages.com/badges/wildphp-module-antispam/health.svg)](https://phpackages.com/packages/wildphp-module-antispam)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
