X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoreuserinputhandler.h;h=5c9dcd6e74cfddae93477ed75b35f818a8aa9630;hp=69a429ee8b90d1437c4b9a439c61fed718c0789d;hb=dd69349ca91776432a4a53aa4d18dd8ef018cd26;hpb=4988547cbb3c35016872a4ed8dbcc1376473ad80 diff --git a/src/core/coreuserinputhandler.h b/src/core/coreuserinputhandler.h index 69a429ee..5c9dcd6e 100644 --- a/src/core/coreuserinputhandler.h +++ b/src/core/coreuserinputhandler.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 * @@ -39,7 +39,17 @@ public: int lastParamOverrun(const QString &cmd, const QList ¶ms); public slots: - void handleAway(const BufferInfo &bufferInfo, const QString &text); + /** + * Handle the away command, marking as away or unaway + * + * Applies to the current network unless text begins with "-all". + * + * @param[in] bufferInfo Currently active buffer + * @param[in] text Away message, or blank to set unaway + * @param[in] skipFormatting If true, skip timestamp formatting codes (e.g. if already done) + */ + void handleAway(const BufferInfo &bufferInfo, const QString &text, + const bool skipFormatting = false); void handleBan(const BufferInfo &bufferInfo, const QString &text); void handleUnban(const BufferInfo &bufferInfo, const QString &text); void handleCtcp(const BufferInfo &bufferInfo, const QString &text); @@ -79,8 +89,22 @@ public slots: void defaultHandler(QString cmd, const BufferInfo &bufferInfo, const QString &text); - void issueQuit(const QString &reason); - void issueAway(const QString &msg, bool autoCheck = true); + /** + * Send a QUIT to the IRC server, optionally skipping the command queue. + * + * @param reason Reason for quitting, often displayed to other IRC clients + * @param forceImmediate Immediately quit, skipping queue of other commands + */ + void issueQuit(const QString &reason, bool forceImmediate = false); + + /** + * Issues the away command, marking as away or unaway on the current network + * + * @param[in] msg Away message, or blank to set unaway + * @param[in] autoCheck If true, always set away, defaulting to the identity away message + * @param[in] skipFormatting If true, skip timestamp formatting codes (e.g. if already done) + */ + void issueAway(const QString &msg, bool autoCheck = true, const bool skipFormatting = false); protected: void timerEvent(QTimerEvent *event); @@ -88,7 +112,7 @@ protected: private: void doMode(const BufferInfo& bufferInfo, const QChar &addOrRemove, const QChar &mode, const QString &nickList); void banOrUnban(const BufferInfo &bufferInfo, const QString &text, bool ban); - void putPrivmsg(const QByteArray &target, const QByteArray &message, Cipher *cipher = 0); + void putPrivmsg(const QString &target, const QString &message, std::function encodeFunc, Cipher *cipher = 0); #ifdef HAVE_QCA2 QByteArray encrypt(const QString &target, const QByteArray &message, bool *didEncrypt = 0) const;