1: <?php
2:
3: namespace Budabot\User\Modules;
4:
5: use Budabot\Core\AutoInject;
6:
7: /**
8: * Authors:
9: * - Tyrence (RK2)
10: *
11: * @Instance
12: *
13: * Commands this controller contains:
14: * @DefineCommand(
15: * command = 'htmldecode',
16: * accessLevel = 'all',
17: * description = 'Execute a command by first decoding html entities',
18: * help = 'htmldecode.txt'
19: * )
20: */
21: class HtmlDecodeController extends AutoInject {
22:
23: /**
24: * Name of the module.
25: * Set automatically by module loader.
26: */
27: public $moduleName;
28:
29: /**
30: * @HandlesCommand("htmldecode")
31: * @Matches("/^htmldecode (.+)$/is")
32: */
33: public function htmldecodeCommand($message, $channel, $sender, $sendto, $args) {
34: $command = html_entity_decode($args[1], ENT_QUOTES);
35: $this->commandManager->process($channel, $command, $sender, $sendto);
36: }
37: }
38: