123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- if (!defined('STATUSNET')) {
- exit(1);
- }
- class ModHelperPlugin extends Plugin
- {
- static $rights = array(Right::SILENCEUSER, Right::TRAINSPAM, Right::REVIEWSPAM);
- function onPluginVersion(&$versions)
- {
- $versions[] = array('name' => 'ModHelper',
- 'version' => GNUSOCIAL_VERSION,
- 'author' => 'Brion Vibber',
- 'homepage' => 'http://status.net/wiki/Plugin:ModHelper',
- 'rawdescription' =>
-
- _m('Lets users who have been manually marked as "modhelper"s silence accounts.'));
- return true;
- }
- function onUserRightsCheck($profile, $right, &$result)
- {
- if (in_array($right, self::$rights)) {
-
- if ($profile->hasRole('modhelper')) {
- $result = true;
- return false;
- }
- }
- return true;
- }
- }
|