Show
Ignore:
Timestamp:
03/29/08 13:28:33 (5 years ago)
Author:
Slynderdale
Message:

A whole lot of enhancements and bug fixes. The files were also updated to use the new path constants.

Notable changes:

  • Acronyym: No longer requires Users, instead its optional for the randomnick feature.
  • ChuckNorris: Added a feature so reponses now have a random chanve at appearing and also added CTCP support.
  • Debug: Added a backwards compatibility check for PHP versions below 5.2
  • FeedTicker?: Added a dependency check for !SimpleXML
  • JoinPart: Allows for multiple channel joins and parts as well as part messages. Also added support for part all
  • Karma: Added some fixes, and also a Blacklist for entries that can't be changed or views. Also added support for ++word and --word
  • Lart: Added some bug fixes and also added support to make lart admin/op only with an ini setting.
  • Logging: Chnaged how other plugins can access the logging data by adding a static prepare function
  • Math: Minor fix to fix support for things like (#)(#) where no operator is defined, it now defaults to multiplication
  • ModuleList: Cleaned up the code a bit and added support for Inactive plugins as well Passive plugins
  • NickServ: Added auto ghosting support and nick name recovery. Also added a KILL handler for when the server sends a KILL request to Phergie. It now quits instead of timing out.
  • Puppet: Added the command raw (hostmask admins only) to send raw messages to the server
  • Sed: Greatly improved Sed to allow matching against specified previous lines as well as correcting other peoples lines. Also tweaked the Sed statement syntax a bit.
  • Seen: Added various bug fixes and took into account the changes in Logging
  • Tld: Now scrapes the data from  http://www.iana.org/domains/root/db/ and also gathered the TLDs type as well.
  • Toggle: Added various tweaks and bug fixes
  • Url: Fixed URLs ending in a ; and also changed the old error handler to onPHPError
  • Users: Fixed a bug that caused the User's data to become corrupted. Also now all matches are done case insensitive.
Files:
1 modified

Legend:

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

    r60 r194  
    44* @see Phergie_Plugin_Abstract_Command 
    55*/ 
    6 require_once 'Phergie/Plugin/Abstract/Command.php'; 
     6require_once PHERGIE_PLUGIN_DIR.'Abstract'.DS.'Command.php'; 
    77 
    88/** 
     
    2020    public function onDoUd($term) 
    2121    { 
     22        $target = $this->event->getNick(); 
     23        $source = $this->event->getSource(); 
     24 
    2225        $url = 'http://www.urbandictionary.com/define.php?term=' . urlencode($term); 
    2326        $contents = file_get_contents($url); 
     
    2528        if (strpos($contents, '<i>' . $term . '</i> isn\'t defined') !== false) { 
    2629            $url = $this->tinyUrl('http://urbandictionary.com/insert.php?word=' . $term); 
    27             $this->doPrivmsg( 
    28                 $this->getSource(), 
    29                 $term . ' is not defined yet [ ' . $url . ' ]' 
    30             ); 
     30            $this->doPrivmsg($source, $target. ': ' . $term . ' is not defined yet [ ' . $url . ' ]'); 
    3131        } else { 
    3232            $start = strpos($contents, '<div class="def_p">'); 
     
    4747            * length should be 510 characters according to the IRC RFC. 
    4848            */ 
    49             $target = $this->event->getSource(); 
    50             $max = 445 - strlen($target) - strlen($url); 
     49            $max = 445 - strlen($source) - strlen($url); 
    5150            if (strlen($contents) > $max) { 
    5251                $contents = substr($contents, 0, $max); 
     
    5958            $contents .=  $url; 
    6059 
    61             $this->doPrivmsg($target, $contents); 
     60            $this->doPrivmsg($source, $contents); 
    6261        } 
    6362    }