summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-02-14 12:15:00 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-02-14 12:15:00 +0100
commit74ccc28da30896ee715504d53822f7b3ce6ec86f (patch)
treefaa72eeee26610355d23b71c27a2b1670629836e /include
parent51b5f06c48b98a256eb56ea5f7e4d5d170555e84 (diff)
Move GetPrefixChar() from Channel to Membership
Diffstat (limited to 'include')
-rw-r--r--include/channels.h13
-rw-r--r--include/membership.h9
2 files changed, 9 insertions, 13 deletions
diff --git a/include/channels.h b/include/channels.h
index 5109c0463..daf8be9e2 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -304,19 +304,6 @@ class CoreExport Channel : public Extensible, public InviteBase<Channel>
*/
void UserList(User *user);
- /** Get a users prefix on this channel in a string.
- * @param user The user to look up
- * @return A character array containing the prefix string.
- * Unlike GetStatus and GetStatusFlags which will only return the
- * core specified modes @, % and + (op, halfop and voice), GetPrefixChar
- * will also return module-defined prefixes. If the user has to prefix,
- * an empty but non-null string is returned. If the user has multiple
- * prefixes, the highest is returned. If you do not recognise the prefix
- * character you can get, you can deal with it in a 'proprtional' manner
- * compared to known prefixes, using GetPrefixValue().
- */
- const char* GetPrefixChar(User *user);
-
/** Return all of a users mode prefixes into a char* string.
* @param user The user to look up
* @return A list of all prefix characters. The prefixes will always
diff --git a/include/membership.h b/include/membership.h
index d98b54731..c6b0bf14a 100644
--- a/include/membership.h
+++ b/include/membership.h
@@ -43,6 +43,15 @@ class CoreExport Membership : public Extensible, public intrusive_list_node<Memb
* @return True if a change was made
*/
bool SetPrefix(PrefixMode* mh, bool adding);
+
+ /** Get the highest prefix this user has on the channel
+ * @return A character containing the highest prefix.
+ * If the user has no prefix, 0 is returned. If the user has multiple prefixes,
+ * the highest is returned. If you do not recognise the prefix character you
+ * can get, you can deal with it in a 'proportional' manner compared to known
+ * prefixes, using GetPrefixValue().
+ */
+ char GetPrefixChar() const;
};
template <typename T>