diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-02 18:45:54 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-02 18:45:54 +0000 |
commit | 52671661f8fdca0b61aec8009b4bc7de9bc00166 (patch) | |
tree | 95bc4a1621d84dbca2d5075cd3f72db3a046544f /src/modules/m_svshold.cpp | |
parent | 82ce093f1adf40acda74d3cec927dc9e7fe963ff (diff) |
DOH! Fix my muppetry of a segfault, and fix some warnings
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9273 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_svshold.cpp')
-rw-r--r-- | src/modules/m_svshold.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index c5538dabd..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); @@ -261,7 +261,7 @@ class ModuleSVSHold : public Module if ((*iter)->set_on + (*iter)->length <= ServerInstance->Time()) { ServerInstance->Logs->Log("m_svshold",DEBUG, "m_svshold.so: hold on %s expired, removing...", (*iter)->nickname.c_str()); - ServerInstance->SNO->WriteToSnoMask('A',"%li second SVSHOLD on %s (%s) set %ld seconds ago expired", (*iter)->length, (*iter)->nickname.c_str(), (*iter)->reason.c_str(), ServerInstance->Time() - (*iter)->set_on); + 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; |