1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 14:06:39 +02:00

Fixed Windows build

This commit is contained in:
Adam
2010-12-24 01:23:22 -05:00
parent befb4b3644
commit 35e328bcb6
10 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ enum CommandFlag
};
/* The source for a command */
struct CommandSource
struct CoreExport CommandSource
{
/* User executing the command */
User *u;
+2 -2
View File
@@ -176,7 +176,7 @@ namespace irc
/** Used to hash irc::strings for unordered_map
*/
struct hash
struct CoreExport hash
{
/* VS 2008 specific code */
enum { bucket_size = 4, min_buckets = 8 };
@@ -253,7 +253,7 @@ namespace ci
/** Used to hash ci::strings for unordered_map
*/
struct hash
struct CoreExport hash
{
/* VS 2008 specific code */
enum { bucket_size = 4, min_buckets = 8 };
+1 -1
View File
@@ -765,7 +765,7 @@ enum EntryType
ENTRYTYPE_HOST
};
class Entry : public Flags<EntryType>
class CoreExport Entry : public Flags<EntryType>
{
Anope::string mask;
+1 -1
View File
@@ -340,7 +340,7 @@ class CoreExport ConnectionSocket : public BufferedSocket
void Connect(const Anope::string &TargetHost, int Port, const Anope::string &BindHost = "");
};
class ClientSocket : public BufferedSocket
class CoreExport ClientSocket : public BufferedSocket
{
public:
/* Listen socket this connection came from */
+4 -4
View File
@@ -76,9 +76,9 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS})
endif(WIN32)
set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}")
add_dependencies(${SO} ${PROGRAM_NAME})
# For Windows only, have the module link to the export library of Anope as well as the wsock32 library (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
# For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
if(WIN32)
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 ${WIN32_MEMORY} ${TEMP_DEPENDENCIES})
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY} ${TEMP_DEPENDENCIES})
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
endif(WIN32)
# Set the module to be installed to the module directory under the data directory
@@ -170,9 +170,9 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS})
add_library(${SO} MODULE ${MODULES_SUBDIR_SRCS})
set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${SUBDIR_LDFLAGS}")
add_dependencies(${SO} ${PROGRAM_NAME})
# For Windows only, have the module link to the export library of Anope as well as the wsock32 library (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
# For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
if(WIN32)
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 ${WIN32_MEMORY} ${SUBDIR_EXTRA_DEPENDS})
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY} ${SUBDIR_EXTRA_DEPENDS})
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
endif(WIN32)
# Set the module to be installed to the module directory under the data directory
+3 -3
View File
@@ -980,7 +980,7 @@ class DBPlain : public Module
db << " " << oldmodes;
else
{
for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
{
const ModeLock &ml = it->second;
if (ml.set)
@@ -1003,7 +1003,7 @@ class DBPlain : public Module
}
else
{
for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
{
const ModeLock &ml = it->second;
if (!ml.set)
@@ -1028,7 +1028,7 @@ class DBPlain : public Module
}
else
{
for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
{
const ModeLock &ml = it->second;
ChannelMode *cm = ModeManager::FindChannelModeByName(ml.name);
+2 -2
View File
@@ -206,7 +206,7 @@ static Anope::string MakeMLock(ChannelInfo *ci, bool status)
;
else
{
for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
{
const ModeLock &ml = it->second;
if (ml.set == status)
@@ -249,7 +249,7 @@ static Anope::string GetMLockParams(ChannelInfo *ci, bool onoff)
}
else
{
for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
{
const ModeLock &ml = it->second;
+1 -1
View File
@@ -62,7 +62,7 @@ class ModuleAlias : public Module
EventReturn OnPreCommandRun(User *&u, BotInfo *&bi, Anope::string &command, Anope::string &message, ChannelInfo *&ci)
{
bool fantasy = ci != NULL;
std::map<Anope::string, CommandAlias, std::less<ci::string> >::const_iterator it = aliases.find(command), it_end = it;
std::multimap<Anope::string, CommandAlias, std::less<ci::string> >::const_iterator it = aliases.find(command), it_end = it;
if (it_end != aliases.end())
it_end = aliases.upper_bound(command);
for (; it != it_end; ++it)
+2 -2
View File
@@ -111,7 +111,7 @@ Anope::string get_mlock_modes(ChannelInfo *ci, int complete)
{
Anope::string pos = "+", neg = "-", params;
for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
{
const ModeLock &ml = it->second;
ChannelMode *cm = ModeManager::FindChannelModeByName(ml.name);
@@ -241,7 +241,7 @@ void check_modes(Channel *c)
return;
}
for (std::map<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
for (std::multimap<ChannelModeName, ModeLock>::const_iterator it = ci->GetMLock().begin(), it_end = ci->GetMLock().end(); it != it_end; ++it)
{
const ModeLock &ml = it->second;
ChannelMode *cm = ModeManager::FindChannelModeByName(ml.name);
+2 -2
View File
@@ -579,13 +579,13 @@ void ChannelInfo::LoadMLock()
*/
bool ChannelInfo::HasMLock(ChannelMode *mode, const Anope::string &param, bool status) const
{
std::map<ChannelModeName, ModeLock>::const_iterator it = this->mode_locks.find(mode->Name);
std::multimap<ChannelModeName, ModeLock>::const_iterator it = this->mode_locks.find(mode->Name);
if (it != this->mode_locks.end())
{
if (mode->Type != MODE_REGULAR)
{
std::map<ChannelModeName, ModeLock>::const_iterator it_end = this->mode_locks.upper_bound(mode->Name);
std::multimap<ChannelModeName, ModeLock>::const_iterator it_end = this->mode_locks.upper_bound(mode->Name);
for (; it != it_end; ++it)
{
const ModeLock &ml = it->second;