diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.c | 8 | ||||
-rw-r--r-- | src/config.c | 4 | ||||
-rw-r--r-- | src/init.c | 4 | ||||
-rw-r--r-- | src/users.c | 6 |
4 files changed, 11 insertions, 11 deletions
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); |