Skip to content

Commit 4d9ce5b

Browse files
committed
fix(chat): Character removal
1 parent c1f89c3 commit 4d9ce5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/entrypoint.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ void Swiftly::Hook_DispatchConCommand(ConCommandHandle cmd, const CCommandContex
502502
std::vector<std::string> textSplitted = explode(args.GetCommandString(), " ");
503503
textSplitted.erase(textSplitted.begin());
504504
std::string text = implode(textSplitted, " ");
505-
text.erase(text.begin());
506-
text.pop_back();
505+
if(text.front() == '\'' || text.front() == '"') text.erase(text.begin());
506+
if(text.back() == '\'' || text.back() == '"') text.pop_back();
507507

508508
if (strim(text).length() == 0)
509509
RETURN_META(MRES_SUPERCEDE);

0 commit comments

Comments
 (0)