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\User\Modules;
  4: 
  5: /**
  6:  * @Instance
  7:  *
  8:  * Commands this controller contains:
  9:  *  @DefineCommand(
 10:  *      command     = 'assist',
 11:  *      accessLevel = 'all',
 12:  *      description = 'Shows the assist macro',
 13:  *      help        = 'assist.txt',
 14:  *      alias       = 'callers'
 15:  *  )
 16:  *  @DefineCommand(
 17:  *      command     = 'assist .+', 
 18:  *      accessLevel = 'rl',
 19:  *      description = 'Sets a new assist',
 20:  *      help        = 'assist.txt'
 21:  *  )
 22:  */
 23: class ChatAssistController {
 24: 
 25:     /**
 26:      * Name of the module.
 27:      * Set automatically by module loader.
 28:      */
 29:     public $moduleName;
 30:     
 31:     /** @Inject */
 32:     public $chatBot;
 33:     
 34:     /** @Inject */
 35:     public $text;
 36: 
 37:     /** @Inject */
 38:     public $chatLeaderController;
 39:     
 40:     /**
 41:      * Contains the assist macro message.
 42:      */
 43:     private $assistMessage;
 44: 
 45:     /**
 46:      * @HandlesCommand("assist")
 47:      * @Matches("/^assist$/i")
 48:      */
 49:     public function assistCommand($message, $channel, $sender, $sendto, $args) {
 50:         if (!isset($this->assistMessage)) {
 51:             $msg = "No assist set.";
 52:             $sendto->reply($msg);
 53:             return;
 54:         } else {
 55:             $sendto->reply($this->assistMessage);
 56:         }
 57:     }
 58:     
 59:     /**
 60:      * @HandlesCommand("assist .+")
 61:      * @Matches("/^assist clear$/i")
 62:      */
 63:     public function assistClearCommand($message, $channel, $sender, $sendto, $args) {
 64:         if (!$this->chatLeaderController->checkLeaderAccess($sender)) {
 65:             $sendto->reply("You must be Raid Leader to use this command.");
 66:             return;
 67:         }
 68: 
 69:         $this->assistMessage = null;
 70:         $sendto->reply("Assist has been cleared.");
 71:     }
 72: 
 73:     /**
 74:      * @HandlesCommand("assist .+")
 75:      * @Matches("/^assist (.+)$/i")
 76:      */
 77:     public function assistSetCommand($message, $channel, $sender, $sendto, $args) {
 78:         if (!$this->chatLeaderController->checkLeaderAccess($sender)) {
 79:             $sendto->reply("You must be Raid Leader to use this command.");
 80:             return;
 81:         }
 82: 
 83:         $nameArray = explode(' ', $args[1]);
 84:         
 85:         if (count($nameArray) == 1) {
 86:             $name = ucfirst(strtolower($args[1]));
 87:             $uid = $this->chatBot->get_uid($name);
 88:             if (!$uid) {
 89:                 $msg = "Character <highlight>$name<end> does not exist.";
 90:                 $sendto->reply($msg);
 91:             } else if ($channel == "priv" && !isset($this->chatBot->chatlist[$name])) {
 92:                 $msg = "Character <highlight>$name<end> is not in this bot.";
 93:                 $sendto->reply($msg);
 94:             }
 95: 
 96:             $link = $this->text->makeChatcmd("Click here to make an assist $name macro", "/macro $name /assist $name");
 97:             $this->assistMessage = $this->text->makeBlob("Assist $name Macro", $link);
 98:         } else {
 99:             forEach ($nameArray as $key => $name) {
100:                 $name = ucfirst(strtolower($name));
101:                 $uid = $this->chatBot->get_uid($name);
102:                 if (!$uid) {
103:                     $msg = "Character <highlight>$name<end> does not exist.";
104:                     $sendto->reply($msg);
105:                 } else if ($channel == "priv" && !isset($this->chatBot->chatlist[$name])) {
106:                     $msg = "Character <highlight>$name<end> is not in this bot.";
107:                     $sendto->reply($msg);
108:                 }
109: 
110:                 $nameArray[$key] = "/assist $name";
111:             }
112: 
113:             // reverse array so that the first character will be the primary assist, and so on
114:             $nameArray = array_reverse($nameArray);
115:             $this->assistMessage = '/macro assist ' . implode(" \\n ", $nameArray);
116:         }
117: 
118:         $sendto->reply($this->assistMessage);
119:     }
120: }
121: 
Budabot 4 Docs API documentation generated by ApiGen