Overview

Namespaces

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

Classes

  • AlienArmorController
  • AlienBioController
  • AlienMiscController
  • AOSpeakController
  • AOUController
  • AXPController
  • BankController
  • BosslootController
  • BroadcastController
  • BuffPerksController
  • CacheController
  • ChatAssistController
  • ChatCheckController
  • ChatLeaderController
  • ChatRallyController
  • ChatSayController
  • ChatTopicController
  • CityWaveController
  • CloakController
  • ClusterController
  • CountdownController
  • DevController
  • DingController
  • EventsController
  • FightController
  • FindOrgController
  • FindPlayerController
  • FunController
  • GitController
  • GuideController
  • GuildController
  • HelpbotController
  • HtmlDecodeController
  • ImplantController
  • ImplantDesignerController
  • InactiveMemberController
  • ItemsController
  • KillOnSightController
  • LevelController
  • LinksController
  • LootListsController
  • MdbController
  • MessageInfoCommandReply
  • MockCommandReply
  • NanoController
  • NewsController
  • NotesController
  • OnlineController
  • OrgHistoryController
  • OrglistController
  • OrgMembersController
  • OSController
  • PlayerHistoryController
  • PlayfieldController
  • PocketbossController
  • PremadeImplantController
  • PrivateChannelController
  • QuoteController
  • RaffleController
  • RaidController
  • RandomController
  • RecipeController
  • RelayController
  • ReputationController
  • ResearchController
  • RunAsController
  • SendTellController
  • ShoppingController
  • SilenceController
  • SkillsController
  • SpiritsController
  • StopwatchController
  • Teamspeak3
  • TeamspeakController
  • TestController
  • TimeController
  • TimerController
  • TimezoneController
  • TowerController
  • TrackerController
  • TrickleController
  • UnixtimeController
  • VoteController
  • WeatherController
  • WhatBuffsController
  • WhereisController
  • WhoisController
  • WhoisOrgController
  • WhompahController
  • Overview
  • Namespace
  • Class

Class TowerController

Namespace: Budabot\User\Modules
Definecommand(:

command = 'towerstats', accessLevel = 'all', description = 'Show how many towers each faction has lost', help = 'towerstats.txt' )


Definecommand(:

command = 'attacks', alias = 'battles', accessLevel = 'all', description = 'Show the last Tower Attack messages', help = 'attacks.txt' )


Definecommand(:

command = 'forcescout', accessLevel = 'guild', description = 'Add tower info to watch list (bypasses some of the checks)', help = 'scout.txt' )


Definecommand(:

command = 'lc', accessLevel = 'all', description = 'Show status of towers', help = 'lc.txt' )


Definecommand(:

command = 'opentimes', accessLevel = 'guild', description = 'Show status of towers', help = 'scout.txt' )


Definecommand(:

command = 'penalty', accessLevel = 'all', description = 'Show orgs in penalty', help = 'penalty.txt' )


Definecommand(:

command = 'remscout', accessLevel = 'guild', description = 'Remove tower info from watch list', help = 'scout.txt' )


Definecommand(:

command = 'scout', accessLevel = 'guild', description = 'Add tower info to watch list', help = 'scout.txt' )


Definecommand(:

command = 'victory', accessLevel = 'all', description = 'Show the last Tower Battle results', help = 'victory.txt' )


Instance: Commands this controller contains:
Located at TOWER_MODULE/TowerController.class.php
Methods summary
public
# registerAttackListener( $callback, $data = null )

Adds listener callback which will be called when tower attacks occur.

Adds listener callback which will be called when tower attacks occur.

public
# setup( )

Setup

This handler is called on bot startup.
public
# attacksCommand( $message, $channel, $sender, $sendto, $args )

This command handler shows the last tower attack messages.

This command handler shows the last tower attack messages.

Handlescommand("attacks")

