1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class ModHelperPlugin extends Plugin
- {
- const PLUGIN_VERSION = '2.0.0';
- static $rights = array(Right::SILENCEUSER, Right::TRAINSPAM, Right::REVIEWSPAM);
- function onPluginVersion(array &$versions)
- {
- $versions[] = array('name' => 'ModHelper',
- 'version' => self::PLUGIN_VERSION,
- 'author' => 'Brion Vibber',
- 'homepage' => 'https://git.gnu.io/gnu/gnu-social/tree/master/plugins/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;
- }
- }
|