Assembla home | Assembla project page
 

Changeset 151

Show
Ignore:
Timestamp:
03/09/08 18:33:21 (9 months ago)
Author:
Seldaek
Message:

* Command: Fixes a bug that eated the first char of each argument parsed if they were "a", "x" or "0"

Files:

Legend:

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

    r141 r151  
    6060                '(?:' . $this->getIni('nick') . '\s*:?\s+)?'; 
    6161 
    62         if (preg_match('/^'.$exp.'(\S+)(?:[\s\0xa0]+(.*))?$/', $message, $match)) { 
     62        if (preg_match('/^'.$exp.'(\S+)(?:[\s'.chr(240).']+(.*))?$/', $message, $match)) { 
    6363            $command = strtolower($match[1]); 
    6464            $params = isset ($match[2]) ? $match[2] : array(); 
     
    7878                    } 
    7979                } else { 
    80                     $params = preg_split('/[\s\0xa0]+/', $params, $this->methods[$command][0]); 
     80                    $params = preg_split('/[\s'.chr(240).']+/', $params, $this->methods[$command][0]); 
    8181                    if ($this->methods[$command][1] <= count($params)) { 
    8282                        call_user_func_array(array($this, $method), $params);