def start(self): self.setting_service.register_new("core.system", "symbol", "!", TextSettingType(["!", "#", "*", "@", "$", "+", "-"]), "Symbol for executing bot commands") self.setting_service.register_new("core.system", "org_channel_max_page_length", 7500, NumberSettingType([4500, 6000, 7500, 9000, 10500, 12000]), "Maximum size of blobs in org channel") self.setting_service.register_new("core.system", "private_message_max_page_length", 7500, NumberSettingType([4500, 6000, 7500, 9000, 10500, 12000]), "Maximum size of blobs in private messages") self.setting_service.register_new("core.system", "private_channel_max_page_length", 7500, NumberSettingType([4500, 6000, 7500, 9000, 10500, 12000]), "Maximum size of blobs in private channel") self.setting_service.register_new("core.system", "org_id", "", NumberSettingType(allow_empty=True), "Override the default org id", "This setting is is for development/debug purposes and should not be changed unless you understand the implications") self.setting_service.register_new("core.system", "org_name", "", TextSettingType(allow_empty=True), "The exact org name of the bot", "This setting is automatically set by the bot and should not be changed manually") self.setting_service.register_new("core.colors", "header_color", "#FFFF00", ColorSettingType(), "Color for headers") self.setting_service.register_new("core.colors", "header2_color", "#FCA712", ColorSettingType(), "Color for sub-headers") self.setting_service.register_new("core.colors", "highlight_color", "#00BFFF", ColorSettingType(), "Color for highlight") self.setting_service.register_new("core.colors", "notice_color", "#FF8C00", ColorSettingType(), "Color for important notices") self.setting_service.register_new("core.colors", "neutral_color", "#E6E1A6", ColorSettingType(), "Color for neutral faction") self.setting_service.register_new("core.colors", "omni_color", "#FA8484", ColorSettingType(), "Color for omni faction") self.setting_service.register_new("core.colors", "clan_color", "#F79410", ColorSettingType(), "Color for clan faction") self.setting_service.register_new("core.colors", "unknown_color", "#FF0000", ColorSettingType(), "Color for unknown faction") self.setting_service.register_new("core.colors", "org_channel_color", "#89D2E8", ColorSettingType(), "Default org channel color") self.setting_service.register_new("core.colors", "private_channel_color", "#89D2E8", ColorSettingType(), "Default private channel color") self.setting_service.register_new("core.colors", "private_message_color", "#89D2E8", ColorSettingType(), "Default private message color") self.setting_service.register_new("core.colors", "blob_color", "#FFFFFF", ColorSettingType(), "Default blob content color") self.register_packet_handler(server_packets.PrivateMessage.id, self.handle_private_message, priority=40)
def start(self): self.db.exec( "CREATE TABLE IF NOT EXISTS points (char_id BIGINT PRIMARY KEY, points INT DEFAULT 0, created_at INT NOT NULL, " "disabled SMALLINT DEFAULT 0)") self.db.exec( "CREATE TABLE IF NOT EXISTS points_log (log_id INT PRIMARY KEY, char_id BIGINT NOT NULL, audit INT NOT NULL, " "leader_id BIGINT NOT NULL, reason VARCHAR(255), created_at INT NOT NULL)" ) self.db.exec( "CREATE TABLE IF NOT EXISTS points_presets (preset_id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(50) NOT NULL, " "points INT DEFAULT 1, UNIQUE(name))") if self.db.query_single( "SELECT COUNT(*) AS count FROM points_presets").count < 1: # Populate with pre-made presets if empty presets = [ "s13", "s28", "s35", "s42", "zodiac", "zod", "tnh", "beast", "12m", "tara", "pvp", "towers", "wipe", "clanwipe", "clan", "omniwipe", "omni", "bonus", "early" ] sql = "INSERT INTO points_presets (name) VALUES (?)" for preset in presets: self.db.exec(sql, [preset]) self.setting_service.register_new( self.module_name, "initial_points_value", 0, NumberSettingType(), "How many points new accounts start with")
def start(self): self.setting_manager.register( "org_channel_max_page_length", 7500, "Maximum size of blobs in org channel", NumberSettingType([4500, 6000, 7500, 9000, 10500, 12000]), "core.system") self.setting_manager.register( "private_message_max_page_length", 7500, "Maximum size of blobs in private messages", NumberSettingType([4500, 6000, 7500, 9000, 10500, 12000]), "core.system", ) self.setting_manager.register( "private_channel_max_page_length", 7500, "Maximum size of blobs in private channel", NumberSettingType([4500, 6000, 7500, 9000, 10500, 12000]), "core.system") self.setting_manager.register("header_color", "#FFFF00", "color for headers", ColorSettingType(), "core.colors") self.setting_manager.register("header2_color", "#FCA712", "color for sub-headers", ColorSettingType(), "core.colors") self.setting_manager.register("highlight_color", "#FFFFFF", "color for highlight", ColorSettingType(), "core.colors") self.setting_manager.register("neutral_color", "#E6E1A6", "color for neutral faction", ColorSettingType(), "core.colors") self.setting_manager.register("omni_color", "#FA8484", "color for omni faction", ColorSettingType(), "core.colors") self.setting_manager.register("clan_color", "#F79410", "color for clan faction", ColorSettingType(), "core.colors") self.setting_manager.register("unknown_color", "#FF0000", "color for unknown faction", ColorSettingType(), "core.colors") self.setting_manager.register("notice_color", "#FF8C00", "color for important notices", ColorSettingType(), "core.colors") self.setting_manager.register( "symbol", "!", "Symbol for executing bot commands", TextSettingType(["!", "#", "*", "@", "$", "+", "-"]), "core.system")
def initial_points_value(self): return NumberSettingType()
def start(self): self.setting_service.register( "symbol", "!", "Symbol for executing bot commands", TextSettingType(["!", "#", "*", "@", "$", "+", "-"]), "core.system") self.setting_service.register( "org_channel_max_page_length", 7500, "Maximum size of blobs in org channel", NumberSettingType([4500, 6000, 7500, 9000, 10500, 12000]), "core.system") self.setting_service.register( "private_message_max_page_length", 7500, "Maximum size of blobs in private messages", NumberSettingType([4500, 6000, 7500, 9000, 10500, 12000]), "core.system", ) self.setting_service.register( "private_channel_max_page_length", 7500, "Maximum size of blobs in private channel", NumberSettingType([4500, 6000, 7500, 9000, 10500, 12000]), "core.system") self.setting_service.register("header_color", "#FFFF00", "color for headers", ColorSettingType(), "core.colors") self.setting_service.register("header2_color", "#FCA712", "color for sub-headers", ColorSettingType(), "core.colors") self.setting_service.register("highlight_color", "#00BFFF", "color for highlight", ColorSettingType(), "core.colors") self.setting_service.register("notice_color", "#FF8C00", "color for important notices", ColorSettingType(), "core.colors") self.setting_service.register("neutral_color", "#E6E1A6", "color for neutral faction", ColorSettingType(), "core.colors") self.setting_service.register("omni_color", "#FA8484", "color for omni faction", ColorSettingType(), "core.colors") self.setting_service.register("clan_color", "#F79410", "color for clan faction", ColorSettingType(), "core.colors") self.setting_service.register("unknown_color", "#FF0000", "color for unknown faction", ColorSettingType(), "core.colors") self.setting_service.register("org_channel_color", "#89D2E8", "default org channel color", ColorSettingType(), "core.colors") self.setting_service.register("private_channel_color", "#89D2E8", "default private channel color", ColorSettingType(), "core.colors") self.setting_service.register("private_message_color", "#89D2E8", "default private message color", ColorSettingType(), "core.colors") self.setting_service.register("blob_color", "#FFFFFF", "default blob content color", ColorSettingType(), "core.colors") self.add_packet_handler(server_packets.PrivateMessage.id, self.handle_private_message, priority=40)
def start(self): self.setting_service.register( "core.system", "symbol", "!", TextSettingType(["!", "#", "*", "@", "$", "+", "-"]), "Symbol for executing bot commands") self.setting_service.register( "core.system", "org_channel_max_page_length", 7500, NumberSettingType([4500, 6000, 7500, 9000, 10500, 12000]), "Maximum size of blobs in org channel") self.setting_service.register( "core.system", "private_message_max_page_length", 7500, NumberSettingType([4500, 6000, 7500, 9000, 10500, 12000]), "Maximum size of blobs in private messages") self.setting_service.register( "core.system", "private_channel_max_page_length", 7500, NumberSettingType([4500, 6000, 7500, 9000, 10500, 12000]), "Maximum size of blobs in private channel") self.setting_service.register( "core.system", "accept_commands_from_slave_bots", False, BooleanSettingType(), "Accept and respond to commands sent to slave bots (only applies if you have added slave bots in the config)" ) self.setting_service.register("core.colors", "header_color", "#FFFF00", ColorSettingType(), "Color for headers") self.setting_service.register("core.colors", "header2_color", "#FCA712", ColorSettingType(), "Color for sub-headers") self.setting_service.register("core.colors", "highlight_color", "#00BFFF", ColorSettingType(), "Color for highlight") self.setting_service.register("core.colors", "notice_color", "#FF8C00", ColorSettingType(), "Color for important notices") self.setting_service.register("core.colors", "neutral_color", "#E6E1A6", ColorSettingType(), "Color for neutral faction") self.setting_service.register("core.colors", "omni_color", "#FA8484", ColorSettingType(), "Color for omni faction") self.setting_service.register("core.colors", "clan_color", "#F79410", ColorSettingType(), "Color for clan faction") self.setting_service.register("core.colors", "unknown_color", "#FF0000", ColorSettingType(), "Color for unknown faction") self.setting_service.register("core.colors", "org_channel_color", "#89D2E8", ColorSettingType(), "Default org channel color") self.setting_service.register("core.colors", "private_channel_color", "#89D2E8", ColorSettingType(), "Default private channel color") self.setting_service.register("core.colors", "private_message_color", "#89D2E8", ColorSettingType(), "Default private message color") self.setting_service.register("core.colors", "blob_color", "#FFFFFF", ColorSettingType(), "Default blob content color") self.register_packet_handler(server_packets.PrivateMessage.id, self.handle_private_message, priority=40)
def start(self): self.db.exec("CREATE TABLE IF NOT EXISTS news (id INT PRIMARY KEY AUTO_INCREMENT, char_id INT NOT NULL, news TEXT, sticky SMALLINT NOT NULL, created_at INT NOT NULL, deleted_at INT NOT NULL)") self.db.exec("CREATE TABLE IF NOT EXISTS news_read (char_id INTEGER NOT NULL, news_id INTEGER NOT NULL)") self.setting_service.register_new(self.module_name, "number_news_shown", 10, NumberSettingType(), "Maximum number of news items shown")
def mass_auction_announce_interval(self): return NumberSettingType()
def mass_auction_length(self): return NumberSettingType()
def minimum_bid(self): return NumberSettingType()
def max_multiple_results(self): return NumberSettingType()
def org_id(self): return NumberSettingType(allow_empty=True)
def number_news_shown(self): return NumberSettingType()
def default_min_lvl(self): return NumberSettingType()