Ejemplo n.º 1
0
$botSettings = $functions->getIniArray('settings');
$bankHeistTimers = $functions->getIniArray('bankheist_timers', true);
$bankHeistStrings = $functions->getIniArray('bankheist_strings', true);
$bankHeistRatios = $functions->getIniArray('bankheist_ratios', true);
$bankHeistChances = $functions->getIniArray('bankheist_chances', true);
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Bank Heist
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('bankHeistSystem.js'));
?>
    </div>
    <div class="panel-body">
      <div class="btn-toolbar">
        <?php 
echo $templates->botCommandButton('bankheist start', 'Start Bank Heist');
?>
        <?php 
echo $templates->switchToggle('Toggle Bankheist', 'doQuickCommand', '[\'bankheist toggle\']', '', array_key_exists('bankheistToggle', $botSettings) ? filter_var($botSettings['bankheistToggle'], FILTER_VALIDATE_BOOLEAN) : false);
?>
      </div>
      <hr/>
      <h4 class="collapsible-master">Session Settings</h4>

      <div class="collapsible-content">
foreach ($subscribers as $username => $subscribed) {
    if ($subscribed == 1) {
        $subscriberTableRows .= '<tr><td>' . ucfirst($username) . '</td></tr>';
    }
}
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Subscriber Events
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('subscribeHandler.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <div class="btn-toolbar">
        <?php 
echo $templates->switchToggle('Toggle Subscriber Notices', 'doQuickCommand', '[\'subsilentmode\']', null, array_key_exists('sub_silentmode', $botSettings) && $botSettings['sub_silentmode'] == 1);
?>
        <div class="btn-group">
          <?php 
echo $templates->botCommandButton('subscribecount', 'Current Subscriber Count');
?>
          <?php 
echo $templates->botCommandButton('subscribemode', 'Subscribe Mode');
?>
Ejemplo n.º 3
0
require_once '../../../AppLoader.class.php';
\PBPanel\AppLoader::load();
$session = new \PBPanel\Util\PanelSession();
if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) {
    die('Invalid session token. Are you trying to hack me?!');
}
$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">
Ejemplo n.º 4
0
                return $group;
        }
    }
    return $group;
}
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Bot Commands
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('addCommand.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <?php 
echo $templates->botCommandForm('', 'Run command', '[command] [params]');
?>
      <hr/>
      <h4 class="collapsible-master">Command Creation</h4>

      <div class="collapsible-content">
        <div class="row">
          <div class="col-sm-6">
            <?php 
echo $templates->botCommandForm('addcom', 'Add command', '[command] [message]');
Ejemplo n.º 5
0
$connection = new \PBPanel\Util\BotConnectionHandler($dataStore);
$functions = new \PBPanel\Util\Functions($dataStore, $connection);
$templates = new \PBPanel\Util\ComponentTemplates();
$botSettings = $functions->getIniArray('settings');
$urlWhiteList = $functions->getIniArray('whitelist');
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Chat Moderator
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('chatModerator.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <h4>Moderate Now</h4>

      <div class="btn-toolbar">
        <?php 
echo $templates->botCommandButton('clear', 'Clear The Chat');
?>
      </div>
      <div class="spacer"></div>
      <div class="row">
        <div class="col-sm-8">
          <?php 
Ejemplo n.º 6
0
foreach ($viewerGroups as $username => $gid) {
    if ($gid != 'null') {
        $viewerGroupTableRows .= '<tr><td>' . ucfirst($username) . '</td><td>' . $groups[$gid] . '</td></tr>';
    }
}
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Group System
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('permissions.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <h4 class="collapsible-master">Group settings per viewer</h4>

      <div class="collapsible-content">
        <div class="row">
          <div class="col-sm-4">
            <?php 
echo $templates->botCommandForm('group set', 'Set viewers group', '[username] [groupname]');
?>
          </div>
          <div class="col-sm-4">
            <?php 
Ejemplo n.º 7
0
    } else {
        $defaultPlaylistDataRows .= '<tr><td colspan="3">Could not parse the default Playlist. Make sure the file location is correct in Extras->Preferences and the playlist has been parsed by the bot.</td></tr>';
        break;
    }
}
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Youtube Player Settings
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('./addonscripts/youtubePlayer.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <div class="btn-toolbar">
        <?php 
echo $templates->switchToggle('Toggle Messages', 'doQuickCommand(\'musicplayer toggle\')', '[]', '', array_key_exists('song_toggle', $botSettings) && $botSettings['song_toggle'] == '1');
?>
        <?php 
echo $templates->botCommandButton('stealsong', 'Steal Song');
?>
        <?php 
echo $templates->botCommandButton('reloadplaylist', 'Reload "playlist.txt"');
?>
      </div>
Ejemplo n.º 8
0
foreach ($greetingSettings as $username => $greeting) {
    if (!in_array($username, ['autogreet', '_default'])) {
        $userGreetingRows .= '<tr><td>' . ucfirst($username) . '</td><td>' . $greeting . '</td></tr>';
    }
}
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Greeting System
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('greetingSystem.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <?php 
echo $templates->switchToggle('Toggle Auto-Greeting', 'doQuickCommand', '[\'greeting toggle\']', null, array_key_exists('autogreet', $greetingSettings) && filter_var($greetingSettings['autogreet'], FILTER_VALIDATE_BOOLEAN));
?>
      <hr/>
      <h4>Greeting Message</h4>

      <div class="row">
        <div class="col-sm-6">
          <?php 
echo $templates->botCommandForm('greeting set default', 'Set global greeting message', '[message]', array_key_exists('_default', $greetingSettings) ? $greetingSettings['_default'] : '');
?>
Ejemplo n.º 9
0
require_once '../../../AppLoader.class.php';
\PBPanel\AppLoader::load();
$session = new \PBPanel\Util\PanelSession();
if (!$session->checkSessionToken(filter_input(INPUT_POST, 'token'))) {
    die('Invalid session token. Are you trying to hack me?!');
}
$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');
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        MODULE NAME
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('MODULE SCRIPT NAME'));
?>
      </h3>
    </div>
    <div class="panel-body">
      PAGE CONTENT
    </div>
  </div>
</div>
Ejemplo n.º 10
0
$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');
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Donations
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('./handlers/donationHandler.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <h4>Donation Event Settings</h4>

      <div class="btn-toolbar">
        <?php 
echo $templates->switchToggle('Enable Donation Alerts', 'doQuickCommand', '[\'donationalert toggle\']', '', array_key_exists('donation_toggle', $botSettings) && $botSettings['donation_toggle'] == '1');
?>
      </div>
      <div class="spacer"></div>
      <div class="row">
        <div class="col-sm-4">
          <?php 
Ejemplo n.º 11
0
foreach ($recordedFollows as $username => $follows) {
    if ($follows == '1') {
        $followersTableRows .= '<tr><td>' . ucfirst($username) . '</td><td>' . (array_key_exists($username, $userLastSeen) ? $functions->botTimeToStandardFormat($userLastSeen[$username]) : 'No data yet!') . '</td></tr>';
    }
}
?>
<div class="app-part">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">
        Follow Events
        <?php 
echo $templates->toggleFavoriteButton();
?>
        <?php 
echo $templates->moduleActiveIndicator($functions->getModuleStatus('followHandler.js'));
?>
      </h3>
    </div>
    <div class="panel-body">
      <div class="row">
        <div class="col-sm-4">
          <?php 
echo $templates->botCommandForm('followed', 'Check follower');
?>
        </div>
        <div class="col-sm-4">
          <?php 
echo $templates->botCommandForm('lastseen', 'Last seen');
?>
        </div>