+
+void UserManager::ServerNoticeAll(const char* text, ...)
+{
+ std::string message;
+ VAFORMAT(message, text, text);
+ message = "NOTICE $" + ServerInstance->Config->ServerName + " :" + message;
+
+ for (LocalUserList::const_iterator i = local_users.begin(); i != local_users.end(); i++)
+ {
+ User* t = *i;
+ t->WriteServ(message);
+ }
+}
+
+/* return how many users have a given mode e.g. 'a' */
+int UserManager::ModeCount(const char mode)
+{
+ int c = 0;
+ for(user_hash::iterator i = clientlist->begin(); i != clientlist->end(); ++i)
+ {
+ User* u = i->second;
+ if (u->modes[mode-65])
+ c++;
+ }
+ return c;
+}
+
+void UserManager::GarbageCollect()
+{
+ // Reset the already_sent IDs so we don't wrap it around and drop a message
+ LocalUser::already_sent_id = 0;
+ for (LocalUserList::const_iterator i = this->local_users.begin(); i != this->local_users.end(); i++)
+ {
+ (**i).already_sent = 0;
+ (**i).RemoveExpiredInvites();
+ }
+}
+
+/* this returns true when all modules are satisfied that the user should be allowed onto the irc server
+ * (until this returns true, a user will block in the waiting state, waiting to connect up to the
+ * registration timeout maximum seconds)
+ */
+bool UserManager::AllModulesReportReady(LocalUser* user)
+{
+ ModResult res;
+ FIRST_MOD_RESULT(OnCheckReady, res, (user));
+ return (res == MOD_RES_PASSTHRU);
+}