feat(Core/Chat): new argument parsing and unify chat hyperlink parsing (#6243)
This commit is contained in:
@@ -91,7 +91,7 @@ void RASession::Start()
|
||||
_socket.close();
|
||||
}
|
||||
|
||||
int RASession::Send(const char* data)
|
||||
int RASession::Send(std::string_view data)
|
||||
{
|
||||
std::ostream os(&_writeBuffer);
|
||||
os << data;
|
||||
@@ -206,9 +206,9 @@ bool RASession::ProcessCommand(std::string& command)
|
||||
return false;
|
||||
}
|
||||
|
||||
void RASession::CommandPrint(void* callbackArg, const char* text)
|
||||
void RASession::CommandPrint(void* callbackArg, std::string_view text)
|
||||
{
|
||||
if (!text || !*text)
|
||||
if (text.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -40,13 +40,13 @@ public:
|
||||
unsigned short GetRemotePort() const { return _socket.remote_endpoint().port(); }
|
||||
|
||||
private:
|
||||
int Send(const char* data);
|
||||
int Send(std::string_view data);
|
||||
std::string ReadString();
|
||||
bool CheckAccessLevel(const std::string& user);
|
||||
bool CheckPassword(const std::string& user, const std::string& pass);
|
||||
bool ProcessCommand(std::string& command);
|
||||
|
||||
static void CommandPrint(void* callbackArg, const char* text);
|
||||
static void CommandPrint(void* callbackArg, std::string_view text);
|
||||
static void CommandFinished(void* callbackArg, bool);
|
||||
|
||||
tcp::socket _socket;
|
||||
|
||||
Reference in New Issue
Block a user