projects
/
PHP-P10.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
format
[PHP-P10.git]
/
Uplink
/
P10Formatter.class.php
diff --git
a/Uplink/P10Formatter.class.php
b/Uplink/P10Formatter.class.php
index e4235f458a3705901e858b8a7308142068a7a71b..44b1c28b55c1fbcd866e7492fbd18e2d81234d8f 100644
(file)
--- a/
Uplink/P10Formatter.class.php
+++ b/
Uplink/P10Formatter.class.php
@@
-1,12
+1,10
@@
<?php
<?php
-/********************************* PHP-P10 ******************************
- * P10 uplink class by pk910 (c)2011 pk910 *
- ************************************************************************
- * Version 2 (OOP) *
+/******************************* PHP-P10 v2 *****************************
+ * Copyright (C) 2011-2012 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 *
* 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, *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
@@
-15,25
+13,18
@@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* 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/>. *
* *
************************************************************************
* *
************************************************************************
- *
+ *
* Uplink/P10Formatter.class.php
*
* This file contains the command formatter.
*
* Uplink/P10Formatter.class.php
*
* 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 {
*/
class P10Formatter {
-
+
private static $commands = array(
"PASS" => "PASS :%s",
"SERVER" => "SERVER %s 1 %s %s J10 %s]]] +s6 :%s",
private static $commands = array(
"PASS" => "PASS :%s",
"SERVER" => "SERVER %s 1 %s %s J10 %s]]] +s6 :%s",
@@
-50,6
+41,7
@@
class P10Formatter {
"P" => "%s P %s :%s",
"O" => "%s O %s :%s",
"M" => "%s M %s %s",
"P" => "%s P %s :%s",
"O" => "%s O %s :%s",
"M" => "%s M %s %s",
+ "L" => "%s L %s :%s",
"SM" => "%s SM %s %s",
"OM" => "%s OM %s %s",
"311" => "{num} 311 %s %s %s %s * :%s",
"SM" => "%s SM %s %s",
"OM" => "%s OM %s %s",
"311" => "{num} 311 %s %s %s %s * :%s",
@@
-59,9
+51,10
@@
class P10Formatter {
"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",
"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",
- null => null
+ "SQ" => "{num} SQ :%s",
+ null => null
);
);
-
+
public static function formatCMD($numeric, $command, $args) {
if(array_key_exists($command, self::$commands)) {
$command = self::$commands[$command];
public static function formatCMD($numeric, $command, $args) {
if(array_key_exists($command, self::$commands)) {
$command = self::$commands[$command];