Assembla home | Assembla project page
 

Changeset 198

Show
Ignore:
Timestamp:
03/30/08 16:29:56 (8 months ago)
Author:
Slynderdale
Message:

Fixed a bug in lart when detecting lart requests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Phergie/Plugin/Lart.php

    r194 r198  
    379379                    } 
    380380                } else if (preg_match('/^(' . $nick . '\s*:?\s+)?(.*?)\s+is\s+(.*)$/i', $message, $match)) { 
    381                        if (!$adminOnly || $this->fromAdmin()) { 
    382                                list (, $address, $name, $definition) = $match; 
    383                                if (!empty($name) && !empty($definition) && (empty($address) xor $source[0] == '#')) { 
     381                    list (, $address, $name, $definition) = $match; 
     382                        if (!empty($name) && !empty($definition) && (empty($address) xor $source[0] == '#')) { 
     383                            if (!$adminOnly || $this->fromAdmin()) { 
    384384                                        $name = trim($name); 
    385385                                        $definition = trim($definition); 
     
    389389                                        $this->doPrivmsg($this->event->getSource(), $target . ': Added lart "'. $name . '".'); 
    390390                                        $this->cache[$name] = $definition; 
    391                                } 
    392                         } else { 
    393                                 $this->doPrivmsg($this->event->getSource(), 
    394                                    $target . ': You do not have permission to add larts.'); 
     391                            } else { 
     392                                   $this->doPrivmsg($this->event->getSource(), 
     393                                        $target . ': You do not have permission to add larts.'); 
     394                        } 
    395395                    } 
    396396                } else if (preg_match('/^(' . $nick . '\s*:?\s+)?forget\s+(.*)$/i', $message, $match)) {