Matches("/^attacks

(\d+)$/i")

Matches("/^attacks$/i")

public
# attacks2Command( $message, $channel, $sender, $sendto, $args )

This command handler shows the last tower attack messages by site number and optionally by page.

This command handler shows the last tower attack messages by site number and optionally by page.

Handlescommand("attacks")

Matches("/^attacks

(?!org|player)([a-z0-9]+) (\d+) (\d+)$/i")
(?!org|player)([a-z0-9]+) (\d+)$/i")
public
# attacksOrgCommand( $message, $channel, $sender, $sendto, $args )

This command handler shows the last tower attack messages where given org has been an attacker or defender.

This command handler shows the last tower attack messages where given org has been an attacker or defender.

Handlescommand("attacks")

Matches("/^attacks

org (.+) (\d+)$/i")
org (.+)$/i")
public
# attacksPlayerCommand( $message, $channel, $sender, $sendto, $args )

This command handler shows the last tower attack messages where given player has been as attacker.

This command handler shows the last tower attack messages where given player has been as attacker.

Handlescommand("attacks")

Matches("/^attacks

player (.+) (\d+)$/i")
player (.+)$/i")
public
# lcCommand( $message, $channel, $sender, $sendto, $args )

This command handler shows status of towers.

This command handler shows status of towers.

Handlescommand("lc")

Matches("/^lc$/i")

public
# lc2Command( $message, $channel, $sender, $sendto, $args )

This command handler shows status of towers.

This command handler shows status of towers.

Handlescommand("lc")

Matches("/^lc

([0-9a-z]+)$/i")
public
# lc3Command( $message, $channel, $sender, $sendto, $args )

This command handler shows status of towers.

This command handler shows status of towers.

Handlescommand("lc")

Matches("/^lc

([0-9a-z]+) ([0-9]+)$/i")
public
# opentimesCommand( $message, $channel, $sender, $sendto, $args )

Handlescommand("opentimes")

Matches("/^opentimes$/i")

public
# penaltyCommand( $message, $channel, $sender, $sendto, $args )

This command handler shows orgs in penalty.

This command handler shows orgs in penalty.

Handlescommand("penalty")

Matches("/^penalty

([a-z0-9]+)$/i")

Matches("/^penalty$/i")

public
# remscoutCommand( $message, $channel, $sender, $sendto, $args )

This command handler removes tower info to watch list.

This command handler removes tower info to watch list.

Handlescommand("remscout")

Matches("/^remscout

([a-z0-9]+) ([0-9]+)$/i")
public
# scoutCommand( $message, $channel, $sender, $sendto, $args )

Handlescommand("scout")

Matches("/^scout

([a-z0-9]+) ([0-9]+) ([0-9]{1,2}:[0-9]{2}:[0-9]{2}) ([0-9]+) ([a-z]+) (.*)$/i")
([a-z0-9]+) ([0-9]+) (.*)$/i")
public
# forcescoutCommand( $message, $channel, $sender, $sendto, $args )

Handlescommand("forcescout")

Matches("/^forcescout

([a-z0-9]+) ([0-9]+) ([0-9]{1,2}:[0-9]{2}:[0-9]{2}) ([0-9]+) ([a-z]+) (.*)$/i")
([a-z0-9]+) ([0-9]+) (.*)$/i")
public
# addScoutInfo( $sender, $playfield_name, $site_number, $closing_time, $ct_ql, $faction, $guild_name, $skip_checks )
public
# towerStatsCommand( $message, $channel, $sender, $sendto, $args )

Handlescommand("towerstats")

Matches("/^towerstats

(.+)$/i")

Matches("/^towerstats$/i")

public
# victoryCommand( $message, $channel, $sender, $sendto, $args )

This command handler shows the last tower battle results.

This command handler shows the last tower battle results.

Handlescommand("victory")

Matches("/^victory

(\d+)$/i")

Matches("/^victory$/i")

public
# victory2Command( $message, $channel, $sender, $sendto, $args )

This command handler shows the last tower battle results.

This command handler shows the last tower battle results.

Handlescommand("victory")

Matches("/^victory

(?!org|player)([a-z0-9]+) (\d+) (\d+)$/i")
(?!org|player)([a-z0-9]+) (\d+)$/i")
public
# victoryOrgCommand( $message, $channel, $sender, $sendto, $args )

This command handler shows the last tower battle results.

This command handler shows the last tower battle results.

Handlescommand("victory")

Matches("/^victory

org (.+) (\d+)$/i")
org (.+)$/i")
public
# victoryPlayerCommand( $message, $channel, $sender, $sendto, $args )

This command handler shows the last tower battle results.

This command handler shows the last tower battle results.

Handlescommand("victory")

Matches("/^victory

player (.+) (\d+)$/i")
player (.+)$/i")
public
# attackMessagesEvent( $eventObj )

This event handler record attack messages.

This event handler record attack messages.

Description("record

attack messages")

Event("towers")

public
# victoryMessagesEvent( $eventObj )

This event handler record victory messages.

This event handler record victory messages.

Description("record

victory messages")

Event("towers")

protected
# attacksCommandHandler( $page_label, $search, $cmd, $sendto )
protected
# victoryCommandHandler( $page_label, $search, $cmd, $sendto )
public
# getTowerInfo( $playfield_id, $site_number )
protected
# findSitesInPlayfield( $playfield_id )
protected
# getClosestSite( $playfield_id, $x_coords, $y_coords )
protected
# getLastAttack( $att_faction, $att_guild_name, $def_faction, $def_guild_name, $playfield_id )
protected
# recordAttack( $whois, $def_faction, $def_guild_name, $x_coords, $y_coords, $closest_site )
protected
# findAllScoutedSites( )
protected
# getLastVictory( $playfield_id, $site_number )
protected
# recordVictory( $last_attack )
protected
# addScoutSite( $playfield_id, $site_number, $close_time, $ct_ql, $faction, $guild_name, $scouted_by )
protected
# remScoutSite( $playfield_id, $site_number )
protected
# checkGuildName( $guild_name )
protected
# getSitesInPenalty( $time )
protected
# getGasLevel( $close_time )
protected
# formatSiteInfo( $row )
public
# getFaction( $input )
Properties summary
public $moduleName

Name of the module. Set automatically by module loader.

Name of the module. Set automatically by module loader.

#
public $playfieldController

Inject

#
public $playerManager

Inject

#
public $text

Inject

#
public $settingManager

Inject

#
public $chatBot

Inject

#
public $db

Inject

#
public $util

Inject

#
public $levelController

Inject

#
public $logger

Logger

#
protected array $attackListeners
# array()
public string $defaultTowerAttackSpam

Accesslevel("mod")

Description("layout

types when displaying tower attacks")

Intoptions("0;1;2")

Options("off;compact;normal")

Setting("tower_attack_spam")

Type("options")

Visibility("edit")

# "1"
public string $defaultTowerPageSize

Accesslevel("mod")

Description("number

of results to display for victory/attacks")

Options("5;10;15;20;25")

Setting("tower_page_size")

Type("options")

Visibility("edit")

# "15"
public string $defaultCheckCloseTimeOnScout

Accesslevel("mod")

Description("check

that close time is within one hour of last victory on site")

Intoptions("1;0")

Options("true;false")

Setting("check_close_time_on_scout")

Type("options")

Visibility("edit")

# "1"
public string $defaultCheckGuildNameOnScout

Accesslevel("mod")

Description("check

that guild name has attacked or been attacked before")

Intoptions("1;0")

Options("true;false")

Setting("check_guild_name_on_scout")

Type("options")

Visibility("edit")

# "1"
Budabot 4 Docs API documentation generated by ApiGen