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:  * Authors:
  9:  *  - Legendadv (RK2)
 10:  *  - Derroylo (RK2)
 11:  *  - Marebone (RK2)
 12:  *
 13:  * The ChatSayController class allows user to send messages to either org
 14:  * channel or to private (guest) channel.
 15:  *
 16:  * Commands this class contains:
 17:  *  @DefineCommand(
 18:  *      command     = 'say',
 19:  *      accessLevel = 'rl',
 20:  *      description = 'Sends message to org chat or private chat',
 21:  *      help        = 'say.txt'
 22:  *  )
 23:  *  @DefineCommand(
 24:  *      command     = 'tell',
 25:  *      accessLevel = 'rl',
 26:  *      description = 'Repeats a message 3 times',
 27:  *      help        = 'tell.txt'
 28:  *  )
 29:  *  @DefineCommand(
 30:  *      command     = 'cmd',
 31:  *      accessLevel = 'rl',
 32:  *      description = 'Creates a highly visible message',
 33:  *      help        = 'cmd.txt'
 34:  *  )
 35:  */
 36: class ChatSayController {
 37: 
 38:     /** @Inject */
 39:     public $chatBot;
 40: 
 41:     /** @Inject */
 42:     public $chatLeaderController;
 43: 
 44:     /**
 45:      * This command handler sends message to org chat.
 46:      * @HandlesCommand("say")
 47:      * @Matches("/^say org (.+)$/si")
 48:      */
 49:     public function sayOrgCommand($message, $channel, $sender, $sendto, $args) {
 50:         if (!$this->chatLeaderController->checkLeaderAccess($sender)) {
 51:             $sendto->reply("You must be Raid Leader to use this command.");
 52:             return;
 53:         }
 54: 
 55:         $this->chatBot->sendGuild("$sender: $args[1]");
 56:     }
 57: 
 58:     /**
 59:      * This command handler sends message to private channel.
 60:      * @HandlesCommand("say")
 61:      * @Matches("/^say priv (.+)$/si")
 62:      */
 63:     public function sayPrivCommand($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->chatBot->sendPrivate("$sender: $args[1]");
 70:     }
 71: 
 72:     /**
 73:      * This command handler creates a highly visible message.
 74:      * @HandlesCommand("cmd")
 75:      * @Matches("/^cmd (.+)$/si")
 76:      */
 77:     public function cmdCommand($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:         $msg = "\n<yellow>---------------------\n<red>$args[1]<end>\n<yellow>---------------------";
 84: 
 85:         if ($channel == 'msg') {
 86:             $this->chatBot->sendGuild($msg, true);
 87:             $this->chatBot->sendPrivate($msg, true);
 88:         } else {
 89:             $sendto->reply($msg, true);
 90:         }
 91:     }
 92: 
 93:     /**
 94:      * This command handler repeats a message 3 times.
 95:      * @HandlesCommand("tell")
 96:      * @Matches("/^tell (.+)$/si")
 97:      */
 98:     public function tellCommand($message, $channel, $sender, $sendto, $args) {
 99:         if (!$this->chatLeaderController->checkLeaderAccess($sender)) {
100:             $sendto->reply("You must be Raid Leader to use this command.");
101:             return;
102:         }
103: 
104:         if ($channel == 'guild' || $channel == 'msg') {
105:             $this->chatBot->sendGuild("<yellow>$args[1]<end>", true);
106:             $this->chatBot->sendGuild("<yellow>$args[1]<end>", true);
107:             $this->chatBot->sendGuild("<yellow>$args[1]<end>", true);
108:         }
109: 
110:         if ($channel == 'priv' || $channel == 'msg') {
111:             $this->chatBot->sendPrivate("<yellow>$args[1]<end>", true);
112:             $this->chatBot->sendPrivate("<yellow>$args[1]<end>", true);
113:             $this->chatBot->sendPrivate("<yellow>$args[1]<end>", true);
114:         }
115:     }
116: 
117: }
118: 
Budabot 4 Docs API documentation generated by ApiGen