luaconsole.cpp has been removed. Ascii driver is still sending text via stdin, but it is now ignored. So in ascii mode, commands are currently not interpreted.

This commit is contained in:
2025-12-16 00:34:30 -05:00
parent c0bcb1099b
commit f75ff36c3d
9 changed files with 21 additions and 288 deletions

View File

@@ -47,16 +47,11 @@
#include "luastack.hpp"
class LuaConsole : public eng::nevernew {
public:
using StringVec = eng::vector<eng::string>;
class LuaConsole {
private:
lua_State *lua_state_;
eng::string raw_input_;
int lines_;
eng::string prompt_;
StringVec words_;
void clear_raw_input();
@@ -79,40 +74,4 @@ public:
void add(eng::string line);
};
//////////////////////////////////////////////////////
//
// CommonCommands is parses slash-commands that are understood by
// lpxclient and lpxserver. That way, these two separate
// sourcefiles don't have to duplicate the code for parsing.
//
// After parsing, this module calls a virtual function
// to execute the command. lpxserver and lpxclient
// implement these virtual functions in different ways.
//
//////////////////////////////////////////////////////
class CommonCommands {
public:
using StringVec = eng::vector<eng::string>;
protected:
virtual void do_syntax_error(std::string_view error) = 0;
virtual void do_unknown_command(std::string_view name) = 0;
virtual void do_view_command() = 0;
virtual void do_moveto_command(int x, int y) = 0;
virtual void do_quit_command() = 0;
virtual void do_cpl_command() = 0;
virtual void do_work_command() = 0;
virtual void do_display_command() = 0;
virtual void do_aborthttp_command() = 0;
virtual void do_connect_command(std::string_view hostname) = 0;
virtual void do_luainvoke_command(std::string_view cmd) = 0;
virtual void do_luaprobe_command(std::string_view cmd) = 0;
public:
// Parse a command and call one of the virtual command functions above.
//
void do_command(const StringVec &command);
};
#endif // LUACONSOLE_HPP