X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fnetwork.h;h=f6e7de1f9be10cae9a5e07c77d7e41e28ff7e4c4;hp=190c62c078c38a5fdc569aca50285c6676689e8b;hb=a0bcb6393bc23734c9df0283a3ddbe4ec63c2f11;hpb=e50ae7a06fc4e5d3a911c361d30953410deab609 diff --git a/src/common/network.h b/src/common/network.h index 190c62c0..f6e7de1f 100644 --- a/src/common/network.h +++ b/src/common/network.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2016 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; } @@ -257,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