summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-01 11:10:20 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-01 11:10:20 +0000
commit2c254b7a3071621ae93623bc0e4b80ffc3c3a6b6 (patch)
tree978b581f3cb6896f494e0dbe9f56fa74dde8394b /src
parentb46d4ed89df12dd46e1566b8a23c6d29ba8c5a26 (diff)
IRC case sensitivity bug, if only we could use ASCII......
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3002 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_cban.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index 8ddfcc159..8739fc98c 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -23,13 +23,14 @@
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "hashcomp.h"
/* $ModDesc: Gives /cban, aka C:lines. Think Q:lines, for channels. */
class CBan
{
public:
- std::string chname;
+ irc::string chname;
std::string set_by;
time_t set_on;
long length;
@@ -39,7 +40,7 @@ public:
{
}
- CBan(std::string cn, std::string sb, time_t so, long ln, std::string rs) : chname(cn), set_by(sb), set_on(so), length(ln), reason(rs)
+ CBan(irc::string cn, std::string sb, time_t so, long ln, std::string rs) : chname(cn), set_by(sb), set_on(so), length(ln), reason(rs)
{
}
};
@@ -205,7 +206,7 @@ class ModuleCBan : public Module
std::string EncodeCBan(const CBan &ban)
{
std::ostringstream stream;
- stream << ban.chname << " " << ban.set_by << " " << ban.set_on << " " << ban.length << " " << ban.reason;
+ stream << ban.chname.c_str() << " " << ban.set_by << " " << ban.set_on << " " << ban.length << " " << ban.reason;
return stream.str();
}
@@ -213,11 +214,14 @@ CBan DecodeCBan(const std::string &data)
{
CBan res;
std::istringstream stream;
- stream >> res.chname;
+ // XXX - Change this...we shouldn't need tempname, need an overloaded iostream operator on irc::string?
+ std::string tempname;
+ stream >> tempname;
stream >> res.set_by;
stream >> res.set_on;
stream >> res.length;
res.reason = stream.str();
+ res.chname = tempname.c_str();
return res;
}