summaryrefslogtreecommitdiff
path: root/modules/protocol/ratbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/protocol/ratbox.cpp')
-rw-r--r--modules/protocol/ratbox.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index 8b6a73cd0..ea1c35c83 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -474,17 +474,8 @@ bool event_encap(const Anope::string &source, const std::vector<Anope::string> &
bool event_pong(const Anope::string &source, const std::vector<Anope::string> &params)
{
Server *s = Server::Find(source);
- if (s && !s->IsSynced())
- {
+ if (s)
s->Sync(false);
-
- for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();)
- {
- User *u = *it;
- if (u->server == s && !u->IsIdentified())
- validate_user(u);
- }
- }
return true;
}
@@ -580,6 +571,19 @@ class ProtoRatbox : public Module
pmodule_ircd_message(&this->ircd_message);
this->AddModes();
+
+ Implementation i[] = { I_OnServerSync };
+ ModuleManager::Attach(i, this, 1);
+ }
+
+ void OnServerSync(Server *s)
+ {
+ for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();)
+ {
+ User *u = *it;
+ if (u->server == s && !u->IsIdentified())
+ validate_user(u);
+ }
}
};