changed file headers & added AUTHORS file
[PHP-P10.git] / Uplink / P10Formatter.class.php
index d280bf212b8f09827a300c0322e6668725444272..4d27a380e06db8745b3fb421dec7e55e27446444 100644 (file)
@@ -1,22 +1,19 @@
 <?php
-/********************************* PHP-P10 ******************************
- *    P10 uplink class by pk910   (c)2011 pk910                         *
- ************************************************************************
- *                          Version 2 (OOP)                             *
+/******************************* PHP-P10 v2 *****************************
+ * Copyright (C) 2011  Philipp Kreil (pk910)                            *
  *                                                                      *
- * PHP-P10 is free software; you can redistribute it and/or modify      *
+ * This program is free software: you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
+ * the Free Software Foundation, either version 3 of the License, or    *
  * (at your option) any later version.                                  *
- *                                                                      *
+ *                                                                      * 
  * This program is distributed in the hope that it will be useful,      *
  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
  * GNU General Public License for more details.                         *
  *                                                                      *
  * You should have received a copy of the GNU General Public License    *
- * along with PHP-P10; if not, write to the Free Software Foundation,   *
- * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.       *
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. *
  *                                                                      *
  ************************************************************************
  * 
  *
  * This file contains the command formatter.
  *
- ************************************************************************
- * accessable methods:
- *
- * static String formatCMD(String $numeric, String $command, String[] $args) 
- *     builds the command with the given arguments
- *
  */
 
 class P10Formatter {
        
        private static $commands = array(
                "PASS"   => "PASS :%s",
-               "SERVER" => "SERVER %s 1 %s %s J10 %s]]] +s :%s",
-               "ERROR"  => "ERROR :%s"
+               "SERVER" => "SERVER %s 1 %s %s J10 %s]]] +s6 :%s",
+               "ERROR"  => "ERROR :%s",
+               "Z"      => "{num} Z %s",
+               "N"      => "{num} N %s 1 %s %s %s %s %s %s :%s",
+               "EB"     => "{num} EB",
+               "EA"     => "{num} EA",
+               "B"      => "{num} B %s %s %s",
+               "Q"      => "%s Q :%s",
+               "D"      => "{num} D %s :%s (%s)",
+               "J"      => "%s J %s %s %s",
+               "K"      => "%s K %s %s :%s",
+               "P"      => "%s P %s :%s",
+               "O"      => "%s O %s :%s",
+               "M"      => "%s M %s %s",
+               "SM"     => "%s SM %s %s",
+               "OM"     => "%s OM %s %s",
+               "311"    => "{num} 311 %s %s %s %s * :%s",
+               "319"    => "{num} 319 %s %s :%s",
+               "312"    => "{num} 312 %s %s %s :%s",
+               "313"    => "{num} 313 %s %s :%s",
+               "330"    => "{num} 330 %s %s %s :is logged in as",
+               "318"    => "{num} 318 %s %s :End of /WHOIS list.",
+               "401"    => "{num} 401 %s %s :No such nick",
+               "SQ"     => "{num} SQ :%s",
+               null     => null
        );
        
        public static function formatCMD($numeric, $command, $args) {