Show
Ignore:
Timestamp:
02/17/08 04:25:26 (5 years ago)
Author:
tobias382
Message:

Fixes #1, #8, #14, #10, #13
* Fixed some parameter parsing issues in the streams driver and Command plugin
* Fixed an issue in the streams driver where quitting would not cause the

connection to be terminated on the client side

* Added automated directory creation to the event handler class
* Added isInChannel() and TYPE_KICK to request event class
* Modified the bootstrap file to use a full path when referencing the Plugin

directory and to include plugin loading debugging messages

* Fixed a bug in the bootstrap file where it would not produce an error when

required configuration settings existed, but were empty

* Cleared default values and unused settings out of the config file
* Made modifications to the fromAdmin method in the AdminCommand? plugin to

optimize performance

* Fixed a bug in the parsing logic in the Acronym plugin and added a check for

instances where the per-IP bandwidth limit has been executed

* Added a check for cases where a server has no MOTD to the Autojoin plugin
* Modified the Drink plugin to filter coffee drinks when scraping data for the

coke table and to remove the profanity filter array from memory once the
init method is done using it

* Added an avogadro alias for the mole fixed karma and added support for

configurable fixed karma for the bot

* Modified the Logging plugin to extend the Command plugin and to use PDO in

place of the standalone SQLite driver

* Modified the Php plugin to use full URLs to function pages rather than the

shorthand version, which does not always resolve to the expected URL

* Renamed the Say plugin to Puppet and added support emulation of CTCP ACTION

commands

* Modified the Url plugin to use the MIME type of the resource in place of

the title in cases where it is not HTML-based

* Fixed an issue with the parsing logic in the onMode handler of the Users

plugin

* Uncommented the onPrivmsg handler and modified it to use the new debug

configuration setting

* Added alternate nick support to the Nickserv plugin
* Removed the CONTRIBUTE file, as its fairly out of date

Files:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Phergie/Plugin/Puppet.php

    r59 r60  
    77 
    88/** 
    9 * Allows administrators to effectively speak as the bot. 
     9* Allows administrators to effectively speak and act as the bot. 
    1010*/ 
    11 class Phergie_Plugin_Say extends Phergie_Plugin_Abstract_AdminCommand 
     11class Phergie_Plugin_Puppet extends Phergie_Plugin_Abstract_AdminCommand 
    1212{ 
    1313    /** 
     
    1515    * channel. 
    1616    * 
    17     * <code>Botname: say [#chan] message</code> 
     17    * <code>say #chan message</code> 
    1818    * 
     19    * @param string $chan Name of the channel 
     20    * @param string $message Message to repeat 
    1921    * @return void 
    2022    */ 
    21     public function onDoSay($what) 
     23    public function onDoSay($chan, $message) 
    2224    { 
    23         $source = $this->getSource(); 
    24         preg_match('{^(#\S+\s)?(.+)}', $what, $match); 
    25         if (!empty ($match[1])) { 
    26             $this->doPrivmsg(trim($match[1]), $match[2]); 
    27         } elseif ($source[0] === '#') { 
    28             $this->doPrivmsg($source, $what); 
    29         } 
     25        $this->doPrivmsg($chan, $message); 
     26    } 
     27 
     28    /** 
     29    * Handles a request for the bot to repeat a given action in a specified 
     30    * channel. 
     31    * 
     32    * <code>act #chan action</code> 
     33    * 
     34    * @param string $chan Name of the channel 
     35    * @param string $action Action to perform 
     36    * @return void 
     37    */ 
     38    public function onDoAct($chan, $action) 
     39    { 
     40        $this->doAction($chan, $action); 
    3041    } 
    3142}