aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_deaf.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-22 22:01:25 +0000
committerGravatar Sadie Powell2023-01-22 22:52:30 +0000
commit8389fbba6d92dec84745e5b8db4739f97561585e (patch)
treea1ef829a156d002639035acec8bab8a4e8d1bdfd /src/modules/m_deaf.cpp
parentConvert various enums to strongly typed scoped enums. (diff)
Replace ModeAction with bool.
This enum is functionally the same as bool but with weird semantics.
Diffstat (limited to 'src/modules/m_deaf.cpp')
-rw-r--r--src/modules/m_deaf.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp
index d8ee9bfcf..68c926697 100644
--- a/src/modules/m_deaf.cpp
+++ b/src/modules/m_deaf.cpp
@@ -38,15 +38,15 @@ public:
{
}
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override
+ bool OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override
{
- if (SimpleUserMode::OnModeChange(source, dest, channel, change) == MODEACTION_ALLOW)
+ if (SimpleUserMode::OnModeChange(source, dest, channel, change) == true)
{
dest->WriteNotice("*** You have enabled user mode +d, deaf mode. This mode means you WILL NOT receive any messages from any channels you are in. If you did NOT mean to do this, use /mode " + dest->nick + " -d.");
- return MODEACTION_ALLOW;
+ return true;
}
- return MODEACTION_DENY;
+ return false;
}
};
@@ -60,15 +60,15 @@ public:
{
}
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override
+ bool OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override
{
- if (SimpleUserMode::OnModeChange(source, dest, channel, change) == MODEACTION_ALLOW)
+ if (SimpleUserMode::OnModeChange(source, dest, channel, change) == true)
{
dest->WriteNotice("*** You have enabled user mode +D, private deaf mode. This mode means you WILL NOT receive any messages and notices from any nicks. If you did NOT mean to do this, use /mode " + dest->nick + " -D.");
- return MODEACTION_ALLOW;
+ return true;
}
- return MODEACTION_DENY;
+ return false;
}
};