PHPackages                             phergie/phergie-irc-plugin-react-usermode - 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. phergie/phergie-irc-plugin-react-usermode

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

phergie/phergie-irc-plugin-react-usermode
=========================================

Phergie plugin for monitoring and providing access to user mode information

2.0.1(10y ago)537611BSD-2-ClausePHP

Since Dec 24Pushed 6y ago3 watchersCompare

[ Source](https://github.com/phergie/phergie-irc-plugin-react-usermode)[ Packagist](https://packagist.org/packages/phergie/phergie-irc-plugin-react-usermode)[ RSS](/packages/phergie-phergie-irc-plugin-react-usermode/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (5)Used By (1)

phergie/phergie-irc-plugin-react-usermode
=========================================

[](#phergiephergie-irc-plugin-react-usermode)

[Phergie](http://github.com/phergie/phergie-irc-bot-react/) plugin for monitoring and providing access to user mode information.

[![Build Status](https://camo.githubusercontent.com/fe76b68ff75b4271945d3a5809fe9d30bcab813ddcb78e58c49b9684d459d26f/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f706865726769652f706865726769652d6972632d706c7567696e2d72656163742d757365726d6f64652e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/phergie/phergie-irc-plugin-react-usermode)

Install
-------

[](#install)

The recommended method of installation is [through composer](http://getcomposer.org).

```
{
    "require": {
        "phergie/phergie-irc-plugin-react-usermode": "~2"
    }
}
```

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

Configuration
-------------

[](#configuration)

```
new \Phergie\Irc\Plugin\React\UserMode\Plugin(array(

    // All configuration is optional

    'prefixes' => array(
        '@' => 'o',
        '+' => 'v',
    ),

))
```

When the bot joins a channel, it receives a `343 RPL_NAMREPLY` server event containing user nicks prefixed with characters indicative of their respective channel-specific user modes.

This plugin's only configuration setting allows [this mapping](https://github.com/phergie/phergie-irc-plugin-react-usermode/blob/6ff691a2559c02b1b37ef555fc780b131898fe8a/src/Plugin.php#L40-46)of prefix to user mode characters to be overridden in cases where a network uses non-standard mappings. The plugin's default mapping includes several standard prefixes, which are shown in the example above, and several commonly used non-standard prefixes.

Usage
-----

[](#usage)

```
use Phergie\Irc\Bot\React\PluginInterface;
use Phergie\Irc\Bot\React\EventQueueInterface;
use Phergie\Irc\Plugin\React\Command\CommandEvent;

class FooPlugin implements PluginInterface
{
    /**
     * @var \Phergie\Irc\Plugin\React\UserMode\Plugin
     */
    protected $userMode;

    public function __construct(array $config)
    {
        // Validate $config['userMode']

        $this->userMode = $config['userMode'];
    }

    public function getSubscribedEvents()
    {
        return array(
            'command.foo' => 'handleFooCommand',
        );
    }

    public function handleFooCommand(CommandEvent $event, EventQueueInterface $queue)
    {
        $connection = $event->getConnection();
        $nick = $event->getNick();
        $params = $event->getParams();
        $source = $event->getCommand() === 'PRIVMSG'
            ? $params['receivers']
            : $params['nickname'];

        // Ignore events sent directly to the bot rather than to a channel
        if ($connection->getNickname() === $source) {
            return;
        }

        // Don't process the command if the user is not a channel operator
        if (!$this->userMode->userHasMode($connection, $source, $nick, 'o')) {
            return;
        }

        // The user is a channel operator, continue processing the command
        // ...
    }
}
```

Tests
-----

[](#tests)

To run the unit test suite:

```
curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit

```

License
-------

[](#license)

Released under the BSD License. See `LICENSE`.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 68% 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 ~223 days

Total

3

Last Release

3710d ago

Major Versions

1.0.0 → 2.0.02015-12-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/80dec604abed1b21daafc54c430468444a2ad163ad5f8229348b8d241b797778?d=identicon)[elazar](/maintainers/elazar)

---

Top Contributors

[![elazar](https://avatars.githubusercontent.com/u/15487?v=4)](https://github.com/elazar "elazar (17 commits)")[![svpernova09](https://avatars.githubusercontent.com/u/967362?v=4)](https://github.com/svpernova09 "svpernova09 (5 commits)")[![matthewtrask](https://avatars.githubusercontent.com/u/4731244?v=4)](https://github.com/matthewtrask "matthewtrask (1 commits)")[![Renegade334](https://avatars.githubusercontent.com/u/9092381?v=4)](https://github.com/Renegade334 "Renegade334 (1 commits)")[![sitedyno](https://avatars.githubusercontent.com/u/216721?v=4)](https://github.com/sitedyno "sitedyno (1 commits)")

---

Tags

pluginbotreactirc

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phergie-phergie-irc-plugin-react-usermode/health.svg)

```
[![Health](https://phpackages.com/badges/phergie-phergie-irc-plugin-react-usermode/health.svg)](https://phpackages.com/packages/phergie-phergie-irc-plugin-react-usermode)
```

PHPackages © 2026

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