summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-12-30 18:58:31 +0100
committerAttila Molnar <attilamolnar@hush.com>2016-12-30 18:58:31 +0100
commit0c061aff64625799160dadfb09ade008a38eb6c5 (patch)
tree261af81d4d5262009661d21e7956309bd3d2dea2 /include
parent03c5ffbdc3850fee20887885bcddd9d0738c8537 (diff)
Clean up User::FormatModes(), rename to GetModeLetters()
Prefix the returned string with '+'
Diffstat (limited to 'include')
-rw-r--r--include/users.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/users.h b/include/users.h
index 29c573daa..4939feb1e 100644
--- a/include/users.h
+++ b/include/users.h
@@ -418,10 +418,12 @@ class CoreExport User : public Extensible
*/
bool IsNoticeMaskSet(unsigned char sm);
- /** Create a displayable mode string for this users umodes
- * @param showparameters The mode string
+ /** Get the mode letters of modes set on the user as a string.
+ * @param includeparams True to get the parameters of the modes as well. Defaults to false.
+ * @return Mode letters of modes set on the user and optionally the parameters of those modes, if any.
+ * The returned string always begins with a '+' character. If the user has no modes set, "+" is returned.
*/
- const char* FormatModes(bool showparameters = false);
+ std::string GetModeLetters(bool includeparams = false) const;
/** Returns true if a specific mode is set
* @param m The user mode