summaryrefslogtreecommitdiff
path: root/include/anope.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-01-03 11:41:32 -0500
committerAdam <Adam@anope.org>2013-01-03 12:34:01 -0500
commit098157dca8a4aecc18294cbc31cbe5ee95b35a94 (patch)
tree654f00f21e151ba9007ca8eb044a78fef1bd6e39 /include/anope.h
parent827469600e8cf98fea7aec09ceaa77a097300b72 (diff)
Don't delete users immediately when quit or killed, instead wait until message processing is done
Diffstat (limited to 'include/anope.h')
-rw-r--r--include/anope.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/anope.h b/include/anope.h
index bf82e6d78..5b230a1a9 100644
--- a/include/anope.h
+++ b/include/anope.h
@@ -158,15 +158,28 @@ namespace Anope
/**
* Trim leading and trailing white spaces from the string.
*/
- inline string& trim()
+
+ inline string& ltrim()
{
while (!this->_string.empty() && isspace(this->_string[0]))
this->_string.erase(this->_string.begin());
+ return *this;
+ }
+
+ inline string& rtrim()
+ {
while (!this->_string.empty() && isspace(this->_string[this->_string.length() - 1]))
this->_string.erase(this->_string.length() - 1);
return *this;
}
+ inline string& trim()
+ {
+ this->ltrim();
+ this->rtrim();
+ return *this;
+ }
+
/**
* Clears the string.
*/