mirror of
https://github.com/anope/anope.git
synced 2026-07-07 12:23:13 +02:00
Fixed cmake build, removed version_flags it is no longer need, removed old unneeded defs.h and split up pseudo.h
This commit is contained in:
@@ -8,7 +8,7 @@ if(MSVC OR NOT SH)
|
||||
# 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 ${CMAKE_CURRENT_SOURCE_DIR}/pseudo.h ${CMAKE_CURRENT_SOURCE_DIR}/messages.h ${SRC_SRCS}
|
||||
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)
|
||||
@@ -19,7 +19,7 @@ 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 ${CMAKE_CURRENT_SOURCE_DIR}/pseudo.h ${CMAKE_CURRENT_SOURCE_DIR}/messages.h ${SRC_SRCS}
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/version.sh DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${SRC_SRCS}
|
||||
)
|
||||
endif(MSVC OR NOT SH)
|
||||
|
||||
|
||||
+2
-5
@@ -1,7 +1,7 @@
|
||||
|
||||
all: services.h extern.h pseudo.h version.h
|
||||
all: services.h extern.h version.h
|
||||
|
||||
version.h: Makefile version.sh services.h pseudo.h $(SRCS)
|
||||
version.h: Makefile version.sh services.h $(SRCS)
|
||||
sh version.sh ../version.log $@
|
||||
|
||||
services.h: sysconf.h config.h extern.h
|
||||
@@ -10,9 +10,6 @@ services.h: sysconf.h config.h extern.h
|
||||
extern.h: slist.h
|
||||
touch $@
|
||||
|
||||
pseudo.h: commands.h timers.h slist.h
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
(rm -f language.h)
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/* Set default values for any constants that should be in include files but
|
||||
*
|
||||
* (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.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef NAME_MAX
|
||||
# define NAME_MAX 255
|
||||
#endif
|
||||
|
||||
#ifndef BUFSIZ
|
||||
# define BUFSIZ 256
|
||||
#else
|
||||
# if BUFSIZ < 256
|
||||
# define BUFSIZ 256
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Length of an array: */
|
||||
#define lenof(a) (sizeof(a) / sizeof(*(a)))
|
||||
|
||||
/* Telling compilers about printf()-like functions: */
|
||||
#ifdef __GNUC__
|
||||
# define FORMAT(type,fmt,start) __attribute__((format(type,fmt,start)))
|
||||
#else
|
||||
# define FORMAT(type,fmt,start)
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
@@ -223,7 +223,6 @@ E const char version_number[];
|
||||
E const char version_number_dotted[];
|
||||
E const char version_build[];
|
||||
E char *version_protocol;
|
||||
E const char version_flags[];
|
||||
|
||||
E std::string services_dir;
|
||||
E std::string log_filename;
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/* Include extra includes needed by most/all pseudo-clients.
|
||||
*
|
||||
* (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 "modules.h"
|
||||
#include "language.h"
|
||||
#include "timers.h"
|
||||
#include "slist.h"
|
||||
+10
-8
@@ -34,9 +34,9 @@
|
||||
# define u_int32_t uint32_t
|
||||
# define u_int64_t uint64_t
|
||||
|
||||
# ifndef INADDR_NONE
|
||||
# define INADDR_NONE (-1)
|
||||
# endif
|
||||
# ifndef INADDR_NONE
|
||||
# define INADDR_NONE (-1)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -96,6 +96,13 @@ extern CoreExport int inet_pton(int af, const char *src, void *dst);
|
||||
extern CoreExport const char *inet_ntop(int af, const void *src, char *dst, size_t size);
|
||||
#endif
|
||||
|
||||
/* Telling compilers about printf()-like functions: */
|
||||
#ifdef __GNUC__
|
||||
# define FORMAT(type,fmt,start) __attribute__((format(type,fmt,start)))
|
||||
#else
|
||||
# define FORMAT(type,fmt,start)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
@@ -141,10 +148,6 @@ extern int strncasecmp(const char *, const char *, size_t);
|
||||
#define tolower tolower_
|
||||
#define toupper toupper_
|
||||
|
||||
/* We also have our own encrypt(). */
|
||||
#define encrypt encrypt_
|
||||
|
||||
|
||||
#ifdef __WINS__
|
||||
#ifndef BKCHECK
|
||||
#define BKCHECK
|
||||
@@ -199,7 +202,6 @@ extern int strncasecmp(const char *, const char *, size_t);
|
||||
|
||||
/* Miscellaneous definitions. */
|
||||
#include "hashcomp.h"
|
||||
#include "defs.h"
|
||||
#include "slist.h"
|
||||
|
||||
/* Pull in the various bits of STL */
|
||||
|
||||
@@ -57,16 +57,6 @@ cat >$VERSIONH <<EOF
|
||||
#define VERSION_STRING "$VERSION"
|
||||
#define VERSION_STRING_DOTTED "$VERSIONDOTTED"
|
||||
|
||||
#if defined(_WIN32)
|
||||
# if _MSC_VER >= 1400
|
||||
# define VER_OS "W"
|
||||
# else
|
||||
# define VER_OS "w"
|
||||
# endif
|
||||
#else
|
||||
# define VER_OS
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
EOF
|
||||
|
||||
@@ -188,6 +188,8 @@ void write_version(FILE * fd, const char *input)
|
||||
until_eof = 1;
|
||||
}
|
||||
|
||||
if (fdin)
|
||||
fclose(fdin);
|
||||
}
|
||||
|
||||
void parse_line(FILE * fd, char *line)
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@ OBJS = actions.o base64.o bots.o botserv.o channels.o chanserv.o command.o comm
|
||||
nickcore.o nickserv.o operserv.o process.o protocol.o regchannel.o send.o servers.o sessions.o slist.o \
|
||||
sockets.o threadengine.o threadengine_pthread.o timers.o opertype.o users.o wildcard.o
|
||||
|
||||
INCLUDES = ../include/commands.h ../include/defs.h ../include/language.h \
|
||||
../include/pseudo.h ../include/sysconf.h ../include/config.h \
|
||||
INCLUDES = ../include/commands.h ../include/language.h \
|
||||
../include/sysconf.h ../include/config.h \
|
||||
../include/services.h ../include/regchannel.h \
|
||||
../include/timers.h ../include/extern.h \
|
||||
../include/modules.h ../include/slist.h ../include/hashcomp.h \
|
||||
|
||||
+2
-3
@@ -14,9 +14,8 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
|
||||
/*************************************************************************/
|
||||
#include "modules.h"
|
||||
#include "language.h"
|
||||
|
||||
static UserData *get_user_data(Channel * c, User * u);
|
||||
|
||||
|
||||
+2
-4
@@ -14,10 +14,8 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
|
||||
/*************************************************************************/
|
||||
/* *INDENT-OFF* */
|
||||
#include "modules.h"
|
||||
#include "language.h"
|
||||
|
||||
registered_channel_map RegisteredChannelList;
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
#include "module.h"
|
||||
|
||||
#define lenof(a) (sizeof(a) / sizeof(*(a)))
|
||||
|
||||
/* List of messages for each news type. This simplifies message sending. */
|
||||
|
||||
#define MSG_SYNTAX 0
|
||||
|
||||
+2
-2
@@ -11,9 +11,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
#include "modules.h"
|
||||
#include "language.h"
|
||||
|
||||
E int do_hs_sync(NickCore * nc, char *vIdent, char *hostmask,
|
||||
char *creator, time_t time);
|
||||
|
||||
+4
-3
@@ -12,7 +12,8 @@
|
||||
*/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
#include "modules.h"
|
||||
|
||||
Uplink *uplink_server;
|
||||
|
||||
extern void moduleAddMsgs();
|
||||
@@ -194,13 +195,13 @@ int init_primary(int ac, char **av)
|
||||
|
||||
if (GetCommandLineArgument("version", 'v'))
|
||||
{
|
||||
Alog(LOG_TERMINAL) << "Anope-" << version_number << version_flags << " -- " << version_build;
|
||||
Alog(LOG_TERMINAL) << "Anope-" << version_number << " -- " << version_build;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (GetCommandLineArgument("help", 'h'))
|
||||
{
|
||||
Alog(LOG_TERMINAL) << "Anope-" << version_number << version_flags << " -- " << version_build;
|
||||
Alog(LOG_TERMINAL) << "Anope-" << version_number << " -- " << version_build;
|
||||
Alog(LOG_TERMINAL) << "Anope IRC Services (http://www.anope.org)";
|
||||
Alog(LOG_TERMINAL) << "Usage ./" << SERVICES_BIN << " [options] ...";
|
||||
Alog(LOG_TERMINAL) << "-c, --config=filename.conf";
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
|
||||
static FILE *logfile;
|
||||
|
||||
|
||||
@@ -83,7 +83,6 @@ const char version_number_dotted[] = VERSION_STRING_DOTTED;
|
||||
const char version_build[] =
|
||||
"build #" BUILD ", compiled " __DATE__ " " __TIME__;
|
||||
/* the space is needed cause if you build with nothing it will complain */
|
||||
const char version_flags[] = " " VER_OS;
|
||||
|
||||
/******** Local variables! ********/
|
||||
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@
|
||||
*/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
#include "modules.h"
|
||||
#include "language.h"
|
||||
|
||||
/*************************************************************************/
|
||||
/* *INDENT-OFF* */
|
||||
|
||||
+2
-2
@@ -277,8 +277,8 @@ int m_stats(const char *source, int ac, const char **av)
|
||||
|
||||
int m_version(const char *source, int ac, const char **av)
|
||||
{
|
||||
if (source) ircdproto->SendNumeric(Config.ServerName, 351, source, "Anope-%s %s :%s - %s (%s) -- %s", version_number, Config.ServerName, ircd->name, version_flags,
|
||||
Config.EncModuleList.begin()->c_str(), version_build);
|
||||
if (source)
|
||||
ircdproto->SendNumeric(Config.ServerName, 351, source, "Anope-%s %s :%s -(%s) -- %s", version_number, Config.ServerName, ircd->name, Config.EncModuleList.begin()->c_str(), version_build);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
#include "modules.h"
|
||||
|
||||
/** Default constructor
|
||||
* @param display The display nick
|
||||
|
||||
+2
-3
@@ -13,9 +13,8 @@
|
||||
*/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
|
||||
/*************************************************************************/
|
||||
#include "modules.h"
|
||||
#include "language.h"
|
||||
|
||||
nickalias_map NickAliasList;
|
||||
nickcore_map NickCoreList;
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@
|
||||
*/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
#include "modules.h"
|
||||
#include "language.h"
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
#include "modules.h"
|
||||
|
||||
IRCDVar myIrcd[] = {
|
||||
{"Bahamut 1.8.x", /* ircd name */
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
#include "modules.h"
|
||||
#include "hashcomp.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
@@ -252,7 +252,7 @@ class InspIRCdProto : public IRCDProto
|
||||
inspircd_cmd_pass(uplink_server->password);
|
||||
SendServer(Me);
|
||||
send_cmd(NULL, "BURST");
|
||||
send_cmd(Config.ServerName, "VERSION :Anope-%s %s :%s - %s (%s) -- %s", version_number, Config.ServerName, ircd->name, version_flags, Config.EncModuleList.begin()->c_str(), version_build);
|
||||
send_cmd(Config.ServerName, "VERSION :Anope-%s %s :%s - (%s) -- %s", version_number, Config.ServerName, ircd->name, Config.EncModuleList.begin()->c_str(), version_build);
|
||||
}
|
||||
|
||||
/* CHGIDENT */
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
#include "modules.h"
|
||||
#include "hashcomp.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
@@ -256,7 +256,7 @@ class InspIRCdProto : public IRCDProto
|
||||
inspircd_cmd_pass(uplink_server->password);
|
||||
SendServer(Me);
|
||||
send_cmd(TS6SID, "BURST");
|
||||
send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - %s (%s) -- %s", version_number, Config.ServerName, ircd->name, version_flags, Config.EncModuleList.begin()->c_str(), version_build);
|
||||
send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - (%s) -- %s", version_number, Config.ServerName, ircd->name, Config.EncModuleList.begin()->c_str(), version_build);
|
||||
}
|
||||
|
||||
/* CHGIDENT */
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
#include "modules.h"
|
||||
|
||||
static char *TS6UPLINK = NULL; // XXX is this needed?
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
#include "modules.h"
|
||||
|
||||
IRCDVar myIrcd[] = {
|
||||
{"UnrealIRCd 3.2.x", /* ircd name */
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@
|
||||
*/
|
||||
|
||||
#include "services.h"
|
||||
#include "pseudo.h"
|
||||
#include "modules.h"
|
||||
#include "language.h"
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user