From a5af52146d191612484cdf010a2bda0dfb385ab5 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 17 Dec 2006 01:22:10 +0000 Subject: Handle removal of permenant svsholds git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6027 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_svshold.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3