1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 02:43:13 +02:00

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
This commit is contained in:
Adam-
2010-01-06 20:09:48 +00:00
parent b462814760
commit 9124a3be53
9 changed files with 22 additions and 21 deletions
+1
View File
@@ -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
+1 -1
View File
@@ -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:
+6 -6
View File
@@ -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.
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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, ...);
};
+4 -4
View File
@@ -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());
}
}
+4
View File
@@ -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");
-4
View File
@@ -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;
+3 -3
View File
@@ -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);