X-Git-Url: http://git.pk910.de/?p=PHP-P10.git;a=blobdiff_plain;f=Uplink%2FP10Formatter.class.php;h=44b1c28b55c1fbcd866e7492fbd18e2d81234d8f;hp=b5cba3d7689636decb9ffeb906c0c3f4b628aff8;hb=7f51193ddac01b0540000c756c50167ff015e02a;hpb=61ea565f8e0161c0f0f75aac75682941fc2a3611 diff --git a/Uplink/P10Formatter.class.php b/Uplink/P10Formatter.class.php index b5cba3d..44b1c28 100644 --- a/Uplink/P10Formatter.class.php +++ b/Uplink/P10Formatter.class.php @@ -1,12 +1,10 @@ . * * * ************************************************************************ - * + * * 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 { - + private static $commands = array( "PASS" => "PASS :%s", "SERVER" => "SERVER %s 1 %s %s J10 %s]]] +s6 :%s", @@ -50,11 +41,20 @@ class P10Formatter { "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", - null => null + "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) { if(array_key_exists($command, self::$commands)) { $command = self::$commands[$command];