From dbe5a1fc6f9e18765863f332a3e79d7c918d3e65 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Thu, 25 Feb 2016 16:40:50 +0100 Subject: Add User::WriteRemoteNumeric() and switch code using SendText() to send numerics to it --- include/users.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'include/users.h') diff --git a/include/users.h b/include/users.h index 8aa88798c..5e7df74ea 100644 --- a/include/users.h +++ b/include/users.h @@ -519,6 +519,57 @@ class CoreExport User : public Extensible */ void WriteNotice(const std::string& text) { this->WriteCommand("NOTICE", ":" + text); } + void WriteRemoteNumeric(const Numeric::Numeric& numeric); + + template + void WriteRemoteNumeric(unsigned int numeric, T1 p1) + { + Numeric::Numeric n(numeric); + n.push(p1); + WriteRemoteNumeric(n); + } + + template + void WriteRemoteNumeric(unsigned int numeric, T1 p1, T2 p2) + { + Numeric::Numeric n(numeric); + n.push(p1); + n.push(p2); + WriteRemoteNumeric(n); + } + + template + void WriteRemoteNumeric(unsigned int numeric, T1 p1, T2 p2, T3 p3) + { + Numeric::Numeric n(numeric); + n.push(p1); + n.push(p2); + n.push(p3); + WriteRemoteNumeric(n); + } + + template + void WriteRemoteNumeric(unsigned int numeric, T1 p1, T2 p2, T3 p3, T4 p4) + { + Numeric::Numeric n(numeric); + n.push(p1); + n.push(p2); + n.push(p3); + n.push(p4); + WriteRemoteNumeric(n); + } + + template + void WriteRemoteNumeric(unsigned int numeric, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5) + { + Numeric::Numeric n(numeric); + n.push(p1); + n.push(p2); + n.push(p3); + n.push(p4); + n.push(p5); + WriteRemoteNumeric(n); + } void WriteNumeric(const Numeric::Numeric& numeric); -- cgit v1.2.3