- inline const QString &networkName() const { return _networkName; }
- inline const QString ¤tServer() const { return _currentServer; }
- inline const QString &myNick() const { return _myNick; }
+ /**@{*/
+ /**
+ * Sorts the list of users' channelmodes according to priority set by PREFIX
+ *
+ * Maintains order of the modes list.
+ *
+ * @seealso Network::sortPrefixModes()
+ *
+ * @param modesList List of users' channel modes
+ * @return Priority-sorted list of users' channel modes
+ */
+ inline QStringList sortPrefixModes(const QStringList& modesList) const
+ {
+ QStringList sortedModesList;
+ // Sort each individual mode string, appending back
+ // Must maintain the order received!
+ for (QString modes : modesList) {
+ sortedModesList << sortPrefixModes(modes);
+ }
+ return sortedModesList;
+ }
+ /**@}*/
+
+ ChannelModeType channelModeType(const QString& mode);
+ inline ChannelModeType channelModeType(const QCharRef& mode) { return channelModeType(QString(mode)); }
+
+ inline const QString& networkName() const { return _networkName; }
+ inline const QString& currentServer() const { return _currentServer; }
+ inline const QString& myNick() const { return _myNick; }