1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 03:56:40 +02:00

Pretty large coding style cleanup, in source doc

cleanup, and allow protocol mods to depend on each
other
This commit is contained in:
Adam
2012-11-22 00:50:33 -05:00
parent 368d469631
commit d33a0f75a5
303 changed files with 7880 additions and 9388 deletions
+9 -10
View File
@@ -5,7 +5,7 @@ static Module *me;
class SQLAuthenticationResult : public SQLInterface
{
dynamic_reference<User> user;
Reference<User> user;
IdentifyRequest *req;
public:
@@ -37,26 +37,25 @@ class SQLAuthenticationResult : public SQLInterface
}
catch (const SQLException &) { }
const BotInfo *bi = findbot(Config->NickServ);
NickAlias *na = findnick(req->GetAccount());
NickAlias *na = NickAlias::Find(req->GetAccount());
if (na == NULL)
{
na = new NickAlias(req->GetAccount(), new NickCore(req->GetAccount()));
if (user)
{
if (Config->NSAddAccessOnReg)
na->nc->AddAccess(create_mask(user));
na->nc->AddAccess(user->Mask());
if (bi)
user->SendMessage(bi, _("Your account \002%s\002 has been successfully created."), na->nick.c_str());
if (NickServ)
user->SendMessage(NickServ, _("Your account \002%s\002 has been successfully created."), na->nick.c_str());
}
}
if (!email.empty() && email != na->nc->email)
{
na->nc->email = email;
if (user && bi)
user->SendMessage(bi, _("Your email has been updated to \002%s\002."), email.c_str());
if (user && NickServ)
user->SendMessage(NickServ, _("Your email has been updated to \002%s\002."), email.c_str());
}
req->Success(me);
@@ -77,7 +76,7 @@ class ModuleSQLAuthentication : public Module
bool disable_register;
Anope::string disable_reason;
service_reference<SQLProvider> SQL;
ServiceReference<SQLProvider> SQL;
public:
ModuleSQLAuthentication(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, SUPPORTED)
@@ -101,7 +100,7 @@ class ModuleSQLAuthentication : public Module
this->disable_register = config.ReadFlag("m_sql_authentication", "disable_ns_register", "false", 0);
this->disable_reason = config.ReadValue("m_sql_authentication", "disable_reason", "", 0);
this->SQL = service_reference<SQLProvider>("SQLProvider", this->engine);
this->SQL = ServiceReference<SQLProvider>("SQLProvider", this->engine);
}
EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> &params) anope_override