summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-10-14 12:20:07 -0400
committerAdam <Adam@anope.org>2011-10-14 12:20:07 -0400
commitddc3c2f38cf6ddc0c1f8ad82489a281e01ef50fc (patch)
tree832b02a62d2da9078b7ab5f9d4d5d99e15570294 /src
parent53275c362c521807b70e1eb7cf936f35593dd4dc (diff)
Added options:nonicknameownership config option
Diffstat (limited to 'src')
-rw-r--r--src/config.cpp1
-rw-r--r--src/users.cpp6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/config.cpp b/src/config.cpp
index ebe31cbbc..f9139bf7a 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -1170,6 +1170,7 @@ ConfigItems::ConfigItems(ServerConfig *conf)
{"options", "botmodes", "", new ValueContainerString(&conf->BotModes), DT_STRING, NoValidation},
{"options", "retrywait", "60", new ValueContainerInt(&conf->RetryWait), DT_INTEGER, ValidateNotZero},
{"options", "hideprivilegedcommands", "no", new ValueContainerBool(&conf->HidePrivilegedCommands), DT_BOOLEAN, NoValidation},
+ {"options", "nonicknameownership", "no", new ValueContainerBool(&conf->NoNicknameOwnership), DT_BOOLEAN | DT_NORELOAD, NoValidation},
{"nickserv", "name", "", new ValueContainerString(&conf->NickServ), DT_STRING, NoValidation},
{"nickserv", "emailregistration", "no", new ValueContainerBool(&conf->NSEmailReg), DT_BOOLEAN, NoValidation},
{"nickserv", "forceemail", "no", new ValueContainerBool(&conf->NSForceEmail), DT_BOOLEAN, ValidateEmailReg},
diff --git a/src/users.cpp b/src/users.cpp
index e1ed207ec..f09cdeed2 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -361,9 +361,9 @@ void User::Identify(NickAlias *na)
}
this->Login(na->nc);
- if (!na->nc->HasFlag(NI_UNCONFIRMED))
- ircdproto->SendAccountLogin(this, this->Account());
- ircdproto->SetAutoIdentificationToken(this);
+ ircdproto->SendLogin(this);
+ if (!Config->NoNicknameOwnership && na->nc == this->Account() && na->nc->HasFlag(NI_UNCONFIRMED) == false)
+ this->SetMode(findbot(Config->NickServ), UMODE_REGISTERED);
FOREACH_MOD(I_OnNickIdentify, OnNickIdentify(this));