mirror of
https://github.com/anope/anope.git
synced 2026-06-28 07:16:37 +02:00
Removed nickrequests, instead have unconfirmed registrations. Also made ns_resetpass allow remote-id to get past things such as kill immed.
This commit is contained in:
@@ -22,7 +22,6 @@ enum MDType
|
||||
MD_NONE,
|
||||
MD_NC,
|
||||
MD_NA,
|
||||
MD_NR,
|
||||
MD_BI,
|
||||
MD_CH
|
||||
};
|
||||
@@ -52,7 +51,6 @@ static void ReadDatabase(Module *m = NULL)
|
||||
|
||||
NickCore *nc = NULL;
|
||||
NickAlias *na = NULL;
|
||||
NickRequest *nr = NULL;
|
||||
BotInfo *bi = NULL;
|
||||
ChannelInfo *ci = NULL;
|
||||
|
||||
@@ -100,11 +98,6 @@ static void ReadDatabase(Module *m = NULL)
|
||||
na = findnick(params[2]);
|
||||
Type = MD_NA;
|
||||
}
|
||||
else if (params[0].equals_ci("NR"))
|
||||
{
|
||||
nr = findrequestnick(params[1]);
|
||||
Type = MD_NR;
|
||||
}
|
||||
else if (params[0].equals_ci("BI"))
|
||||
{
|
||||
bi = findbot(params[1]);
|
||||
@@ -149,20 +142,6 @@ static void ReadDatabase(Module *m = NULL)
|
||||
Log() << "[db_plain]: " << ex.GetReason();
|
||||
}
|
||||
}
|
||||
else if (Type == MD_NR && nr)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (m)
|
||||
m->OnDatabaseReadMetadata(nr, key, params);
|
||||
else
|
||||
FOREACH_RESULT(I_OnDatabaseReadMetadata, OnDatabaseReadMetadata(nr, key, params));
|
||||
}
|
||||
catch (const DatabaseException &ex)
|
||||
{
|
||||
Log() << "[db_plain]: " << ex.GetReason();
|
||||
}
|
||||
}
|
||||
else if (Type == MD_BI && bi)
|
||||
{
|
||||
try
|
||||
@@ -292,17 +271,6 @@ static void LoadNickAlias(const std::vector<Anope::string> ¶ms)
|
||||
Log(LOG_DEBUG_2) << "[db_plain}: Loaded nickalias for " << na->nick;
|
||||
}
|
||||
|
||||
static void LoadNickRequest(const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
NickRequest *nr = new NickRequest(params[0]);
|
||||
nr->passcode = params[1];
|
||||
nr->password = params[2];
|
||||
nr->email = params[3];
|
||||
nr->requested = params[4].is_pos_number_only() ? convertTo<time_t>(params[4]) : 0;
|
||||
|
||||
Log(LOG_DEBUG_2) << "[db_plain]: Loaded nickrequest for " << nr->nick;
|
||||
}
|
||||
|
||||
static void LoadBotInfo(const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
BotInfo *bi = findbot(params[0]);
|
||||
@@ -480,8 +448,6 @@ class DBPlain : public Module
|
||||
LoadNickCore(otherparams);
|
||||
else if (key.equals_ci("NA"))
|
||||
LoadNickAlias(otherparams);
|
||||
else if (key.equals_ci("NR"))
|
||||
LoadNickRequest(otherparams);
|
||||
else if (key.equals_ci("BI"))
|
||||
LoadBotInfo(otherparams);
|
||||
else if (key.equals_ci("CH"))
|
||||
@@ -765,15 +731,6 @@ class DBPlain : public Module
|
||||
|
||||
db_buffer << "VER 2" << endl;
|
||||
|
||||
for (nickrequest_map::const_iterator it = NickRequestList.begin(), it_end = NickRequestList.end(); it != it_end; ++it)
|
||||
{
|
||||
NickRequest *nr = it->second;
|
||||
|
||||
db_buffer << "NR " << nr->nick << " " << nr->passcode << " " << nr->password << " " << nr->email << " " << nr->requested << endl;
|
||||
|
||||
FOREACH_MOD(I_OnDatabaseWriteMetadata, OnDatabaseWriteMetadata(WriteMetadata, nr));
|
||||
}
|
||||
|
||||
for (nickcore_map::const_iterator nit = NickCoreList.begin(), nit_end = NickCoreList.end(); nit != nit_end; ++nit)
|
||||
{
|
||||
NickCore *nc = nit->second;
|
||||
|
||||
Reference in New Issue
Block a user