2009-08-23 06:19:15 +02:00
|
|
|
/*
|
|
|
|
* ============================================================================
|
|
|
|
*
|
|
|
|
* Zombie:Reloaded
|
|
|
|
*
|
|
|
|
* File: version.inc
|
|
|
|
* Description: Command for version information.
|
|
|
|
*
|
2013-01-12 08:47:36 +01:00
|
|
|
* Copyright (C) 2009-2013 Greyscale, Richard Helgeby
|
2009-08-23 06:19:15 +02:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* ============================================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
VersionOnCommandsCreate()
|
|
|
|
{
|
|
|
|
RegConsoleCmd("zr_version", Command_Version, "Prints version info about this plugin.");
|
|
|
|
}
|
|
|
|
|
|
|
|
public Action:Command_Version(client, argc)
|
|
|
|
{
|
|
|
|
decl String:buffer[512];
|
|
|
|
decl String:linebuffer[128];
|
|
|
|
buffer[0] = 0;
|
|
|
|
linebuffer[0] = 0;
|
2016-02-06 00:47:47 +01:00
|
|
|
|
2009-10-26 23:17:22 +01:00
|
|
|
#define FORMATSTRING "%24s: %s\n"
|
2016-02-06 00:47:47 +01:00
|
|
|
|
2009-08-23 06:19:15 +02:00
|
|
|
Format(linebuffer, sizeof(linebuffer), "%s\n", ZR_VER_PRODUCT_NAME);
|
|
|
|
StrCat(buffer, sizeof(buffer), linebuffer);
|
2016-02-06 00:47:47 +01:00
|
|
|
|
2009-08-23 06:19:15 +02:00
|
|
|
Format(linebuffer, sizeof(linebuffer), "%s\n\n", ZR_VER_COPYRIGHT);
|
|
|
|
StrCat(buffer, sizeof(buffer), linebuffer);
|
2016-02-06 00:47:47 +01:00
|
|
|
|
2009-10-26 23:17:22 +01:00
|
|
|
Format(linebuffer, sizeof(linebuffer), FORMATSTRING, "Version", ZR_VER_VERSION);
|
2009-08-23 06:19:15 +02:00
|
|
|
StrCat(buffer, sizeof(buffer), linebuffer);
|
2016-02-06 00:47:47 +01:00
|
|
|
|
2009-10-26 23:17:22 +01:00
|
|
|
Format(linebuffer, sizeof(linebuffer), FORMATSTRING, "Compile date", ZR_VER_DATE);
|
2009-08-23 06:19:15 +02:00
|
|
|
StrCat(buffer, sizeof(buffer), linebuffer);
|
2016-02-06 00:47:47 +01:00
|
|
|
|
2009-10-26 23:17:22 +01:00
|
|
|
Format(linebuffer, sizeof(linebuffer), FORMATSTRING, "License", ZR_VER_LICENSE);
|
2009-08-23 06:19:15 +02:00
|
|
|
StrCat(buffer, sizeof(buffer), linebuffer);
|
2016-02-06 00:47:47 +01:00
|
|
|
|
2009-10-26 23:17:22 +01:00
|
|
|
Format(linebuffer, sizeof(linebuffer), FORMATSTRING, "Build", ZR_VER_REVISION);
|
2009-08-23 06:19:15 +02:00
|
|
|
StrCat(buffer, sizeof(buffer), linebuffer);
|
2016-02-06 00:47:47 +01:00
|
|
|
|
2009-10-26 23:17:22 +01:00
|
|
|
Format(linebuffer, sizeof(linebuffer), FORMATSTRING, "Development branch", ZR_VER_BRANCH);
|
2009-08-23 06:19:15 +02:00
|
|
|
StrCat(buffer, sizeof(buffer), linebuffer);
|
2016-02-06 00:47:47 +01:00
|
|
|
|
2009-08-23 06:19:15 +02:00
|
|
|
ReplyToCommand(client, buffer);
|
|
|
|
return Plugin_Handled;
|
|
|
|
}
|