X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_safelist.cpp;h=091d59d1a7313e171304a170a3bb1d6a5bffe8c8;hb=94288cdc2efb02eab9f27b3225adad839a7f2b58;hp=45177805ec9790975938d7fc3817086e01caa380;hpb=2591562ada4cb1f866e5d1c98340fb19332b3844;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp index 45177805e..091d59d1a 100644 --- a/src/modules/m_safelist.cpp +++ b/src/modules/m_safelist.cpp @@ -22,10 +22,13 @@ using namespace std; #include "helperfuncs.h" #include "message.h" #include +#include "configreader.h" #include "inspircd.h" extern time_t TIME; +extern InspIRCd* ServerInstance; + class ListData : public classbase { public: @@ -105,9 +108,9 @@ class ListTimer : public InspTimer long users = chan->GetUserCounter(); if (users) { - int counter = snprintf(buffer,MAXBUF,"322 %s %s %ld :[+%s] %s",u->nick,chan->name,users,chanmodes(chan,has_user),chan->topic); + int counter = snprintf(buffer,MAXBUF,"322 %s %s %ld :[+%s] %s",u->nick,chan->name,users,chan->ChanModes(has_user),chan->topic); /* Increment total plus linefeed */ - amount_sent += counter + 4 + Srv->GetServerName().length(); + amount_sent += counter + 4 + strlen(ServerInstance->Config->ServerName); log(DEBUG,"m_safelist.so: Sent %ld of safe %ld / 4",amount_sent,u->sendqmax); u->WriteServ(std::string(buffer)); } @@ -131,7 +134,7 @@ class ListTimer : public InspTimer } ListTimer* MyTimer = new ListTimer(1,Srv); - Srv->AddTimer(MyTimer); + ServerInstance->Timers->AddTimer(MyTimer); } }; @@ -146,7 +149,7 @@ class ModuleSafeList : public Module Srv = Me; MyTimer = new ListTimer(1,Srv); - Srv->AddTimer(MyTimer); + ServerInstance->Timers->AddTimer(MyTimer); } virtual ~ModuleSafeList()