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

Commit cf8b2ea

Browse files
committed
Merge pull request #10 from Renegade334/devel
Add support for PROTOCTL command
2 parents 8b3ed19 + 4e0d227 commit cf8b2ea

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

src/Generator.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,17 @@ public function ircIson($nicknames)
540540
return $this->getIrcMessage('ISON', array($nicknames));
541541
}
542542

543+
/**
544+
* Returns a PROTOCTL message.
545+
*
546+
* @param string $proto
547+
* @return string
548+
*/
549+
public function ircProtoctl($proto)
550+
{
551+
return $this->getIrcMessage('PROTOCTL', array($proto));
552+
}
553+
543554
/**
544555
* Returns a CTCP request.
545556
*

src/GeneratorInterface.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,14 @@ public function ircUserhost($nickname1, $nickname2 = null, $nickname3 = null, $n
427427
*/
428428
public function ircIson($nicknames);
429429

430+
/**
431+
* Returns a PROTOCTL message.
432+
*
433+
* @param string $proto
434+
* @return string
435+
*/
436+
public function ircProtoctl($proto);
437+
430438
/**
431439
* Returns a CTCP FINGER message.
432440
*

tests/GeneratorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ public function dataProviderTestGenerationMethod()
183183

184184
array('ircIson', "ISON :nicknames\r\n", array('nicknames')),
185185

186+
array('ircProtoctl', "PROTOCTL :NAMESX\r\n", array('NAMESX')),
187+
186188
array('ctcpFinger', "PRIVMSG receivers :\001FINGER\001\r\n", array('receivers')),
187189

188190
array('ctcpFingerResponse', "NOTICE nickname :\001FINGER text\001\r\n", array('nickname', 'text')),

0 commit comments

Comments
 (0)