mirror of
https://github.com/znc/znc.git
synced 2026-08-10 19:02:51 +02:00
Rename one of overloads of CMessage::GetParams to GetParamsColon
This commit is contained in:
+17
-2
@@ -30,6 +30,14 @@
|
||||
#define ZNC_LVREFQUAL
|
||||
#endif
|
||||
|
||||
#ifdef SWIG
|
||||
#define ZNC_MSG_DEPRECATED(msg, repl)
|
||||
#elif defined(__clang__)
|
||||
#define ZNC_MSG_DEPRECATED(msg, repl) __attribute__((deprecated(msg, repl)))
|
||||
#else
|
||||
#define ZNC_MSG_DEPRECATED(msg, repl) __attribute__((deprecated(msg)))
|
||||
#endif
|
||||
|
||||
#include <znc/zncconfig.h>
|
||||
#include <znc/ZNCString.h>
|
||||
#include <znc/Nick.h>
|
||||
@@ -55,7 +63,8 @@ class CIRCNetwork;
|
||||
* - `nick` is the sender, which can be obtained with GetNick()
|
||||
* - `cmd` is command, which is obtained via GetCommand()
|
||||
* - `0`, `1`, ... are parameters, available via GetParam(n), which removes the
|
||||
* leading colon (:). If you don't want to remove the colon, use GetParams().
|
||||
* leading colon (:). If you don't want to remove the colon, use
|
||||
* GetParamsColon().
|
||||
*
|
||||
* For certain events, like a PRIVMSG, convienience commands like GetChan() and
|
||||
* GetNick() are available, this is not true for all CMessage extensions.
|
||||
@@ -114,9 +123,15 @@ class CMessage {
|
||||
void SetCommand(const CString& sCommand);
|
||||
|
||||
const VCString& GetParams() const { return m_vsParams; }
|
||||
CString GetParams(unsigned int uIdx, unsigned int uLen = -1) const;
|
||||
void SetParams(const VCString& vsParams);
|
||||
|
||||
/// @deprecated use GetParamsColon() instead.
|
||||
CString GetParams(unsigned int uIdx, unsigned int uLen = -1) const
|
||||
ZNC_MSG_DEPRECATED("Use GetParamsColon() instead", "GetParamsColon") {
|
||||
return GetParamsColon(uIdx, uLen);
|
||||
}
|
||||
CString GetParamsColon(unsigned int uIdx, unsigned int uLen = -1) const;
|
||||
|
||||
CString GetParam(unsigned int uIdx) const;
|
||||
void SetParam(unsigned int uIdx, const CString& sParam);
|
||||
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ void CMessage::SetCommand(const CString& sCommand) {
|
||||
InitType();
|
||||
}
|
||||
|
||||
CString CMessage::GetParams(unsigned int uIdx, unsigned int uLen) const {
|
||||
CString CMessage::GetParamsColon(unsigned int uIdx, unsigned int uLen) const {
|
||||
if (m_vsParams.empty() || uLen == 0) {
|
||||
return "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user