X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_cban.cpp;h=43f53668e9de4d01bb1c34fe36f3761b0521163d;hb=b78e9d4af214d09227fd528a95acb54508a5d5bc;hp=ae49dbc059ae1e13cb21971db3fb2dfd4d8c09a6;hpb=21e7efdadfa685ac1ddcb0a0a515502bc873302b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index ae49dbc05..43f53668e 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -1,10 +1,16 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2019 Matt Schatz + * Copyright (C) 2018 linuxdaemon + * Copyright (C) 2013, 2017-2018, 2020 Sadie Powell + * Copyright (C) 2012-2013, 2016 Attila Molnar + * Copyright (C) 2012, 2019 Robby + * Copyright (C) 2009 John Brooks + * Copyright (C) 2009 Daniel De Graaf + * Copyright (C) 2008 Robin Burchell * Copyright (C) 2007-2008 Dennis Friis - * Copyright (C) 2005-2008 Robin Burchell - * Copyright (C) 2005-2006 Craig Edwards - * Copyright (C) 2006 Oliver Lupton + * Copyright (C) 2006, 2010 Craig Edwards * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -106,7 +112,7 @@ class CommandCBan : public Command } else { - user->WriteNotice("*** CBan " + parameters[0] + " not found in list, try /stats C."); + user->WriteNotice("*** CBan " + parameters[0] + " not found on the list."); return CMD_FAILURE; } } @@ -130,9 +136,9 @@ class CommandCBan : public Command } else { - time_t c_requires_crap = duration + ServerInstance->Time(); - std::string timestr = InspIRCd::TimeString(c_requires_crap); - ServerInstance->SNO->WriteGlobalSno('x', "%s added timed CBan for %s, expires on %s: %s", user->nick.c_str(), parameters[0].c_str(), timestr.c_str(), reason); + ServerInstance->SNO->WriteGlobalSno('x', "%s added timed CBan for %s, expires in %s (on %s): %s", + user->nick.c_str(), parameters[0].c_str(), InspIRCd::DurationString(duration).c_str(), + InspIRCd::TimeString(ServerInstance->Time() + duration).c_str(), reason); } } else @@ -182,7 +188,7 @@ class ModuleCBan : public Module, public Stats::EventListener if (stats.GetSymbol() != 'C') return MOD_RES_PASSTHRU; - ServerInstance->XLines->InvokeStats("CBAN", 210, stats); + ServerInstance->XLines->InvokeStats("CBAN", stats); return MOD_RES_DENY; } @@ -204,7 +210,7 @@ class ModuleCBan : public Module, public Stats::EventListener Version GetVersion() CXX11_OVERRIDE { - return Version("Gives /cban, aka C-lines. Think Q-lines, for channels.", VF_COMMON | VF_VENDOR); + return Version("Adds the /CBAN command which allows server operators to prevent channels matching a glob from being created.", VF_COMMON | VF_VENDOR); } };