X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FTwitchBot%2FIRCMessage.php;h=d127f9f5d57425e850512640d6ae470c2f0c1bc3;hb=31127000e16c18389129546b9aa652de565683fb;hp=c730ef7d0bfa962126417f7b513e7adc46984b9b;hpb=9ac5e263a259207e3ecd132188df41f7c3315b88;p=alttp.git diff --git a/app/TwitchBot/IRCMessage.php b/app/TwitchBot/IRCMessage.php index c730ef7..d127f9f 100644 --- a/app/TwitchBot/IRCMessage.php +++ b/app/TwitchBot/IRCMessage.php @@ -139,6 +139,13 @@ class IRCMessage { return $msg; } + public static function ping($token = 'localhorsttv') { + $msg = new IRCMessage(); + $msg->command = 'PING'; + $msg->params[] = $token; + return $msg; + } + public static function privmsg($target, $message) { $msg = new IRCMessage(); $msg->command = 'PRIVMSG'; @@ -169,6 +176,10 @@ class IRCMessage { return $this->command == 'PING'; } + public function isPong() { + return $this->command == 'PONG'; + } + public function isPrivMsg() { return $this->command == 'PRIVMSG'; }