Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #15 from Renegade334/devel
Browse files Browse the repository at this point in the history
Add support for PROTOCTL command
  • Loading branch information
elazar committed Mar 29, 2015
2 parents 715b1e9 + efc720e commit d9e63ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ class Parser implements ParserInterface
'257' => 'RPL_ADMINLOC1',
'258' => 'RPL_ADMINLOC2',
'259' => 'RPL_ADMINEMAIL',
'005' => 'RPL_ISUPPORT',
);

/**
Expand Down Expand Up @@ -261,6 +262,7 @@ public function __construct()
'WALLOPS' => "/^(?:(?P<text>$trailing))$/",
'USERHOST' => "/^(?:(?P<nickname1>$middle|$trailing)(?P<nickname2>$middle|$trailing)?(?P<nickname3>$middle|$trailing)?(?P<nickname4>$middle|$trailing)?(?P<nickname5>$trailing)?)$/",
'ISON' => "/^(?:(?P<nicknames>(?:$middle )*$trailing))$/",
'PROTOCTL' => "/^(?:()(?P<proto>$trailing))$/",
);

$xdelim = "\001";
Expand Down
12 changes: 12 additions & 0 deletions tests/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,18 @@ public function dataProviderTestParse()
),
),

// PROTOCTL
array(
"PROTOCTL NAMESX\r\n",
array(
'command' => 'PROTOCTL',
'params' => array(
'proto' => 'NAMESX',
'all' => 'NAMESX',
),
),
),

// Error replies (RFC 1459 Section 6.1)
array(
"401\r\n",
Expand Down

0 comments on commit d9e63ea

Please sign in to comment.