From 396c9ef9f7a96934d3227bb7d1d091315e3d4fa8 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 10 Aug 2006 14:43:29 +0000 Subject: FindNick, FindChan, ChanModes, UserList, CountInvisible, PurgeEmptyChannels, GetClass, WriteOpers, GetServerDescription -> into classes ServerConfig takes InspIRCd pointer in its constructor git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4832 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules.cpp | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'src/modules.cpp') diff --git a/src/modules.cpp b/src/modules.cpp index 1566ac5d7..da4a7e152 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -326,7 +326,7 @@ const std::string& Server::GetModuleName(Module* m) void Server::RehashServer() { - WriteOpers("*** Rehashing config file"); + ServerInstance->WriteOpers("*** Rehashing config file"); ServerInstance->Config->Read(false,NULL); } @@ -375,11 +375,6 @@ chanrec* Server::GetChannelIndex(long index) return NULL; } -void Server::SendOpers(const std::string &s) -{ - WriteOpers("%s",s.c_str()); -} - bool Server::MatchText(const std::string &sliteral, const std::string &spattern) { return match(sliteral.c_str(),spattern.c_str()); @@ -440,21 +435,11 @@ bool Server::IsNick(const std::string &nick) return (isnick(nick.c_str()) != 0); } -userrec* Server::FindNick(const std::string &nick) -{ - return Find(nick); -} - userrec* Server::FindDescriptor(int socket) { return (socket < 65536 ? ServerInstance->fd_ref_table[socket] : NULL); } -chanrec* Server::FindChannel(const std::string &channel) -{ - return FindChan(channel.c_str()); -} - std::string Server::ChanMode(userrec* User, chanrec* Chan) { return cmode(User,Chan); @@ -553,7 +538,7 @@ bool InspIRCd::PseudoToUser(userrec* alive, userrec* zombie, const std::string & zombie->WriteServ("332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic); zombie->WriteServ("333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset); } - userlist(zombie,Ptr); + Ptr->UserList(zombie); zombie->WriteServ("366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name); } } @@ -786,11 +771,11 @@ void ConfigReader::DumpErrors(bool bail, userrec* user) } else { - WriteOpers("There were errors in the configuration file:"); + ServerInstance->WriteOpers("There were errors in the configuration file:"); while(start < errors.length()) { - WriteOpers(errors.substr(start, 360).c_str()); + ServerInstance->WriteOpers(errors.substr(start, 360).c_str()); start += 360; } } -- cgit v1.3.1-10-gc9f91