1: <?php
2:
3: namespace Budabot\User\Modules;
4:
5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35:
36: class ChatSayController {
37:
38:
39: public $chatBot;
40:
41:
42: public $chatLeaderController;
43:
44: 45: 46: 47: 48:
49: public function sayOrgCommand($message, $channel, $sender, $sendto, $args) {
50: if (!$this->chatLeaderController->checkLeaderAccess($sender)) {
51: $sendto->reply("You must be Raid Leader to use this command.");
52: return;
53: }
54:
55: $this->chatBot->sendGuild("$sender: $args[1]");
56: }
57:
58: 59: 60: 61: 62:
63: public function sayPrivCommand($message, $channel, $sender, $sendto, $args) {
64: if (!$this->chatLeaderController->checkLeaderAccess($sender)) {
65: $sendto->reply("You must be Raid Leader to use this command.");
66: return;
67: }
68:
69: $this->chatBot->sendPrivate("$sender: $args[1]");
70: }
71:
72: 73: 74: 75: 76:
77: public function cmdCommand($message, $channel, $sender, $sendto, $args) {
78: if (!$this->chatLeaderController->checkLeaderAccess($sender)) {
79: $sendto->reply("You must be Raid Leader to use this command.");
80: return;
81: }
82:
83: $msg = "\n<yellow>---------------------\n<red>$args[1]<end>\n<yellow>---------------------";
84:
85: if ($channel == 'msg') {
86: $this->chatBot->sendGuild($msg, true);
87: $this->chatBot->sendPrivate($msg, true);
88: } else {
89: $sendto->reply($msg, true);
90: }
91: }
92:
93: 94: 95: 96: 97:
98: public function tellCommand($message, $channel, $sender, $sendto, $args) {
99: if (!$this->chatLeaderController->checkLeaderAccess($sender)) {
100: $sendto->reply("You must be Raid Leader to use this command.");
101: return;
102: }
103:
104: if ($channel == 'guild' || $channel == 'msg') {
105: $this->chatBot->sendGuild("<yellow>$args[1]<end>", true);
106: $this->chatBot->sendGuild("<yellow>$args[1]<end>", true);
107: $this->chatBot->sendGuild("<yellow>$args[1]<end>", true);
108: }
109:
110: if ($channel == 'priv' || $channel == 'msg') {
111: $this->chatBot->sendPrivate("<yellow>$args[1]<end>", true);
112: $this->chatBot->sendPrivate("<yellow>$args[1]<end>", true);
113: $this->chatBot->sendPrivate("<yellow>$args[1]<end>", true);
114: }
115: }
116:
117: }
118: