} if (array_key_exists($command, $commandPriceIni)) { if (intval($commandPriceIni[$command]) < 1 || intval($commandPriceIni[$command]) > 1) { $price = $commandPriceIni[$command] . ' ' . $pointNames[0]; } else { $price = $commandPriceIni[$command] . ' ' . $pointNames[1]; } } else { $price = '0 ' . $pointNames[0]; } if (array_key_exists($command, $commandCooldown)) { $cooldown = $functions->secondsToTime(intval($commandCooldown[$command])); } else { $cooldown = $functions->secondsToTime(0); } $customCommandsTableRows .= '<tr>' . $templates->addTooltip('<td class="command-actor">' . $actor . '</td>', '<span class="message ' . $msgClass . '">' . $message . '</span>', ['position' => \PBPanel\Util\ComponentTemplates::TOOLTIP_POS_RIGHT, 'offsetY' => strlen($message) < 50 ? 17 : (strlen($message) > 90 ? -17 : 0)]) . '<td>' . '<span class="text-muted">Group:</span> ' . $perm . '<br />' . '<span class="text-muted">Price:</span> ' . $price . '<br />' . '<span class="text-muted">Cooldown:</span> ' . $cooldown . '</td>' . '<td>' . join(', ', $commandAliases) . '</td>' . '<td class="actions">' . $templates->botCommandButton('delcom ' . $command, '<span class="fa fa-trash"></span>', 'danger', 'Are you sure you want to delete !' . $command . '?', true) . '</td>' . '</tr>'; } array_walk($commandPermIni, function ($value) use($defaultCommands) { $defaultCommands[] = str_replace('_recursive', '', $value); }); $defaultCommands = array_unique(array_merge($defaultCommands, array_keys($commandPriceIni), array_values($commandAliasIni), array_keys($commandCooldown))); sort($defaultCommands); foreach ($defaultCommands as $command) { if (array_key_exists($command, $commandAliasIni) || array_key_exists($command, $customCommandsIni)) { continue; } $commandAliases = []; foreach ($commandAliasIni as $alias => $originalCommand) { if ($originalCommand == $command) { $commandAliases[] = '!' . $alias; }
<?php echo $renderedMenu; ?> </ul> <ul class="nav navbar-nav navbar-right"> <li> <a nohref onclick="logOut()" role="button"> Logout </a> </li> </ul> </div> <div class="container-fluid"> <ul id="favorites-menu" class="nav navbar-nav"> <?php echo $templates->addTooltip('<li class="favorites-menu-icon"><span class="fa fa-star-half-empty"></span></li>', 'Favorites', ['position' => \PBPanel\Util\ComponentTemplates::TOOLTIP_POS_LEFT, 'offsetX' => 10, 'offsetY' => 21, 'appendToBody' => true]); ?> </ul> </div> </nav> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title"> Hi <span id="current-user"></span> <?php echo str_repeat('<span class="pull-right info-banner-space-left"> </span>', 3); ?> <?php echo $templates->streamInfoBanner($NOSubscribers, 'dollar', 'warning', 'Subscriber Count', '', $NOSubscribers > -1); ?> <?php
$dataStore = new \PBPanel\Util\DataStore(); $connection = new \PBPanel\Util\BotConnectionHandler($dataStore); $functions = new \PBPanel\Util\Functions($dataStore, $connection); $templates = new \PBPanel\Util\ComponentTemplates(); $botSettings = $functions->getIniArray('settings'); $pastRaiders = $functions->getIniArray('raiders'); $pastRaidersTableRows = ''; $doRaidCommandResponse = $functions->getIniValueByKey('command', 'doraid'); $firstTime = false; $addCommandJsActive = $functions->getModuleStatus('addCommand.js'); $doRaidCommandForm = $templates->botCommandForm('doraid', 'Raid target', '[username]'); if ($addCommandJsActive == 1 && (!$doRaidCommandResponse || $doRaidCommandResponse == '')) { $connection->send('!addcom doraid Let\'s raid (1)! Go to http://twitch.tv/(1) and say "' . $dataStore->getVar('connector', 'channelOwner') . ' Raid!", throw them a follow and show the love! <3'); $firstTime = true; } elseif ($addCommandJsActive == '0') { $doRaidCommandForm = $templates->addTooltip($templates->botCommandForm('doraid', 'Raid target', '[username]', null, 'Send', true), 'Enable the addCommand.js module to use this form.' . $templates->botCommandButton('!module enable ./commands/addCommand.js', 'Enable addCommand.js Now', 'primary btn-block')); } foreach ($pastRaiders as $username => $timesRaided) { $pastRaidersTableRows .= '<tr><td>' . str_replace('_count', '', $username) . '</td><td>' . $timesRaided . ' raids</td></tr>'; } ?> <div class="app-part"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> Raid System <?php echo $templates->toggleFavoriteButton(); ?> <?php echo $templates->moduleActiveIndicator($functions->getModuleStatus('raidSystem.js'));