diff --git a/core/igncore.py b/core/igncore.py
index ce8ad91..4184afc 100644
--- a/core/igncore.py
+++ b/core/igncore.py
@@ -48,7 +48,7 @@ class IgnCore:
self.last_timer_event = 0
self.start_time = int(time.time())
self.major_version = "IGNCore v2.9"
- self.minor_version = "3"
+ self.minor_version = "4"
self.incoming_queue = FifoQueue()
self.mass_message_queue = None
self.conns = DictObject()
diff --git a/modules/core/discord/discord_command_handler.py b/modules/core/discord/discord_command_handler.py
index 073bf23..ae9cf4f 100644
--- a/modules/core/discord/discord_command_handler.py
+++ b/modules/core/discord/discord_command_handler.py
@@ -92,10 +92,10 @@ class DiscordCommandHandler(BaseModule):
body = self.discord.text.split_by_separators(embeds.description, 4000, 10)
tmp1 = embeds
embeds = []
- for x in enumerate(body):
+ for x, e in enumerate(body):
tmp = tmp1.copy()
- tmp.description = body[x]
- tmp.title += f"*Page ({x}/{len(body)}*"
+ tmp.description = e
+ tmp.title += f"*Page ({x}/{len(body)})*"
embeds.append(tmp)
else:
embeds = [embeds]
diff --git a/modules/core/discord/discord_controller.py b/modules/core/discord/discord_controller.py
index ec9bc36..e636d0d 100644
--- a/modules/core/discord/discord_controller.py
+++ b/modules/core/discord/discord_controller.py
@@ -186,8 +186,9 @@ class DiscordController:
elif type(msg) == ChatBlob:
if msg.embed:
msg: ChatBlob
+ des = self.cmd.parseDiscord(msg.msg, blob=True)
blob = Embed(title=self.cmd.parseDiscord(f"{msg.page_prefix} {msg.title} {msg.page_postfix}"),
- color=0x00FF00, description=self.cmd.parseDiscord(msg.msg, blob=True).replace("\n> ", '\n'))
+ color=0x00FF00, description=(des or "").replace("\n> ", '\n'))
asyncio.run_coroutine_threadsafe(ch.send("", delete_after=del_after, embed=blob), self.loop)
return
rsp = self.cmd.parseDiscord(ctx.formatted_message.page_prefix) + "\n"
diff --git a/modules/core/discord/discord_data.py b/modules/core/discord/discord_data.py
index 274d8ac..1765f89 100644
--- a/modules/core/discord/discord_data.py
+++ b/modules/core/discord/discord_data.py
@@ -18,8 +18,7 @@ class DiscordData:
return self.db.exec("UPDATE account SET discord_handle = ? WHERE discord_id = ?", [handle, discord_id])
def get_discord_invite(self, invite):
- return self.db.query_single("SELECT * FROM account WHERE discord_invite = ?", [invite])
+ return self.db.query_single("SELECT * FROM account WHERE discord_invite = ? and a.main=a.char_id", [invite])
def get_account_discord_id(self, discord_id):
- return self.db.query_single(
- "SELECT * FROM account a left join player p on a.char_id=p.char_id WHERE discord_id = ?", [discord_id])
\ No newline at end of file
+ return self.db.query_single("SELECT * FROM account a left join player p on a.char_id=p.char_id WHERE a.discord_id = ? and a.main=a.char_id", [discord_id])
\ No newline at end of file
diff --git a/modules/core/help/about.txt b/modules/core/help/about.txt
index 914a288..6608a33 100644
--- a/modules/core/help/about.txt
+++ b/modules/core/help/about.txt
@@ -6,7 +6,6 @@ and is being maintained by a group Volunteers.
At this point, we'd like to send a special "thank you" to the following people, which in one way or another, contributed to IGNCore/IGNCom:
» Zetabyte & its Network, for many feature ideas,
and the heavy assistance with knowledge.
- » Chrisax for hosting the !history mirror.
» Everyone who participated in test runs,
» sent us ideas for bot improvements,
» helped us by sending bug reports our way,
diff --git a/modules/orgbot/notify/notify_controller.py b/modules/orgbot/notify/notify_controller.py
index b503145..1491327 100644
--- a/modules/orgbot/notify/notify_controller.py
+++ b/modules/orgbot/notify/notify_controller.py
@@ -1,6 +1,7 @@
import time
from core.buddy_service import BuddyService
+from core.chat_blob import ChatBlob
from core.command_param_types import Character, Int
from core.decorators import event, instance, command
from core.logger import Logger
@@ -57,8 +58,7 @@ class NotifyController:
for log in logs:
blob += f"[{self.util.format_datetime(log.time)}] {log.name} -> " \
f"{'logged on' if log.status == 1 else 'logged off'}.\n"
- return f"{char.name} was last seen at " \
- f"{self.util.format_date(logs[0].time)}. {self.text.format_page('More', blob)}"
+ return ChatBlob("More", blob, prefix=f"{char.name} was last seen at {self.util.format_date(logs[0].time)}. [", suffix="]")
def get_log(self, char_list, length=16):
query = "SELECT n.*, p.name as name FROM notify_log n LEFT JOIN player p on n.char_id = p.char_id "
diff --git a/modules/standard/helpbot/time_controller.py b/modules/standard/helpbot/time_controller.py
index 70edb62..acf31e4 100644
--- a/modules/standard/helpbot/time_controller.py
+++ b/modules/standard/helpbot/time_controller.py
@@ -5,7 +5,7 @@ from datetime import datetime
import pytz
from core.chat_blob import ChatBlob
-from core.command_param_types import Any, Const
+from core.command_param_types import Any, Const, Int
from core.decorators import instance, command
@@ -50,6 +50,12 @@ class TimeController:
return f"Currently its {now.hour:02}:{now.minute:02}:{now.second:02} " \
f"{calendar.month_name[now.month]} {day}, {now.year + 27474} Rubi-Ka Universal Time."
+ @command(command="time", params=[Int("timestamp")], access_level="member",
+ description="Show UTC time of the provided timestamp")
+ def timestamp_cmd(self, _, t: int):
+ d = datetime.fromtimestamp(t, pytz.utc)
+ return f"Your provided timestamp resolves to: {d.strftime(self.time_format)}"
+
@command(command="time", params=[Any("timezone")], access_level="member",
description="Show time for the specified timezone")
def time_zone_cmd(self, _, timezone_str):