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 #12 from hashworks/bugfix/reverseWhoisParameter
Browse files Browse the repository at this point in the history
Reverse ircWhois parameters, make server optional
  • Loading branch information
elazar committed Jun 8, 2015
2 parents cf8b2ea + 5055dd6 commit 6df0832
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,11 @@ public function ircWho($name, $o = null)
/**
* Returns a WHOIS message.
*
* @param string $server
* @param string $nickmasks
* @param string $server
* @return string
*/
public function ircWhois($server, $nickmasks)
public function ircWhois($nickmasks, $server = null)
{
return $this->getIrcMessage('WHOIS', array($server, $nickmasks));
}
Expand Down
4 changes: 2 additions & 2 deletions src/GeneratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ public function ircWho($name, $o = null);
/**
* Returns a WHOIS message.
*
* @param string $server
* @param string $nickmasks
* @param string $server
* @return string
* @link https://tools.ietf.org/html/rfc2812#section-4.5.2
*/
public function ircWhois($server, $nickmasks);
public function ircWhois($nickmasks, $server = null);

/**
* Returns a WHOWAS message.
Expand Down
2 changes: 1 addition & 1 deletion tests/GeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function dataProviderTestGenerationMethod()
array('ircWho', "WHO :name\r\n", array('name')),
array('ircWho', "WHO name :o\r\n", array('name', 'o')),

array('ircWhois', "WHOIS server :nickmasks\r\n", array('server', 'nickmasks')),
array('ircWhois', "WHOIS server :nickmasks\r\n", array('nickmasks', 'server')),

array('ircWhowas', "WHOWAS :nickname\r\n", array('nickname')),
array('ircWhowas', "WHOWAS nickname :2\r\n", array('nickname', '2')),
Expand Down

0 comments on commit 6df0832

Please sign in to comment.