summaryrefslogtreecommitdiff
path: root/include/users.h
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-02-25 16:40:50 +0100
committerAttila Molnar <attilamolnar@hush.com>2016-02-25 16:40:50 +0100
commitdbe5a1fc6f9e18765863f332a3e79d7c918d3e65 (patch)
treeeb53116004bf80b3621da7e654207e508377f9a2 /include/users.h
parentee7567584e4792166a4d6455ca306731d8b5f28a (diff)
Add User::WriteRemoteNumeric() and switch code using SendText() to send numerics to it
Diffstat (limited to 'include/users.h')
-rw-r--r--include/users.h51
1 files changed, 51 insertions, 0 deletions
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 <typename T1>
+ void WriteRemoteNumeric(unsigned int numeric, T1 p1)
+ {
+ Numeric::Numeric n(numeric);
+ n.push(p1);
+ WriteRemoteNumeric(n);
+ }
+
+ template <typename T1, typename T2>
+ void WriteRemoteNumeric(unsigned int numeric, T1 p1, T2 p2)
+ {
+ Numeric::Numeric n(numeric);
+ n.push(p1);
+ n.push(p2);
+ WriteRemoteNumeric(n);
+ }
+
+ template <typename T1, typename T2, typename T3>
+ 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 <typename T1, typename T2, typename T3, typename T4>
+ 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 <typename T1, typename T2, typename T3, typename T4, typename T5>
+ 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);