Example #1
0
 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;
 }
Example #2
0
 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()]--;
 }
Example #3
0
 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));
 }
Example #4
0
 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);
 }
Example #5
0
<?php

Dog::reply('^StAr^ is the slayradio DJ with the most sexy voice ever, and you can ommit the slayradio stuff!');
Example #6
0
<?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');
}
Example #7
0
<?php

Dog::reply('byte is the doublenibble in the german-elite irc network. He can be greeted with either "Hi" or "Lo".');
Example #8
0
<?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));
Example #9
0
<?php

Dog::reply('KraxUltim is a C64 DJ that plays amiga remixes mostly. He also has a kraxling mic.');
Example #10
0
<?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);
Example #11
0
 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);
 }
Example #12
0
<?php

$lang = array('en' => array('help' => 'Usage: %CMD%. Return a random number chosen by fair average dice roll.'));
Dog::reply('4');
Example #13
0
 public function reply($message)
 {
     Dog::reply($message);
 }
Example #14
0
<?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);
    }
}
Example #15
0
<?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/');
Example #16
0
<?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);
Example #17
0
 public static function reply(SR_Player $player, $message)
 {
     return $player->isNPC() || $player->isFighting() && self::isCombatCommand() ? $player->message($message) : Dog::reply($message);
 }
Example #18
0
                } elseif (!$plug->isEnabled($serv, $chan)) {
                    Dog::rply('err_disabled');
                } else {
                    $plug->execute();
                }
            } elseif (false !== ($mod = Dog_Module::getByTrigger($trigger))) {
                if (!$mod->hasScopeFor($trigger, $serv, $chan)) {
                    Dog::scopeError($mod->getScope($trigger));
                }
                if (!$mod->hasPermissionFor($trigger, $serv, $chan, $user)) {
                    Dog::permissionError($mod->getPriv($trigger));
                } elseif (!$mod->isTriggerEnabled($serv, $chan, $trigger)) {
                    Dog::rply('err_disabled');
                } else {
                    $mod->execute($trigger);
                }
            } else {
                // 				Dog::rply('err_command');
            }
        }
    } elseif (Common::startsWith($msg, "") && Common::endsWith($msg, "")) {
        require 'CTCP.php';
    } else {
        $msg = preg_replace('[^a-z]', '', $msg);
        if ($msg === 'wechallnetISUP') {
            Dog::reply('Yay \\o/');
        } elseif ($msg === 'wechallnetISUP') {
            Dog::reply('NO! :(');
        }
    }
}
Example #19
0
<?php

Dog::reply('Trained by mystical creatures from the eigthies, spaceone can only be reached by thy wechall address.');
Example #20
0
<?php

Dog::reply('Kitty is not listed in girls, because she is mine.');
Example #21
0
<?php

Dog::reply('Zeewolf is the almighty garbage collector!');
Example #22
0
<?php

Dog::reply('Element, dear Watson, is when the alphabet is missing 2 letters, Q and K. See RFC142453.');
Example #23
0
<?php

Dog::reply('You probably mean radiocrazybase! http://109.235.60.60:8024/listen.pls - Listen please!');
Example #24
0
<?php

Dog::reply('Roll your own. Q');
Example #25
0
<?php

$lang = array('en' => array('help' => 'Usage: %CMD% [<message here...>]. Initiate a reboot and quit with a message.', 'default' => '%s is rebooting me :O'));
// GWF_HTTP::getFromURL("")
return Dog::reply('YOU FOUND A TODO!');
$plugin = Dog::getPlugin();
$message = $plugin->argc() === 0 ? $plugin->lang('default', array(Dog::getUser()->displayName())) : $plugin->msg();
foreach (Dog::getServers() as $server) {
    $server instanceof Dog_Server;
    $server->disconnect($message);
}
Dog_Launcher::kill();
Example #26
0
$lang = array('en' => array('help' => 'Usage: %CMD% <expression>. Evaluate a mathematical expression and print results. Use _ and $ to referr to the last result.', '00' => '1 ... No ... 0 ... No ... UNDEFINED!', 'err_in' => 'Error in expression.', 'err_lib' => 'The "EvalMath" class by Miles Kaufmann is missing.'));
$plugin = Dog::getPlugin();
if ('' === ($message = $plugin->msg())) {
    return $plugin->showHelp();
}
if (false !== ($last = Dog_Conf_Plug_User::getConf($plugin->getName(), Dog::getUID(), 'last', false))) {
    $message = str_replace(array('_', '$'), $last, $message);
}
if ($message === '0^0') {
    return $plugin->rply('00');
}
if ($message === 'pi') {
    return $plugin->reply('4');
}
$path = GWF_PATH . 'core/inc/3p/EvalMath.php';
if (!Common::isFile($path)) {
    return $plugin->rply('err_lib');
}
require_once $path;
$eval = new EvalMath();
if (false === ($result = $eval->e($message))) {
    return $plugin->rply('err_in');
}
$result = sprintf('%.09f', $result);
if (strpos($result, '.') !== false) {
    $result = rtrim($result, '0');
    $result = rtrim($result, '.');
}
Dog_Conf_Plug_User::setConf($plugin->getName(), Dog::getUID(), 'last', $result);
Dog::reply($result);
Example #27
0
<?php

Dog::reply('honey is not listed in .girls, because gizmore is interested in her... and she is a wonderful IRC addict!');
Example #28
0
<?php

Dog::reply('Dicer is not funny');
Example #29
0
 public function reply($message)
 {
     return Dog::reply($message);
 }
Example #30
0
<?php

$lang = array('en' => array('help' => 'Wo-Wo-World... of Wonders... http://www.youtube.com/watch?v=lQE5V8QCx9w'));
$plugin = Dog::getPlugin();
Dog::reply($plugin->lang('help'));