summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-29 21:29:28 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-29 21:29:28 +0000
commitddbc70ec8e1fe30899458fa2c833a1e66fc9b14d (patch)
treed6e371972e6cadf5b4acd332ec95f74033176add
parent4564ed215cfde77e648a1aa8110ebe5de1252764 (diff)
Backport fix for stripcolour not stripping colour codes, reported by jackmcbarn - thanks. Also make rebasing neater, output to current console/output window of visual studio, not a new console
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9592 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_stripcolor.cpp10
-rw-r--r--win/configure.cpp6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp
index 9b3f8c2f1..97df7f193 100644
--- a/src/modules/m_stripcolor.cpp
+++ b/src/modules/m_stripcolor.cpp
@@ -112,7 +112,7 @@ class ModuleStripColor : public Module
/* refactor this completely due to SQUIT bug since the old code would strip last char and replace with \0 --peavey */
int seq = 0;
std::string::iterator i,safei;
- for (i = sentence.begin(); i != sentence.end(); ++i)
+ for (i = sentence.begin(); i != sentence.end();)
{
if ((*i == 3))
seq = 1;
@@ -134,12 +134,18 @@ class ModuleStripColor : public Module
safei = i;
--i;
sentence.erase(safei);
+ ++i;
+ ServerInstance->Logs->Log("m_stripcolor", DEBUG, "Sentence: %s iter pos %c", sentence.c_str(), *i);
}
else
{
sentence.erase(i);
i = sentence.begin();
- } }
+ ServerInstance->Logs->Log("m_stripcolor", DEBUG, "Sentence begin(): %s iter pos %c", sentence.c_str(), *i);
+ }
+ }
+ else
+ ++i;
}
}
diff --git a/win/configure.cpp b/win/configure.cpp
index a6dab1ffd..40a5ea0d2 100644
--- a/win/configure.cpp
+++ b/win/configure.cpp
@@ -146,13 +146,7 @@ int __stdcall WinMain(IN HINSTANCE hInstance, IN HINSTANCE hPrevInstance, IN LPS
{
if (!strcmp(lpCmdLine, "/rebase"))
{
- AllocConsole();
- // pipe standard handles to this console
- freopen("CONIN$", "r", stdin);
- freopen("CONOUT$", "w", stdout);
- freopen("CONOUT$", "w", stderr);
Rebase();
- FreeConsole();
return 0;
}
FILE * j = fopen("inspircd_config.h", "r");