Do not load settings which are not active (module not loaded)
Restart the bot, on heavy DB errors, with an 30 seconds delay (like: all connections terminated by DB, table_definition_cache exhausted) Fix for channel prefixing (org <-> priv)
This commit is contained in:
@@ -356,9 +356,9 @@ class LootController:
|
||||
if int(time.time()) - self.last_modify > 3600 and self.loot_list:
|
||||
self.last_modify = None
|
||||
self.loot_list = OrderedDict()
|
||||
self.bot.send_org_message("Loot was last modified more than 1 hour ago, list has been cleared.")
|
||||
self.bot.send_org_message("Loot was last modified more than 1 hour ago, list has been cleared.", fire_outgoing_event=False)
|
||||
self.bot.send_private_channel_message(
|
||||
"Loot was last modified more than 1 hour ago, list has been cleared.")
|
||||
"Loot was last modified more than 1 hour ago, list has been cleared.", fire_outgoing_event=False)
|
||||
|
||||
def is_already_added(self, name: str):
|
||||
for i, loot_item in self.loot_list.items():
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from core.command_param_types import Any
|
||||
from core.decorators import instance, command
|
||||
from core.igncore import IgnCore
|
||||
from core.text import Text
|
||||
|
||||
|
||||
@instance()
|
||||
@@ -8,6 +9,7 @@ class ChatController:
|
||||
def inject(self, registry):
|
||||
self.command_alias_service = registry.get_instance("command_alias_service")
|
||||
self.bot: IgnCore = registry.get_instance("bot")
|
||||
self.text: Text = registry.get_instance("text")
|
||||
|
||||
def start(self):
|
||||
self.command_alias_service.add_alias("cmd", "shout")
|
||||
@@ -20,3 +22,11 @@ class ChatController:
|
||||
f"<yellow>────────────────</yellow>\n"
|
||||
f"<highlight>{message}</highlight>\n"
|
||||
f"<yellow>────────────────</yellow>")
|
||||
|
||||
@command(command="lft", params=[Any("message", is_optional=True)], access_level="member",
|
||||
description="Show a highly visible message")
|
||||
def shout_command(self, _, message):
|
||||
lft = f"<a href='chatcmd:///lft <font color=#FFFF00>» {message or '<myname>'}<end>'>/lft {message or '<myname>'}</a>"
|
||||
return self.text.format_page("Use this command for going LFT", "<yellow>────────────────</yellow>\n"
|
||||
f"<highlight>{lft}</highlight>\n"
|
||||
f"<yellow>────────────────</yellow>")
|
||||
|
||||
@@ -390,9 +390,9 @@ class SpecialsController:
|
||||
inits_recharge = ((((init_result - 87.5) * 0.02) + 1 - weapon_attack + 4) * -900) + 1200
|
||||
|
||||
if inits_attack < inits_recharge:
|
||||
return inits_recharge
|
||||
return int(inits_recharge)
|
||||
else:
|
||||
return inits_attack
|
||||
return int(inits_attack)
|
||||
|
||||
def get_aimed_shot_info(self, weapon_attack, weapon_recharge, aimed_shot_skill):
|
||||
result = DictObject()
|
||||
|
||||
Reference in New Issue
Block a user