summaryrefslogtreecommitdiff
path: root/src/base.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-05-01 12:44:07 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-05-01 12:44:07 +0000
commit8e475017a6f87ac936993fa9791a6634683dd512 (patch)
treed7d22134e17c5171e10e75605ddae849faf06c92 /src/base.cpp
parente53c7aa50c815761f84e0ba3a28c0e6e58dc025f (diff)
Added Module::OnAccessCheck
Added ListMode support Fixed Extensible class bug git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@759 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/base.cpp')
-rw-r--r--src/base.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/base.cpp b/src/base.cpp
index 7e545694b..f1f66bd93 100644
--- a/src/base.cpp
+++ b/src/base.cpp
@@ -3,13 +3,16 @@
#include <time.h>
#include <map>
#include <string>
+#include "inspircd.h"
+#include "modules.h"
-bool Extensible::Extend(std::string key, VoidPointer p)
+bool Extensible::Extend(std::string key, char* p)
{
// only add an item if it doesnt already exist
if (this->Extension_Items.find(key) == this->Extension_Items.end())
{
- this->Extension_Items[key] == p;
+ this->Extension_Items[key] = p;
+ log(DEBUG,"Extending object with item %s",key.c_str());
return true;
}
// item already exists, return false
@@ -22,17 +25,21 @@ bool Extensible::Shrink(std::string key)
if (this->Extension_Items.find(key) != this->Extension_Items.end())
{
this->Extension_Items.erase(this->Extension_Items.find(key));
+ log(DEBUG,"Shrinking object with item %s",key.c_str());
return true;
}
return false;
}
-VoidPointer Extensible::GetExt(std::string key)
+char* Extensible::GetExt(std::string key)
{
+ log(DEBUG,"Checking extension items for %s",key.c_str());
if (this->Extension_Items.find(key) != this->Extension_Items.end())
{
+ log(DEBUG,"Found item %s %s",key.c_str(),(this->Extension_Items.find(key))->second);
return (this->Extension_Items.find(key))->second;
}
+ log(DEBUG,"Cant find item %s",key.c_str());
return NULL;
}