X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FTwitchBot%2FIRCMessage.php;h=b986847792f6898a4d99f8abb9a82f9455e55318;hb=HEAD;hp=0f73c06797a79b4694215dbe09a380392e56620f;hpb=6a643908d58f26272c2095616514a140e7c0b4c0;p=alttp.git diff --git a/app/TwitchBot/IRCMessage.php b/app/TwitchBot/IRCMessage.php index 0f73c06..b986847 100644 --- a/app/TwitchBot/IRCMessage.php +++ b/app/TwitchBot/IRCMessage.php @@ -140,6 +140,13 @@ class IRCMessage { return TokenizedMessage::fromIRC($this); } + public static function capReq($cap) { + $msg = new IRCMessage(); + $msg->command = 'CAP REQ'; + $msg->params[] = $cap; + return $msg; + } + public static function join($channels) { $msg = new IRCMessage(); $msg->command = 'JOIN'; @@ -199,6 +206,10 @@ class IRCMessage { return $this->command == 'PRIVMSG'; } + public function isWhisper() { + return $this->command == 'WHISPER'; + } + public function isOwner() { return substr($this->getPrivMsgTarget(), 1) == $this->nick; }