Overview

Namespaces

  • Budabot
    • Core
      • Modules
    • User
      • Modules
  • None
  • Tyrence
    • Modules

Classes

  • AccessLevel
  • Budabot\Core\AccessManager
  • Budabot\Core\AdminManager
  • Budabot\Core\AOChat
  • Budabot\Core\AOChatPacket
  • Budabot\Core\AOChatQueue
  • Budabot\Core\AOExtMsg
  • Budabot\Core\AsyncHttp
  • Budabot\Core\AutoInject
  • Budabot\Core\BotRunner
  • Budabot\Core\Budabot
  • Budabot\Core\BuddylistManager
  • Budabot\Core\CacheManager
  • Budabot\Core\CacheResult
  • Budabot\Core\ClassLoader
  • Budabot\Core\ColorSettingHandler
  • Budabot\Core\CommandAlias
  • Budabot\Core\CommandManager
  • Budabot\Core\ConfigFile
  • Budabot\Core\DB
  • Budabot\Core\DBRow
  • Budabot\Core\EventLoop
  • Budabot\Core\EventManager
  • Budabot\Core\GuildChannelCommandReply
  • Budabot\Core\GuildManager
  • Budabot\Core\HelpManager
  • Budabot\Core\Http
  • Budabot\Core\HttpRequest
  • Budabot\Core\LegacyLogger
  • Budabot\Core\LimitsController
  • Budabot\Core\LoggerWrapper
  • Budabot\Core\MMDBParser
  • Budabot\Core\Modules\AdminController
  • Budabot\Core\Modules\AliasController
  • Budabot\Core\Modules\AltInfo
  • Budabot\Core\Modules\AltsController
  • Budabot\Core\Modules\BanController
  • Budabot\Core\Modules\BuddylistController
  • Budabot\Core\Modules\ColorsController
  • Budabot\Core\Modules\CommandlistController
  • Budabot\Core\Modules\CommandSearchController
  • Budabot\Core\Modules\ConfigController
  • Budabot\Core\Modules\EventlistController
  • Budabot\Core\Modules\HelpController
  • Budabot\Core\Modules\LogsController
  • Budabot\Core\Modules\PlayerLookupController
  • Budabot\Core\Modules\ProfileCommandReply
  • Budabot\Core\Modules\ProfileController
  • Budabot\Core\Modules\SettingsController
  • Budabot\Core\Modules\SQLController
  • Budabot\Core\Modules\SystemController
  • Budabot\Core\Modules\UsageController
  • Budabot\Core\Modules\WhitelistController
  • Budabot\Core\NumberSettingHandler
  • Budabot\Core\OptionsSettingHandler
  • Budabot\Core\PlayerHistory
  • Budabot\Core\PlayerHistoryManager
  • Budabot\Core\PlayerManager
  • Budabot\Core\Preferences
  • Budabot\Core\PrivateChannelCommandReply
  • Budabot\Core\PrivateMessageCommandReply
  • Budabot\Core\Registry
  • Budabot\Core\SettingHandler
  • Budabot\Core\SettingManager
  • Budabot\Core\SettingObject
  • Budabot\Core\SocketManager
  • Budabot\Core\SocketNotifier
  • Budabot\Core\SubcommandManager
  • Budabot\Core\Text
  • Budabot\Core\TextSettingHandler
  • Budabot\Core\Timer
  • Budabot\Core\TimerEvent
  • Budabot\Core\TimeSettingHandler
  • Budabot\Core\Util
  • Budabot\Core\xml
  • Budabot\User\Modules\AlienArmorController
  • Budabot\User\Modules\AlienBioController
  • Budabot\User\Modules\AlienMiscController
  • Budabot\User\Modules\AOSpeakController
  • Budabot\User\Modules\AOUController
  • Budabot\User\Modules\AXPController
  • Budabot\User\Modules\BankController
  • Budabot\User\Modules\BosslootController
  • Budabot\User\Modules\BroadcastController
  • Budabot\User\Modules\BuffPerksController
  • Budabot\User\Modules\CacheController
  • Budabot\User\Modules\ChatAssistController
  • Budabot\User\Modules\ChatCheckController
  • Budabot\User\Modules\ChatLeaderController
  • Budabot\User\Modules\ChatRallyController
  • Budabot\User\Modules\ChatSayController
  • Budabot\User\Modules\ChatTopicController
  • Budabot\User\Modules\CityWaveController
  • Budabot\User\Modules\CloakController
  • Budabot\User\Modules\ClusterController
  • Budabot\User\Modules\CountdownController
  • Budabot\User\Modules\DevController
  • Budabot\User\Modules\DingController
  • Budabot\User\Modules\EventsController
  • Budabot\User\Modules\FightController
  • Budabot\User\Modules\FindOrgController
  • Budabot\User\Modules\FindPlayerController
  • Budabot\User\Modules\FunController
  • Budabot\User\Modules\GitController
  • Budabot\User\Modules\GuideController
  • Budabot\User\Modules\GuildController
  • Budabot\User\Modules\HelpbotController
  • Budabot\User\Modules\HtmlDecodeController
  • Budabot\User\Modules\ImplantController
  • Budabot\User\Modules\ImplantDesignerController
  • Budabot\User\Modules\InactiveMemberController
  • Budabot\User\Modules\ItemsController
  • Budabot\User\Modules\KillOnSightController
  • Budabot\User\Modules\LevelController
  • Budabot\User\Modules\LinksController
  • Budabot\User\Modules\LootListsController
  • Budabot\User\Modules\MdbController
  • Budabot\User\Modules\MessageInfoCommandReply
  • Budabot\User\Modules\MockCommandReply
  • Budabot\User\Modules\NanoController
  • Budabot\User\Modules\NewsController
  • Budabot\User\Modules\NotesController
  • Budabot\User\Modules\OnlineController
  • Budabot\User\Modules\OrgHistoryController
  • Budabot\User\Modules\OrglistController
  • Budabot\User\Modules\OrgMembersController
  • Budabot\User\Modules\OSController
  • Budabot\User\Modules\PlayerHistoryController
  • Budabot\User\Modules\PlayfieldController
  • Budabot\User\Modules\PocketbossController
  • Budabot\User\Modules\PremadeImplantController
  • Budabot\User\Modules\PrivateChannelController
  • Budabot\User\Modules\QuoteController
  • Budabot\User\Modules\RaffleController
  • Budabot\User\Modules\RaidController
  • Budabot\User\Modules\RandomController
  • Budabot\User\Modules\RecipeController
  • Budabot\User\Modules\RelayController
  • Budabot\User\Modules\ReputationController
  • Budabot\User\Modules\ResearchController
  • Budabot\User\Modules\RunAsController
  • Budabot\User\Modules\SendTellController
  • Budabot\User\Modules\ShoppingController
  • Budabot\User\Modules\SilenceController
  • Budabot\User\Modules\SkillsController
  • Budabot\User\Modules\SpiritsController
  • Budabot\User\Modules\StopwatchController
  • Budabot\User\Modules\Teamspeak3
  • Budabot\User\Modules\TeamspeakController
  • Budabot\User\Modules\TestController
  • Budabot\User\Modules\TimeController
  • Budabot\User\Modules\TimerController
  • Budabot\User\Modules\TimezoneController
  • Budabot\User\Modules\TowerController
  • Budabot\User\Modules\TrackerController
  • Budabot\User\Modules\TrickleController
  • Budabot\User\Modules\UnixtimeController
  • Budabot\User\Modules\VoteController
  • Budabot\User\Modules\WeatherController
  • Budabot\User\Modules\WhatBuffsController
  • Budabot\User\Modules\WhereisController
  • Budabot\User\Modules\WhoisController
  • Budabot\User\Modules\WhoisOrgController
  • Budabot\User\Modules\WhompahController
  • Command
  • DefaultStatus
  • DefineCommand
  • Description
  • Event
  • HandlesCommand
  • Help
  • Inject
  • Instance
  • Intoptions
  • Matches
  • Options
  • Setting
  • Setup
  • Type
  • Tyrence\Modules\DemoResponseCommandReply
  • Tyrence\Modules\SameChannelResponseController
  • Visibility

