summaryrefslogtreecommitdiff
path: root/src/modules/m_sethost.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-31 13:29:46 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-31 13:29:46 +0000
commit739b08770578b891cab4c824ca29eeb01445457f (patch)
tree16d6eef2be70b5b1ebb27a3e55e6f8c813e66df9 /src/modules/m_sethost.cpp
parent7ea1041e61122e17c499e6c361216512a3926240 (diff)
Fix broken LOLCODE
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6192 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_sethost.cpp')
-rw-r--r--src/modules/m_sethost.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index 0e116888c..048756b6d 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -26,9 +26,9 @@
class cmd_sethost : public command_t
{
private:
- char*& hostmap;
+ char* hostmap;
public:
- cmd_sethost (InspIRCd* Instance, char*& hmap) : command_t(Instance,"SETHOST",'o',1), hostmap(hmap)
+ cmd_sethost (InspIRCd* Instance, char* hmap) : command_t(Instance,"SETHOST",'o',1), hostmap(hmap)
{
this->source = "m_sethost.so";
syntax = "<new-hostname>";
@@ -64,12 +64,11 @@ class cmd_sethost : public command_t
class ModuleSetHost : public Module
{
cmd_sethost* mycommand;
- char* hostmap;
+ char hostmap[256];
public:
ModuleSetHost(InspIRCd* Me)
: Module::Module(Me)
{
- hostmap = new char[256];
OnRehash("");
mycommand = new cmd_sethost(ServerInstance, hostmap);
ServerInstance->AddCommand(mycommand);
@@ -88,14 +87,13 @@ class ModuleSetHost : public Module
if (hmap.empty())
hmap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789";
- memset(&hostmap, 0, sizeof(hostmap));
+ memset(&hostmap, 0, 255);
for (std::string::iterator n = hmap.begin(); n != hmap.end(); n++)
hostmap[(unsigned char)*n] = 1;
}
virtual ~ModuleSetHost()
{
- delete[] hostmap;
}
virtual Version GetVersion()