X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fbtr;a=blobdiff_plain;f=lib%2Fbtr%2Firc.php;fp=lib%2Fbtr%2Firc.php;h=0000000000000000000000000000000000000000;hp=8af22098e1e5d6f878b89b3fc129590410fb9842;hb=4723d8f5f6c11d101989ab6c64658c03211100dc;hpb=7a1b870bedbbb500f7425751c60229aea6a1f48d diff --git a/lib/btr/irc.php b/lib/btr/irc.php deleted file mode 100755 index 8af2209..0000000 --- a/lib/btr/irc.php +++ /dev/null @@ -1,88 +0,0 @@ -session = $session = new irc\client\Session( - $url["user"], - $url["user"], - $url["user"] - ); - - @list($this->channel, $this->keyword) = - explode(" ", $url["fragment"]); - - $session->onConnect = $session->onPart = function($origin, array $args) { - $this->joined = false; - $this->session->doJoin("#".$this->channel, $this->keyword); - }; - $session->onJoin = function($origin, array $args) use ($onJoin) { - $this->joined = true; - $onJoin($this, $origin, $args); - }; - $session->doConnect(false, $url["host"], @$url["port"]?:6667, @$url["pass"]); - } - - function send($message = null) { - if (isset($message)) { - $this->queue[] = $message; - } - - if ($this->joined) { - while ($this->queue) { - $this->session->doMsg("#".$this->channel, array_shift($this->queue)); - } - } - } - - function getSession() { - return $this->session; - } -} - -if (!extension_loaded("ircclient")) { - fatal("ext/ircclient not loaded"); -} - -# vim: noet