diff options
author | Sadie Powell <sadie@witchery.services> | 2025-04-22 17:36:26 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-04-22 18:16:31 +0100 |
commit | f3629598347763c984d03ee70235133c45dd9908 (patch) | |
tree | 9aa5190273a40005a4c730c06258b1ee3ae703c7 /include/anope.h | |
parent | f5a85c69d225edaed4e11eb4c2b27d66ebc5195e (diff) |
Fix splitting in the middle of some command names.
Diffstat (limited to 'include/anope.h')
-rw-r--r-- | include/anope.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/anope.h b/include/anope.h index 9c109d9ee..618592090 100644 --- a/include/anope.h +++ b/include/anope.h @@ -222,6 +222,14 @@ namespace Anope inline bool is_pos_number_only() const { return this->find_first_not_of("0123456789.") == npos; } /** + * In IRC messages we use a substitute (ASCII 0x1A) instead of a space + * (ASCII 0x20) so it doesn't get line wrapped when put into a message. + * The line wrapper will convert this to a space before it is sent to + * clients. + */ + inline Anope::string nobreak() const { return this->replace_all_cs("\x20", "\x1A"); } + + /** * Replace parts of the string. */ inline string replace(size_type pos, size_type n, const string &_str) { return string(this->_string.replace(pos, n, _str._string)); } |