diff options
-rw-r--r-- | nfsw/io.py | 3 | ||||
-rw-r--r-- | nfsw/scenes.py | 18 |
2 files changed, 18 insertions, 3 deletions
@@ -10,6 +10,7 @@ from flask import ( Blueprint, render_template, request ) + bp = Blueprint('io', __name__) @@ -51,7 +52,7 @@ def query(): # Respond. return { - 'ans': scene(q) + 'ans': scene({'q': q}) } diff --git a/nfsw/scenes.py b/nfsw/scenes.py index e2c3b00..55f443f 100644 --- a/nfsw/scenes.py +++ b/nfsw/scenes.py @@ -1,4 +1,6 @@ from nfsw.redis import redis as r, key as k +from nfsw.util import read_junk + def get_scene(name): scenes = { @@ -14,5 +16,17 @@ def current_scene(): ) -def sexshop(q): - return q + ' you are fucked' +def sexshop(o): + def intro(): + return read_junk('sexshop/intro') + + def process(q): + return '' + + if 'intro' in o: + return intro() + + if 'q' in o: + return process(o['q']) + + |