aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-10-29 15:44:01 +0100
committerGravatar Sadie Powell2022-10-29 15:54:59 +0100
commit6fc111ccb6650a67f014977b2e7ebc2fb5b16790 (patch)
treeea56149af9bf3e2226e32385ad6989355266090d /src/modules
parentUse User::IsFullyConnected instead of checking for REG_ALL. (diff)
Rename session registration to connection to avoid a semantic conflict.
We previously referred to both session registration and user registration as "registration" which is confusing for users who aren't familiar with how IRC works.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_alias.cpp4
-rw-r--r--src/modules/m_blockamsg.cpp2
-rw-r--r--src/modules/m_chghost.cpp2
-rw-r--r--src/modules/m_conn_waitpong.cpp4
-rw-r--r--src/modules/m_disable.cpp4
-rw-r--r--src/modules/m_ident.cpp4
-rw-r--r--src/modules/m_ircv3.cpp2
-rw-r--r--src/modules/m_ircv3_chghost.cpp2
-rw-r--r--src/modules/m_ircv3_ctctags.cpp4
-rw-r--r--src/modules/m_sasl.cpp2
-rw-r--r--src/modules/m_setname.cpp2
-rw-r--r--src/modules/m_spanningtree/uid.cpp8
-rw-r--r--src/modules/m_starttls.cpp4
13 files changed, 21 insertions, 23 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 1a02b2972..ee4c5d6e5 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -160,9 +160,7 @@ public:
ModResult OnPreCommand(std::string& command, CommandBase::Params& parameters, LocalUser* user, bool validated) override
{
- /* If they're not registered yet, we dont want
- * to know.
- */
+ // If they're not fully connected yet, we dont want to know.
if (!user->IsFullyConnected())
return MOD_RES_PASSTHRU;
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp
index 793ec389d..93254a852 100644
--- a/src/modules/m_blockamsg.cpp
+++ b/src/modules/m_blockamsg.cpp
@@ -77,7 +77,7 @@ public:
ModResult OnPreCommand(std::string& command, CommandBase::Params& parameters, LocalUser* user, bool validated) override
{
- // Don't do anything with unregistered users
+ // Don't do anything with partially connected users
if (!user->IsFullyConnected())
return MOD_RES_PASSTHRU;
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index c98ea0208..d84b70a8e 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -59,7 +59,7 @@ public:
auto dest = ServerInstance->Users.Find(parameters[0]);
- // Allow services to change the host of unregistered users
+ // Allow services to change the host of partially connected users.
if (!dest || (!dest->IsFullyConnected() && !user->server->IsService()))
{
user->WriteNumeric(Numerics::NoSuchNick(parameters[0]));
diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp
index c00f4e850..e0112b6aa 100644
--- a/src/modules/m_conn_waitpong.cpp
+++ b/src/modules/m_conn_waitpong.cpp
@@ -57,7 +57,7 @@ public:
}
if(sendsnotice)
- user->WriteNotice("*** If you are having problems connecting due to registration timeouts type /quote PONG " + pingrpl + " or /raw PONG " + pingrpl + " now.");
+ user->WriteNotice("*** If you are having problems connecting due to connection timeouts type /quote PONG " + pingrpl + " or /raw PONG " + pingrpl + " now.");
ext.Set(user, pingrpl);
return MOD_RES_PASSTHRU;
@@ -79,7 +79,7 @@ public:
else
{
if(killonbadreply)
- ServerInstance->Users.QuitUser(user, "Incorrect ping reply for registration");
+ ServerInstance->Users.QuitUser(user, "Incorrect ping reply for connection");
return MOD_RES_DENY;
}
}
diff --git a/src/modules/m_disable.cpp b/src/modules/m_disable.cpp
index c718d0abc..e9610209f 100644
--- a/src/modules/m_disable.cpp
+++ b/src/modules/m_disable.cpp
@@ -141,7 +141,7 @@ public:
ModResult OnPreCommand(std::string& command, CommandBase::Params& parameters, LocalUser* user, bool validated) override
{
- // If a command is unvalidated or the source is not registered we do nothing.
+ // If a command is unvalidated or the source is not fully connected we do nothing.
if (!validated || !user->IsFullyConnected())
return MOD_RES_PASSTHRU;
@@ -169,7 +169,7 @@ public:
ModResult OnRawMode(User* user, Channel* chan, const Modes::Change& change) override
{
- // If a mode change is remote or the source is not registered we do nothing.
+ // If a mode change is remote or the source is not fully connected we do nothing.
if (!IS_LOCAL(user) || !user->IsFullyConnected())
return MOD_RES_PASSTHRU;
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 9adfaf3bd..ede26f28f 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -28,7 +28,7 @@
enum
{
- // Either the ident lookup has not started yet or the user is registered.
+ // Either the ident lookup has not started yet or the user is fully connected.
IDENT_UNKNOWN = 0,
// Ident lookups are not enabled and a user has been marked as being skipped.
@@ -380,7 +380,7 @@ public:
}
else if (!isock->HasResult())
{
- // time still good, no result yet... hold the registration
+ // time still good, no result yet... hold the connection
return MOD_RES_DENY;
}
diff --git a/src/modules/m_ircv3.cpp b/src/modules/m_ircv3.cpp
index c1c617538..a961dbffa 100644
--- a/src/modules/m_ircv3.cpp
+++ b/src/modules/m_ircv3.cpp
@@ -146,7 +146,7 @@ public:
void OnAccountChange(User* user, const std::string& newaccount) override
{
- if (!(user->registered & REG_NICKUSER))
+ if (!(user->connected & User::CONN_NICKUSER))
return;
// Logged in: 1 parameter which is the account name
diff --git a/src/modules/m_ircv3_chghost.cpp b/src/modules/m_ircv3_chghost.cpp
index df706334f..5ff9ac1ba 100644
--- a/src/modules/m_ircv3_chghost.cpp
+++ b/src/modules/m_ircv3_chghost.cpp
@@ -30,7 +30,7 @@ class ModuleIRCv3ChgHost final
void DoChgHost(User* user, const std::string& ident, const std::string& host)
{
- if (!(user->registered & REG_NICKUSER))
+ if (!(user->connected & User::CONN_NICKUSER))
return;
ClientProtocol::Message msg("CHGHOST", user);
diff --git a/src/modules/m_ircv3_ctctags.cpp b/src/modules/m_ircv3_ctctags.cpp
index 5d9e74e8a..14bc98fbc 100644
--- a/src/modules/m_ircv3_ctctags.cpp
+++ b/src/modules/m_ircv3_ctctags.cpp
@@ -133,7 +133,7 @@ private:
message.SetSideEffect(true);
for (auto* luser : ServerInstance->Users.GetLocalUsers())
{
- // Don't send to unregistered users or the user who is the source.
+ // Don't send to partially connected users or the user who is the source.
if (!luser->IsFullyConnected() || luser == source)
continue;
@@ -185,7 +185,7 @@ private:
if (!target)
{
- // The target user does not exist or is not fully registered.
+ // The target user does not exist or is not fully connected.
source->WriteNumeric(Numerics::NoSuchNick(parameters[0]));
return CmdResult::FAILURE;
}
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index 159d960ed..4ca3e6979 100644
--- a/src/modules/m_sasl.cpp
+++ b/src/modules/m_sasl.cpp
@@ -443,7 +443,7 @@ public:
void OnUserConnect(LocalUser* user) override
{
- // If the client completes registration (with CAP END, NICK, USER and
+ // If the client completes connection (with CAP END, NICK, USER and
// any other necessary messages) while the SASL authentication is still
// in progress, the server SHOULD abort it and send a 906 numeric, then
// register the client without authentication.
diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp
index e94f425f0..884edabec 100644
--- a/src/modules/m_setname.cpp
+++ b/src/modules/m_setname.cpp
@@ -95,7 +95,7 @@ public:
void OnChangeRealName(User* user, const std::string& real) override
{
- if (!(user->registered & REG_NICKUSER))
+ if (!(user->connected & User::CONN_NICKUSER))
return;
ClientProtocol::Message msg("SETNAME", user);
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index ccedf8c3c..e141f022b 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -51,14 +51,14 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, CommandBase::Params
auto collideswith = ServerInstance->Users.FindNick(params[2]);
if (collideswith && !collideswith->IsFullyConnected())
{
- // User that the incoming user is colliding with is not fully registered, we force nick change the
- // unregistered user to their uuid and tell them what happened
+ // User that the incoming user is colliding with is not fully connected, we force nick change the
+ // partially connected user to their uuid and tell them what happened
LocalUser* const localuser = static_cast<LocalUser*>(collideswith);
localuser->OverruleNick();
}
else if (collideswith)
{
- // The user on this side is registered, handle the collision
+ // The user on this side is fully connected, handle the collision
bool they_change = Utils->DoCollision(collideswith, remoteserver, nickchanged, params[5], params[6], params[0], "UID");
if (they_change)
{
@@ -85,7 +85,7 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, CommandBase::Params
_new->ident = params[5];
_new->ChangeRemoteAddress(sa);
_new->ChangeRealName(params.back());
- _new->registered = REG_ALL;
+ _new->connected = User::CONN_FULL;
_new->signon = signon;
_new->nickchanged = nickchanged;
diff --git a/src/modules/m_starttls.cpp b/src/modules/m_starttls.cpp
index c95b7b4f5..905e8f6e3 100644
--- a/src/modules/m_starttls.cpp
+++ b/src/modules/m_starttls.cpp
@@ -55,7 +55,7 @@ public:
if (user->IsFullyConnected())
{
- user->WriteNumeric(ERR_STARTTLS, "STARTTLS is not permitted after client registration is complete");
+ user->WriteNumeric(ERR_STARTTLS, "STARTTLS is not permitted once you are fully connected");
return CmdResult::FAILURE;
}
@@ -70,7 +70,7 @@ public:
* otherwise we'll be sending this line inside the TLS session - which
* won't start its handshake until the client gets this line. Currently,
* we assume the write will not block here; this is usually safe, as
- * STARTTLS is sent very early on in the registration phase, where the
+ * STARTTLS is sent very early on in the connection phase, where the
* user hasn't built up much sendq. Handling a blocked write here would
* be very annoying.
*/