]> git.localhorst.tv Git - alttp.git/blobdiff - app/TwitchBot/IRCMessage.php
first simple twitch commands
[alttp.git] / app / TwitchBot / IRCMessage.php
index c0acfbb547cc2d205fff7ef5420fdfbe07ce9ad1..00217dc044660b1a5b70c471a8f20497e611fad1 100644 (file)
@@ -132,6 +132,14 @@ class IRCMessage {
                return $msg;
        }
 
+       public static function privmsg($target, $message) {
+               $msg = new IRCMessage();
+               $msg->command = 'PRIVMSG';
+               $msg->params[] = $target;
+               $msg->params[] = $message;
+               return $msg;
+       }
+
        public function getPrivMsgTarget() {
                if (!empty($this->params)) {
                        return $this->params[0];