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;
 }
Example #2
0
 /**
  * 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");
 }
Example #3
0
 /**
  * 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");
 }