1: <?php
2:
3: namespace Budabot\User\Modules;
4:
5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15:
16: class ChatCheckController {
17:
18:
19: public $db;
20:
21:
22: public $text;
23:
24: const CHANNEL_TYPE = "priv";
25:
26: 27: 28: 29: 30:
31: public function checkAllCommand($message, $channel, $sender, $sendto, $args) {
32: $data = $this->db->query("SELECT name FROM online WHERE added_by = '<myname>' AND channel_type = ?", self::CHANNEL_TYPE);
33: forEach ($data as $row) {
34: $content .= " \\n /assist $row->name";
35: }
36:
37: $list = $this->text->makeChatcmd("Check Players", "/text AssistAll: $content");
38: $msg = $this->text->makeBlob("Check Players In Vicinity", $list);
39: $sendto->reply($msg);
40: }
41: }
42: