From 2c254b7a3071621ae93623bc0e4b80ffc3c3a6b6 Mon Sep 17 00:00:00 2001 From: om Date: Wed, 1 Feb 2006 11:10:20 +0000 Subject: 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 --- src/modules/m_cban.cpp | 12 ++++++++---- 1 file 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; } -- cgit v1.2.3