summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-23 15:32:22 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-23 15:32:22 +0000
commit4d0cd408dfabdcd0b95b5305e47a594ff958c74a (patch)
tree16f9248340d8e5d4b2c714a477d2d52fd5b583e3 /src
parent2a291c331fba316c3510b6dbaf973202bb99a49e (diff)
Add an ID field to Request and a GetId() method, takes const char* and returns it - Added new constructor to use it, all modules using ID should convert to the 'new' way of doing Requests, data is now theoretically depreceiated
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4529 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index ca533b523..13cc3e740 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -64,17 +64,36 @@ featurelist Features;
// version is a simple class for holding a modules version number
-Version::Version(int major, int minor, int revision, int build, int flags) : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
+Version::Version(int major, int minor, int revision, int build, int flags)
+: Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags)
+{
+}
// admin is a simple class for holding a server's administrative info
-Admin::Admin(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { };
+Admin::Admin(std::string name, std::string email, std::string nick)
+: Name(name), Email(email), Nick(nick)
+{
+}
-Request::Request(char* anydata, Module* src, Module* dst) : data(anydata), source(src), dest(dst) { };
+Request::Request(char* anydata, Module* src, Module* dst)
+: data(anydata), source(src), dest(dst)
+{
+}
+
+Request::Request(Module* src, Module* dst, const char* idstr)
+: id(idstr), source(src), dest(dst)
+{
+};
char* Request::GetData()
{
- return (char*)this->data;
+ return this->data;
+}
+
+const char* Request::GetId()
+{
+ return this->id;
}
Module* Request::GetSource()