summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-03-24 00:46:53 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-03-24 00:46:53 +0000
commit3ffd9179262242acc01ed93b749aa55a938cf381 (patch)
treef199314aa20920c5136206755786413ba5e809c0 /include
parent14fc57d24b5b3ed622d0603011d33b06780ca071 (diff)
Rewrote arg parsing system, changed lots of std::string*s to std::string&, made --config arg, and made Anope print out a few lines of information when starting
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2833 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
-rw-r--r--include/channels.h2
-rw-r--r--include/config.h3
-rw-r--r--include/extern.h5
-rw-r--r--include/regchannel.h2
-rw-r--r--include/services.h7
-rw-r--r--include/version.sh6
6 files changed, 10 insertions, 15 deletions
diff --git a/include/channels.h b/include/channels.h
index e543370b4..33a376a20 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -232,7 +232,7 @@ class CoreExport Channel : public Extensible, public Flags<ChannelFlags>
* @param Target a string to put the param into
* @return true on success
*/
- const bool GetParam(ChannelModeName Name, std::string *Target);
+ const bool GetParam(ChannelModeName Name, std::string &Target);
/** Check if a mode is set and has a param
* @param Name The mode
diff --git a/include/config.h b/include/config.h
index 0ec5f9bf9..a43b17f3e 100644
--- a/include/config.h
+++ b/include/config.h
@@ -22,9 +22,6 @@
/******* General configuration *******/
-/* Name of configuration file (in Services directory) */
-#define SERVICES_CONF "services.conf"
-
/* Name of log file (in Services directory) */
#define LOG_FILENAME "services.log"
diff --git a/include/extern.h b/include/extern.h
index a46314081..4e1de79e7 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -158,6 +158,7 @@ char *sockstrerror(int error);
/**** config.c ****/
+E std::string services_conf;
E ServerConfig Config;
E int read_config(int reload);
@@ -179,6 +180,8 @@ E void hostserv_init();
/**** init.c ****/
E void introduce_user(const std::string &user);
+E bool GetCommandLineArgument(const std::string &name, char shortname = 0);
+E bool GetCommandLineArgument(const std::string &name, char shortname, std::string &param);
E int init_primary(int ac, char **av);
E int init_secondary(int ac, char **av);
E Uplink *uplink_server;
@@ -230,7 +233,7 @@ E char *version_protocol;
E const char version_flags[];
E std::string services_dir;
-E const char *log_filename;
+E std::string log_filename;
E int debug;
E int readonly;
E bool LogChan;
diff --git a/include/regchannel.h b/include/regchannel.h
index 899267ca2..6b0e9c264 100644
--- a/include/regchannel.h
+++ b/include/regchannel.h
@@ -279,7 +279,7 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag>
* @param Target a string to put the param into
* @return true on success
*/
- const bool GetParam(ChannelModeName Name, std::string *Target);
+ const bool GetParam(ChannelModeName Name, std::string &Target);
/** Check if a mode is set and has a param
* @param Name The mode
diff --git a/include/services.h b/include/services.h
index 40512c32b..e13866e81 100644
--- a/include/services.h
+++ b/include/services.h
@@ -231,6 +231,7 @@ extern int strncasecmp(const char *, const char *, size_t);
#include "slist.h"
/* pull in the various bits of STL to pull in */
+#include <iostream>
#include <string>
#include <map>
#include <exception>
@@ -1121,6 +1122,7 @@ struct Uplink {
enum LogLevel
{
LOG_NORMAL,
+ LOG_TERMINAL,
LOG_DEBUG,
LOG_DEBUG_2,
LOG_DEBUG_3,
@@ -1131,14 +1133,13 @@ class CoreExport Alog
{
private:
std::stringstream buf;
- bool logit;
+ LogLevel Level;
public:
Alog(LogLevel val = LOG_NORMAL);
~Alog();
template<typename T> Alog& operator<<(T val)
{
- if (logit)
- buf << val;
+ buf << val;
return *this;
}
};
diff --git a/include/version.sh b/include/version.sh
index 9d3f82bff..7f14f9e1d 100644
--- a/include/version.sh
+++ b/include/version.sh
@@ -67,12 +67,6 @@ cat >$VERSIONH <<EOF
# define VER_OS
#endif
-#if defined(USE_MODULES)
-# define VER_MODULE "M"
-#else
-# define VER_MODULE
-#endif
-
#endif
EOF