summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp2
-rw-r--r--src/modules/m_blockcaps.cpp5
-rw-r--r--src/modules/m_blockcolor.cpp30
-rw-r--r--src/modules/m_censor.cpp7
-rw-r--r--src/modules/m_stripcolor.cpp8
5 files changed, 35 insertions, 17 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 1681df2b5..73b483a42 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -680,7 +680,7 @@ int InspIRCd::Run()
{
if (TIME < OLDTIME)
{
- SNO->WriteToSnoMask('A', "\002EH?!\002 -- Time is flowing BACKWARDS in this dimension! Clock drifted backwards %d secs.",abs(OLDTIME-TIME));
+ SNO->WriteToSnoMask('A', "\002EH?!\002 -- Time is flowing BACKWARDS in this dimension! Clock drifted backwards %d secs.",OLDTIME-TIME);
}
if ((TIME % 3600) == 0)
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp
index bcbc82cac..6414f4db7 100644
--- a/src/modules/m_blockcaps.cpp
+++ b/src/modules/m_blockcaps.cpp
@@ -82,6 +82,11 @@ public:
Channel* c = (Channel*)dest;
+ if (CHANOPS_EXEMPT(ServerInstance, 'B') && c->GetStatus(user) == STATUS_OP)
+ {
+ return 0;
+ }
+
if (c->IsModeSet('B'))
{
int caps = 0;
diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp
index 9fe5eb224..f10d50b74 100644
--- a/src/modules/m_blockcolor.cpp
+++ b/src/modules/m_blockcolor.cpp
@@ -67,25 +67,27 @@ class ModuleBlockColour : public Module
if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
{
Channel* c = (Channel*)dest;
+
+ if (CHANOPS_EXEMPT(ServerInstance, 'c') && c->GetStatus(user) == STATUS_OP)
+ {
+ return 0;
+ }
if(c->IsModeSet('c'))
{
- if (!CHANOPS_EXEMPT(ServerInstance, 'c') || CHANOPS_EXEMPT(ServerInstance, 'c') && c->GetStatus(user) != STATUS_OP)
+ for (std::string::iterator i = text.begin(); i != text.end(); i++)
{
- for (std::string::iterator i = text.begin(); i != text.end(); i++)
+ switch (*i)
{
- switch (*i)
- {
- case 2:
- case 3:
- case 15:
- case 21:
- case 22:
- case 31:
- user->WriteServ("404 %s %s :Can't send colours to channel (+c set)",user->nick, c->name);
- return 1;
- break;
- }
+ case 2:
+ case 3:
+ case 15:
+ case 21:
+ case 22:
+ case 31:
+ user->WriteServ("404 %s %s :Can't send colours to channel (+c set)",user->nick, c->name);
+ return 1;
+ break;
}
}
}
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp
index 94ac8d113..4eaf1e3b4 100644
--- a/src/modules/m_censor.cpp
+++ b/src/modules/m_censor.cpp
@@ -140,7 +140,14 @@ class ModuleCensor : public Module
if (target_type == TYPE_USER)
active = ((User*)dest)->IsModeSet('G');
else if (target_type == TYPE_CHANNEL)
+ {
active = ((Channel*)dest)->IsModeSet('G');
+ Channel* c = (Channel*)dest;
+ if (CHANOPS_EXEMPT(ServerInstance, 'G') && c->GetStatus(user) == STATUS_OP)
+ {
+ return 0;
+ }
+ }
if (!active)
return 0;
diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp
index 17c0a2f30..094961ce0 100644
--- a/src/modules/m_stripcolor.cpp
+++ b/src/modules/m_stripcolor.cpp
@@ -153,8 +153,12 @@ class ModuleStripColor : public Module
// check if we allow ops to bypass filtering, if we do, check if they're opped accordingly.
// note: short circut logic here, don't wreck it. -- w00t
- if (!CHANOPS_EXEMPT(ServerInstance, 'S') || CHANOPS_EXEMPT(ServerInstance, 'S') && t->GetStatus(user) != STATUS_OP)
- active = t->IsModeSet('S');
+ if (CHANOPS_EXEMPT(ServerInstance, 'S') && t->GetStatus(user) == STATUS_OP)
+ {
+ return 0;
+ }
+
+ active = t->IsModeSet('S');
}
if (active)