PHPackages                             hashworks/phergie-user-watch-plugin - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hashworks/phergie-user-watch-plugin

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hashworks/phergie-user-watch-plugin
===================================

Phergie plugin to watch and handle users.

v0.1(11y ago)132GNU GPL v3.0PHP

Since Apr 23Pushed 6y ago1 watchersCompare

[ Source](https://github.com/hashworks/PhergieUserWatch)[ Packagist](https://packagist.org/packages/hashworks/phergie-user-watch-plugin)[ RSS](/packages/hashworks-phergie-user-watch-plugin/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (6)Used By (0)

PhergieUserWatch
================

[](#phergieuserwatch)

[Phergie](http://github.com/phergie/phergie-irc-bot-react/) plugin to watch joins, parts and quits of users. You can also whois users easily.

About
-----

[](#about)

This plugin was originally written to keep the growing amount of monitoring-bots in the Rizon network out of channels. However you can do what you want with the callbacks, it'll require a bit of PHP knowledge though.

Install
-------

[](#install)

Use the command below to install it with [Composer](http://getcomposer.org/) to the current `$PWD`.

```
composer require hashworks/phergie-user-watch-plugin

```

See Phergie documentation for more information on [installing and enabling plugins](https://github.com/phergie/phergie-irc-bot-react/wiki/Usage#plugins).

Configuration Examples
----------------------

[](#configuration-examples)

The configuration allows you to set up to 3 callbacks: joinCallback, partCallback and quitCallback. Below are some examples.

```
// Simple example, give voice to every user who joins the channel.
new \hashworks\Phergie\Plugin\UserWatch\Plugin(array(
                'joinCallback' => function(\hashworks\Phergie\Plugin\UserWatch\User $user) {
                    $user->setChannelMode('+v', $user->getNick());
                }
        )
)
```

```
// Kick everyone who isn't using a secure connection.
new \hashworks\Phergie\Plugin\UserWatch\Plugin(array(
                'joinCallback' => function(\hashworks\Phergie\Plugin\UserWatch\User $user) {
                    $user->queueWhois(function() use($user) {
                        if (!$user->hasSecureConnection()) {
                            $user->kick('This channel requires a secure connection.');
                        }
                    });
                }
        )
)
```

```
// This is kinda how I use it. Kickban every user who is in 13 channels or more. Ban based on nick and username, replace numbers with question marks.
new \hashworks\Phergie\Plugin\UserWatch\Plugin(array(
                'joinCallback' => function(\hashworks\Phergie\Plugin\UserWatch\User $user) {
                    $user->queueWhois(function() use($user) {
                        if (count($user->getChannels()) >= 13) {
                            $banMask = preg_replace_callback('/^(?.+?)(?[0-9]{0,})!(?.+?)(?[0-9]{0,})@.+$/', function ($matches) {
                                return $matches['nick'] . str_replace(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9), '?', $matches['nicknumbers']) . '!' .
                                $matches['username'] . str_replace(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9), '?', $matches['usernumbers']) . '@*';
                            }, $user->getNick() . '!' . $user->getUsername() . '@' . $user->getHost());
                            if (!empty($banMask)) {
                                $user->setChannelMode('+b', $banMask);
                                $user->kick('You have been kicked automatically. Please contact hashworks to file a complaint.');
                                $user->privmsgUser('You have been banned automatically from ' . $user->getEvent()->getSource() . '. . Please contact hashworks to file a complaint.');
                            }
                        }
                    });
                }
        )
)
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~12 days

Total

5

Last Release

4039d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/020e7faf0f687685e662b4ae27a51e3c3a79713665ede78869816014a7c88b4c?d=identicon)[hashworks](/maintainers/hashworks)

---

Top Contributors

[![hashworks](https://avatars.githubusercontent.com/u/2362091?v=4)](https://github.com/hashworks "hashworks (2 commits)")

---

Tags

pluginjoinbotwhoisircwatchphergiepart

### Embed Badge

![Health badge](/badges/hashworks-phergie-user-watch-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/hashworks-phergie-user-watch-plugin/health.svg)](https://phpackages.com/packages/hashworks-phergie-user-watch-plugin)
```

PHPackages © 2026

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