From: Christian Heller Date: Sun, 15 Nov 2020 22:51:27 +0000 (+0100) Subject: Remove client remnants of QUERY command. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/condition_titles?a=commitdiff_plain;h=4c164d8ac34965d2cc4e4e1f570c34789ec07fe1;p=plomrogue2 Remove client remnants of QUERY command. --- diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index e0f2f6a..9940094 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -689,13 +689,6 @@ class TUI: self.send('NICK ' + quote(tokens[1])) else: self.log_msg('? need login name') - #elif self.input_.startswith('/msg'): - # tokens = self.input_.split(maxsplit=2) - # if len(tokens) == 3: - # self.send('QUERY %s %s' % (quote(tokens[1]), - # quote(tokens[2]))) - # else: - # self.log_msg('? need message target and message') else: self.log_msg('? unknown command') else: diff --git a/rogue_chat_nocanvas_monochrome.html b/rogue_chat_nocanvas_monochrome.html index 7a479d0..6093f95 100644 --- a/rogue_chat_nocanvas_monochrome.html +++ b/rogue_chat_nocanvas_monochrome.html @@ -142,7 +142,6 @@ terminal.initialize(); let parser = { tokenize: function(str) { - let token_ends = []; let tokens = []; let token = '' let quoted = false; @@ -164,7 +163,6 @@ let parser = { quoted = true } else if (c === ' ') { if (token.length > 0) { - token_ends.push(i); tokens.push(token); token = ''; } @@ -175,11 +173,7 @@ let parser = { if (token.length > 0) { tokens.push(token); } - let token_starts = []; - for (let i = 0; i < token_ends.length; i++) { - token_starts.push(token_ends[i] - tokens[i].length); - }; - return [tokens, token_starts]; + return tokens; }, parse_yx: function(position_string) { let coordinate_strings = position_string.split(',') @@ -225,7 +219,7 @@ let server = { this.websocket.send(unparser.untokenize(tokens)); }, handle_event: function(event) { - let tokens = parser.tokenize(event.data)[0]; + let tokens = parser.tokenize(event.data); if (tokens[0] === 'TURN') { game.turn_complete = false; game.things = {}; @@ -661,7 +655,6 @@ let tui = { content += '[' + this.keys.switch_to_play + '] – play mode\n'; } else if (this.mode == mode_chat) { content += '/nick NAME – re-name yourself to NAME\n'; - //content += '/msg USER TEXT – send TEXT to USER\n'; content += '/' + this.keys.switch_to_play + ' or /play – switch to play mode\n'; content += '/' + this.keys.switch_to_study + ' or /study – switch to study mode\n'; } @@ -910,13 +903,6 @@ tui.inputEl.addEventListener('keydown', (event) => { } else { tui.log_msg('? need new name'); } - //} else if (tokens[0].slice(1) == 'msg') { - // if (tokens.length > 2) { - // let msg = tui.inputEl.value.slice(token_starts[2]); - // server.send(['QUERY', tokens[1], msg]); - // } else { - // tui.log_msg('? need message target and message'); - // } } else { tui.log_msg('? unknown command'); }