public function run() { $server = Server::getInstance(); $server->notify($this->senderNick, "Shutting down..."); $server->quit(); ErrorLog::log(ErrorCategories::NOTICE, "Killing script and all associated processes"); die; }
/** * Invites the given user to the given channel * * @param string nickname to invite * @param string channel name */ public function channelInvite($nick, $channel) { ErrorLog::log(ErrorCategories::NOTICE, "Sending channel invite for '" . $channel . "' to '" . $nick . "'"); fwrite(static::$serverHandle, "INVITE " . $nick . " " . $channel . "\n"); }
/** * Kills a user from the server (oper only) */ public function kill($user, $reason = "Killed") { // Send it ErrorLog::log(ErrorCategories::DEBUG, "Killing user " . $user . " from server"); fwrite(static::$serverHandle, "KILL " . $user . " " . $reason . "\n"); }