Added the option to !opt-in/opt-out [onlinebot only]

Fixed command & event threading
Events are now threaded by event_type (i.e. all buddy_logon events get ran in the same one)
Added default preferences
Fixed recipe loading for multiple installs (i.e. on different machines)
This commit is contained in:
2021-08-27 13:58:47 +02:00
parent d0c8c1744c
commit c04f76c0db
24 changed files with 258 additions and 122 deletions
+4 -1
View File
@@ -122,7 +122,8 @@ hh:mm - DD.MM.YYYY
return
if "member" in self.buddy_service.get_buddy(data.packet.char_id)["types"]:
account = data.account
if account.disabled == 1:
# Apply standard checks. (User Banned, Account disabled, ...)
if not self.account_service.simple_checks(data.account):
return
if self.db.query_single("SELECT * from org_bots where char_id=?", [data.packet.char_id]):
return
@@ -138,6 +139,8 @@ hh:mm - DD.MM.YYYY
self.job_schedule.delayed_job(self.send_news, 15, user, self.account_service.get_alts(account.main),
discord,
self.preferences.get_pref_view_small(account))
# This one is kinda redudant now that the simple checks get done above, will remove it in the future.
if account.last_seen == 0 and self.setting_service.get_value('is_alliance_bot') == "1":
self.bot.send_mass_message(data.packet.char_id, self.INFO)