aboutsummaryrefslogtreecommitdiffstats
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-04-21 04:00:14 +0100
committerGravatar Sadie Powell2020-04-21 04:17:14 +0100
commit44834a66a7e92c8979ae16421286c581a9cffbe9 (patch)
tree5ace069f2a7be708c8125fc17bcc6977da82f59b /src/users.cpp
parentMerge branch 'insp3' into master. (diff)
Convert UserType to an enum class.
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 5837d2412..d97f133c0 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -93,7 +93,7 @@ User::User(const std::string& uid, Server* srv, UserType type)
ServerInstance->Users.all_ulines.push_back(this);
// Do not insert FakeUsers into the uuidlist so FindUUID() won't return them which is the desired behavior
- if (type != USERTYPE_SERVER)
+ if (type != UserType::SERVER)
{
if (!ServerInstance->Users.uuidlist.insert(std::make_pair(uuid, this)).second)
throw CoreException("Duplicate UUID in User constructor: " + uuid);
@@ -101,7 +101,7 @@ User::User(const std::string& uid, Server* srv, UserType type)
}
LocalUser::LocalUser(int myfd, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* servaddr)
- : User(ServerInstance->UIDGen.GetUID(), ServerInstance->FakeClient->server, USERTYPE_LOCAL)
+ : User(ServerInstance->UIDGen.GetUID(), ServerInstance->FakeClient->server, UserType::LOCAL)
, eh(this)
, quitting_sendq(false)
, lastping(true)
@@ -118,7 +118,7 @@ LocalUser::LocalUser(int myfd, irc::sockets::sockaddrs* client, irc::sockets::so
}
LocalUser::LocalUser(int myfd, const std::string& uid, Serializable::Data& data)
- : User(uid, ServerInstance->FakeClient->server, USERTYPE_LOCAL)
+ : User(uid, ServerInstance->FakeClient->server, UserType::LOCAL)
, eh(this)
{
eh.SetFd(myfd);