X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_svshold.cpp;h=4a650fb1fc3d3afaa598d70960eb38ff9314fdf2;hb=52671661f8fdca0b61aec8009b4bc7de9bc00166;hp=4701a717b336b055e4865cba7e55fb0692029566;hpb=dd36852a52e8541306b76c5b88bce8ab9b36654c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index 4701a717b..4a650fb1f 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -82,7 +82,7 @@ class CommandSvshold : public Command if ((*iter)->length) { remaining = ((*iter)->set_on + (*iter)->length) - ServerInstance->Time(); - user->WriteServ( "386 %s %s :Removed SVSHOLD with %lu seconds left before expiry (%s)", user->nick, (*iter)->nickname.c_str(), remaining, (*iter)->reason.c_str()); + user->WriteServ( "386 %s %s :Removed SVSHOLD with %lu seconds left before expiry (%s)", user->nick, (*iter)->nickname.c_str(), (unsigned long)remaining, (*iter)->reason.c_str()); } else { @@ -113,7 +113,7 @@ class CommandSvshold : public Command return CMD_FAILURE; } - long length = ServerInstance->Duration(parameters[1]); + unsigned long length = ServerInstance->Duration(parameters[1]); std::string reason = (pcnt > 2) ? parameters[2] : "No reason supplied"; SVSHold* S = new SVSHold(parameters[0], user->nick, ServerInstance->Time(), length, reason); @@ -226,7 +226,7 @@ class ModuleSVSHold : public Module virtual Version GetVersion() { - return Version(1, 1, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION); + return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION); } std::string EncodeSVSHold(const SVSHold* ban) @@ -260,8 +260,8 @@ class ModuleSVSHold : public Module { if ((*iter)->set_on + (*iter)->length <= ServerInstance->Time()) { - ServerInstance->Log(DEBUG, "m_svshold.so: hold on %s expired, removing...", (*iter)->nickname.c_str()); - ServerInstance->SNO->WriteToSnoMask('A',"%li second SVSHOLD on %s (%s) set %u seconds ago expired", (*iter)->length, (*iter)->nickname.c_str(), (*iter)->reason.c_str(), ServerInstance->Time() - (*iter)->set_on); + ServerInstance->Logs->Log("m_svshold",DEBUG, "m_svshold.so: hold on %s expired, removing...", (*iter)->nickname.c_str()); + ServerInstance->SNO->WriteToSnoMask('A',"%lu second SVSHOLD on %s (%s) set %lu seconds ago expired", (unsigned long) (*iter)->length, (*iter)->nickname.c_str(), (*iter)->reason.c_str(), (unsigned long) ServerInstance->Time() - (*iter)->set_on); HoldMap.erase(assign((*iter)->nickname)); delete *iter; safeiter = iter;