summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-27 13:21:10 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-27 13:21:10 +0000
commit05b816c4c45e2d6b9a896bfa1acdb8bac229df5d (patch)
tree931f64b75949e5e0de45a57561df871aae390bfb
parentc33249de90907d653f127f7970f366c40f3ca3cf (diff)
Forward port bug #484 patch from John, thanks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8760 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_timedbans.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index a411dade9..3e5823d1f 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -85,11 +85,13 @@ class CommandTban : public Command
was_added = true;
if (was_added)
{
+ CUList tmp;
T.channel = channelname;
T.mask = mask;
T.expire = expire;
TimedBanList.push_back(T);
- channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name, user->nick, mask.c_str(), duration);
+ channel->WriteAllExcept(user, true, '@', tmp, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name, user->nick, mask.c_str(), duration);
+ channel->WriteAllExcept(user, true, '%', tmp, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name, user->nick, mask.c_str(), duration);
return CMD_SUCCESS;
}
return CMD_FAILURE;
@@ -155,7 +157,6 @@ class ModuleTimedBans : public Module
again = true;
if (cr)
{
- cr->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :Timed ban on %s expired.", cr->name, i->mask.c_str());
const char *setban[3];
setban[0] = i->channel.c_str();
setban[1] = "-b";
@@ -169,6 +170,10 @@ class ModuleTimedBans : public Module
ServerInstance->SendMode(setban,3, ServerInstance->FakeClient);
Event rmode((char *)&n, NULL, "send_mode");
rmode.Send(ServerInstance);
+ CUList empty;
+ cr->WriteAllExcept(ServerInstance->FakeClient, true, '@', empty, "NOTICE %s :*** Timed ban on %s expired.", cr->name, i->mask.c_str());
+ if (ServerInstance->Config->AllowHalfop)
+ cr->WriteAllExcept(ServerInstance->FakeClient, true, '%', empty, "NOTICE %s :*** Timed ban on %s expired.", cr->name, i->mask.c_str());
}
else
{