| Server IP : 157.230.181.24 / Your IP : 216.73.217.11 Web Server : Apache/2.4.58 (Ubuntu) System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64 User : ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /proc/self/root/opt/aim-bots/ |
Upload File : |
"""Persist AIM profile HTML to Open OSCAR Server SQLite + helpers."""
from __future__ import annotations
import sqlite3
import time
from pathlib import Path
DEFAULT_DB = Path("/var/lib/ras/oscar.sqlite")
PROFILES = {
"magus5311": """<BODY BGCOLOR="#000080"><FONT COLOR="#0000ff" FACE="Trebuchet MS" SIZE="2"><B>Magus5311</B><BR><BR><I>help</I><BR><BR><B>shows w/ the crew:</B><BR>maylene / haste the day / chariot / norma jean<BR>emery / he is legend / showbread<BR><BR>malachi . andrew . lydia . amy . keefe . charles . dag<BR><BR>/b/ . explosm . american idle<BR><BR>probably on.<BR></FONT></BODY>""",
"soewaslike": """<FONT COLOR="#208fa4" FACE="Lucida Console" SIZE="2"><B>so E was like</B><BR><BR>bored.<BR>firefox is stupid.<BR>simpsons >>> homework<BR><BR><I>pe@ce bro</I><BR><BR>im always on lol<BR>msg me<BR></FONT>""",
}
def persist_aim_profile(
screen_name: str,
html: str,
db_path: Path = DEFAULT_DB,
mime_type: str = "text/html",
) -> None:
if not html.strip():
return
if not db_path.exists():
raise FileNotFoundError(f"OSCAR database not found: {db_path}")
now = int(time.time())
sn = screen_name.lower()
with sqlite3.connect(str(db_path)) as con:
con.execute(
"""
INSERT INTO profile (screenName, body, mimeType, updateTime)
VALUES (?, ?, ?, ?)
ON CONFLICT (screenName)
DO UPDATE SET body = excluded.body,
mimeType = excluded.mimeType,
updateTime = excluded.updateTime
""",
(sn, html.strip(), mime_type, now),
)
con.commit()
def load_profile_from_voice(voice: dict, persona: dict) -> str:
return (voice.get("profile_html") or persona.get("profile_html") or "").strip()