summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-06 20:09:48 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-06 20:09:48 +0000
commit9124a3be5347317918d9fb95991bdb2dd3818c99 (patch)
tree59b726e2470328f56996a96b94fbc57e622c1edb
parentb462814760cb7c0830072275acc97291a9fb905b (diff)
Fixed windows build and cleaned up a few small things
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2736 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--Changes.conf1
-rw-r--r--include/modes.h2
-rw-r--r--include/modules.h12
-rw-r--r--include/services.h4
-rw-r--r--include/users.h2
-rw-r--r--src/channels.c8
-rw-r--r--src/config.c4
-rw-r--r--src/init.c4
-rw-r--r--src/users.c6
9 files changed, 22 insertions, 21 deletions
diff --git a/Changes.conf b/Changes.conf
index f4319af25..0fe3b7352 100644
--- a/Changes.conf
+++ b/Changes.conf
@@ -7,6 +7,7 @@ options:database added for the database modules
** MODIFIED CONFIGURATION DIRECTIVES **
chanserv:modules added cs_unban
+nickserv:modules added ns_resetpass
** DELETED CONFIGURATION DIRECTIVES **
nickserv:database deleted because of new database system
diff --git a/include/modes.h b/include/modes.h
index 34e3ce463..a4692397e 100644
--- a/include/modes.h
+++ b/include/modes.h
@@ -66,7 +66,7 @@ enum ModeType
/** This class is a user mode, all user modes use this/inherit from this
*/
-class UserMode
+class CoreExport UserMode
{
public:
diff --git a/include/modules.h b/include/modules.h
index c25016bdd..0656e2a4e 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -219,12 +219,12 @@ struct ModuleLang_ {
enum CommandFlag
{
- CFLAG_ALLOW_UNREGISTERED = 1,
- CFLAG_ALLOW_FORBIDDEN = 2,
- CFLAG_ALLOW_SUSPENDED = 4,
- CFLAG_ALLOW_UNREGISTEREDCHANNEL = 8,
- CFLAG_STRIP_CHANNEL = 16,
- CFLAG_DISABLE_FANTASY = 32
+ CFLAG_ALLOW_UNREGISTERED,
+ CFLAG_ALLOW_FORBIDDEN,
+ CFLAG_ALLOW_SUSPENDED,
+ CFLAG_ALLOW_UNREGISTEREDCHANNEL,
+ CFLAG_STRIP_CHANNEL,
+ CFLAG_DISABLE_FANTASY
};
/** Every services command is a class, inheriting from Command.
diff --git a/include/services.h b/include/services.h
index d92f84f63..a2a328eb5 100644
--- a/include/services.h
+++ b/include/services.h
@@ -507,7 +507,7 @@ typedef struct {
/*************************************************************************/
-class HostInfo
+class CoreExport HostInfo
{
private:
std::string Ident;
@@ -988,7 +988,7 @@ class CoreExport Channel : public Extensible, public Flags<ChannelFlags>
* @param EnforceMLock Should mlock be enforced on this mode change
* @param cmodes The modes to set
*/
- void SetModes(BotInfo *bi, bool EnforceMLock, const std::string &cmodes, ...);
+ void SetModes(BotInfo *bi, bool EnforceMLock, const char *cmodes, ...);
};
/** Channelban type flags
diff --git a/include/users.h b/include/users.h
index 0458c0455..f3476f055 100644
--- a/include/users.h
+++ b/include/users.h
@@ -215,6 +215,6 @@ class CoreExport User : public Extensible
* @param bi The client setting the mode
* @param modes The modes
*/
- void SetModes(BotInfo *bi, const std::string &modes, ...);
+ void SetModes(BotInfo *bi, const char *modes, ...);
};
diff --git a/src/channels.c b/src/channels.c
index 85b026b40..bc1b17f17 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -595,14 +595,14 @@ void Channel::ClearInvites(BotInfo *bi)
* @param EnforceMLock Should mlock be enforced on this mode change
* @param cmodes The modes to set
*/
-void Channel::SetModes(BotInfo *bi, bool EnforceMLock, const std::string &cmodes, ...)
+void Channel::SetModes(BotInfo *bi, bool EnforceMLock, const char *cmodes, ...)
{
char buf[BUFSIZE] = "";
va_list args;
std::string modebuf, sbuf;
int add = -1;
- va_start(args, cmodes.c_str());
- vsnprintf(buf, BUFSIZE - 1, cmodes.c_str(), args);
+ va_start(args, cmodes);
+ vsnprintf(buf, BUFSIZE - 1, cmodes, args);
va_end(args);
spacesepstream sep(buf);
@@ -2105,7 +2105,7 @@ void MassChannelModes(BotInfo *bi, const std::string &modes)
{
if (c->bouncy_modes)
return;
- c->SetModes(bi, false, modes);
+ c->SetModes(bi, false, modes.c_str());
}
}
diff --git a/src/config.c b/src/config.c
index 07001aea9..0b654d433 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1767,6 +1767,10 @@ int read_config(int reload)
SetDefaultMLock();
+ /* Disable the log channel if its defined in the conf, but not enabled */
+ if (!Config.LogChannel && LogChan)
+ LogChan = false;
+
if (!retval) {
printf
("\n*** Support resources: Read through the services.conf self-contained \n*** documentation. Read the documentation files found in the 'docs' \n*** folder. Visit our portal located at http://www.anope.org/. Join \n*** our support channel on /server irc.anope.org channel #anope.\n\n");
diff --git a/src/init.c b/src/init.c
index cd53e67bf..ba9fd1f71 100644
--- a/src/init.c
+++ b/src/init.c
@@ -378,10 +378,6 @@ int init_primary(int ac, char **av)
return -1;
}
- /* Disable the log channel if its defined in the conf, but not enabled */
- if (!Config.LogChannel && LogChan)
- LogChan = false;
-
/* Add IRCD Protocol Module; exit if there are errors */
if (protocol_module_init()) {
return -1;
diff --git a/src/users.c b/src/users.c
index 54cc6b22b..a0df6c5be 100644
--- a/src/users.c
+++ b/src/users.c
@@ -576,14 +576,14 @@ void User::RemoveMode(BotInfo *bi, char ModeChar)
* @param bi The client setting the mode
* @param modes The modes
*/
-void User::SetModes(BotInfo *bi, const std::string &modes, ...)
+void User::SetModes(BotInfo *bi, const char *modes, ...)
{
char buf[BUFSIZE] = "";
va_list args;
std::string modebuf, sbuf;
int add = -1;
- va_start(args, modes.c_str());
- vsnprintf(buf, BUFSIZE - 1, modes.c_str(), args);
+ va_start(args, modes);
+ vsnprintf(buf, BUFSIZE - 1, modes, args);
va_end(args);
spacesepstream sep(buf);