X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoresession.h;h=c4de8cc91e2418123e2628ce2b0ea7e1093d7b8c;hp=3eecc4bb84fe05f4f6b64c3e038a8a8cbb0d22b5;hb=c1722505b4906fe59c48aad54e6545a17afb78d7;hpb=1cb02004ee5973b89368bd84f234d4652794690d diff --git a/src/core/coresession.h b/src/core/coresession.h index 3eecc4bb..c4de8cc9 100644 --- a/src/core/coresession.h +++ b/src/core/coresession.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 * @@ -27,6 +27,7 @@ #include "corecoreinfo.h" #include "corealiasmanager.h" #include "coreignorelistmanager.h" +#include "peer.h" #include "protocol.h" #include "message.h" #include "storage.h" @@ -34,6 +35,7 @@ class CoreBacklogManager; class CoreBufferSyncer; class CoreBufferViewManager; +class CoreDccConfig; class CoreIdentity; class CoreIrcListHelper; class CoreNetwork; @@ -45,7 +47,6 @@ class EventManager; class EventStringifier; class InternalPeer; class IrcParser; -class Peer; class MessageEvent; class NetworkConnection; class RemotePeer; @@ -87,6 +88,7 @@ public: inline CoreIgnoreListManager *ignoreListManager() { return &_ignoreListManager; } inline CoreTransferManager *transferManager() const { return _transferManager; } + inline CoreDccConfig *dccConfig() const { return _dccConfig; } // void attachNetworkConnection(NetworkConnection *conn); @@ -127,10 +129,19 @@ public slots: */ void renameBuffer(const NetworkId &networkId, const QString &newName, const QString &oldName); + void changePassword(PeerPtr peer, const QString &userName, const QString &oldPassword, const QString &newPassword); + + void kickClient(int peerId); + QHash persistentChannels(NetworkId) const; - //! Marks us away (or unaway) on all networks - void globalAway(const QString &msg = QString()); + /** + * Marks us away (or unaway) on all networks + * + * @param[in] msg Away message, or blank to set unaway + * @param[in] skipFormatting If true, skip timestamp formatting codes (e.g. if already done) + */ + void globalAway(const QString &msg = QString(), const bool skipFormatting = false); signals: void initialized(); @@ -158,6 +169,8 @@ signals: void networkRemoved(NetworkId); void networkDisconnected(NetworkId); + void passwordChanged(PeerPtr peer, bool success); + protected: virtual void customEvent(QEvent *event); @@ -199,6 +212,7 @@ private: CoreBufferSyncer *_bufferSyncer; CoreBacklogManager *_backlogManager; CoreBufferViewManager *_bufferViewManager; + CoreDccConfig *_dccConfig; CoreIrcListHelper *_ircListHelper; CoreNetworkConfig *_networkConfig; CoreCoreInfo _coreInfo; @@ -212,6 +226,13 @@ private: QScriptEngine *scriptEngine; + /** + * This method obtains the prefixes of the message's sender within a channel, by looking up their channelmodes, and + * processing them to prefixes based on the network's settings. + * @param sender The hostmask of the sender + * @param bufferInfo The BufferInfo object of the buffer + */ + QString senderPrefixes(const QString &sender, const BufferInfo &bufferInfo) const; QList _messageQueue; bool _processMessages; CoreIgnoreListManager _ignoreListManager;