mirror of
https://github.com/anope/anope.git
synced 2026-06-12 18:54:47 +02:00
Changed the versioning system to use git
This commit is contained in:
+21
-2
@@ -366,8 +366,8 @@ else(INSTDIR)
|
||||
endif(INSTDIR)
|
||||
|
||||
# Version number processing
|
||||
# Find all lines in version.log that start with VERSION_
|
||||
read_from_file(${Anope_SOURCE_DIR}/version.log "^VERSION_" VERSIONS)
|
||||
# Find all lines in src/version.sh that start with VERSION_
|
||||
read_from_file(${Anope_SOURCE_DIR}/src/version.sh "^VERSION_" VERSIONS)
|
||||
# Iterate through the strings found
|
||||
foreach(VERSION_STR ${VERSIONS})
|
||||
# Get the length of the string
|
||||
@@ -382,6 +382,25 @@ foreach(VERSION_STR ${VERSIONS})
|
||||
set(VERSION_${VERSION_TYPE} ${VERSION})
|
||||
endforeach(VERSION_STR ${VERSIONS})
|
||||
|
||||
# Default build version to 0
|
||||
set(VERSION_BUILD 0)
|
||||
|
||||
# Only change the build number if version.h exists
|
||||
if(EXISTS "${Anope_SOURCE_DIR}/include/version.h")
|
||||
# Attempt to read the build number from include/version.h
|
||||
read_from_file(${Anope_SOURCE_DIR}/include/version.h "^#define VERSION_BUILD" VERSIONS)
|
||||
foreach(VERSION_STR ${VERSIONS})
|
||||
# Get the length of the string
|
||||
string(LENGTH ${VERSION_STR} VERSION_LEN)
|
||||
# Subtract 22 from the string's length
|
||||
math(EXPR VERSION_NUM_LEN "${VERSION_LEN} - 22")
|
||||
# Extract the value from the string
|
||||
string(SUBSTRING ${VERSION_STR} 22 ${VERSION_NUM_LEN} VERSION)
|
||||
# Set VERSION_BUILD correctly
|
||||
set(VERSION_BUILD ${VERSION})
|
||||
endforeach(VERSION_STR ${VERSIONS})
|
||||
endif(EXISTS "${Anope_SOURCE_DIR}/include/version.h")
|
||||
|
||||
# Set the version variables based on what was found above
|
||||
set(VERSION_COMMA "${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_BUILD}")
|
||||
set(VERSION_DOTTED_NOBUILD "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||
|
||||
@@ -205,8 +205,13 @@ if [ ! "$NO_INTRO" ] ; then
|
||||
clear
|
||||
;;
|
||||
esac
|
||||
. $SOURCE_DIR/version.log
|
||||
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER
|
||||
. src/version.sh
|
||||
if [ -d .git ] ; then
|
||||
VERSION=`git describe --tags`
|
||||
echo "#define VERSION_BUILD `echo "$VERSION" | cut -d'-' -f2`" > include/version.h
|
||||
echo "#define VERSION_EXTRA \"-`echo "$VERSION" | cut -d'-' -f3`$VERSION_EXTRA\"" >> include/version.h
|
||||
fi
|
||||
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
|
||||
+2767
File diff suppressed because it is too large
Load Diff
Executable
+1
@@ -0,0 +1 @@
|
||||
git log --pretty=format:"Revision %h - %cD - %s" > version.log
|
||||
+14
-27
@@ -1,30 +1,17 @@
|
||||
# If we are building for Visual Studio OR if the system we are on doesn't have sh (which would be odd on a *nix system...), we'll build a C++ program to create version.h
|
||||
if(MSVC OR NOT SH)
|
||||
# Set version.sh.c to use C++ as well as set it's compile flags
|
||||
set_source_files_properties(version.sh.c PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
|
||||
# Generate version_sh executable to create version.h from the contents of version.sh, setting it's linker flags as well
|
||||
add_executable(version_sh version.sh.c)
|
||||
set_target_properties(version_sh PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
|
||||
# Generate version.h from the above executable and the version.log file from the main source directory, with dependencies to the given headers and all source files in the main Anope build
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
COMMAND version_sh ${Anope_SOURCE_DIR}/version.log ${CMAKE_CURRENT_SOURCE_DIR}/version.sh ${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/version.sh DEPENDS version_sh ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${SRC_SRCS}
|
||||
)
|
||||
# Add version_sh to list of files for CPack to ignore
|
||||
get_target_property(version_sh_BINARY version_sh LOCATION)
|
||||
get_filename_component(version_sh_BINARY ${version_sh_BINARY} NAME)
|
||||
add_to_cpack_ignored_files("${version_sh_BINARY}$" TRUE)
|
||||
# For any non-Visual Studio platforms that do have sh, we will run version.h through the version.h shell script
|
||||
else(MSVC OR NOT SH)
|
||||
# Generate version.h from version.sh and the version.log file from the main source directory, with dependencies to the given headers and all source files in the main Anope build
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
COMMAND ${SH} ${CMAKE_CURRENT_SOURCE_DIR}/version.sh ${Anope_SOURCE_DIR}/version.log ${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/version.sh DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${SRC_SRCS}
|
||||
)
|
||||
endif(MSVC OR NOT SH)
|
||||
|
||||
# Add version.h to the list of files for CPack to ignore
|
||||
add_to_cpack_ignored_files("version.h$" TRUE)
|
||||
# Set version.cpp to use C++ as well as set its compile flags
|
||||
set_source_files_properties(version.cpp PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
|
||||
# Generate version executable to modify version.h, setting it's linker flags as well
|
||||
add_executable(version version.cpp)
|
||||
set_target_properties(version PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
|
||||
# Modify version.h from the above executable, with dependencies to the given headers, version.cpp, and all source files in the main Anope build
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
COMMAND version ${Anope_SOURCE_DIR}/src/version.sh ${CMAKE_CURRENT_SOURCE_DIR}/version.h
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp ${SRC_SRCS}
|
||||
)
|
||||
# Add version to list of files for CPack to ignore
|
||||
get_target_property(version_BINARY version LOCATION)
|
||||
get_filename_component(version_BINARY ${version_BINARY} NAME)
|
||||
add_to_cpack_ignored_files("${version_BINARY}$" TRUE)
|
||||
|
||||
# Add a custom target to the above file
|
||||
add_custom_target(headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h)
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
|
||||
all: services.h extern.h version.h
|
||||
./version ../src/version.sh version.h
|
||||
|
||||
version.h: Makefile version.sh services.h $(SRCS)
|
||||
sh version.sh ../version.log $@
|
||||
version.h: Makefile services.h version.cpp $(SRCS)
|
||||
$(CC) version.cpp -o version
|
||||
|
||||
services.h: sysconf.h config.h extern.h
|
||||
touch $@
|
||||
@@ -11,4 +11,4 @@ clean:
|
||||
(rm -f language.h)
|
||||
|
||||
distclean: clean
|
||||
(rm -f sysconf.h version.h)
|
||||
(rm -f sysconf.h version.h version)
|
||||
|
||||
@@ -206,9 +206,6 @@ E void fatal_perror(const char *fmt, ...) FORMAT(printf,1,2);
|
||||
|
||||
/**** main.c ****/
|
||||
|
||||
E const char version_number[];
|
||||
E const char version_number_dotted[];
|
||||
E const char version_build[];
|
||||
E char *version_protocol;
|
||||
|
||||
E std::string services_dir;
|
||||
|
||||
+27
-1
@@ -16,6 +16,7 @@
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#include "version.h"
|
||||
#include "sysconf.h"
|
||||
|
||||
#define BUFSIZE 1024
|
||||
@@ -202,6 +203,7 @@ extern "C" void __pfnBkCheck() {}
|
||||
|
||||
/* Pull in the various bits of STL */
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <exception>
|
||||
@@ -355,6 +357,19 @@ template<typename T> class Flags
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
template<typename T>
|
||||
inline const std::string stringify(const T &x)
|
||||
{
|
||||
std::stringstream stream;
|
||||
|
||||
if (!(stream << x))
|
||||
throw CoreException("Stringify fail");
|
||||
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* forward declarations, mostly used by older code */
|
||||
class User;
|
||||
class ChannelInfo;
|
||||
@@ -1036,7 +1051,19 @@ struct Message; // XXX
|
||||
|
||||
class CoreExport Anope
|
||||
{
|
||||
private:
|
||||
static const char * const compiled;
|
||||
public:
|
||||
static inline const std::string Version()
|
||||
{
|
||||
return stringify(VERSION_MAJOR) + "." + stringify(VERSION_MINOR) + "." + stringify(VERSION_PATCH) + VERSION_EXTRA " (" + stringify(VERSION_BUILD) + ")";
|
||||
}
|
||||
|
||||
static inline const std::string Build()
|
||||
{
|
||||
return "build #" + stringify(BUILD) + ", compiled " + compiled;
|
||||
}
|
||||
|
||||
/** Check whether two strings match.
|
||||
* @param str The string to check against the pattern (e.g. foobar)
|
||||
* @param mask The pattern to check (e.g. foo*bar)
|
||||
@@ -1064,7 +1091,6 @@ class CoreExport Anope
|
||||
* @return a vector with pointers to the messagehandlers (you can bind more than one handler to a message)
|
||||
*/
|
||||
static std::vector<Message *> FindMessage(const std::string &name);
|
||||
|
||||
};
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
/* Build bumper
|
||||
*
|
||||
* (C) 2003-2010 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <list>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
if (argc < 3)
|
||||
{
|
||||
cout << "Syntax: " << argv[0] << " <src/version.sh> <version.h>" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
fstream fd;
|
||||
|
||||
fd.open(argv[1], ios::in);
|
||||
if (!fd.is_open())
|
||||
{
|
||||
cout << "Error: Unable to open src/version.sh for reading: " << argv[1] << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
string filebuf;
|
||||
list<pair<string, string> > versions;
|
||||
while (getline(fd, filebuf))
|
||||
{
|
||||
if (filebuf.find("VERSION_") == 0)
|
||||
{
|
||||
size_t eq = filebuf.find('=');
|
||||
|
||||
string type = filebuf.substr(8, 5);
|
||||
string value = filebuf.substr(eq + 2, filebuf.length() - eq - 3);
|
||||
versions.push_back(make_pair(type, value));
|
||||
}
|
||||
}
|
||||
|
||||
fd.close();
|
||||
|
||||
fd.open(argv[2], ios::in);
|
||||
|
||||
string version_build = "#define VERSION_BUILD 1";
|
||||
string version_extra;
|
||||
string build = "#define BUILD 1";
|
||||
if (fd.is_open())
|
||||
{
|
||||
while (getline(fd, filebuf))
|
||||
{
|
||||
if (filebuf.find("#define VERSION_BUILD") == 0)
|
||||
{
|
||||
version_build = filebuf;
|
||||
}
|
||||
else if (filebuf.find("#define VERSION_EXTRA") == 0)
|
||||
{
|
||||
size_t q = filebuf.find('"');
|
||||
|
||||
version_extra = filebuf.substr(q + 1, filebuf.length() - q - 2);
|
||||
}
|
||||
else if (filebuf.find("#define BUILD") == 0)
|
||||
{
|
||||
size_t tab = filebuf.find(' ');
|
||||
|
||||
int ibuild = atoi(filebuf.substr(tab + 1).c_str());
|
||||
++ibuild;
|
||||
|
||||
stringstream ss;
|
||||
ss << "#define BUILD " << ibuild;
|
||||
build = ss.str();
|
||||
}
|
||||
}
|
||||
|
||||
fd.close();
|
||||
}
|
||||
|
||||
fd.open(argv[2], ios::out);
|
||||
|
||||
if (!fd.is_open())
|
||||
{
|
||||
cout << "Error: Unable to include/version.h for writing: " << argv[2];
|
||||
return 1;
|
||||
}
|
||||
|
||||
fd << "/* This file is automatically generated by version.cpp - do not edit it! */" << endl;
|
||||
|
||||
for (list<pair<string, string> >::iterator it = versions.begin(), it_end = versions.end(); it != it_end; ++it)
|
||||
{
|
||||
if (it->first == "EXTRA")
|
||||
{
|
||||
if (!version_extra.empty())
|
||||
fd << "#define VERSION_EXTRA \"" << version_extra << "\"" << endl;
|
||||
else
|
||||
fd << "#define VERSION_EXTRA \"" << it->second << "\"" << endl;
|
||||
}
|
||||
else
|
||||
fd << "#define VERSION_" << it->first << " " << it->second << endl;
|
||||
}
|
||||
|
||||
fd << version_build << endl;
|
||||
fd << build << endl;
|
||||
|
||||
fd.close();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Build version string and increment Services build number.
|
||||
#
|
||||
|
||||
if [ $# -lt 2 ] ; then
|
||||
echo "Syntax: $0 <version.log> <version.h>"
|
||||
exit 1
|
||||
fi
|
||||
# Grab version information from the version control file.
|
||||
CTRL="$1"
|
||||
if [ -f $CTRL ] ; then
|
||||
. $CTRL
|
||||
else
|
||||
echo "Error: Unable to find control file: $CTRL"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_EXTRA} (${VERSION_BUILD})"
|
||||
VERSIONDOTTED="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_EXTRA}.${VERSION_BUILD}"
|
||||
|
||||
VERSIONH="$2"
|
||||
if [ -f $VERSIONH ] ; then
|
||||
BUILD=`fgrep '#define BUILD' $VERSIONH | cut -f2 -d\"`
|
||||
BUILD=`expr $BUILD + 1 2>/dev/null`
|
||||
else
|
||||
BUILD=1
|
||||
fi
|
||||
if [ ! "$BUILD" ] ; then
|
||||
BUILD=1
|
||||
fi
|
||||
cat >$VERSIONH <<EOF
|
||||
/* Version information for Services.
|
||||
*
|
||||
* (C) 2003-2010 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and CREDITS for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
* This file is auto-generated by version.sh
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
|
||||
#define VERSION_MAJOR $VERSION_MAJOR
|
||||
#define VERSION_MINOR $VERSION_MINOR
|
||||
#define VERSION_PATCH $VERSION_PATCH
|
||||
#define VERSION_EXTRA "$VERSION_EXTRA"
|
||||
#define VERSION_BUILD $VERSION_BUILD
|
||||
|
||||
#define BUILD "$BUILD"
|
||||
#define VERSION_STRING "$VERSION"
|
||||
#define VERSION_STRING_DOTTED "$VERSIONDOTTED"
|
||||
|
||||
#endif
|
||||
|
||||
EOF
|
||||
|
||||
@@ -1,248 +0,0 @@
|
||||
/* version file handler for win32.
|
||||
*
|
||||
* (C) 2003-2010 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
* Written by Dominick Meglio <codemastr@unrealircd.com>
|
||||
*/
|
||||
|
||||
/* Needed due to Windows lack of a decent interpreter */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <cstdlib>
|
||||
#include <cctype>
|
||||
|
||||
long version_major, version_minor, version_patch, version_build, build;
|
||||
char *version_extra = NULL;
|
||||
char version[1024];
|
||||
char version_dotted[1024];
|
||||
|
||||
void load_ctrl(FILE *);
|
||||
long get_value(char *);
|
||||
char *get_value_str(char *);
|
||||
char *strip(char *);
|
||||
void parse_version(FILE *);
|
||||
void write_version(FILE *, const char *);
|
||||
void parse_line(FILE *, char *);
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (argc < 4)
|
||||
{
|
||||
fprintf(stderr, "Syntax: %s <version.log> <version.sh> <version.h>\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
FILE *fd = fopen(argv[1], "r");
|
||||
|
||||
if (!fd)
|
||||
{
|
||||
fprintf(stderr, "Error: Unable to find control file: %s\n", argv[1]);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
load_ctrl(fd);
|
||||
fclose(fd);
|
||||
|
||||
_snprintf(version, 1024, "%ld.%ld.%ld%s (%ld)", version_major, version_minor, version_patch, version_extra ? version_extra : "", version_build);
|
||||
|
||||
_snprintf(version_dotted, 1024, "%ld.%ld.%ld%s.%ld", version_major, version_minor, version_patch, version_extra ? version_extra : "", version_build);
|
||||
|
||||
fd = fopen(argv[3], "r");
|
||||
|
||||
if (fd)
|
||||
{
|
||||
parse_version(fd);
|
||||
fclose(fd);
|
||||
}
|
||||
else
|
||||
build = 1;
|
||||
|
||||
fd = fopen(argv[3], "w");
|
||||
write_version(fd, argv[2]);
|
||||
fclose(fd);
|
||||
|
||||
if (version_extra)
|
||||
free(version_extra);
|
||||
}
|
||||
|
||||
void load_ctrl(FILE * fd)
|
||||
{
|
||||
char buf[512];
|
||||
while (fgets(buf, 511, fd))
|
||||
{
|
||||
char *var;
|
||||
|
||||
strip(buf);
|
||||
|
||||
var = strtok(buf, "=");
|
||||
if (!var)
|
||||
continue;
|
||||
if (!strcmp(var, "VERSION_MAJOR"))
|
||||
version_major = get_value(strtok(NULL, ""));
|
||||
else if (!strcmp(var, "VERSION_MINOR"))
|
||||
version_minor = get_value(strtok(NULL, ""));
|
||||
else if (!strcmp(var, "VERSION_PATCH"))
|
||||
version_patch = get_value(strtok(NULL, ""));
|
||||
else if (!strcmp(var, "VERSION_BUILD"))
|
||||
version_build = get_value(strtok(NULL, ""));
|
||||
else if (!strcmp(var, "VERSION_EXTRA"))
|
||||
version_extra = get_value_str(strtok(NULL, ""));
|
||||
}
|
||||
}
|
||||
|
||||
char *strip(char *str)
|
||||
{
|
||||
char *c;
|
||||
if ((c = strchr(str, '\n')))
|
||||
*c = 0;
|
||||
if ((c = strchr(str, '\r')))
|
||||
*c = 0;
|
||||
return str;
|
||||
}
|
||||
|
||||
long get_value(char *string)
|
||||
{
|
||||
// XXX : if the fields in version.log are empty strtok returns a double quote, dont try to atol it then
|
||||
if (string[1] != '"')
|
||||
return atol(get_value_str(string));
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *get_value_str(char *string)
|
||||
{
|
||||
int len;
|
||||
char *newstr;
|
||||
|
||||
if (*string == '"')
|
||||
++string;
|
||||
|
||||
len = strlen(string);
|
||||
|
||||
if (string[len - 1] == '"')
|
||||
string[len - 1] = 0;
|
||||
if (!*string)
|
||||
return NULL;
|
||||
newstr = (char *)malloc(len + 1);
|
||||
strcpy(newstr, string);
|
||||
return newstr;
|
||||
//return strdup(string);
|
||||
}
|
||||
|
||||
void parse_version(FILE * fd)
|
||||
{
|
||||
char buf[1024];
|
||||
|
||||
while (fgets(buf, 1023, fd))
|
||||
{
|
||||
char *para1;
|
||||
|
||||
strip(buf);
|
||||
para1 = strtok(buf, " \t");
|
||||
|
||||
if (!para1)
|
||||
continue;
|
||||
|
||||
if (!strcmp(para1, "#define"))
|
||||
{
|
||||
char *para2 = strtok(NULL, " \t");
|
||||
|
||||
if (!para2)
|
||||
continue;
|
||||
|
||||
if (!strcmp(para2, "BUILD"))
|
||||
{
|
||||
char *value = strtok(NULL, "");
|
||||
build = get_value(value);
|
||||
build++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
build = 1;
|
||||
}
|
||||
|
||||
void write_version(FILE *fd, const char *input)
|
||||
{
|
||||
FILE *fdin = fopen(input, "r");
|
||||
char buf[1024];
|
||||
short until_eof = 0;
|
||||
|
||||
while (fgets(buf, 1023, fdin))
|
||||
{
|
||||
strip(buf);
|
||||
|
||||
if (until_eof)
|
||||
{
|
||||
if (!strcmp(buf, "EOF"))
|
||||
break;
|
||||
else
|
||||
parse_line(fd, buf);
|
||||
}
|
||||
|
||||
if (!strcmp(buf, "cat >$VERSIONH <<EOF"))
|
||||
until_eof = 1;
|
||||
}
|
||||
|
||||
if (fdin)
|
||||
fclose(fdin);
|
||||
}
|
||||
|
||||
void parse_line(FILE *fd, char *line)
|
||||
{
|
||||
char *c;
|
||||
for (c = line; *c; ++c)
|
||||
{
|
||||
/* It's a variable, find out which */
|
||||
if (*c == '$')
|
||||
{
|
||||
char *var, *varbegin;
|
||||
|
||||
if (*(c + 1))
|
||||
++c;
|
||||
else
|
||||
continue;
|
||||
for (var = varbegin = c; var; ++var)
|
||||
if (!isalnum(*var) && *var != '_')
|
||||
break;
|
||||
if (var != varbegin)
|
||||
{
|
||||
char tmp = *var;
|
||||
|
||||
*var = 0;
|
||||
if (!strcmp(varbegin, "VERSION_MAJOR"))
|
||||
fprintf(fd, "%ld", version_major);
|
||||
else if (!strcmp(varbegin, "VERSION_MINOR"))
|
||||
fprintf(fd, "%ld", version_minor);
|
||||
else if (!strcmp(varbegin, "VERSION_PATCH"))
|
||||
fprintf(fd, "%ld", version_patch);
|
||||
else if (!strcmp(varbegin, "VERSION_EXTRA"))
|
||||
{
|
||||
if (version_extra)
|
||||
fprintf(fd, "%s", version_extra);
|
||||
}
|
||||
else if (!strcmp(varbegin, "VERSION_BUILD"))
|
||||
fprintf(fd, "%ld", version_build);
|
||||
else if (!strcmp(varbegin, "BUILD"))
|
||||
fprintf(fd, "%ld", build);
|
||||
else if (!strcmp(varbegin, "VERSION"))
|
||||
fprintf(fd, "%s", version);
|
||||
else if (!strcmp(varbegin, "VERSIONDOTTED"))
|
||||
fprintf(fd, "%s", version_dotted);
|
||||
if (tmp)
|
||||
fputc(tmp, fd);
|
||||
}
|
||||
c = var;
|
||||
}
|
||||
else
|
||||
fputc(*c, fd);
|
||||
}
|
||||
/* We only need \n here - we didn't open the file as binary -GD */
|
||||
fprintf(fd, "\n");
|
||||
}
|
||||
+4
-9
@@ -13,7 +13,7 @@
|
||||
//
|
||||
|
||||
var anopeVersion = "Unknown";
|
||||
var vMaj, vMin, vPat, vBuild, vExtra;
|
||||
var vMaj, vMin, vPat, vExtra;
|
||||
|
||||
var installerResponses = new Array();
|
||||
|
||||
@@ -258,13 +258,13 @@ else
|
||||
// Functions
|
||||
|
||||
function FindAnopeVersion() {
|
||||
if (!fso.FileExists(ScriptPath + 'version.log'))
|
||||
if (!fso.FileExists(ScriptPath + 'src\\version'))
|
||||
{
|
||||
anopeVersion = 'Unknown';
|
||||
return;
|
||||
}
|
||||
|
||||
var versionLog = fso.OpenTextFile(ScriptPath + 'version.log');
|
||||
var versionLog = fso.OpenTextFile(ScriptPath + 'src\\version');
|
||||
while (!versionLog.atEndOfStream)
|
||||
{
|
||||
var versionLine = versionLog.readline();
|
||||
@@ -292,14 +292,9 @@ function FindAnopeVersion() {
|
||||
vExtra = versionLine.replace('VERSION_EXTRA=', '');
|
||||
continue;
|
||||
}
|
||||
if (versionLine.match(/VERSION_BUILD=/g))
|
||||
{
|
||||
vBuild = versionLine.replace('VERSION_BUILD=', '');
|
||||
continue;
|
||||
}
|
||||
}
|
||||
versionLog.close();
|
||||
anopeVersion = vMaj + '.' + vMin + '.' + vPat + '.' + vBuild + vExtra;
|
||||
anopeVersion = vMaj + '.' + vMin + '.' + vPat + vExtra;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,6 @@ class BSAct : public Module
|
||||
BSAct(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(BotServ, new CommandBSAct());
|
||||
}
|
||||
|
||||
@@ -87,7 +87,6 @@ class BSAssign : public Module
|
||||
BSAssign(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(BotServ, new CommandBSAssign);
|
||||
}
|
||||
|
||||
@@ -268,7 +268,6 @@ class BSBadwords : public Module
|
||||
BSBadwords(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(BotServ, new CommandBSBadwords);
|
||||
}
|
||||
|
||||
@@ -409,7 +409,6 @@ class BSBot : public Module
|
||||
BSBot(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(BotServ, new CommandBSBot());
|
||||
}
|
||||
|
||||
@@ -85,7 +85,6 @@ class BSBotList : public Module
|
||||
BSBotList(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(BotServ, new CommandBSBotList());
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ class BSHelp : public Module
|
||||
BSHelp(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(BotServ, new CommandBSHelp());
|
||||
}
|
||||
|
||||
@@ -225,7 +225,6 @@ class BSInfo : public Module
|
||||
BSInfo(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(BotServ, new CommandBSInfo());
|
||||
}
|
||||
|
||||
@@ -380,7 +380,6 @@ class BSKick : public Module
|
||||
BSKick(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(BotServ, new CommandBSKick());
|
||||
}
|
||||
|
||||
@@ -83,7 +83,6 @@ class BSSay : public Module
|
||||
BSSay(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(BotServ, new CommandBSSay());
|
||||
}
|
||||
|
||||
@@ -207,7 +207,6 @@ class BSSet : public Module
|
||||
BSSet(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(BotServ, new CommandBSSet());
|
||||
}
|
||||
|
||||
@@ -65,7 +65,6 @@ class BSUnassign : public Module
|
||||
BSUnassign(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(BotServ, new CommandBSUnassign);
|
||||
}
|
||||
|
||||
@@ -604,7 +604,6 @@ class CSAccess : public Module
|
||||
CSAccess(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(ChanServ, new CommandCSAccess());
|
||||
|
||||
@@ -567,7 +567,6 @@ class CSAKick : public Module
|
||||
CSAKick(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(ChanServ, new CommandCSAKick());
|
||||
}
|
||||
|
||||
@@ -102,7 +102,6 @@ class CSBan : public Module
|
||||
CSBan(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(ChanServ, new CommandCSBan("BAN"));
|
||||
this->AddCommand(ChanServ, new CommandCSBan("KB"));
|
||||
|
||||
@@ -170,7 +170,6 @@ class CSClear : public Module
|
||||
CSClear(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(ChanServ, new CommandCSClear());
|
||||
}
|
||||
|
||||
@@ -108,7 +108,6 @@ class CSDrop : public Module
|
||||
CSDrop(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(ChanServ, new CommandCSDrop());
|
||||
}
|
||||
|
||||
@@ -121,7 +121,6 @@ class CSForbid : public Module
|
||||
CSForbid(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(ChanServ, new CommandCSForbid());
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ class CSGetKey : public Module
|
||||
CSGetKey(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(ChanServ, new CommandCSGetKey());
|
||||
}
|
||||
|
||||
@@ -64,7 +64,6 @@ class CSHelp : public Module
|
||||
CSHelp(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(ChanServ, new CommandCSHelp());
|
||||
}
|
||||
|
||||
@@ -163,7 +163,6 @@ class CSInfo : public Module
|
||||
CSInfo(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(ChanServ, new CommandCSInfo());
|
||||
}
|
||||
|
||||
@@ -86,7 +86,6 @@ class CSInvite : public Module
|
||||
CSInvite(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(ChanServ, new CommandCSInvite());
|
||||
}
|
||||
|
||||
@@ -88,7 +88,6 @@ class CSKick : public Module
|
||||
CSKick(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(ChanServ, new CommandCSKick("KICK"));
|
||||
this->AddCommand(ChanServ, new CommandCSKick("K"));
|
||||
|
||||
@@ -168,7 +168,6 @@ public:
|
||||
CSList(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(ChanServ, new CommandCSList());
|
||||
}
|
||||
|
||||
@@ -402,7 +402,6 @@ class CSModes : public Module
|
||||
CSModes(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(ChanServ, new CommandCSOp());
|
||||
|
||||
@@ -122,7 +122,6 @@ class CSRegister : public Module
|
||||
CSRegister(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(ChanServ, new CommandCSRegister());
|
||||
|
||||
@@ -113,7 +113,6 @@ class CSSASet : public Module
|
||||
CSSASet(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(ChanServ, new CommandCSSASet("SASET"));
|
||||
|
||||
@@ -64,7 +64,6 @@ class CSSetNoexpire : public Module
|
||||
CSSetNoexpire(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SASET");
|
||||
|
||||
@@ -118,7 +118,6 @@ class CSSet : public Module
|
||||
CSSet(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(ChanServ, new CommandCSSet("SET"));
|
||||
|
||||
@@ -84,7 +84,6 @@ class CSSetBanType : public Module
|
||||
CSSetBanType(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -78,7 +78,6 @@ class CSSetDescription : public Module
|
||||
CSSetDescription(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -85,7 +85,6 @@ class CSSetEMail : public Module
|
||||
CSSetEMail(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -85,7 +85,6 @@ class CSSetEntryMsg : public Module
|
||||
CSSetEntryMsg(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -112,7 +112,6 @@ class CSSetFounder : public Module
|
||||
CSSetFounder(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -83,7 +83,6 @@ class CSSetKeepTopic : public Module
|
||||
CSSetKeepTopic(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -156,7 +156,6 @@ class CSSetMLock : public Module
|
||||
CSSetMLock(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -83,7 +83,6 @@ class CSSetOpNotice : public Module
|
||||
CSSetOpNotice(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -83,7 +83,6 @@ class CSSetPeace : public Module
|
||||
CSSetPeace(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -128,7 +128,6 @@ class CSSetPersist : public Module
|
||||
CSSetPersist(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -83,7 +83,6 @@ class CSSetPrivate : public Module
|
||||
CSSetPrivate(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -86,7 +86,6 @@ class CSSetRestricted : public Module
|
||||
CSSetRestricted(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -83,7 +83,6 @@ class CSSetSecure : public Module
|
||||
CSSetSecure(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -89,7 +89,6 @@ class CSSetSecureFounder : public Module
|
||||
CSSetSecureFounder(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -83,7 +83,6 @@ class CSSetSecureOps : public Module
|
||||
CSSetSecureOps(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -91,7 +91,6 @@ class CSSetSignKick : public Module
|
||||
CSSetSignKick(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -114,7 +114,6 @@ class CSSetSuccessor : public Module
|
||||
CSSetSuccessor(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -83,7 +83,6 @@ class CSSetTopicLock : public Module
|
||||
CSSetTopicLock(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -85,7 +85,6 @@ class CSSetURL : public Module
|
||||
CSSetURL(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -121,7 +121,6 @@ class CSSetXOP : public Module
|
||||
CSSetXOP(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
Command *c = FindCommand(ChanServ, "SET");
|
||||
|
||||
@@ -67,7 +67,6 @@ class CSStatus : public Module
|
||||
CSStatus(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -185,7 +185,6 @@ class CSSuspend : public Module
|
||||
CSSuspend(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(ChanServ, new CommandCSSuspend());
|
||||
|
||||
@@ -89,7 +89,6 @@ class CSTopic : public Module
|
||||
CSTopic(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(ChanServ, new CommandCSTopic());
|
||||
|
||||
@@ -79,7 +79,6 @@ class CSUnban : public Module
|
||||
CSUnban(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(ChanServ, new CommandCSUnban());
|
||||
|
||||
@@ -624,7 +624,6 @@ class CSXOP : public Module
|
||||
CSXOP(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(ChanServ, new CommandCSSOP());
|
||||
|
||||
@@ -516,7 +516,6 @@ class DBPlain : public Module
|
||||
DBPlain(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(DATABASE);
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnDatabaseRead, I_OnLoadDatabase, I_OnDatabaseReadMetadata, I_OnSaveDatabase, I_OnModuleLoad };
|
||||
|
||||
@@ -318,7 +318,6 @@ class EMD5 : public Module
|
||||
EMD5(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(ENCRYPTION);
|
||||
|
||||
ModuleManager::Attach(I_OnEncrypt, this);
|
||||
|
||||
@@ -15,7 +15,6 @@ class ENone : public Module
|
||||
ENone(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(ENCRYPTION);
|
||||
|
||||
ModuleManager::Attach(I_OnEncrypt, this);
|
||||
|
||||
@@ -323,7 +323,6 @@ class EOld : public Module
|
||||
EOld(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(ENCRYPTION);
|
||||
|
||||
ModuleManager::Attach(I_OnEncrypt, this);
|
||||
|
||||
@@ -171,7 +171,6 @@ class ESHA1 : public Module
|
||||
ESHA1(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(ENCRYPTION);
|
||||
|
||||
ModuleManager::Attach(I_OnEncrypt, this);
|
||||
|
||||
@@ -251,7 +251,6 @@ class ESHA256 : public Module
|
||||
ESHA256(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(ENCRYPTION);
|
||||
|
||||
ModuleManager::Attach(I_OnEncrypt, this);
|
||||
|
||||
@@ -65,7 +65,6 @@ class HSDel : public Module
|
||||
HSDel(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(HostServ, new CommandHSDel());
|
||||
|
||||
@@ -70,7 +70,6 @@ class HSDelAll : public Module
|
||||
HSDelAll(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(HostServ, new CommandHSDelAll());
|
||||
|
||||
@@ -58,7 +58,6 @@ class HSGroup : public Module
|
||||
HSGroup(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(HostServ, new CommandHSGroup());
|
||||
|
||||
@@ -42,7 +42,6 @@ class HSHelp : public Module
|
||||
HSHelp(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(HostServ, new CommandHSHelp());
|
||||
|
||||
@@ -124,7 +124,6 @@ class HSList : public Module
|
||||
HSList(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(HostServ, new CommandHSList());
|
||||
|
||||
@@ -54,7 +54,6 @@ class HSOff : public Module
|
||||
HSOff(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(HostServ, new CommandHSOff());
|
||||
|
||||
@@ -68,7 +68,6 @@ class HSOn : public Module
|
||||
HSOn(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(HostServ, new CommandHSOn());
|
||||
|
||||
@@ -162,7 +162,6 @@ class HSSet : public Module
|
||||
HSSet(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(HostServ, new CommandHSSet());
|
||||
|
||||
@@ -160,7 +160,6 @@ class HSSetAll : public Module
|
||||
HSSetAll(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(HostServ, new CommandHSSetAll());
|
||||
|
||||
@@ -82,7 +82,6 @@ class MSCancel : public Module
|
||||
MSCancel(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(MemoServ, new CommandMSCancel());
|
||||
}
|
||||
|
||||
@@ -98,7 +98,6 @@ class MSCheck : public Module
|
||||
MSCheck(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(MemoServ, new CommandMSCheck());
|
||||
}
|
||||
|
||||
@@ -165,7 +165,6 @@ class MSDel : public Module
|
||||
MSDel(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -43,7 +43,6 @@ class MSHelp : public Module
|
||||
MSHelp(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(MemoServ, new CommandMSHelp());
|
||||
}
|
||||
|
||||
@@ -211,7 +211,6 @@ class MSInfo : public Module
|
||||
MSInfo(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(MemoServ, new CommandMSInfo());
|
||||
}
|
||||
|
||||
@@ -169,7 +169,6 @@ class MSList : public Module
|
||||
MSList(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(MemoServ, new CommandMSList());
|
||||
}
|
||||
|
||||
@@ -154,7 +154,6 @@ class MSRead : public Module
|
||||
MSRead(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(MemoServ, new CommandMSRead());
|
||||
}
|
||||
|
||||
@@ -82,7 +82,6 @@ class MSRSend : public Module
|
||||
MSRSend(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(MemoServ, new CommandMSRSend());
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ class MSSend : public Module
|
||||
MSSend(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(MemoServ, new CommandMSSend());
|
||||
}
|
||||
|
||||
@@ -69,7 +69,6 @@ class MSSendAll : public Module
|
||||
MSSendAll(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(MemoServ, new CommandMSSendAll());
|
||||
}
|
||||
|
||||
@@ -264,7 +264,6 @@ class MSSet : public Module
|
||||
MSSet(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(MemoServ, new CommandMSSet());
|
||||
|
||||
@@ -66,7 +66,6 @@ class MSStaff : public Module
|
||||
MSStaff(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
this->AddCommand(MemoServ, new CommandMSStaff());
|
||||
}
|
||||
|
||||
@@ -173,7 +173,6 @@ class NSAccess : public Module
|
||||
NSAccess(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(NickServ, new CommandNSAccess());
|
||||
|
||||
@@ -147,7 +147,6 @@ class NSAList : public Module
|
||||
NSAList(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(NickServ, new CommandNSAList());
|
||||
|
||||
@@ -120,7 +120,6 @@ class NSDrop : public Module
|
||||
NSDrop(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(NickServ, new CommandNSDrop());
|
||||
|
||||
@@ -113,7 +113,6 @@ class NSForbid : public Module
|
||||
NSForbid(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(NickServ, new CommandNSForbid());
|
||||
|
||||
@@ -79,7 +79,6 @@ class NSGetEMail : public Module
|
||||
NSGetEMail(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(NickServ, new CommandNSGetEMail());
|
||||
|
||||
@@ -82,7 +82,6 @@ class NSGetPass : public Module
|
||||
NSGetPass(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(NickServ, new CommandNSGetPass());
|
||||
|
||||
@@ -95,7 +95,6 @@ class NSGhost : public Module
|
||||
NSGhost(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(NickServ, new CommandNSGhost());
|
||||
|
||||
@@ -292,7 +292,6 @@ class NSGroup : public Module
|
||||
NSGroup(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(CORE);
|
||||
|
||||
this->AddCommand(NickServ, new CommandNSGroup());
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user