summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-29 00:34:13 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-29 00:34:13 +0000
commit3e9413c83584aaf5f38519f335d91aadfaf9ff8a (patch)
treed325d2ede6700aea2e61c0452e4a2d1ffd7b8716
parentf9d4002ba81b1d19743caa5400be8e802ad844f9 (diff)
Added start of Services class to be used by new and existing pseudo-clients.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1814 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--include/bots.h2
-rw-r--r--include/services.h31
-rw-r--r--src/Makefile7
-rw-r--r--src/makefile.win327
4 files changed, 35 insertions, 12 deletions
diff --git a/include/bots.h b/include/bots.h
index 7b175d99f..dc51f77f7 100644
--- a/include/bots.h
+++ b/include/bots.h
@@ -46,7 +46,7 @@ class CoreExport BotInfo
/** Destroy a bot, clearing up appropriately.
*/
- ~BotInfo();
+ virtual ~BotInfo();
/** Change the nickname set on a bot.
* @param newnick The nick to change to
diff --git a/include/services.h b/include/services.h
index 782f46e0e..76174dad6 100644
--- a/include/services.h
+++ b/include/services.h
@@ -361,13 +361,13 @@ class CoreExport Extensible
* @return Returns true on success.
*/
bool Shrink(const std::string &key)
- {
- /* map::size_type map::erase( const key_type& key );
- * returns the number of elements removed, std::map
- * is single-associative so this should only be 0 or 1
- */
- return this->Extension_Items.erase(key);
- }
+ {
+ /* map::size_type map::erase( const key_type& key );
+ * returns the number of elements removed, std::map
+ * is single-associative so this should only be 0 or 1
+ */
+ return this->Extension_Items.erase(key);
+ }
/** Get an extension item.
*
@@ -1240,6 +1240,23 @@ struct capabinfo_ {
/*************************************************************************/
+class CoreExport Services : public BotInfo
+{
+ public:
+ /** Create a new Services pseudo-client
+ * @param nick The nickname to assign to the pseudo-client.
+ * @param user The ident to assign to the pseudo-client.
+ * @param host The hostname to assign to the pseudo-client.
+ * @param real The realname to assign to the pseudo-client.
+ */
+ Services(const char *nick, const char *user, const char *host, const char *real);
+ /** Destroy a pseudo-client, cleaning up appropriately.
+ */
+ virtual ~Services();
+};
+
+/*************************************************************************/
+
/*
* Forward declaration reqired, because the base IRCDProto class uses some crap from in here.
*/
diff --git a/src/Makefile b/src/Makefile
index bde534274..8172fe200 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,11 +1,13 @@
OBJS = actions.o base64.o bots.o botserv.o channels.o chanserv.o commands.o compat.o \
config.o datafiles.o encrypt.o events.o hashcomp.o helpserv.o hostserv.o init.o ircd.o language.o log.o mail.o main.o \
memory.o memoserv.o messages.o misc.o modules.o news.o nickserv.o operserv.o \
- process.o send.o servers.o sessions.o slist.o sockutil.o timeout.o users.o module.o modulemanager.o configreader.o
+ process.o send.o servers.o sessions.o slist.o sockutil.o timeout.o users.o module.o modulemanager.o configreader.o \
+ services.o
SRCS = actions.c base64.c bots.cpp botserv.c channels.c chanserv.c commands.c compat.c \
config.c datafiles.c encrypt.c events.c hashcomp.cpp helpserv.c hostserv.c init.c ircd.c language.c log.c mail.c main.c \
memory.c memoserv.c messages.c misc.c modules.c news.c nickserv.c operserv.c \
- process.c send.c servers.c sessions.c s sockutil.c timeout.c users.c module.cpp modulemanager.cpp configreader.cpp
+ process.c send.c servers.c sessions.c s sockutil.c timeout.c users.c module.cpp modulemanager.cpp configreader.cpp \
+ services.cpp
INCLUDES = ../include/commands.h ../include/defs.h ../include/language.h \
../include/pseudo.h ../include/sysconf.h ../include/config.h \
@@ -69,6 +71,7 @@ operserv.o: operserv.c $(INCLUDES)
process.o: process.c $(INCLUDES)
send.o: send.c $(INCLUDES)
servers.o: servers.c $(INCLUDES)
+services.o: services.cpp $(INCLUDES)
sessions.o: sessions.c $(INCLUDES)
slist.o: slist.c $(INCLUDES)
sockutil.o: sockutil.c $(INCLUDES)
diff --git a/src/makefile.win32 b/src/makefile.win32
index 7558c1ad6..4acf19071 100644
--- a/src/makefile.win32
+++ b/src/makefile.win32
@@ -22,13 +22,15 @@ OBJS = actions.obj base64.obj bots.obj botserv.obj channels.obj chanserv.obj co
init.obj ircd.obj language.obj log.obj mail.obj main.obj memory.obj \
memoserv.obj messages.obj misc.obj modules.obj mod_version.obj news.obj nickserv.obj operserv.obj \
process.obj send.obj servers.obj sessions.obj slist.obj sockutil.obj \
- timeout.obj users.obj module.obj modulemanager.obj hashcomp.obj configreader.obj
+ timeout.obj users.obj module.obj modulemanager.obj hashcomp.obj configreader.obj \
+ services.obj
SRCS = actions.c base64.c botserv.c bots.cpp channels.c chanserv.c commands.c compat.c \
config.c datafiles.c encrypt.c events.c helpserv.c hostserv.c init.c ircd.c \
language.c log.c mail.c main.c memory.c memoserv.c messages.c misc.c \
modules.c mod_version.c news.c nickserv.c operserv.c process.c send.c servers.obj sessions.c \
- slist.c sockutil.c timeout.c users.c module.cpp modulemanager.cpp hashcomp.cpp configreader.cpp
+ slist.c sockutil.c timeout.c users.c module.cpp modulemanager.cpp hashcomp.cpp configreader.cpp \
+ services.cpp
###########################################################################
@@ -97,6 +99,7 @@ operserv.obj: operserv.c ..\include\services.h ..\include\pseudo.h
process.obj: process.c ..\include\services.h ..\include\messages.h
send.obj: send.c ..\include\services.h
servers.obj: servers.c ..\include\services.h
+services.obj: services.cpp ..\include\services.h
sessions.obj: sessions.c ..\include\services.h ..\include\pseudo.h
slist.obj: slist.c ..\include\services.h ..\include\slist.h
sockutil.obj: sockutil.c ..\include\services.h