X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fnetwork.h;h=55e953aca221a13408e21d531c78d4315c80150a;hp=01e6158affa736ac629082501f0d84eabde3fb5c;hb=91e19c05228aaba95ef27b580b35fc6ed2af7517;hpb=9c7d754dd853d40ed8d0464762afebf7ec1034e5 diff --git a/src/common/network.h b/src/common/network.h index 01e6158a..55e953ac 100644 --- a/src/common/network.h +++ b/src/common/network.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by the Quassel Project * + * Copyright (C) 2005-2015 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -132,6 +132,18 @@ public : bool isChannelName(const QString &channelname) const; + /** + * Checks if the target counts as a STATUSMSG + * + * Status messages are prefixed with one or more characters from the server-provided STATUSMSG + * if available, otherwise "@" and "+" are assumed. Generally, status messages sent to a + * channel are only visible to those with the same or higher permissions, e.g. voiced. + * + * @param[in] target Name of destination, e.g. a channel or query + * @returns True if a STATUSMSG, otherwise false + */ + bool isStatusMsg(const QString &target) const; + inline bool isConnected() const { return _connected; } //Network::ConnectionState connectionState() const; inline int connectionState() const { return _connectionState; } @@ -213,10 +225,6 @@ public : inline bool autoAwayActive() const { return _autoAwayActive; } inline void setAutoAwayActive(bool active) { _autoAwayActive = active; } - static QStringList presetNetworks(bool onlyDefault = false); - static QStringList presetDefaultChannels(const QString &networkName); - static NetworkInfo networkInfoFromPreset(const QString &networkName); - public slots: void setNetworkName(const QString &networkName); void setCurrentServer(const QString ¤tServer); @@ -261,6 +269,12 @@ public slots: inline void initSetServerList(const QVariantList &serverList) { _serverList = fromVariantList(serverList); } virtual void initSetIrcUsersAndChannels(const QVariantMap &usersAndChannels); + /** + * Update IrcUser hostmask and username from mask, creating an IrcUser if one does not exist. + * + * @param[in] mask Full nick!user@hostmask string + * @return IrcUser of the matching nick if exists, otherwise a new IrcUser + */ IrcUser *updateNickFromMask(const QString &mask); // these slots are to keep the hashlists of all users and the @@ -372,8 +386,6 @@ private: bool _autoAwayActive; // when this is active handle305 and handle306 don't trigger any output - static QString _networksIniPath; - friend class IrcUser; friend class IrcChannel; };