diff --git a/files/classes/mod_logs.py b/files/classes/mod_logs.py index c33124e46..3f35bf61f 100644 --- a/files/classes/mod_logs.py +++ b/files/classes/mod_logs.py @@ -1,5 +1,4 @@ import time -from copy import deepcopy from sqlalchemy import Column, ForeignKey from sqlalchemy.orm import relationship @@ -50,7 +49,7 @@ class ModAction(Base): @property @lazy def string(self): - output = ACTIONTYPES[self.kind]["str"].format(self=self) + output = MODACTION_TYPES[self.kind]["str"].format(self=self) if self.note: output += f" ({self.note})" return output @@ -65,346 +64,16 @@ class ModAction(Base): @property @lazy def icon(self): - return ACTIONTYPES[self.kind]['icon'] + return MODACTION_TYPES[self.kind]['icon'] @property @lazy def color(self): - return ACTIONTYPES[self.kind]['color'] + return MODACTION_TYPES[self.kind]['color'] @property @lazy def permalink(self): return f"{SITE_FULL}/log/{self.id}" -ACTIONTYPES = { - 'chud': { - "str": 'chudded {self.target_link}', - "icon": 'fa-snooze', - "color": 'bg-danger' - }, - 'approve_app': { - "str": 'approved an application by {self.target_link}', - "icon": 'fa-robot', - "color": 'bg-success' - }, - 'badge_grant': { - "str": 'granted badge to {self.target_link}', - "icon": 'fa-badge', - "color": 'bg-success' - }, - 'badge_remove': { - "str": 'removed badge from {self.target_link}', - "icon": 'fa-badge', - "color": 'bg-danger' - }, - 'ban_comment': { - "str": 'removed {self.target_link}', - "icon": 'fa-comment', - "color": 'bg-danger' - }, - 'ban_domain': { - "str": 'banned a domain', - "icon": 'fa-globe', - "color": 'bg-danger' - }, - 'ban_post': { - "str": 'removed post {self.target_link}', - "icon": 'fa-feather-alt', - "color": 'bg-danger' - }, - 'ban_user': { - "str": 'banned user {self.target_link}', - "icon": 'fa-user-slash', - "color": 'bg-danger' - }, - 'delete_report': { - "str": 'deleted report on {self.target_link}', - "icon": 'fa-flag', - "color": 'bg-danger' - }, - 'disable_bots': { - "str": 'disabled bots', - "icon": 'fa-robot', - "color": 'bg-danger' - }, - 'disable_fart_mode': { - "str": 'disabled fart mode', - "icon": 'fa-gas-pump-slash', - "color": 'bg-danger' - }, - 'disable_read_only_mode': { - "str": 'disabled read only mode', - "icon": 'fa-book', - "color": 'bg-danger' - }, - 'disable_signups': { - "str": 'disabled signups', - "icon": 'fa-users', - "color": 'bg-danger' - }, - 'disable_login_required': { - "str": 'disabled login required', - "icon": 'fa-users', - "color": 'bg-danger' - }, - 'disable_under_attack': { - "str": 'disabled under attack mode', - "icon": 'fa-shield', - "color": 'bg-muted' - }, - 'disable_under_siege': { - "str": 'disabled under siege mode', - "icon": 'fa-shield', - "color": 'bg-muted' - }, - 'distinguish_comment': { - "str": 'distinguished {self.target_link}', - "icon": 'fa-crown', - "color": 'bg-success' - }, - 'distinguish_post': { - "str": 'distinguished {self.target_link}', - "icon": 'fa-crown', - "color": 'bg-success' - }, - 'distribute': { - "str": 'distributed bet winnings to voters on {self.target_link}', - "icon": 'fa-dollar-sign', - "color": 'bg-success' - }, - 'clear_internal_cache': { - "str": 'cleared internal cache', - "icon": 'fa-trash-alt', - "color": 'bg-muted' - }, - 'edit_post': { - "str": 'edited {self.target_link}', - "icon": 'fa-edit', - "color": 'bg-primary' - }, - 'edit_rules': { - "str": 'edited the rules', - "icon": 'fa-columns', - "color": 'bg-primary' - }, - 'enable_bots': { - "str": 'enabled bots', - "icon": 'fa-robot', - "color": 'bg-success' - }, - 'enable_fart_mode': { - "str": 'enabled fart mode', - "icon": 'fa-gas-pump', - "color": 'bg-success' - }, - 'enable_read_only_mode': { - "str": 'enabled read only mode', - "icon": 'fa-book', - "color": 'bg-success' - }, - 'enable_signups': { - "str": 'enabled signups', - "icon": 'fa-users', - "color": 'bg-success' - }, - 'enable_login_required': { - "str": 'enabled login required', - "icon": 'fa-users', - "color": 'bg-success' - }, - 'enable_under_attack': { - "str": 'enabled under attack mode', - "icon": 'fa-shield', - "color": 'bg-success' - }, - 'enable_under_siege': { - "str": 'enabled under siege mode', - "icon": 'fa-shield', - "color": 'bg-success', - }, - 'flair_post': { - "str": 'set a flair on {self.target_link}', - "icon": 'fa-tag', - "color": 'bg-primary' - }, - 'link_accounts': { - "str": 'linked {self.target_link}', - "icon": 'fa-link', - "color": 'bg-success' - }, - 'delink_accounts': { - "str": 'delinked {self.target_link}', - "icon": 'fa-link-slash', - "color": 'bg-danger' - }, - 'make_admin': { - "str": 'made {self.target_link} an admin', - "icon": 'fa-user-crown', - "color": 'bg-success' - }, - 'mod_mute_user': { - "str": 'muted reports from user {self.target_link}', - "icon": 'fa-file-signature', - "color": 'bg-danger' - }, - 'mod_unmute_user': { - "str": 'unmuted reports from user {self.target_link}', - "icon": 'fa-file-signature', - "color": 'bg-success' - }, - 'monthly': { - "str": 'distributed monthly marseybux', - "icon": 'fa-sack-dollar', - "color": 'bg-success' - }, - 'move_hole': { - "str": 'changed hole of {self.target_link}', - "icon": 'fa-manhole', - "color": 'bg-primary' - }, - 'nuke_user': { - "str": 'removed all content of {self.target_link}', - "icon": 'fa-radiation-alt', - "color": 'bg-danger' - }, - 'pin_comment': { - "str": 'pinned {self.target_link}', - "icon": 'fa-thumbtack fa-rotate--45', - "color": 'bg-success' - }, - 'pin_post': { - "str": 'pinned post {self.target_link}', - "icon": 'fa-thumbtack fa-rotate--45', - "color": 'bg-success' - }, - 'clear_cloudflare_cache': { - "str": 'cleared cloudflare cache', - "icon": 'fab fa-cloudflare', - "color": 'bg-muted' - }, - 'reject_app': { - "str": 'rejected an application request by {self.target_link}', - "icon": 'fa-robot', - "color": 'bg-muted' - }, - 'remove_admin': { - "str": 'removed {self.target_link} as admin', - "icon": 'fa-user-crown', - "color": 'bg-danger' - }, - 'revert': { - "str": 'reverted {self.target_link} mod actions', - "icon": 'fa-history', - "color": 'bg-danger' - }, - 'revoke_app': { - "str": 'revoked an application by {self.target_link}', - "icon": 'fa-robot', - "color": 'bg-muted' - }, - 'set_flair_locked': { - "str": "set {self.target_link}'s flair (locked)", - "icon": 'fa-award', - "color": 'bg-primary' - }, - 'set_flair_notlocked': { - "str": "set {self.target_link}'s flair (not locked)", - "icon": 'fa-award', - "color": 'bg-primary' - }, - 'set_nsfw': { - "str": 'set nsfw on post {self.target_link}', - "icon": 'fa-eye-evil', - "color": 'bg-danger' - }, - 'set_nsfw_comment': { - "str": 'set nsfw on a {self.target_link}', - "icon": 'fa-eye-evil', - "color": 'bg-danger' - }, - 'shadowban': { - "str": 'shadowbanned {self.target_link}', - "icon": 'fa-eye-slash', - "color": 'bg-danger' - }, - 'unchud': { - "str": 'unchudded {self.target_link}', - "icon": 'fa-snooze', - "color": 'bg-success' - }, - 'unban_comment': { - "str": 'reinstated {self.target_link}', - "icon": 'fa-comment', - "color": 'bg-success' - }, - 'unban_domain': { - "str": 'unbanned a domain', - "icon": 'fa-globe', - "color": 'bg-success' - }, - 'unban_post': { - "str": 'reinstated post {self.target_link}', - "icon": 'fa-feather-alt', - "color": 'bg-success' - }, - 'unban_user': { - "str": 'unbanned user {self.target_link}', - "icon": 'fa-user', - "color": 'bg-success' - }, - 'undistinguish_comment': { - "str": 'un-distinguished {self.target_link}', - "icon": 'fa-crown', - "color": 'bg-muted' - }, - 'undistinguish_post': { - "str": 'un-distinguished {self.target_link}', - "icon": 'fa-crown', - "color": 'bg-muted' - }, - 'unnuke_user': { - "str": 'approved all content of {self.target_link}', - "icon": 'fa-radiation-alt', - "color": 'bg-success' - }, - 'unpin_comment': { - "str": 'unpinned {self.target_link}', - "icon": 'fa-thumbtack fa-rotate--45', - "color": 'bg-muted' - }, - 'unpin_post': { - "str": 'unpinned post {self.target_link}', - "icon": 'fa-thumbtack fa-rotate--45', - "color": 'bg-muted' - }, - 'unset_nsfw': { - "str": 'un-set nsfw on post {self.target_link}', - "icon": 'fa-eye-evil', - "color": 'bg-success' - }, - 'unset_nsfw_comment': { - "str": 'un-set nsfw on a {self.target_link}', - "icon": 'fa-eye-evil', - "color": 'bg-success' - }, - 'unshadowban': { - "str": 'unshadowbanned {self.target_link}', - "icon": 'fa-eye', - "color": 'bg-success' - }, - 'update_hat': { - "str": 'updated hat image', - "icon": 'fa-hat-cowboy', - "color": 'bg-success' - }, - 'update_marsey': { - "str": 'updated marsey', - "icon": 'fa-cat', - "color": 'bg-success' - }, -} - -ACTIONTYPES2 = deepcopy(ACTIONTYPES) -ACTIONTYPES2.pop("shadowban") -ACTIONTYPES2.pop("unshadowban") +from files.helpers.config.modaction_types import MODACTION_TYPES, MODACTION_TYPES_FILTERED diff --git a/files/classes/sub.py b/files/classes/sub.py index 495a2fb58..2065bb58d 100644 --- a/files/classes/sub.py +++ b/files/classes/sub.py @@ -1,5 +1,6 @@ +from random import Random import time -from os import environ +from typing import Optional from sqlalchemy import Column from sqlalchemy.orm import relationship @@ -13,13 +14,13 @@ from .sub_relationship import * class Sub(Base): __tablename__ = "subs" - name = Column(String, primary_key=True) - sidebar = Column(String) - sidebar_html = Column(String) - sidebarurl = Column(String) - bannerurl = Column(String) - marseyurl = Column(String) - css = Column(String) + name = Column(VARCHAR(SUB_NAME_COLUMN_LENGTH), primary_key=True) + sidebar = Column(VARCHAR(SUB_SIDEBAR_COLUMN_LENGTH)) + sidebar_html = Column(VARCHAR(SUB_SIDEBAR_HTML_COLUMN_LENGTH)) + sidebarurl = Column(VARCHAR(SUB_SIDEBAR_URL_COLUMN_LENGTH)) + bannerurls = Column(ARRAY(VARCHAR(SUB_BANNER_URL_COLUMN_LENGTH))) + marseyurl = Column(VARCHAR(SUB_MARSEY_URL_LENGTH)) + css = Column(VARCHAR(SUB_CSS_COLUMN_LENGTH)) stealth = Column(Boolean) created_utc = Column(Integer) @@ -42,9 +43,20 @@ class Sub(Base): @property @lazy - def banner_url(self): - if self.bannerurl: return SITE_FULL + self.bannerurl - return f'/i/{SITE_NAME}/banner.webp?v=3009' + def banner_urls(self): + if self.bannerurls: return [f"{SITE_FULL}{banner}" for banner in self.bannerurl] + return [] + + @lazy + def random_banner(self, random:Optional[Random]=None): + if not random: random = Random() + if not self.banner_urls: return None + return random.choice(self.banner_urls) + + @property + @lazy + def has_banners(self) -> bool: + return bool(self.bannerurls) @property @lazy diff --git a/files/classes/sub_logs.py b/files/classes/sub_logs.py index 6ed27e9de..b835cb3ee 100644 --- a/files/classes/sub_logs.py +++ b/files/classes/sub_logs.py @@ -41,7 +41,7 @@ class SubAction(Base): @property @lazy def string(self): - output = ACTIONTYPES[self.kind]["str"].format(self=self) + output = SUBACTION_TYPES[self.kind]["str"].format(self=self) if self._note: output += f" ({self._note})" return output @@ -56,127 +56,16 @@ class SubAction(Base): @property @lazy def icon(self): - return ACTIONTYPES[self.kind]['icon'] + return SUBACTION_TYPES[self.kind]['icon'] @property @lazy def color(self): - return ACTIONTYPES[self.kind]['color'] + return SUBACTION_TYPES[self.kind]['color'] @property @lazy def permalink(self): return f"{SITE_FULL}/h/{self.sub}/log/{self.id}" -ACTIONTYPES = { - 'exile_user': { - "str": 'exiled user {self.target_link}', - "icon": 'fa-user-slash', - "color": 'bg-danger' - }, - 'unexile_user': { - "str": 'unexiled user {self.target_link}', - "icon": 'fa-user', - "color": 'bg-success' - }, - 'make_mod': { - "str": 'made {self.target_link} a mod', - "icon": 'fa-user-crown', - "color": 'bg-success' - }, - 'remove_mod': { - "str": 'removed {self.target_link} as mod', - "icon": 'fa-user-crown', - "color": 'bg-danger' - }, - 'kick_post': { - "str": 'kicked post {self.target_link}', - "icon": 'fa-feather-alt', - "color": 'bg-danger' - }, - 'move_chudrama': { - "str": 'moved post {self.target_link} to /h/chudrama', - "icon": 'fa-feather-alt', - "color": 'bg-danger' - }, - 'flair_post': { - "str": 'set a flair on {self.target_link}', - "icon": 'fa-tag', - "color": 'bg-primary' - }, - 'edit_sidebar': { - "str": 'edited the sidebar', - "icon": 'fa-columns', - "color": 'bg-primary' - }, - 'edit_css': { - "str": 'edited the css', - "icon": 'fa-css3-alt', - "color": 'bg-primary' - }, - 'change_banner': { - "str": 'changed the banner', - "icon": 'fa-landscape', - "color": 'bg-primary' - }, - 'change_sidebar_image': { - "str": 'changed the sidebar image', - "icon": 'fa-image', - "color": 'bg-primary' - }, - 'change_marsey': { - "str": 'changed the hole marsey', - "icon": 'fa-cat', - "color": 'bg-primary' - }, - 'pin_post': { - "str": 'pinned post {self.target_link}', - "icon": 'fa-thumbtack fa-rotate--45', - "color": 'bg-success' - }, - 'unpin_post': { - "str": 'unpinned post {self.target_link}', - "icon": 'fa-thumbtack fa-rotate--45', - "color": 'bg-muted' - }, - 'pin_comment': { - "str": 'pinned {self.target_link}', - "icon": 'fa-thumbtack fa-rotate--45', - "color": 'bg-success' - }, - 'unpin_comment': { - "str": 'unpinned {self.target_link}', - "icon": 'fa-thumbtack fa-rotate--45', - "color": 'bg-muted' - }, - 'enable_stealth': { - "str": 'enabled stealth mode', - "icon": 'fa-user-ninja', - "color": 'bg-primary' - }, - 'disable_stealth': { - "str": 'disabled stealth mode', - "icon": 'fa-user-ninja', - "color": 'bg-muted' - }, - 'set_nsfw': { - "str": 'set nsfw on post {self.target_link}', - "icon": 'fa-eye-evil', - "color": 'bg-danger' - }, - 'unset_nsfw': { - "str": 'un-set nsfw on post {self.target_link}', - "icon": 'fa-eye-evil', - "color": 'bg-success' - }, - 'set_nsfw_comment': { - "str": 'set nsfw on a {self.target_link}', - "icon": 'fa-eye-evil', - "color": 'bg-danger' - }, - 'unset_nsfw_comment': { - "str": 'un-set nsfw on a {self.target_link}', - "icon": 'fa-eye-evil', - "color": 'bg-success' - }, -} +from files.helpers.config.subaction_types import SUBACTION_TYPES diff --git a/files/helpers/config/awards.py b/files/helpers/config/awards.py new file mode 100644 index 000000000..68bf3dc85 --- /dev/null +++ b/files/helpers/config/awards.py @@ -0,0 +1,729 @@ +from copy import deepcopy + + +AWARDS = { + "fallback": { + "kind": "fallback", + "title": "Unknown", + "description": "", + "icon": "fas fa-block-question", + "color": "text-white", + "price": 0, + "deflectable": False, + "cosmetic": False + }, + ### Deprecated + "ghost": { + "kind": "ghost", + "title": "Ghost", + "description": "", + "icon": "fas fa-ghost", + "color": "text-white", + "price": 3000, + "deflectable": False, + "cosmetic": False + }, + "nword": { + "kind": "nword", + "title": "Nword Pass", + "description": "", + "icon": "fas fa-edit", + "color": "text-success", + "price": 10000, + "deflectable": True, + "cosmetic": False + }, + ### Fistmas 2021 + "snow": { + "kind": "snow", + "title": "Snow", + "description": "", + "icon": "fas fa-snowflake", + "color": "text-blue-200", + "price": 300, + "deflectable": False, + "cosmetic": True + }, + "gingerbread": { + "kind": "gingerbread", + "title": "Gingerbread", + "description": "", + "icon": "fas fa-gingerbread-man", + "color": "", + "price": 300, + "deflectable": False, + "cosmetic": True + }, + "lights": { + "kind": "lights", + "title": "Lights", + "description": "", + "icon": "fas fa-lights-holiday", + "color": "", + "price": 300, + "deflectable": False, + "cosmetic": True + }, + "candycane": { + "kind": "candycane", + "title": "Candy Cane", + "description": "", + "icon": "fas fa-candy-cane", + "color": "", + "price": 400, + "deflectable": False, + "cosmetic": True + }, + "fireplace": { + "kind": "fireplace", + "title": "Fireplace", + "description": "", + "icon": "fas fa-fireplace", + "color": "", + "price": 600, + "deflectable": False, + "cosmetic": True + }, + "grinch": { + "kind": "grinch", + "title": "Grinch", + "description": "", + "icon": "fas fa-angry", + "color": "text-green-500", + "price": 1000, + "deflectable": True, + "cosmetic": False + }, + ### Homoween 2021 & 2022 + "haunt": { + "kind": "haunt", + "title": "Haunt", + "description": "", + "icon": "fas fa-book-dead", + "color": "text-warning", + "price": 500, + "deflectable": False, + "cosmetic": True + }, + "upsidedown": { + "kind": "upsidedown", + "title": "The Upside Down", + "description": "", + "icon": "fas fa-lights-holiday", + "color": "", + "price": 400, + "deflectable": False, + "cosmetic": True + }, + "stab": { + "kind": "stab", + "title": "Stab", + "description": "", + "icon": "fas fa-knife-kitchen", + "color": "text-danger", + "price": 300, + "deflectable": False, + "cosmetic": True + }, + "spiders": { + "kind": "spiders", + "title": "Spiders", + "description": "", + "icon": "fas fa-spider", + "color": "text-black", + "price": 200, + "deflectable": False, + "cosmetic": True + }, + "fog": { + "kind": "fog", + "title": "Fog", + "description": "", + "icon": "fas fa-smoke", + "color": "text-gray", + "price": 200, + "deflectable": False, + "cosmetic": True + }, + ### Homoween 2022 + "jumpscare": { + "kind": "jumpscare", + "title": "Jumpscare", + "description": "", + "icon": "fas fa-coffin-cross", + "color": "text-purple", + "price": 600, + "deflectable": True, + "cosmetic": False + }, + "hw-bite": { + "kind": "hw-bite", + "title": "Zombie Bite", + "description": "", + "icon": "fas fa-biohazard", + "color": "text-danger", + "price": 500, + "deflectable": True, + "cosmetic": False + }, + "hw-vax": { + "kind": "hw-vax", + "title": "Vaxxmaxx", + "description": "", + "icon": "fas fa-syringe", + "color": "text-blue", + "price": 500, + "deflectable": True, + "cosmetic": False + }, + "hw-grinch": { + "kind": "hw-grinch", + "title": "Hallowgrinch", + "description": "", + "icon": "fas fa-angry", + "color": "text-orange", + "price": 1000, + "deflectable": True, + "cosmetic": False + }, + "flashlight": { + "kind": "flashlight", + "title": "Flashlight", + "description": "", + "icon": "fas fa-flashlight", + "color": "text-black", + "price": 400, + "deflectable": False, + "cosmetic": True + }, + "candy-corn": { + "kind": "candy-corn", + "title": "Candy Corn", + "description": "", + "icon": "fas fa-candy-corn", + "color": "text-orange", + "price": 400, + "deflectable": False, + "cosmetic": True + }, + "ectoplasm": { + "kind": "ectoplasm", + "title": "Ectoplasm", + "description": "", + "icon": "fas fa-ghost", + "color": "text-success", + "price": 400, + "deflectable": False, + "cosmetic": True + }, + "bones": { + "kind": "bones", + "title": "Bones", + "description": "", + "icon": "fas fa-bone", + "color": "text-white", + "price": 200, + "deflectable": False, + "cosmetic": True + }, + "pumpkin": { + "kind": "pumpkin", + "title": "Pumpkin", + "description": "", + "icon": "fas fa-jack-o-lantern", + "color": "text-orange", + "price": 200, + "deflectable": False, + "cosmetic": True + }, + ### Standard + "marsify": { + "kind": "marsify", + "title": "Marsify", + "description": "Marsifies the recipient's comments for 24 hours.", + "icon": "fas fa-cat", + "color": "text-white", + "price": 150, + "deflectable": True, + "cosmetic": False + }, + "shit": { + "kind": "shit", + "title": "Shit", + "description": "Makes flies swarm the post.", + "icon": "fas fa-poop", + "color": "text-black-50", + "price": 150, + "deflectable": False, + "cosmetic": True + }, + "fireflies": { + "kind": "fireflies", + "title": "Fireflies", + "description": "Makes fireflies swarm the post.", + "icon": "fas fa-sparkles", + "color": "text-warning", + "price": 150, + "deflectable": False, + "cosmetic": True + }, + "train": { + "kind": "train", + "title": "Train", + "description": "Summons a train on the post.", + "icon": "fas fa-train", + "color": "text-pink", + "price": 150, + "deflectable": False, + "cosmetic": True + }, + "scooter": { + "kind": "scooter", + "title": "Scooter", + "description": "Summons a scooter on the post.", + "icon": "fas fa-flag-usa", + "color": "text-muted", + "price": 150, + "deflectable": False, + "cosmetic": True + }, + "wholesome": { + "kind": "wholesome", + "title": "Wholesome", + "description": "Summons a wholesome marsey on the post.", + "icon": "fas fa-smile-beam", + "color": "text-yellow", + "price": 150, + "deflectable": False, + "cosmetic": True + }, + "firework": { + "kind": "firework", + "title": "Fireworks", + "description": "Summons fireworks on the post.", + "icon": "fas fa-bahai", + "color": "text-danger", + "price": 150, + "deflectable": False, + "cosmetic": True + }, + "confetti": { + "kind": "confetti", + "title": "Confetti", + "description": "Summons confetti to fall on the post.", + "icon": "fas fa-party-horn", + "color": "text-yellow", + "price": 150, + "deflectable": False, + "cosmetic": True + }, + "ricardo": { + "kind": "ricardo", + "title": "Stripper Cake", + "description": "Summons Ricardo to dance on the post.", + "icon": "fas fa-pinata", + "color": "text-pink", + "price": 150, + "deflectable": False, + "cosmetic": True + }, + "tilt": { + "kind": "tilt", + "title": "Tilt", + "description": "Tilts the post or comment", + "icon": "fas fa-car-tilt", + "color": "text-blue", + "price": 150, + "deflectable": False, + "cosmetic": True + }, + "glowie": { + "kind": "glowie", + "title": "Glowie", + "description": "Indicates that the recipient can be seen when driving. Just run them over.", + "icon": "fas fa-user-secret", + "color": "text-green", + "price": 150, + "deflectable": False, + "cosmetic": True + }, + "rehab": { + "kind": "rehab", + "title": "Rehab", + "description": "Prevents the user from gambling for 24 hours in a last ditch effort to save them from themself.", + "icon": "fas fa-dice-six", + "color": "text-black", + "price": 777, + "deflectable": True, + "cosmetic": False + }, + "agendaposter": { + "kind": "agendaposter", + "title": "Chud", + "description": "Chuds the recipient for 24 hours.", + "icon": "fas fa-snooze", + "color": "text-purple", + "price": 1000, + "deflectable": True, + "cosmetic": False + }, + "offsitementions": { + "kind": "offsitementions", + "title": "Y'all Seein' Eye", + "description": "Gives the recipient access to notifications when people off-site talk about us.", + "icon": "fas fa-eyes", + "color": "text-orange", + "price": 1000, + "deflectable": True, + "cosmetic": False + }, + "lootbox": { + "kind": "lootbox", + "title": "Lootbox", + "description": "", + "icon": "fas fa-box-open", + "color": "text-blue", + "price": 1000, + "deflectable": True, + "cosmetic": False + }, + "beano": { + "kind": "beano", + "title": "Beano", + "description": "Stops you from embarrassing yourself with your flatulence", + "icon": "fas fa-gas-pump-slash", + "color": "text-green", + "price": 1000, + "deflectable": True, + "cosmetic": False + }, + "unpin": { + "kind": "unpin", + "title": "Unpin", + "description": "Removes 1 hour from the pin duration of a post or 6 hours from the pin duration of a comment.", + "icon": "fas fa-thumbtack fa-rotate--45", + "color": "text-black", + "price": 1000, + "deflectable": False, + "cosmetic": False + }, + "flairlock": { + "kind": "flairlock", + "title": "1-Day Flairlock", + "description": "Sets a flair for the recipient and locks it for 24 hours.", + "icon": "fas fa-lock", + "color": "text-black", + "price": 1250, + "deflectable": True, + "cosmetic": False + }, + "pin": { + "kind": "pin", + "title": "Pin", + "description": "Pins a post for 1 hour or a comment for 6 hours.", + "icon": "fas fa-thumbtack fa-rotate--45", + "color": "text-warning", + "price": 1500, + "deflectable": False, + "cosmetic": False + }, + "progressivestack": { + "kind": "progressivestack", + "title": "Progressive Stack", + "description": "Makes votes on the recipient's posts and comments weigh double in the ranking algorithm for 6 hours.", + "icon": "fas fa-bullhorn", + "color": "text-danger", + "price": 1500, + "deflectable": True, + "cosmetic": False + }, + "pizzashill": { + "kind": "pizzashill", + "title": "Pizzashill", + "description": "Forces the recipient to make all posts/comments > 280 characters for 24 hours.", + "icon": "fas fa-pizza-slice", + "color": "text-orange", + "price": 1500, + "deflectable": True, + "cosmetic": False + }, + "bird": { + "kind": "bird", + "title": "Bird Site", + "description": "Forces the recipient to make all posts/comments < 140 characters for 24 hours.", + "icon": "fab fa-twitter", + "color": "text-blue", + "price": 1500, + "deflectable": True, + "cosmetic": False + }, + "spider": { + "kind": "spider", + "title": "Spider!", + "description": f"Summons a spider to terrorize the recipient for 24 hours.", + "icon": "fas fa-spider", + "color": "text-brown", + "price": 2000, + "deflectable": True, + "cosmetic": False + }, + "deflector": { + "kind": "deflector", + "title": "Deflector", + "description": "Causes most awards received for the next 10 hours to be deflected back at their giver.", + "icon": "fas fa-shield", + "color": "text-pink", + "price": 2750, + "deflectable": True, + "cosmetic": False + }, + "marsey": { + "kind": "marsey", + "title": "Marsey", + "description": "Makes the recipient unable to post/comment anything but marsey emojis for 24 hours.", + "icon": "fas fa-cat", + "color": "text-orange", + "price": 3000, + "deflectable": True, + "cosmetic": False + }, + "ban": { + "kind": "ban", + "title": "1-Day Ban", + "description": "Bans the recipient for a day.", + "icon": "fas fa-gavel", + "color": "text-danger", + "price": 3000, + "deflectable": True, + "cosmetic": False + }, + "unban": { + "kind": "unban", + "title": "1-Day Unban", + "description": "Removes 1 day from the ban duration of the recipient.", + "icon": "fas fa-gavel", + "color": "text-success", + "price": 3500, + "deflectable": True, + "cosmetic": False + }, + "benefactor": { + "kind": "benefactor", + "title": "Benefactor", + "description": f"Grants one month of {patron} status and 2500 marseybux to the recipient. Cannot be used on yourself.", + "icon": "fas fa-gift", + "color": "text-blue", + "price": 4000, + "deflectable": False, + "cosmetic": False + }, + "grass": { + "kind": "grass", + "title": "Grass", + "description": "Ban the recipient for 30 days (if they provide a timestamped picture of them touching grass/snow/sand/ass to the admins, they will get unbanned immediately)", + "icon": "fas fa-seedling", + "color": "text-success", + "price": 10000, + "deflectable": True, + "cosmetic": False + }, + "eye": { + "kind": "eye", + "title": "All-Seeing Eye", + "description": "Gives the recipient the ability to view private profiles.", + "icon": "fas fa-eye", + "color": "text-silver", + "price": 10000, + "deflectable": True, + "cosmetic": False + }, + "unblockable": { + "kind": "unblockable", + "title": "Unblockable", + "description": "Makes the recipient unblockable and removes all blocks on them.", + "icon": "fas fa-laugh-squint", + "color": "text-lightgreen", + "price": 20000, + "deflectable": True, + "cosmetic": False + }, + "fish": { + "kind": "fish", + "title": "Fish", + "description": "This user cannot be unfollowed", + "icon": "fas fa-fish", + "color": "text-lightblue", + "price": 20000, + "deflectable": True, + "cosmetic": False + }, + "pause": { + "kind": "pause", + "title": "Pause", + "description": "Gives the recipient the ability to pause profile anthems.", + "icon": "fas fa-volume-mute", + "color": "text-danger", + "price": 20000, + "deflectable": True, + "cosmetic": False + }, + "unpausable": { + "kind": "unpausable", + "title": "Unpausable", + "description": "Makes the profile anthem of the recipient unpausable.", + "icon": "fas fa-volume", + "color": "text-success", + "price": 40000, + "deflectable": True, + "cosmetic": False + }, + "alt": { + "kind": "alt", + "title": "Alt-Seeing Eye", + "description": "Gives the recipient the ability to view alts.", + "icon": "fas fa-eye", + "color": "text-gold", + "price": 50000, + "deflectable": True, + "cosmetic": False + }, + "checkmark": { + "kind": "checkmark", + "title": "Checkmark", + "description": "Gives the recipient a checkmark.", + "icon": "fas fa-badge-check", + "color": "checkmark", + "price": 50000, + "deflectable": True, + "cosmetic": False + }, +} + +if SITE_NAME != 'rDrama': + EXTRA_AWARDS = { + "owoify": { + "kind": "owoify", + "title": "OwOify", + "description": "OwOifies the recipient's comments for 6 hours.", + "icon": "fas fa-paw-simple", + "color": "text-purple", + "price": 400, + "deflectable": True, + "cosmetic": False + }, + "rainbow": { + "kind": "rainbow", + "title": "Rainbow", + "description": "Makes the recipient's comments and posts in rainbow text for 24 hours.", + "icon": "fas fa-cloud-rainbow", + "color": "text-pink", + "price": 400, + "deflectable": True, + "cosmetic": False + }, + } + AWARDS.update(EXTRA_AWARDS) + +if SITE_NAME == 'PCM': + PCM_AWARDS = { + "croag": { + "kind": "croag", + "title": "Croag", + "description": "Summons Croag on the post.", + "icon": "fas fa-head-side", + "color": "text-gold", + "price": 150, + "deflectable": False, + "cosmetic": True + }, + "toe": { + "kind": "toe", + "title": "Toe Hype", + "description": "Summons Blade's toe on the post.", + "icon": "fas fa-socks", + "color": "text-blue", + "price": 150, + "deflectable": False, + "cosmetic": True + }, + "crab": { + "kind": "crab", + "title": "Crab", + "description": "Rave time!", + "icon": "fas fa-crab", + "color": "text-danger", + "price": 4000, + "deflectable": False, + "cosmetic": True + } + } + AWARDS.update(PCM_AWARDS) + +# Permit only cosmetics and pin/unpin on ghosted things. +for award in AWARDS: + AWARDS[award]['ghost'] = AWARDS[award]['cosmetic'] +AWARDS['pin']['ghost'] = True +AWARDS['unpin']['ghost'] = True + +# Disable unused awards, and site-specific award inclusion/exclusion. +AWARDS_DISABLED = [ + 'fallback', 'ghost', 'nword', 'lootbox', # Generic + 'snow', 'gingerbread', 'lights', 'candycane', 'fireplace', 'grinch', # Fistmas + 'haunt', 'upsidedown', 'stab', 'spiders', 'fog', # Homoween '21 + 'jumpscare', 'hw-bite', 'hw-vax', 'hw-grinch', 'flashlight', # Homoween '22 + 'candy-corn', 'ectoplasm', 'bones', 'pumpkin', # Homoween '22 (cont'd) +] + + +HOUSE_AWARDS = { + "Furry": { + "kind": "Furry", + "title": "OwOify", + "description": "OwOifies the recipient's comments for 6 hours.", + "icon": "fas fa-paw-simple", + "color": "text-purple", + "price": 400, + "deflectable": True, + "cosmetic": False, + "ghost": False, + }, + "Femboy": { + "kind": "Femboy", + "title": "Rainbow", + "description": "Makes the recipient's comments and posts in rainbow text for 24 hours.", + "icon": "fas fa-cloud-rainbow", + "color": "text-pink", + "price": 400, + "deflectable": True, + "cosmetic": False, + "ghost": False, + }, + "Vampire": { + "kind": "Vampire", + "title": "Bite", + "description": "Turns the recipient into a vampire for 2 days.", + "icon": "fas fa-bat", + "color": "text-gray", + "price": 400, + "deflectable": True, + "cosmetic": False, + "ghost": False, + }, + "Racist": { + "kind": "Racist", + "title": "Early Life", + "description": "Checks the recipient's Early Life section on Wikipedia. Notices.", + "icon": "fas fa-star-of-david", + "color": "text-yellow", + "price": 400, + "deflectable": True, + "cosmetic": False, + "ghost": False, + }, +} + +temp = deepcopy(HOUSE_AWARDS).items() +for k, val in temp: + HOUSE_AWARDS[f'{k} Founder'] = val + HOUSE_AWARDS[f'{k} Founder']['kind'] += ' Founder' + HOUSE_AWARDS[f'{k} Founder']['price'] = int(HOUSE_AWARDS[f'{k} Founder']['price'] * 0.75) diff --git a/files/helpers/config/modaction_types.py b/files/helpers/config/modaction_types.py new file mode 100644 index 000000000..d6378e987 --- /dev/null +++ b/files/helpers/config/modaction_types.py @@ -0,0 +1,337 @@ +from copy import deepcopy + +MODACTION_TYPES = { + 'chud': { + "str": 'chudded {self.target_link}', + "icon": 'fa-snooze', + "color": 'bg-danger' + }, + 'approve_app': { + "str": 'approved an application by {self.target_link}', + "icon": 'fa-robot', + "color": 'bg-success' + }, + 'badge_grant': { + "str": 'granted badge to {self.target_link}', + "icon": 'fa-badge', + "color": 'bg-success' + }, + 'badge_remove': { + "str": 'removed badge from {self.target_link}', + "icon": 'fa-badge', + "color": 'bg-danger' + }, + 'ban_comment': { + "str": 'removed {self.target_link}', + "icon": 'fa-comment', + "color": 'bg-danger' + }, + 'ban_domain': { + "str": 'banned a domain', + "icon": 'fa-globe', + "color": 'bg-danger' + }, + 'ban_post': { + "str": 'removed post {self.target_link}', + "icon": 'fa-feather-alt', + "color": 'bg-danger' + }, + 'ban_user': { + "str": 'banned user {self.target_link}', + "icon": 'fa-user-slash', + "color": 'bg-danger' + }, + 'delete_report': { + "str": 'deleted report on {self.target_link}', + "icon": 'fa-flag', + "color": 'bg-danger' + }, + 'disable_bots': { + "str": 'disabled bots', + "icon": 'fa-robot', + "color": 'bg-danger' + }, + 'disable_fart_mode': { + "str": 'disabled fart mode', + "icon": 'fa-gas-pump-slash', + "color": 'bg-danger' + }, + 'disable_read_only_mode': { + "str": 'disabled read only mode', + "icon": 'fa-book', + "color": 'bg-danger' + }, + 'disable_signups': { + "str": 'disabled signups', + "icon": 'fa-users', + "color": 'bg-danger' + }, + 'disable_login_required': { + "str": 'disabled login required', + "icon": 'fa-users', + "color": 'bg-danger' + }, + 'disable_under_attack': { + "str": 'disabled under attack mode', + "icon": 'fa-shield', + "color": 'bg-muted' + }, + 'disable_under_siege': { + "str": 'disabled under siege mode', + "icon": 'fa-shield', + "color": 'bg-muted' + }, + 'distinguish_comment': { + "str": 'distinguished {self.target_link}', + "icon": 'fa-crown', + "color": 'bg-success' + }, + 'distinguish_post': { + "str": 'distinguished {self.target_link}', + "icon": 'fa-crown', + "color": 'bg-success' + }, + 'distribute': { + "str": 'distributed bet winnings to voters on {self.target_link}', + "icon": 'fa-dollar-sign', + "color": 'bg-success' + }, + 'clear_internal_cache': { + "str": 'cleared internal cache', + "icon": 'fa-trash-alt', + "color": 'bg-muted' + }, + 'edit_post': { + "str": 'edited {self.target_link}', + "icon": 'fa-edit', + "color": 'bg-primary' + }, + 'edit_rules': { + "str": 'edited the rules', + "icon": 'fa-columns', + "color": 'bg-primary' + }, + 'enable_bots': { + "str": 'enabled bots', + "icon": 'fa-robot', + "color": 'bg-success' + }, + 'enable_fart_mode': { + "str": 'enabled fart mode', + "icon": 'fa-gas-pump', + "color": 'bg-success' + }, + 'enable_read_only_mode': { + "str": 'enabled read only mode', + "icon": 'fa-book', + "color": 'bg-success' + }, + 'enable_signups': { + "str": 'enabled signups', + "icon": 'fa-users', + "color": 'bg-success' + }, + 'enable_login_required': { + "str": 'enabled login required', + "icon": 'fa-users', + "color": 'bg-success' + }, + 'enable_under_attack': { + "str": 'enabled under attack mode', + "icon": 'fa-shield', + "color": 'bg-success' + }, + 'enable_under_siege': { + "str": 'enabled under siege mode', + "icon": 'fa-shield', + "color": 'bg-success', + }, + 'flair_post': { + "str": 'set a flair on {self.target_link}', + "icon": 'fa-tag', + "color": 'bg-primary' + }, + 'link_accounts': { + "str": 'linked {self.target_link}', + "icon": 'fa-link', + "color": 'bg-success' + }, + 'delink_accounts': { + "str": 'delinked {self.target_link}', + "icon": 'fa-link-slash', + "color": 'bg-danger' + }, + 'make_admin': { + "str": 'made {self.target_link} an admin', + "icon": 'fa-user-crown', + "color": 'bg-success' + }, + 'mod_mute_user': { + "str": 'muted reports from user {self.target_link}', + "icon": 'fa-file-signature', + "color": 'bg-danger' + }, + 'mod_unmute_user': { + "str": 'unmuted reports from user {self.target_link}', + "icon": 'fa-file-signature', + "color": 'bg-success' + }, + 'monthly': { + "str": 'distributed monthly marseybux', + "icon": 'fa-sack-dollar', + "color": 'bg-success' + }, + 'move_hole': { + "str": 'changed hole of {self.target_link}', + "icon": 'fa-manhole', + "color": 'bg-primary' + }, + 'nuke_user': { + "str": 'removed all content of {self.target_link}', + "icon": 'fa-radiation-alt', + "color": 'bg-danger' + }, + 'pin_comment': { + "str": 'pinned {self.target_link}', + "icon": 'fa-thumbtack fa-rotate--45', + "color": 'bg-success' + }, + 'pin_post': { + "str": 'pinned post {self.target_link}', + "icon": 'fa-thumbtack fa-rotate--45', + "color": 'bg-success' + }, + 'clear_cloudflare_cache': { + "str": 'cleared cloudflare cache', + "icon": 'fab fa-cloudflare', + "color": 'bg-muted' + }, + 'reject_app': { + "str": 'rejected an application request by {self.target_link}', + "icon": 'fa-robot', + "color": 'bg-muted' + }, + 'remove_admin': { + "str": 'removed {self.target_link} as admin', + "icon": 'fa-user-crown', + "color": 'bg-danger' + }, + 'revert': { + "str": 'reverted {self.target_link} mod actions', + "icon": 'fa-history', + "color": 'bg-danger' + }, + 'revoke_app': { + "str": 'revoked an application by {self.target_link}', + "icon": 'fa-robot', + "color": 'bg-muted' + }, + 'set_flair_locked': { + "str": "set {self.target_link}'s flair (locked)", + "icon": 'fa-award', + "color": 'bg-primary' + }, + 'set_flair_notlocked': { + "str": "set {self.target_link}'s flair (not locked)", + "icon": 'fa-award', + "color": 'bg-primary' + }, + 'set_nsfw': { + "str": 'set nsfw on post {self.target_link}', + "icon": 'fa-eye-evil', + "color": 'bg-danger' + }, + 'set_nsfw_comment': { + "str": 'set nsfw on a {self.target_link}', + "icon": 'fa-eye-evil', + "color": 'bg-danger' + }, + 'shadowban': { + "str": 'shadowbanned {self.target_link}', + "icon": 'fa-eye-slash', + "color": 'bg-danger' + }, + 'unchud': { + "str": 'unchudded {self.target_link}', + "icon": 'fa-snooze', + "color": 'bg-success' + }, + 'unban_comment': { + "str": 'reinstated {self.target_link}', + "icon": 'fa-comment', + "color": 'bg-success' + }, + 'unban_domain': { + "str": 'unbanned a domain', + "icon": 'fa-globe', + "color": 'bg-success' + }, + 'unban_post': { + "str": 'reinstated post {self.target_link}', + "icon": 'fa-feather-alt', + "color": 'bg-success' + }, + 'unban_user': { + "str": 'unbanned user {self.target_link}', + "icon": 'fa-user', + "color": 'bg-success' + }, + 'undistinguish_comment': { + "str": 'un-distinguished {self.target_link}', + "icon": 'fa-crown', + "color": 'bg-muted' + }, + 'undistinguish_post': { + "str": 'un-distinguished {self.target_link}', + "icon": 'fa-crown', + "color": 'bg-muted' + }, + 'unnuke_user': { + "str": 'approved all content of {self.target_link}', + "icon": 'fa-radiation-alt', + "color": 'bg-success' + }, + 'unpin_comment': { + "str": 'unpinned {self.target_link}', + "icon": 'fa-thumbtack fa-rotate--45', + "color": 'bg-muted' + }, + 'unpin_post': { + "str": 'unpinned post {self.target_link}', + "icon": 'fa-thumbtack fa-rotate--45', + "color": 'bg-muted' + }, + 'unset_nsfw': { + "str": 'un-set nsfw on post {self.target_link}', + "icon": 'fa-eye-evil', + "color": 'bg-success' + }, + 'unset_nsfw_comment': { + "str": 'un-set nsfw on a {self.target_link}', + "icon": 'fa-eye-evil', + "color": 'bg-success' + }, + 'unshadowban': { + "str": 'unshadowbanned {self.target_link}', + "icon": 'fa-eye', + "color": 'bg-success' + }, + 'update_hat': { + "str": 'updated hat image', + "icon": 'fa-hat-cowboy', + "color": 'bg-success' + }, + 'update_marsey': { + "str": 'updated marsey', + "icon": 'fa-cat', + "color": 'bg-success' + }, +} + +MODACTION_PRIVILEGED_TYPES = {'shadowban', 'unshadowban', + 'mod_mute_user', 'mod_unmute_user', + 'link_accounts', 'delink_accounts'} + +MODACTION_TYPES_FILTERED = deepcopy({t:v for t,v in MODACTION_TYPES.items() if not t in MODACTION_PRIVILEGED_TYPES}) +MODACTION_TYPES_FILTERED.pop("shadowban") +MODACTION_TYPES_FILTERED.pop("unshadowban") diff --git a/files/helpers/config/subaction_types.py b/files/helpers/config/subaction_types.py new file mode 100644 index 000000000..6f8061e40 --- /dev/null +++ b/files/helpers/config/subaction_types.py @@ -0,0 +1,117 @@ +SUBACTION_TYPES = { + 'exile_user': { + "str": 'exiled user {self.target_link}', + "icon": 'fa-user-slash', + "color": 'bg-danger' + }, + 'unexile_user': { + "str": 'unexiled user {self.target_link}', + "icon": 'fa-user', + "color": 'bg-success' + }, + 'make_mod': { + "str": 'made {self.target_link} a mod', + "icon": 'fa-user-crown', + "color": 'bg-success' + }, + 'remove_mod': { + "str": 'removed {self.target_link} as mod', + "icon": 'fa-user-crown', + "color": 'bg-danger' + }, + 'kick_post': { + "str": 'kicked post {self.target_link}', + "icon": 'fa-feather-alt', + "color": 'bg-danger' + }, + 'move_chudrama': { + "str": 'moved post {self.target_link} to /h/chudrama', + "icon": 'fa-feather-alt', + "color": 'bg-danger' + }, + 'flair_post': { + "str": 'set a flair on {self.target_link}', + "icon": 'fa-tag', + "color": 'bg-primary' + }, + 'edit_sidebar': { + "str": 'edited the sidebar', + "icon": 'fa-columns', + "color": 'bg-primary' + }, + 'edit_css': { + "str": 'edited the css', + "icon": 'fa-css3-alt', + "color": 'bg-primary' + }, + 'upload_banner': { + "str": 'uploaded a banner', + "icon": 'fa-landscape', + "color": 'bg-primary' + }, + 'delete_banner': { + "str": 'deleted banner', + "icon": 'fa-image-slash', + "color": 'bg-danger', + }, + 'change_sidebar_image': { + "str": 'changed the sidebar image', + "icon": 'fa-image', + "color": 'bg-primary' + }, + 'change_marsey': { + "str": 'changed the hole marsey', + "icon": 'fa-cat', + "color": 'bg-primary' + }, + 'pin_post': { + "str": 'pinned post {self.target_link}', + "icon": 'fa-thumbtack fa-rotate--45', + "color": 'bg-success' + }, + 'unpin_post': { + "str": 'unpinned post {self.target_link}', + "icon": 'fa-thumbtack fa-rotate--45', + "color": 'bg-muted' + }, + 'pin_comment': { + "str": 'pinned {self.target_link}', + "icon": 'fa-thumbtack fa-rotate--45', + "color": 'bg-success' + }, + 'unpin_comment': { + "str": 'unpinned {self.target_link}', + "icon": 'fa-thumbtack fa-rotate--45', + "color": 'bg-muted' + }, + 'enable_stealth': { + "str": 'enabled stealth mode', + "icon": 'fa-user-ninja', + "color": 'bg-primary' + }, + 'disable_stealth': { + "str": 'disabled stealth mode', + "icon": 'fa-user-ninja', + "color": 'bg-muted' + }, + 'set_nsfw': { + "str": 'set nsfw on post {self.target_link}', + "icon": 'fa-eye-evil', + "color": 'bg-danger' + }, + 'unset_nsfw': { + "str": 'un-set nsfw on post {self.target_link}', + "icon": 'fa-eye-evil', + "color": 'bg-success' + }, + 'set_nsfw_comment': { + "str": 'set nsfw on a {self.target_link}', + "icon": 'fa-eye-evil', + "color": 'bg-danger' + }, + 'unset_nsfw_comment': { + "str": 'un-set nsfw on a {self.target_link}', + "icon": 'fa-eye-evil', + "color": 'bg-success' + }, +} diff --git a/files/helpers/const.py b/files/helpers/const.py index fef7460a9..879e7d6e2 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -72,9 +72,6 @@ SESSION_LIFETIME = 60 * 60 * 24 * 365 CASINO_RELEASE_DAY = 1662825600 -if SITE_NAME == 'rDrama': patron = 'Paypig' -else: patron = 'Patron' - AJ_REPLACEMENTS = { ' your ': " you're ", ' to ': " too ", @@ -183,11 +180,12 @@ profanity_single_words = "|".join([profanity.lower() for profanity in PROFANITIE LONGPOST_REPLIES = ('Wow, you must be a JP fan.', 'This is one of the worst posts I have EVER seen. Delete it.', "No, don't reply like this, please do another wall of unhinged rant please.", '
Hi @{username},
Your {type} has been automatically removed because you forgot to include {AGENDAPOSTER_PHRASE}
.
Use this form to contact {{SITE_NAME}} Admins.
diff --git a/files/templates/default.html b/files/templates/default.html index 7be3cdd86..add1c26c2 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -9,8 +9,8 @@ {% else %} {% if err and SITE_NAME == 'rDrama' %} {% set src = "banner_error.webp" | asset_siteimg %} - {% elif sub %} - {% set src = sub.banner_url %} + {% elif sub and sub.has_banners %} + {% set src = sub.random_banner() %} {% set alt = ['/h/', sub, 'banner']|join %} {% set class = 'site-banner-hole' %} {% elif SITE_NAME == "rDrama" %} diff --git a/files/templates/live.html b/files/templates/live.html index 71485c267..0a14473f2 100644 --- a/files/templates/live.html +++ b/files/templates/live.html @@ -19,28 +19,8 @@ } - {% if error %} -{% block authtext %}{% endblock %}
- {% if error %} -