Interfaces

  • Budabot\Core\CommandReply

Exceptions

  • Budabot\Core\InvalidHttpRequest
  • Budabot\Core\SQLException
  • Budabot\Core\StopExecutionException

Functions

  • Budabot\Core\isWindows
  • Budabot\Core\Modules\read_input
  • Overview
  • Namespace
  • Class
  1: <?php
  2: 
  3: namespace Budabot\Core\Modules;
  4: 
  5: /**
  6:  * Authors:
  7:  *  - Tyrence (RK2)
  8:  *
  9:  * @Instance
 10:  *
 11:  * Commands this class contains:
 12:  *  @DefineCommand(
 13:  *      command       = 'help',
 14:  *      accessLevel   = 'all',
 15:  *      description   = 'Show help topics',
 16:  *      help          = 'help.txt',
 17:  *      defaultStatus = '1'
 18:  *  )
 19:  */
 20: class HelpController {
 21: 
 22:     /**
 23:      * Name of the module.
 24:      * Set automatically by module loader.
 25:      */
 26:     public $moduleName;
 27: 
 28:     /** @Inject */
 29:     public $commandManager;
 30:     
 31:     /** @Inject */
 32:     public $commandAlias;
 33: 
 34:     /** @Inject */
 35:     public $helpManager;
 36: 
 37:     /** @Inject */
 38:     public $text;
 39: 
 40:     /**
 41:      * @Setup
 42:      * This handler is called on bot startup.
 43:      */
 44:     public function setup() {
 45:         $this->helpManager->register($this->moduleName, "about", "about.txt", "all", "Info about the development of Budabot");
 46:         
 47:         $this->commandAlias->register($this->moduleName, "help about", "about");
 48:     }
 49:     
 50:     public function getAbout() {
 51:         global $version;
 52:         $data = file_get_contents("./core/HELP/about.txt");
 53:         $data = str_replace('<version>', $version, $data);
 54:         return $this->text->makeBlob("About Budabot $version", $data);
 55:     }
 56:     
 57:     /**
 58:      * @HandlesCommand("help")
 59:      * @Matches("/^help$/i")
 60:      */
 61:     public function helpListCommand($message, $channel, $sender, $sendto) {
 62:         global $version;
 63: 
 64:         $data = $this->helpManager->getAllHelpTopics($sender);
 65: 
 66:         if (count($data) == 0) {
 67:             $msg = "No help files found.";
 68:         } else {
 69:             $blob = '';
 70:             $current_module = '';
 71:             forEach ($data as $row) {
 72:                 if ($current_module != $row->module) {
 73:                     $blob .= "\n<pagebreak><header2>{$row->module}:<end>\n";
 74:                     $current_module = $row->module;
 75:                 }
 76:                 $helpLink = $this->text->makeChatcmd($row->name, "/tell <myname> help $row->name");
 77:                 $blob .= "  {$helpLink}: {$row->description}\n";
 78:             }
 79: 
 80:             $msg = $this->text->makeBlob("Help (main)", $blob);
 81:         }
 82: 
 83:         $sendto->reply($msg);
 84:     }
 85:     
 86:     /**
 87:      * @HandlesCommand("help")
 88:      * @Matches("/^help (.+)$/i")
 89:      */
 90:     public function helpShowCommand($message, $channel, $sender, $sendto, $args) {
 91:         $helpcmd = strtolower($args[1]);
 92:         
 93:         if ($helpcmd == 'about') {
 94:             $msg = $this->getAbout();
 95:             $sendto->reply($msg);
 96:             return;
 97:         }
 98:     
 99:         // check for alias
100:         $row = $this->commandAlias->get($helpcmd);
101:         if ($row !== null && $row->status == 1) {
102:             $arr = explode(' ', $row->cmd);
103:             $helpcmd = $arr[0];
104:         }
105: 
106:         $blob = $this->helpManager->find($helpcmd, $sender);
107:         if ($blob !== false) {
108:             $helpcmd = ucfirst($helpcmd);
109:             $msg = $this->text->makeBlob("Help ($helpcmd)", $blob);
110:             $sendto->reply($msg);
111:         } else {
112:             $sendto->reply("No help found on this topic.");
113:         }
114:     }
115: }
116: 
Budabot 4 Docs API documentation generated by ApiGen