]>
Commit | Line | Data |
---|---|---|
dc618640 VL |
1 | <?php |
2 | ||
3 | /** | |
c3699142 | 4 | @title Mute Users |
dc618640 VL |
5 | @author Valware |
6 | @description View a list of users who are muted (requires third/mute) | |
7 | @contact valerie@valware.co.uk | |
8 | @version 1.0 | |
9 | @tested 0.9 | |
10 | @minver 0.9 | |
11 | @maxver * | |
12 | @license GPLv3 | |
5aaa70ac | 13 | @icon https://static.thenounproject.com/png/10454-200.png |
dc618640 VL |
14 | */ |
15 | ||
16 | class mute | |
17 | { | |
18 | /* You must specify these here for internal use | |
19 | * All of these are mandatory or your plugin will not work. | |
20 | */ | |
21 | public $name = "mute"; // Name of your plugin | |
22 | public $author = "Valware"; // Name or handle of your lovely self | |
23 | public $version = "1.0"; // Version of this plugin | |
24 | public $description = "View a list of users who are muted (requires third/mute)"; // Description of your beautiful plugin | |
25 | public $email = "v.a.pond@outlook.com"; // An email people can contact you with in case of problems | |
26 | ||
27 | /** This is run on plugin load. You can add hooks and initialize whatever databases | |
28 | * that you think you might need. | |
29 | */ | |
30 | function __construct() | |
31 | { | |
32 | /**The hook for the navigation bar. | |
33 | * The first argument is the HOOKTYPE we're using. In this case | |
34 | * we're using NAVBAR to add our page to the navigation bar. | |
35 | * For a full list of hooks, see this page: | |
36 | * https://github.com/unrealircd/unrealircd-webpanel/blob/main/Classes/class-hook.php | |
37 | * | |
38 | * The second argument references the function you want to include | |
39 | * in your hooked function. In this example we are referencing a | |
40 | * method (function) in this class (mute) | |
41 | */ | |
42 | Hook::func(HOOKTYPE_NAVBAR, 'mute::add_navbar'); | |
43 | } | |
44 | ||
45 | /** This is the method (function) that we have hooked. | |
46 | * Now we can do things. Make sure to check the relevant hooks | |
47 | * for the right variables to use. | |
48 | * We use variable reference (&) on this hook | |
49 | */ | |
50 | public static function add_navbar(&$pages) | |
51 | { | |
52 | $page_name = "Mutes"; | |
53 | $page_link = "plugins/mute"; | |
54 | $pages["Server Bans"][$page_name] = ["script" => $page_link, "no_irc_server_required" => true]; | |
55 | } | |
56 | ||
57 | } |