-void ShowMOTD(userrec *user)
-{
- if (!ServerInstance->Config->MOTD.size())
- {
- user->WriteServ("422 %s :Message of the day file is missing.",user->nick);
- return;
- }
- user->WriteServ("375 %s :%s message of the day", user->nick, ServerInstance->Config->ServerName);
-
- for (unsigned int i = 0; i < ServerInstance->Config->MOTD.size(); i++)
- user->WriteServ("372 %s :- %s",user->nick,ServerInstance->Config->MOTD[i].c_str());
-
- user->WriteServ("376 %s :End of message of the day.", user->nick);
-}
-
-void ShowRULES(userrec *user)
-{
- if (!ServerInstance->Config->RULES.size())
- {
- user->WriteServ("NOTICE %s :Rules file is missing.",user->nick);
- return;
- }
- user->WriteServ("NOTICE %s :%s rules",user->nick,ServerInstance->Config->ServerName);
-
- for (unsigned int i = 0; i < ServerInstance->Config->RULES.size(); i++)
- user->WriteServ("NOTICE %s :%s",user->nick,ServerInstance->Config->RULES[i].c_str());
-
- user->WriteServ("NOTICE %s :End of %s rules.",user->nick,ServerInstance->Config->ServerName);
-}
-
-// this returns 1 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 AllModulesReportReady(userrec* user)
-{
- if (!ServerInstance->Config->global_implementation[I_OnCheckReady])
- return true;
-
- for (int i = 0; i <= MODCOUNT; i++)
- {
- if (ServerInstance->Config->implement_lists[i][I_OnCheckReady])
- {
- int res = modules[i]->OnCheckReady(user);
- if (!res)
- return false;
- }
- }
-
- return true;
-}
-
-int InsertMode(std::string &output, const char* mode, unsigned short section)
-{
- unsigned short currsection = 1;
- unsigned int pos = output.find("CHANMODES=", 0) + 10; // +10 for the length of "CHANMODES="
-
- if(section > 4 || section == 0)
- {
- log(DEBUG, "InsertMode: CHANMODES doesn't have a section %dh :/", section);
- return 0;
- }
-
- for(; pos < output.size(); pos++)
- {
- if(section == currsection)
- break;
-
- if(output[pos] == ',')
- currsection++;
- }
-
- output.insert(pos, mode);
- return 1;
-}
-
-bool IsValidChannelName(const char *chname)