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 = 'unixtime',
16: * accessLevel = 'all',
17: * description = 'Show the date and time for a unix timestamp',
18: * help = 'unixtime.txt'
19: * )
20: */
21: class UnixtimeController extends AutoInject {
22:
23: /**
24: * Name of the module.
25: * Set automatically by module loader.
26: */
27: public $moduleName;
28:
29: /**
30: * @HandlesCommand("unixtime")
31: * @Matches("/^unixtime (\d+)$/i")
32: */
33: public function reloadinstanceAllCommand($message, $channel, $sender, $sendto, $args) {
34: $time = $args[1];
35:
36: $msg = "$time is " . $this->util->date($time) . ".";
37: $sendto->reply($msg);
38: }
39: }
40: