diff options
| author | Adam <Adam@anope.org> | 2012-06-27 16:23:17 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2012-07-01 22:26:05 -0400 |
| commit | 9b5f6d3c45987f29a6270b0cc3e8327c232ab991 (patch) | |
| tree | c908ec5fe94d9ae51f078e3679d382ef6da71cdc /modules/commands/ns_register.cpp | |
| parent | af24dc605079e2a37fb013e3c1f72b0d916b61a4 (diff) | |
Remove ExtensibleString everywhere
Diffstat (limited to 'modules/commands/ns_register.cpp')
| -rw-r--r-- | modules/commands/ns_register.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp index 05a87c4cf..0d51ef20c 100644 --- a/modules/commands/ns_register.cpp +++ b/modules/commands/ns_register.cpp @@ -15,11 +15,6 @@ static bool SendRegmail(User *u, const NickAlias *na, const BotInfo *bi); -struct ExtensibleString : Anope::string, ExtensibleItem -{ - ExtensibleString(const Anope::string &s) : Anope::string(s) { } -}; - class CommandNSConfirm : public Command { public: @@ -50,7 +45,7 @@ class CommandNSConfirm : public Command } else if (source.nc) { - Anope::string *code = source.nc->GetExt<ExtensibleString *>("ns_register_passcode"); + Anope::string *code = source.nc->GetExt<ExtensibleItemClass<Anope::string> *>("ns_register_passcode"); if (code != NULL && *code == passcode) { NickCore *nc = source.nc; @@ -354,7 +349,7 @@ static bool SendRegmail(User *u, const NickAlias *na, const BotInfo *bi) { NickCore *nc = na->nc; - Anope::string *code = na->nc->GetExt<ExtensibleString *>("ns_register_passcode"); + Anope::string *code = na->nc->GetExt<ExtensibleItemClass<Anope::string> *>("ns_register_passcode"); Anope::string codebuf; if (code == NULL) { @@ -368,7 +363,7 @@ static bool SendRegmail(User *u, const NickAlias *na, const BotInfo *bi) int idx, min = 1, max = 62; for (idx = 0; idx < 9; ++idx) codebuf += chars[1 + static_cast<int>((static_cast<float>(max - min)) * static_cast<uint16_t>(rand()) / 65536.0) + min]; - nc->Extend("ns_register_passcode", new ExtensibleString(codebuf)); + nc->Extend("ns_register_passcode", new ExtensibleItemClass<Anope::string>(codebuf)); } else codebuf = *code; |
