<?php
/**
- * Phergie
+ * Phergie
*
* PHP version 5
*
* 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)
* 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
$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)) {
- 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 . '!';
- }
+ $msg = 'You\'re my ' . $m[1] . ', ' . $target . '!';
$this->doPrivmsg($source, $msg);
}
}