9 * This source file is subject to the new BSD license that is bundled
10 * with this package in the file LICENSE.
11 * It is also available through the world-wide-web at this URL:
12 * http://phergie.org/license
15 * @package Phergie_Plugin_Puppet
16 * @author Phergie Development Team <team@phergie.org>
17 * @copyright 2008-2010 Phergie Development Team (http://phergie.org)
18 * @license http://phergie.org/license New BSD License
19 * @link http://pear.phergie.org/package/Phergie_Plugin_Puppet
23 * Allows a user to effectively speak and act as the bot.
26 * @package Phergie_Plugin_Puppet
27 * @author Phergie Development Team <team@phergie.org>
28 * @license http://phergie.org/license New BSD License
29 * @link http://pear.phergie.org/package/Phergie_Plugin_Puppet
30 * @uses Phergie_Plugin_Command pear.phergie.org
32 class Phergie_Plugin_Puppet extends Phergie_Plugin_Abstract
35 * Checks for dependencies.
39 public function onLoad()
41 $this->getPluginHandler()->getPlugin('Command');
45 * Handles a request for the bot to repeat a given message in a specified
48 * <code>say #chan message</code>
50 * @param string $channel Name of the channel
51 * @param string $message Message to repeat
55 public function onCommandSay($channel, $message)
57 $this->doPrivmsg($channel, $message);
61 * Handles a request for the bot to repeat a given action in a specified
64 * <code>act #chan action</code>
66 * @param string $channel Name of the channel
67 * @param string $action Action to perform
71 public function onCommandAct($channel, $action)
73 $this->doAction($channel, $action);
77 * Handles a request for the bot to send the server a raw message
79 * <code>raw message</code>
81 * @param string $message Message to send
85 public function onCommandRaw($message)
87 $this->doRaw($message);