summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-01-25 15:48:07 -0500
committerAdam <Adam@anope.org>2012-01-25 15:48:07 -0500
commit52eaa7d6d61e3373340fd5a69b92b0fb3b5609e0 (patch)
tree428f2b440ab5675ae3a9c19ae5b813f132497c79 /include/modules.h
parente88e37c59b45cc43b714d1d28719eb3c2ca9579a (diff)
Windows
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/modules.h b/include/modules.h
index c4a6c8f62..d251be353 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -1123,13 +1123,14 @@ class CallBack : public Timer
}
};
-template<typename T, typename U = T>
+template<typename T>
class service_reference : public dynamic_reference<T>
{
+ Anope::string type;
Anope::string name;
public:
- service_reference(const Anope::string &n) : dynamic_reference<T>(NULL), name(n)
+ service_reference(const Anope::string &t, const Anope::string &n) : dynamic_reference<T>(NULL), type(t), name(n)
{
}
@@ -1147,7 +1148,7 @@ class service_reference : public dynamic_reference<T>
}
if (!this->ref)
{
- this->ref = static_cast<T *>(Service<U>::FindService(this->name));
+ this->ref = static_cast<T *>(Service::FindService(this->type, this->name));
if (this->ref)
this->ref->AddReference(this);
}