summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/core/bs_kick.cpp12
-rw-r--r--modules/core/bs_main.cpp11
2 files changed, 19 insertions, 4 deletions
diff --git a/modules/core/bs_kick.cpp b/modules/core/bs_kick.cpp
index 3e6719338..467f4104e 100644
--- a/modules/core/bs_kick.cpp
+++ b/modules/core/bs_kick.cpp
@@ -660,6 +660,18 @@ class BSKick : public Module
{
Anope::string realbuf = msg;
+ /* If it's a /me, cut the CTCP part because the ACTION will cause
+ * problems with the caps or badwords kicker
+ */
+ if (realbuf.substr(0, 8).equals_ci("\1ACTION ") && realbuf[realbuf.length() - 1] == '\1')
+ {
+ realbuf.erase(0, 8);
+ realbuf.erase(realbuf.length() - 1);
+ }
+
+ if (realbuf.empty())
+ return;
+
/* Bolds kicker */
if (ci->botflags.HasFlag(BS_KICK_BOLDS) && realbuf.find(2) != Anope::string::npos)
{
diff --git a/modules/core/bs_main.cpp b/modules/core/bs_main.cpp
index e325b012f..b47b7e128 100644
--- a/modules/core/bs_main.cpp
+++ b/modules/core/bs_main.cpp
@@ -164,6 +164,12 @@ class BotServCore : public Module
~BotServCore()
{
+ for (channel_map::const_iterator cit = ChannelList.begin(), cit_end = ChannelList.end(); cit != cit_end; ++cit)
+ {
+ cit->second->Shrink("bs_main_userdata");
+ cit->second->Shrink("bs_main_bandata");
+ }
+
spacesepstream coreModules(Config->BotCoreModules);
Anope::string module;
while (coreModules.GetToken(module))
@@ -190,13 +196,10 @@ class BotServCore : public Module
ircdproto->SendCTCP(ci->bi, u->nick, "%s", ctcp.c_str());
}
- bool was_action = false;
Anope::string realbuf = msg;
- /* If it's a /me, cut the CTCP part because the ACTION will cause
- * problems with the caps or badwords kicker
- */
+ bool was_action = false;
if (realbuf.substr(0, 8).equals_ci("\1ACTION ") && realbuf[realbuf.length() - 1] == '\1')
{
realbuf.erase(0, 8);