root/trunk/Phergie/Plugin/Quit.php @ 76

Revision 76, 0.9 KB (checked in by Seldaek, 5 years ago)

* Streams: parameter parsing bug fixed
* Karma: supports multi-word items using (grouped by parenthesis)
* Quit: added 'die' command, same effect with different quit message
* Tld: added easter eggs (and spoons)

Line 
1<?php
2
3/**
4* @see Phergie_Plugin_AdminCommand
5*/
6require_once 'Phergie/Plugin/Abstract/AdminCommand.php';
7
8/**
9* Handles requests from administrators for the bot to disconnect from the
10* server.
11*/
12class Phergie_Plugin_Quit extends Phergie_Plugin_Abstract_AdminCommand
13{
14    /**
15    * Processes requests for the bot to disconnect from the server.
16    *
17    * Note: The Freenode IRC daemon will display "Client Quit" in place of
18    * any provided reason for quitting if the bot has not been connected for
19    * at least 5 minutes prior to disconnecting. This is meant to prevent
20    * spamming via quit messages. It is possible that IRC daemons for other
21    * networks have similar behavior.
22    *
23    * @return void
24    */
25    public function onDoQuit()
26    {
27        $this->doQuit('by request of ' . $this->event->getNick());
28    }
29
30    public function onDoDie()
31    {
32        $this->doQuit('bows to ' . $this->event->getNick() .' and commits seppuku');
33    }
34}
Note: See TracBrowser for help on using the browser.