]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/coremods/core_info/cmd_info.cpp
Skip module tags which don't have a module specified.
[user/henk/code/inspircd.git] / src / coremods / core_info / cmd_info.cpp
1 /*
2  * InspIRCd -- Internet Relay Chat Daemon
3  *
4  *   Copyright (C) 2018-2020 Sadie Powell <sadie@witchery.services>
5  *   Copyright (C) 2015 Robin Burchell <robin+git@viroteck.net>
6  *   Copyright (C) 2013-2014, 2016 Attila Molnar <attilamolnar@hush.com>
7  *   Copyright (C) 2012, 2019 Robby <robby@chatbelgie.be>
8  *   Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
9  *   Copyright (C) 2007, 2010 Craig Edwards <brain@inspircd.org>
10  *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
11  *
12  * This file is part of InspIRCd.  InspIRCd is free software: you can
13  * redistribute it and/or modify it under the terms of the GNU General Public
14  * License as published by the Free Software Foundation, version 2.
15  *
16  * This program is distributed in the hope that it will be useful, but WITHOUT
17  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
19  * details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23  */
24
25
26 #include "inspircd.h"
27 #include "core_info.h"
28
29 CommandInfo::CommandInfo(Module* parent)
30         : ServerTargetCommand(parent, "INFO")
31 {
32         Penalty = 4;
33         syntax = "[<servername>]";
34 }
35
36 static const char* const lines[] = {
37         "                   -/\\- \002InspIRCd\002 -\\/-",
38         "                 November 2002 - Present",
39         " ",
40         "\002Core Developers\002:",
41         "    Matt Schatz,            genius3000, <genius3000@g3k.solutions>",
42         "    Sadie Powell,           SadieCat,   <sadie@witchery.services>",
43         " ",
44         "\002Former Developers\002:",
45         "    Attila Molnar,          Attila,     <attilamolnar@hush.com>",
46         "    Daniel De Graaf,        danieldg,   <danieldg@inspircd.org>",
47         "    Dennis Friis,           peavey,     <peavey@inspircd.org>",
48         "    John Brooks,            Special,    <special@inspircd.org>",
49         "    Matt Smith,             dz,         <dz@inspircd.org>",
50         "    Oliver Lupton,          Om,         <om@inspircd.org>",
51         "    Thomas Stagner,         aquanight,  <aquanight@inspircd.org>",
52         "    Uli Schlachter,         psychon,    <psychon@inspircd.org>",
53         " ",
54         "\002Founding Developers\002:",
55         "    Craig Edwards,          Brain,      <brain@inspircd.org>",
56         "    Craig McLure,           Craig,      <craig@inspircd.org>",
57         "    Robin Burchell,         w00t,       <w00t@inspircd.org>",
58         " ",
59         "\002Active Contributors\002:",
60         "   Adam            linuxdaemon     Robby           Sheogorath",
61         " ",
62         "\002Former Contributors\002:",
63         "   Adremelech      Ankit           AnMaster        Bricker",
64         "   BuildSmart      Burlex          CC              ChrisTX",
65         "   Dan             djGrrr          dmb             eggy",
66         "   GreenReaper     HiroP           jackmcbarn      jamie",
67         "   Jason           jilles          John2           kaniini",
68         "   LeaChim         MacGyver        Majic           Namegduf",
69         "   owine           Phoenix         pippijn         praetorian",
70         "   Quension        satmd           Shawn           Shutter",
71         "   skenmy          Skip            Stskeeps        Taros",
72         "   ThaPrince       Thunderhacker   typobox43       Zaba",
73         " ",
74         "\002Thanks To\002:",
75         "   Asmo            Brik            fraggeln        prawnsalad",
76         " ",
77         " Best experienced with: \002An IRC client\002",
78         NULL
79 };
80
81 /** Handle /INFO
82  */
83 CmdResult CommandInfo::Handle(User* user, const Params& parameters)
84 {
85         if (parameters.size() > 0 && !irc::equals(parameters[0], ServerInstance->Config->ServerName))
86                 return CMD_SUCCESS;
87
88         int i=0;
89         while (lines[i])
90                 user->WriteRemoteNumeric(RPL_INFO, lines[i++]);
91
92         user->WriteRemoteNumeric(RPL_ENDOFINFO, "End of /INFO list");
93         return CMD_SUCCESS;
94 }