forked from GNUsocial/gnu-social
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Phergie
|
||||
* Phergie
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://phergie.org/license
|
||||
*
|
||||
* @category Phergie
|
||||
* @category Phergie
|
||||
* @package Phergie_Plugin_Daddy
|
||||
* @author Phergie Development Team <team@phergie.org>
|
||||
* @copyright 2008-2010 Phergie Development Team (http://phergie.org)
|
||||
@@ -23,7 +23,7 @@
|
||||
* Simply responds to messages addressed to the bot that contain the phrase
|
||||
* "Who's your daddy?" and related variations.
|
||||
*
|
||||
* @category Phergie
|
||||
* @category Phergie
|
||||
* @package Phergie_Plugin_Daddy
|
||||
* @author Phergie Development Team <team@phergie.org>
|
||||
* @license http://phergie.org/license New BSD License
|
||||
@@ -45,11 +45,15 @@ class Phergie_Plugin_Daddy extends Phergie_Plugin_Abstract
|
||||
$text = $event->getArgument(1);
|
||||
$target = $event->getNick();
|
||||
$source = $event->getSource();
|
||||
$pattern
|
||||
= '/' . preg_quote($prefix) .
|
||||
$pattern
|
||||
= '/' . preg_quote($prefix) .
|
||||
'\s*?who\'?s y(?:our|a) ([^?]+)\??/iAD';
|
||||
if (preg_match($pattern, $text, $m)) {
|
||||
$msg = 'You\'re my ' . $m[1] . ', ' . $target . '!';
|
||||
if ($config['daddy.curses'] && mt_rand(0, 5) === 5) {
|
||||
$msg = $target . ': I am your ' . $m[1] . ', bitch!';
|
||||
} else {
|
||||
$msg = 'You\'re my ' . $m[1] . ', ' . $target . '!';
|
||||
}
|
||||
$this->doPrivmsg($source, $msg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user