]> git.localhorst.tv Git - alttp.git/blobdiff - app/TwitchBot/IRCMessage.php
simple guessing game
[alttp.git] / app / TwitchBot / IRCMessage.php
index 1e64bd9b6de7c12c0674ce7966e06adbd914f0b0..4fb54c670b7a8890e89af029f6dc9b649efb42cc 100644 (file)
@@ -195,6 +195,14 @@ class IRCMessage {
                return $this->command == 'PRIVMSG';
        }
 
+       public function isOwner() {
+               return substr($this->getPrivMsgTarget(), 1) == $this->nick;
+       }
+
+       public function isMod() {
+               return $this->isOwner() || (isset($this->tags['mod']) && $this->tags['mod'] = '1');
+       }
+
        public function makePong() {
                $msg = new IRCMessage();
                $msg->command = 'PONG';