]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules.cpp
Optimisation of optimisation :P ty w00tie
[user/henk/code/inspircd.git] / src / modules.cpp
index 266556dac1abd622f70387432a3dbf119f117f80..a267662dfdd0abd16d321f09cc7d7effa9620195 100644 (file)
@@ -405,6 +405,7 @@ long Server::GetChannelCount()
 
 chanrec* Server::GetChannelIndex(long index)
 {
+       int target = 0;
        for (chan_hash::iterator n = chanlist.begin(); n != chanlist.end(); n++, target++)
        {
                if (index == target)
@@ -413,6 +414,11 @@ chanrec* Server::GetChannelIndex(long index)
        return NULL;
 }
 
+void Server::AddTimer(InspTimer* T)
+{
+       ::AddTimer(T);
+}
+
 void Server::SendOpers(std::string s)
 {
        WriteOpers("%s",s.c_str());
@@ -480,9 +486,9 @@ bool Server::IsUlined(std::string server)
        return is_uline(server.c_str());
 }
 
-void Server::CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user)
+bool Server::CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user)
 {
-       ServerInstance->Parser->CallHandler(commandname,parameters,pcnt,user);
+       return ServerInstance->Parser->CallHandler(commandname,parameters,pcnt,user);
 }
 
 bool Server::IsValidModuleCommand(std::string commandname, int pcnt, userrec* user)
@@ -529,7 +535,7 @@ void Server::SendTo(userrec* Source, userrec* Dest, std::string s)
        if (!Source)
        {
                // if source is NULL, then the message originates from the local server
-               Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
+               WriteServ_NoFormat(Dest->fd,s.c_str());
        }
        else
        {