summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-02-14 15:13:27 -0500
committerAdam <Adam@anope.org>2012-02-14 15:13:27 -0500
commita9772cde21407c89abd161d51aff45267f87b1fb (patch)
tree9e57ba6c121d3843888917d968dd4f5d030b57cf
parent086790d6331357022f4da17c76b26b9fc6e2ad90 (diff)
Clean up and reorganize our header files
-rw-r--r--include/CMakeLists.txt26
-rw-r--r--include/access.h19
-rw-r--r--include/account.h129
-rw-r--r--include/anope.h288
-rw-r--r--include/base.h106
-rw-r--r--include/bots.h11
-rw-r--r--include/botserv.h79
-rw-r--r--include/channels.h22
-rw-r--r--include/commands.h7
-rw-r--r--include/config.h51
-rw-r--r--include/defs.h52
-rw-r--r--include/dns.h21
-rw-r--r--include/extensible.h3
-rw-r--r--include/extern.h98
-rw-r--r--include/hashcomp.h15
-rw-r--r--include/lists.h94
-rw-r--r--include/logger.h16
-rw-r--r--include/mail.h15
-rw-r--r--include/memo.h63
-rw-r--r--include/modes.h57
-rw-r--r--include/module.h52
-rw-r--r--include/modules.h136
-rw-r--r--include/oper.h4
-rw-r--r--include/opertype.h5
-rw-r--r--include/protocol.h155
-rw-r--r--include/regchannel.h31
-rw-r--r--include/serialize.h162
-rw-r--r--include/servers.h3
-rw-r--r--include/service.h110
-rw-r--r--include/services.h913
-rw-r--r--include/signals.h49
-rw-r--r--include/socketengine.h2
-rw-r--r--include/sockets.h12
-rw-r--r--include/threadengine.h3
-rw-r--r--include/timers.h10
-rw-r--r--include/uplink.h44
-rw-r--r--include/users.h24
-rw-r--r--modules/commands/hs_del.cpp4
-rw-r--r--modules/commands/hs_group.cpp12
-rw-r--r--modules/commands/hs_list.cpp24
-rw-r--r--modules/commands/hs_off.cpp2
-rw-r--r--modules/commands/hs_on.cpp18
-rw-r--r--modules/commands/hs_request.cpp2
-rw-r--r--modules/commands/hs_set.cpp8
-rw-r--r--modules/commands/ms_ignore.cpp1
-rw-r--r--modules/commands/ns_info.cpp8
-rw-r--r--modules/commands/os_forbid.cpp2
-rw-r--r--modules/commands/os_list.cpp2
-rw-r--r--modules/commands/os_session.cpp2
-rw-r--r--modules/commands/os_session.h8
-rw-r--r--modules/database/db_old.cpp2
-rw-r--r--modules/database/db_plain.cpp6
-rw-r--r--modules/extra/m_dnsbl.cpp18
-rw-r--r--modules/extra/m_proxyscan.cpp7
-rw-r--r--modules/extra/m_ssl.cpp1
-rw-r--r--modules/extra/m_xmlrpc.cpp1
-rw-r--r--modules/extra/m_xmlrpc_main.cpp4
-rw-r--r--modules/protocol/bahamut.cpp5
-rw-r--r--modules/protocol/inspircd11.cpp5
-rw-r--r--modules/protocol/inspircd12.cpp5
-rw-r--r--modules/protocol/inspircd20.cpp5
-rw-r--r--modules/protocol/plexus.cpp5
-rw-r--r--modules/protocol/ratbox.cpp5
-rw-r--r--modules/protocol/unreal.cpp5
-rw-r--r--modules/pseudoclients/hostserv.cpp27
-rw-r--r--modules/pseudoclients/nickserv.cpp54
-rw-r--r--modules/pseudoclients/operserv.cpp4
-rw-r--r--src/access.cpp7
-rw-r--r--src/actions.cpp4
-rw-r--r--src/base.cpp8
-rw-r--r--src/base64.cpp1
-rw-r--r--src/bots.cpp11
-rw-r--r--src/botserv.cpp9
-rw-r--r--src/channels.cpp84
-rw-r--r--src/chanserv.cpp35
-rw-r--r--src/command.cpp6
-rw-r--r--src/config.cpp9
-rw-r--r--src/configreader.cpp1
-rw-r--r--src/dns.cpp33
-rw-r--r--src/hashcomp.cpp2
-rw-r--r--src/hostserv.cpp79
-rw-r--r--src/init.cpp15
-rw-r--r--src/language.cpp17
-rw-r--r--src/logger.cpp11
-rw-r--r--src/mail.cpp14
-rw-r--r--src/main.cpp26
-rw-r--r--src/memoserv.cpp5
-rw-r--r--src/messages.cpp6
-rw-r--r--src/misc.cpp13
-rw-r--r--src/modes.cpp23
-rw-r--r--src/module.cpp14
-rw-r--r--src/modulemanager.cpp13
-rw-r--r--src/modules.cpp13
-rw-r--r--src/nickalias.cpp151
-rw-r--r--src/nickcore.cpp13
-rw-r--r--src/nickserv.cpp87
-rw-r--r--src/operserv.cpp16
-rw-r--r--src/opertype.cpp4
-rw-r--r--src/process.cpp1
-rw-r--r--src/protocol.cpp19
-rw-r--r--src/regchannel.cpp11
-rw-r--r--src/serialize.cpp138
-rw-r--r--src/servers.cpp7
-rw-r--r--src/socket_clients.cpp5
-rw-r--r--src/socket_transport.cpp2
-rw-r--r--src/socketengines/pipeengine_eventfd.cpp13
-rw-r--r--src/socketengines/pipeengine_pipe.cpp16
-rw-r--r--src/socketengines/socketengine_epoll.cpp19
-rw-r--r--src/socketengines/socketengine_kqueue.cpp19
-rw-r--r--src/socketengines/socketengine_poll.cpp20
-rw-r--r--src/socketengines/socketengine_select.cpp18
-rw-r--r--src/sockets.cpp27
-rw-r--r--src/threadengine.cpp15
-rw-r--r--src/timers.cpp2
-rw-r--r--src/users.cpp29
-rw-r--r--src/win32/pipe/pipe.cpp4
-rw-r--r--src/win32/resource.h (renamed from include/resource.h)0
117 files changed, 2415 insertions, 1819 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index c7d5456c7..5579fdf30 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -20,11 +20,24 @@ endif(NOT WIN32)
set(PCH_SOURCES_GCH "")
if(CMAKE_COMPILER_IS_GNUCXX)
string(REPLACE " " ";" PCH_CXXFLAGS ${CXXFLAGS})
- file(GLOB INCLUDE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h")
- remove_item_from_list(INCLUDE_SRCS "version.h")
- set(PCH_SOURCES "module.h;modules.h;services.h")
+ file(GLOB PCH_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h")
+ sort_list(PCH_SOURCES)
+
foreach(PCH_SOURCE ${PCH_SOURCES})
+ find_includes(${PCH_SOURCE} INCLUDES)
+ set(INCLUDES_LIST)
+ foreach(INCLUDE ${INCLUDES})
+ # Extract the filename from the #include line
+ extract_include_filename(${INCLUDE} FILENAME QUOTE_TYPE)
+ if(QUOTE_TYPE STREQUAL "quotes")
+ find_in_list(PCH_SOURCES "${FILENAME}" FOUND)
+ if(NOT FOUND EQUAL -1)
+ append_to_list(INCLUDES_LIST ${FILENAME})
+ endif(NOT FOUND EQUAL -1)
+ endif(QUOTE_TYPE STREQUAL "quotes")
+ endforeach(INCLUDE)
+
set(PCH_EXTRAFLAGS "")
if(DEBUG_BUILD)
set(PCH_EXTRAFLAGS "-g")
@@ -33,13 +46,14 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(PCH_EXTRAFLAGS ${PCH_EXTRAFLAGS} -fPIC)
endif(PCH_SOURCE STREQUAL "module.h")
if(GETTEXT_INCLUDE)
- set(PCH_GETTEXT_INCLUDE "-I${GETTEXT_INCLUDE}")
+ set(PCH_GETTEXT_INCLUDE "-I${GETTEXT_INCLUDE}")
endif(GETTEXT_INCLUDE)
set(PCH_SOURCES_GCH "${PCH_SOURCES_GCH};${CMAKE_CURRENT_BINARY_DIR}/${PCH_SOURCE}.gch")
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PCH_SOURCE}.gch
- COMMAND ${CMAKE_CXX_COMPILER} ARGS ${PCH_CXXFLAGS} ${PCH_EXTRAFLAGS} ${PCH_GETTEXT_INCLUDE} -I${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${PCH_SOURCE} -o ${CMAKE_CURRENT_BINARY_DIR}/${PCH_SOURCE}.gch
- DEPENDS ${INCLUDE_SRCS} VERBATIM
+ COMMAND ${CMAKE_CXX_COMPILER} ARGS ${PCH_CXXFLAGS} ${PCH_EXTRAFLAGS}
+ ${PCH_GETTEXT_INCLUDE} -I${CMAKE_CURRENT_BINARY_DIR} -I${Anope_SOURCE_DIR}/modules/pseudoclients ${CMAKE_CURRENT_SOURCE_DIR}/${PCH_SOURCE} -o ${CMAKE_CURRENT_BINARY_DIR}/${PCH_SOURCE}.gch
+ DEPENDS ${INCLUDES_LIST} VERBATIM
)
endforeach(PCH_SOURCE ${PCH_SOURCES})
endif(CMAKE_COMPILER_IS_GNUCXX)
diff --git a/include/access.h b/include/access.h
index 8b380895d..e19c15a76 100644
--- a/include/access.h
+++ b/include/access.h
@@ -1,6 +1,24 @@
+/*
+ *
+ * (C) 2003-2012 Anope Team
+ * Contact us at team@anope.org
+ *
+ * Please read COPYING and README for further details.
+ *
+ * Based on the original code of Epona by Lara.
+ * Based on the original code of Services by Andy Church.
+ *
+ *
+ */
+
#ifndef ACCESS_H
#define ACCESS_H
+#include "services.h"
+#include "anope.h"
+#include "serialize.h"
+#include "service.h"
+
enum
{
ACCESS_INVALID = -10000,
@@ -28,7 +46,6 @@ class CoreExport PrivilegeManager
static void ClearPrivileges();
};
-class ChanAccess;
class CoreExport AccessProvider : public Service
{
diff --git a/include/account.h b/include/account.h
index 516bcace5..ffdc7b18f 100644
--- a/include/account.h
+++ b/include/account.h
@@ -1,10 +1,24 @@
+/*
+ *
+ * (C) 2003-2012 Anope Team
+ * Contact us at team@anope.org
+ *
+ * Please read COPYING and README for further details.
+ *
+ * Based on the original code of Epona by Lara.
+ * Based on the original code of Services by Andy Church.
+ *
+ *
+ */
+
#ifndef ACCOUNT_H
#define ACCOUNT_H
+#include "extensible.h"
+#include "serialize.h"
#include "anope.h"
-
-class NickAlias;
-class NickCore;
+#include "memo.h"
+#include "base.h"
typedef Anope::insensitive_map<NickAlias *> nickalias_map;
typedef Anope::insensitive_map<NickCore *> nickcore_map;
@@ -93,8 +107,11 @@ const Anope::string NickCoreFlagStrings[] = {
"MEMO_MAIL", "HIDE_STATUS", "SUSPENDED", "AUTOOP", "FORBIDDEN", "UNCONFIRMED", ""
};
-class CoreExport NickAlias : public Extensible, public Flags<NickNameFlag, NS_END>, public Serializable
+class CoreExport NickAlias : public Base, public Extensible, public Flags<NickNameFlag, NS_END>, public Serializable
{
+ Anope::string vhost_ident, vhost_host, vhost_creator;
+ time_t vhost_created;
+
public:
/** Default constructor
* @param nickname The nick
@@ -114,7 +131,6 @@ class CoreExport NickAlias : public Extensible, public Flags<NickNameFlag, NS_EN
time_t time_registered; /* When the nick was registered */
time_t last_seen; /* When it was seen online for the last time */
NickCore *nc; /* I'm an alias of this */
- HostInfo hostinfo;
Anope::string serialize_name() const;
serialized_data serialize();
@@ -131,9 +147,46 @@ class CoreExport NickAlias : public Extensible, public Flags<NickNameFlag, NS_EN
* @param u The user
*/
void OnCancel(User *u);
+
+ /** Set a vhost for the user
+ * @param ident The ident
+ * @param host The host
+ * @param creator Who created the vhost
+ * @param time When the vhost was craated
+ */
+ void SetVhost(const Anope::string &ident, const Anope::string &host, const Anope::string &creator, time_t created = Anope::CurTime);
+
+ /** Remove a users vhost
+ **/
+ void RemoveVhost();
+
+ /** Check if the user has a vhost
+ * @return true or false
+ */
+ bool HasVhost() const;
+
+ /** Retrieve the vhost ident
+ * @return the ident
+ */
+ const Anope::string &GetVhostIdent() const;
+
+ /** Retrieve the vhost host
+ * @return the host
+ */
+ const Anope::string &GetVhostHost() const;
+
+ /** Retrieve the vhost creator
+ * @return the creator
+ */
+ const Anope::string &GetVhostCreator() const;
+
+ /** Retrieve when the vhost was created
+ * @return the time it was created
+ */
+ time_t GetVhostCreated() const;
};
-class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag, NI_END>, public Serializable
+class CoreExport NickCore : public Base, public Extensible, public Flags<NickCoreFlag, NI_END>, public Serializable
{
public:
/** Default constructor
@@ -254,65 +307,11 @@ class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag, NI_END
};
-/** Timer for colliding nicks to force people off of nicknames
- */
-class CoreExport NickServCollide : public Timer
-{
- dynamic_reference<User> u;
- Anope::string nick;
-
- public:
- /** Default constructor
- * @param nick The nick we're colliding