mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Private Message User IRC Command
Summary: Added phabot irc command to directly message a user rather than outputting in a channel. Syntax: ex: ````Korvin, D1717``` results in phabot private messaging me the info on D1717 Test Plan: ##nick##, [DTPVF]n Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1717
This commit is contained in:
parent
fe05a63736
commit
7863956746
1 changed files with 5 additions and 0 deletions
|
@ -49,6 +49,7 @@ class PhabricatorIRCObjectNameHandler extends PhabricatorIRCHandler {
|
|||
'(D|T|P|V|F)(\d+)'.
|
||||
'(?:\b|$)'.
|
||||
'@';
|
||||
$pattern_override = '/(^[^\s]+)[,:] [DTPVF]\d+/';
|
||||
|
||||
$revision_ids = array();
|
||||
$task_ids = array();
|
||||
|
@ -56,8 +57,12 @@ class PhabricatorIRCObjectNameHandler extends PhabricatorIRCHandler {
|
|||
$commit_names = array();
|
||||
$vote_ids = array();
|
||||
$file_ids = array();
|
||||
$matches_override = array();
|
||||
|
||||
if (preg_match_all($pattern, $message, $matches, PREG_SET_ORDER)) {
|
||||
if (preg_match($pattern_override, $message, $matches_override)) {
|
||||
$reply_to = $matches_override[1];
|
||||
}
|
||||
foreach ($matches as $match) {
|
||||
switch ($match[1]) {
|
||||
case 'D':
|
||||
|
|
Loading…
Reference in a new issue