Assembla home | Assembla project page
 

Changeset 172

Show
Ignore:
Timestamp:
03/13/08 03:05:10 (8 months ago)
Author:
Slynderdale
Message:

Changed some static line break endings such \n and such to use PHP_EOL to be more portable with PHP running on other OSs and also made (ping|time|version|ctcp)reply functions to use camel case so onPingreply is now !onPingReply

Files:

Legend:

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

    r125 r172  
    6161*/ 
    6262if (!ini_get('register_argc_argv')) { 
    63     echo 'The register_argc_argv setting in php.ini is disabled, defaulting to ' . PHERGIE_INI . "\n"
     63    echo 'The register_argc_argv setting in php.ini is disabled, defaulting to ' . PHERGIE_INI . PHP_EOL
    6464    $ini = PHERGIE_INI; 
    6565} else if ($argc == 1) { 
    66     echo 'No configuration file specified, defaulting to ' . PHERGIE_INI . "\n"
     66    echo 'No configuration file specified, defaulting to ' . PHERGIE_INI . PHP_EOL
    6767    $ini = PHERGIE_INI; 
    6868} else { 
    69     echo 'Loaded specified configuration file ' . $argv[1] . "\n"
     69    echo 'Loaded specified configuration file ' . $argv[1] . PHP_EOL
    7070    $ini = $argv[1]; 
    7171} 
     
    8585 
    8686        if (count($config) == 0) { 
    87             echo 'Configuration file inaccessible or empty: ' . $ini . "\n"
     87            echo 'Configuration file inaccessible or empty: ' . $ini . PHP_EOL
    8888            return; 
    8989        } 
     
    9191        foreach ($required as $setting) { 
    9292            if (!isset($config[$setting]) || empty($config[$setting])) { 
    93                 echo 'Required configuration setting missing: ' . $setting . "\n"
     93                echo 'Required configuration setting missing: ' . $setting . PHP_EOL
    9494                return; 
    9595            } 
  • trunk/Phergie/Driver/Abstract.php

    r162 r172  
    120120    { 
    121121        if ($this->getIni('debug')) { 
    122             $message = date('H:i:s') . ' ' . $message . "\n"
     122            $message = date('H:i:s') . ' ' . $message . PHP_EOL
    123123            echo $message; 
    124124            if ($log = $this->getIni('log')) { 
  • trunk/Phergie/Driver/Streams.php

    r167 r172  
    257257                       } elseif ($cmd == 'ping' || $cmd == 'version' || $cmd == 'time') { 
    258258                           // Return sender as source and the rest of the args as its first argument 
    259                            $cmd = $cmd.'reply'; 
     259                           $cmd = $cmd.'Reply'; 
    260260                           $args = array($nick, trim($args)); 
    261261                       } else { 
    262262                           // Return sender as source and the ctcp as its first argument 
    263                            $cmd = 'ctcpreply'; 
     263                           $cmd = 'ctcpReply'; 
    264264                           $args = array($nick, $ctcp); 
    265265                       } 
  • trunk/Phergie/Plugin/Abstract/Base.php

    r166 r172  
    546546    * @return void 
    547547    */ 
    548     public function onPingreply() { } 
     548    public function onPingReply() { } 
    549549 
    550550    /** 
     
    553553    * @return void 
    554554    */ 
    555     public function onTimereply() { } 
     555    public function onTimeReply() { } 
    556556 
    557557    /** 
     
    560560    * @return void 
    561561    */ 
    562     public function onVersionreply() { } 
     562    public function onVersionReply() { } 
    563563 
    564564    /** 
     
    567567    * @return void 
    568568    */ 
    569     public function onCtcpreply() { } 
     569    public function onCtcpReply() { } 
    570570 
    571571    /** 
  • trunk/Phergie/Plugin/Eval.php

    r149 r172  
    3636                // Dump the content of the output buffering to the console 
    3737                                if (!empty($contents)) { 
    38                                         $this->debug("OUTPUT:\n".trim($contents)); 
     38                                        $this->debug('OUTPUT:' . PHP_EOL . trim($contents)); 
    3939                                        unset($contents); 
    4040                                } 
     
    6464                                if (!empty($output)) { 
    6565                                        if ($console) { 
    66                                                 $this->debug("OUTPUT:\n".implode("\n", $output)); 
     66                                                $this->debug('OUTPUT:' . PHP_EOL . implode("\n", $output)); 
    6767                                        } 
    6868                                        unset($output);