Compare commits
1 Commits
b243fe1b31
...
5ea5020a16
Author | SHA1 | Date | |
---|---|---|---|
5ea5020a16 |
|
@ -28,17 +28,16 @@ def qm_only(msg=""):
|
||||||
def _nop(*args, **kwargs):
|
def _nop(*args, **kwargs):
|
||||||
data = args[0]
|
data = args[0]
|
||||||
room = data.get("room")
|
room = data.get("room")
|
||||||
res = db.get_quest_meta(quest_id=room)
|
res = db.get_quest_meta(room)
|
||||||
if not res:
|
if not res:
|
||||||
return msg
|
return msg
|
||||||
if session.get("user_id") != res[3]:
|
if session.get("user_id") != res[2]:
|
||||||
return msg
|
return msg
|
||||||
return func(*args, **kwargs)
|
return func(*args, **kwargs)
|
||||||
return _nop
|
return _nop
|
||||||
return actual_decorator
|
return actual_decorator
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@socketio.on('joined')
|
@socketio.on('joined')
|
||||||
def joined(data):
|
def joined(data):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -5,7 +5,7 @@ var tid = setInterval( function () {
|
||||||
clearInterval( tid );
|
clearInterval( tid );
|
||||||
|
|
||||||
document.getElementById('chatWindow').scrollTop = document.getElementById('chatWindow').scrollHeight;
|
document.getElementById('chatWindow').scrollTop = document.getElementById('chatWindow').scrollHeight;
|
||||||
socket = io.connect('https://' + document.domain + '/anonkun:' + location.port);
|
socket = io.connect('https://' + document.domain + location.port);
|
||||||
socket.on('connect', function() {
|
socket.on('connect', function() {
|
||||||
socket.emit('joined', {room: room_id});
|
socket.emit('joined', {room: room_id});
|
||||||
});
|
});
|
||||||
|
@ -223,7 +223,6 @@ function makePost() {
|
||||||
let text = qparea.value.trim();
|
let text = qparea.value.trim();
|
||||||
qparea.value = '';
|
qparea.value = '';
|
||||||
if (text == '') { return; }
|
if (text == '') { return; }
|
||||||
console.log(page_num);
|
|
||||||
socket.emit('new_post', {post: text, page_num: page_num, room: room_id});
|
socket.emit('new_post', {post: text, page_num: page_num, room: room_id});
|
||||||
}
|
}
|
||||||
function edit_post(post_id) {
|
function edit_post(post_id) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user