X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoresession.h;h=c4de8cc91e2418123e2628ce2b0ea7e1093d7b8c;hp=59d6d51c3220beba812591e7f9a307b3c58eadba;hb=c1722505b4906fe59c48aad54e6545a17afb78d7;hpb=64cf9f9b8a737dad5f29447805d4004cfd03c454 diff --git a/src/core/coresession.h b/src/core/coresession.h index 59d6d51c..c4de8cc9 100644 --- a/src/core/coresession.h +++ b/src/core/coresession.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 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,17 +35,18 @@ class CoreBacklogManager; class CoreBufferSyncer; class CoreBufferViewManager; +class CoreDccConfig; class CoreIdentity; class CoreIrcListHelper; class CoreNetwork; class CoreNetworkConfig; class CoreSessionEventProcessor; +class CoreTransferManager; class CtcpParser; class EventManager; class EventStringifier; class InternalPeer; class IrcParser; -class Peer; class MessageEvent; class NetworkConnection; class RemotePeer; @@ -85,6 +87,9 @@ public: inline CoreIrcListHelper *ircListHelper() const { return _ircListHelper; } inline CoreIgnoreListManager *ignoreListManager() { return &_ignoreListManager; } + inline CoreTransferManager *transferManager() const { return _transferManager; } + inline CoreDccConfig *dccConfig() const { return _dccConfig; } + // void attachNetworkConnection(NetworkConnection *conn); //! Return necessary data for restoring the session after restarting the core @@ -124,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(); @@ -155,6 +169,8 @@ signals: void networkRemoved(NetworkId); void networkDisconnected(NetworkId); + void passwordChanged(PeerPtr peer, bool success); + protected: virtual void customEvent(QEvent *event); @@ -196,9 +212,11 @@ private: CoreBufferSyncer *_bufferSyncer; CoreBacklogManager *_backlogManager; CoreBufferViewManager *_bufferViewManager; + CoreDccConfig *_dccConfig; CoreIrcListHelper *_ircListHelper; CoreNetworkConfig *_networkConfig; CoreCoreInfo _coreInfo; + CoreTransferManager *_transferManager; EventManager *_eventManager; EventStringifier *_eventStringifier; // should eventually move into client @@ -208,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;