当前位置: 首页>>代码示例>>PHP>>正文


PHP Dog::reply方法代码示例

本文整理汇总了PHP中Dog::reply方法的典型用法代码示例。如果您正苦于以下问题:PHP Dog::reply方法的具体用法?PHP Dog::reply怎么用?PHP Dog::reply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dog的用法示例。


在下文中一共展示了Dog::reply方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: reply

 public function reply($message)
 {
     Dog::reply($message);
     return true;
     // 		if (true === $this->player->isOptionEnabled(SR_Player::WWW_OUT))
     // 		{
     // 			$this->player->message($message);
     // 		}
     // 		else
     // 		{
     // 			Dog::reply($message);
     // 			if (NULL === ($user = $this->player->getUser()))
     // 			{
     // 				echo "PLAYER HAS NO USER IN SHADOWRAP.\n";
     // 			}
     // 			elseif (false === ($server = $user->getServer()))
     // 			{
     // 				echo "USER HAS NO SERVER IN SHADOWRAP.\n";
     // 			}
     // 			else
     // 			{
     // 				# BAH
     // 			}
     // 		}
     // 		return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:26,代码来源:Shadowrap.php

示例2: dog_plugin_alert_func4

 function dog_plugin_alert_func4(array $args)
 {
     global $DOG_PLUG_ALERT_TIMERS;
     $scope = $args[0];
     $scope instanceof Dog_Scope;
     Dog::setScope($scope);
     Dog::reply($args[1]);
     $DOG_PLUG_ALERT_TIMERS[$scope->getUser()->getID()]--;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:9,代码来源:alert_Pb.php

示例3: announceVideo

 private function announceVideo(array $data)
 {
     // Pick ISO for channel?
     if (false !== ($chan = Dog::getChannel())) {
         $iso = $chan->getLangISO();
     } else {
         $iso = Dog::getUser()->getLangISO();
     }
     $vars = array($data['title'], GWF_TimeConvert::humanDurationISO($iso, $data['duration']), sprintf('%.02f', $data['rating']), number_format($data['views']), number_format($data['num_raters']));
     Dog::reply($this->langISO($iso, 'video', $vars));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:11,代码来源:DOGMOD_YouTube.php

示例4: on_scum_Pc

 public function on_scum_Pc()
 {
     if (false === ($chanel = Dog::getChannel())) {
         return Dog::rply('err_only_channel');
     }
     $user = Dog::getUser();
     $msg = $this->msgarg();
     $command = Common::substrUntil($msg, ' ', $msg);
     $message = Common::substrFrom($msg, ' ', '');
     switch ($command) {
         case '':
         case 'help':
             $out = $this->scumHelp($message);
             break;
         case 'init':
             $out = $this->scumInit($user);
             break;
         case 'join':
             $out = $this->scumJoin($user);
             break;
         case 'start':
             $out = $this->scumStart($user);
             break;
         case 'cards':
             $out = $this->scumCards($user);
             break;
         case 'turn':
         case 'deck':
             $out = $this->scumDeck($user);
             break;
         case 'top5':
             $out = $this->scumTop5($user, $message);
             break;
         case 'stats':
             $out = $this->scumStats($user, $message);
             break;
         case 'abort':
             $out = $this->scumAbort($user);
             break;
         case 'pass':
             $out = $this->scumPass($user);
             break;
         default:
             $out = $this->scumPlay($user, $msg, false);
             break;
     }
     return Dog::reply($out);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:48,代码来源:DOGMOD_Scum.php

示例5:

<?php

Dog::reply('^StAr^ is the slayradio DJ with the most sexy voice ever, and you can ommit the slayradio stuff!');
开发者ID:sinfocol,项目名称:gwf3,代码行数:3,代码来源:star_Pc.php

示例6: array

<?php

$lang = array('en' => array('help' => 'Usage: %CMD%. Show information of the current song played at http://slayradio.org - mplayer http://relay1.slayradio.org:8000', 'np' => 'Now Playing on http://slayradio.org %s - %s (requested by %s)', 'live' => "There is probably a live show on http://slayradio.org: %s.", 'ki' => 'SlayRadio AI'));
$plugin = Dog::getPlugin();
$ki = $plugin->lang('ki');
$url = 'http://slayradio.org/now_playing.php';
if (false === ($result = GWF_HTTP::getFromURL($url))) {
    return Dog::rply('err_response');
}
# <strong>Lagerfeldt</strong><br>R-Type (Doppelganger Summer Remix)<p align="center"><small>Requested by <b><i>zeddan</i></b> <br></small>
if (preg_match('#<strong>([^<]+)</strong><br>([^<]+)<p align="center"><small>Requested by <b><i>([^<]+)</i></b> <br></small>#', $result, $matches)) {
    $plugin->rply('np', array(utf8_encode(html_entity_decode($matches[1], ENT_QUOTES)), utf8_encode(html_entity_decode($matches[2], ENT_QUOTES)), utf8_encode(html_entity_decode($matches[3], ENT_QUOTES))));
} elseif (preg_match('#<strong>([^<]+)</strong><br>([^<]+)<p align="center">#', $result, $matches)) {
    $plugin->rply('np', array(utf8_encode(html_entity_decode($matches[1], ENT_QUOTES)), utf8_encode(html_entity_decode($matches[2], ENT_QUOTES)), $ki));
} elseif (preg_match('#<strong>([^<]+)</strong><br>([^<]+)<br>#', $result, $matches) && preg_match('#<small>Requested by <b><i>([^<]+)</i></b> <br></small>#', $result, $matches2)) {
    $plugin->rply('np', array(utf8_encode(html_entity_decode($matches[1], ENT_QUOTES)), utf8_encode(html_entity_decode($matches[2], ENT_QUOTES)), utf8_encode(html_entity_decode($matches2[1], ENT_QUOTES))));
} elseif (1 === preg_match('#<strong>([^<]+)</strong><br>([^<]+)<br>#', $result, $matches)) {
    $plugin->rply('np', array(utf8_encode(html_entity_decode($matches[1], ENT_QUOTES)), utf8_encode(html_entity_decode($matches[2], ENT_QUOTES)), $ki));
} elseif (true === false) {
} elseif (1 === preg_match('#<font size="\\+1">([^<]+)</font>#', $result, $matches)) {
    $plugin->rply('live', array($matches[1]));
    Dog::reply(sprintf('', $matches[1]));
} else {
    Dog::rply('err_response');
}
开发者ID:sinfocol,项目名称:gwf3,代码行数:25,代码来源:np_Pb.php

示例7: array

<?php

$lang = array('en' => array('help' => 'Usage: %CMD% <hex numbers separated by space>. Convert hex into dec. See also dec2hex.'));
$plugin = Dog::getPlugin();
if ('' === ($message = $plugin->msg())) {
    return $plugin->showHelp();
}
$out = '';
$hex = preg_split('/ +/', strtolower($message));
foreach ($hex as $h) {
    if (!preg_match('/^[0-9a-f]+$/', $h)) {
        $out .= ' ??';
    } else {
        $out .= ' ' . GWF_Numeric::baseConvert($h, 16, 10);
    }
}
Dog::reply(substr($out, 1));
开发者ID:sinfocol,项目名称:gwf3,代码行数:17,代码来源:hex2dec_Pb.php

示例8: array

<?php

$lang = array('en' => array('help' => 'Usage: %CMD% <module> [<flush>]. Will (re)install and init a module.', 'install' => 'Triggering install for %s.', 'install_flush' => 'Dropping all tables and triggering install for %s.'), 'de' => array('help' => 'Nutze: %CMD% <Modul> [<flush>]. (Re)-Installiert und Initialisiert ein Modul.', 'install' => 'Führe die Installationsroutinen für %s aus.', 'install_flush' => 'Lösche und initialisiere Modul %s.'));
$plugin = Dog::getPlugin();
$argv = $plugin->argv();
$argc = count($argv);
$flush = false;
if ($argc === 2) {
    $flush = $argv[1] === 'flush';
    $argc = 1;
}
if ($flush) {
    return Dog::reply('NO FLUSH!');
}
if ($argc !== 1) {
    return $plugin->showHelp();
}
if (false === ($module = Dog_Module::getModule($argv[0]))) {
    return Dog::rply('err_module');
}
$plugin->rply($flush ? 'install_flush' : 'install', array($module->displayName()));
Dog_Init::installModule($module, $flush);
开发者ID:sinfocol,项目名称:gwf3,代码行数:22,代码来源:install_Yb.php

示例9: onTrigger

 public static function onTrigger(Dog_User $user, $msg)
 {
     if ($user->isRegistered() && !$user->isLoggedIn()) {
         if (false !== ($mod_al = Dog_Module::getModule('AutoLogin'))) {
             $mod_al instanceof DOGMOD_AutoLogin;
             $mod_al->onTryAutoLogin();
         }
         # You need to login to play.
         return Dog::reply(DOGMOD_Shadowlamb::instance()->lang('0001'));
     }
     if (false === ($player = self::getPlayerForUser($user))) {
         return Dog::reply('Can not get Player for user ' . $user->getName() . '.');
     }
     SR_Tell::onTell($player);
     # Do it!
     Shadowcmd::onTrigger($player, $msg);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:17,代码来源:Shadowrun4.php

示例10: array

<?php

$lang = array('en' => array('help' => 'Usage: %CMD%. Return a random number chosen by fair average dice roll.'));
Dog::reply('4');
开发者ID:sinfocol,项目名称:gwf3,代码行数:4,代码来源:rand_Pb.php

示例11: reply

 public function reply($message)
 {
     Dog::reply($message);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:4,代码来源:Dog_Module.php

示例12: array

<?php

$lang = array('en' => array('help' => 'Usage: %CMD% <host>. Use the ping command to ping a host.', 'err_host' => 'The host looks invalid.'));
$plugin = Dog::getPlugin();
$argv = $plugin->argv();
$argc = count($argv);
if ($argc !== 1) {
    return $plugin->showHelp();
}
$host = $argv[0];
if (!preg_match('/^[a-z0-9\\.\\-:]+$/iD', $host)) {
    $plugin->rply('err_host');
} elseif (!function_exists('exec')) {
    Dog::rply('err_exec');
} else {
    $ehost = escapeshellarg($host);
    exec("ping -c 3 {$ehost}", $output);
    foreach ($output as $line) {
        Dog::reply($line);
    }
}
开发者ID:sinfocol,项目名称:gwf3,代码行数:21,代码来源:hping_Ib.php

示例13: array

<?php

$lang = array('en' => array('help' => 'Commodore Is Awesome is a fellow C64 Demo Group!'), 'de' => array('help' => 'Commodore Is Awesome ist eine C64 Demo Gruppe!'));
$plugin = Dog::getPlugin();
Dog::reply('Commodore Is Awesome: http://awesome.commodore.me/');
开发者ID:sinfocol,项目名称:gwf3,代码行数:5,代码来源:cia_Pb.php

示例14: array

<?php

$lang = array('en' => array('help' => 'Usage: %CMD% <decimal numbers separated by space>. Convert decimal numbers to utf8 text.'));
$plugin = Dog::getPlugin();
if ('' === ($message = $plugin->msg())) {
    return $plugin->showHelp();
}
$out = '';
$hex = preg_split('/ +/', strtolower($message));
foreach ($hex as $n) {
    if (!preg_match('/^[0-9a-f]+$/', $n)) {
        $out .= '?';
        continue;
    }
    $c = '';
    $n = GWF_Numeric::baseConvert($n, 16, 10);
    while ($n != 0) {
        $mod = bcmod($n, '256');
        printf('%02X' . PHP_EOL, $mod);
        $c = chr($mod) . $c;
        $n = bcdiv($n, '256');
    }
    $out .= $c;
}
Dog::reply($out);
开发者ID:sinfocol,项目名称:gwf3,代码行数:25,代码来源:hex2utf_Pb.php

示例15: reply

 public static function reply(SR_Player $player, $message)
 {
     return $player->isNPC() || $player->isFighting() && self::isCombatCommand() ? $player->message($message) : Dog::reply($message);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:4,代码来源:Shadowcmd.php


注:本文中的Dog::reply方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。