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