2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2019 Matt Schatz <genius3000@g3k.solutions>
5 * Copyright (C) 2018 Sadie Powell <sadie@witchery.services>
6 * Copyright (C) 2013, 2015 Attila Molnar <attilamolnar@hush.com>
7 * Copyright (C) 2012 Robby <robby@chatbelgie.be>
8 * Copyright (C) 2010 Craig Edwards <brain@inspircd.org>
9 * Copyright (C) 2009 Uli Schlachter <psychon@inspircd.org>
10 * Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
11 * Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
13 * This file is part of InspIRCd. InspIRCd is free software: you can
14 * redistribute it and/or modify it under the terms of the GNU General Public
15 * License as published by the Free Software Foundation, version 2.
17 * This program is distributed in the hope that it will be useful, but WITHOUT
18 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
32 CmdResult CommandDelLine::Handle(User* user, Params& params)
34 const std::string& setter = user->nick;
37 // XLineManager::DelLine() returns true if the xline existed, false if it didn't
38 if (ServerInstance->XLines->DelLine(params[1].c_str(), params[0], reason, user))
40 ServerInstance->SNO->WriteToSnoMask('X', "%s removed %s%s on %s: %s", setter.c_str(),
41 params[0].c_str(), params[0].length() == 1 ? "-line" : "", params[1].c_str(), reason.c_str());