summaryrefslogtreecommitdiff
path: root/modules/protocol/ratbox.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-19 16:27:38 -0400
committerAdam <Adam@anope.org>2010-08-19 16:27:38 -0400
commit931b0777fbd961a4ca961ddfa763af92dcce946c (patch)
treeb49fd2d5ee2d2299e933a3561be6e81ffcb3664e /modules/protocol/ratbox.cpp
parentb180d5f975b3fd9a096a712adf9589c360831f72 (diff)
Changed the svid system back to using user timestamps for IRCds limited to just usermode +d. This allows us to keep people logged in once again when Anope is restarted.
Diffstat (limited to 'modules/protocol/ratbox.cpp')
-rw-r--r--modules/protocol/ratbox.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index 59abc7bc8..8db46a3d5 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -437,12 +437,16 @@ int anope_event_nick(const Anope::string &source, int ac, const char **av)
user = do_nick("", av[0], av[4], av[5], s->GetName(), av[8], Anope::string(av[2]).is_number_only() ? convertTo<time_t>(av[2]) : 0, 0, "*", av[7]);
if (user)
{
- /* No usermode +d on ratbox so we use
- * nick timestamp to check for auth - Adam
- */
- user->CheckAuthenticationToken(av[2]);
-
UserSetInternalModes(user, 1, &av[3]);
+
+ NickAlias *na = findnick(user->nick);
+ Anope::string svidbuf;
+ if (na && na->nc->GetExtRegular("authenticationtoken", svidbuf) && svidbuf == av[2])
+ {
+ user->Login(na->nc);
+ }
+ else
+ validate_user(user);
}
}
else if (ac == 2)