diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-17 01:22:10 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-17 01:22:10 +0000 |
commit | a5af52146d191612484cdf010a2bda0dfb385ab5 (patch) | |
tree | ed062dcb3aeb40c9ca83809696eebdb23dffacf9 /src/modules | |
parent | 9412c906164b183ccb79f27890d03187fc8c3123 (diff) |
Handle removal of permenant svsholds
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6027 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_svshold.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index 604162093..ad1ec8085 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -76,8 +76,16 @@ class cmd_svshold : public command_t { if (parameters[0] == assign((*iter)->nickname)) { - unsigned long 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()); + unsigned long remaining = 0; + 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()); + } + else + { + user->WriteServ( "386 %s %s :Removed permenant SVSHOLD (%s)", user->nick, (*iter)->nickname.c_str(), (*iter)->reason.c_str()); + } SVSHolds.erase(iter); break; } |