summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/FindGettext.cmake13
-rw-r--r--language/CMakeLists.txt1
-rw-r--r--modules/CMakeLists.txt3
-rw-r--r--modules/extra/m_ssl.cpp2
-rw-r--r--src/channels.cpp31
-rw-r--r--src/servers.cpp4
6 files changed, 33 insertions, 21 deletions
diff --git a/cmake/FindGettext.cmake b/cmake/FindGettext.cmake
index cdae5bfb3..e97bfef36 100644
--- a/cmake/FindGettext.cmake
+++ b/cmake/FindGettext.cmake
@@ -1,17 +1,18 @@
# Find the header files, libs, and executables for gettext
if(NOT WIN32)
find_path(GETTEXT_INCLUDE libintl.h /usr/include /usr/local/include ${EXTRA_INCLUDE})
- find_library(GETTEXT_LIBRARY intl PATHS /usr/lib /usr/lib64 ${EXTRA_INCLUDE})
+ find_library(GETTEXT_LIBRARY intl PATHS /usr/lib /usr/lib64 ${EXTRA_LIBS})
+ find_library(ICONV_LIBRARY iconv PATHS /usr/lib /usr/lib64 ${EXTRA_LIBS})
find_program(GETTEXT_MSGFMT msgfmt PATHS /usr/bin/ /usr/local/bin ${EXTRA_INCLUDE})
if(GETTEXT_INCLUDE AND GETTEXT_MSGFMT)
set(GETTEXT_FOUND TRUE)
endif(GETTEXT_INCLUDE AND GETTEXT_MSGFMT)
else(NOT WIN32)
find_path(GETTEXT_INCLUDE libintl.h ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/include $ENV{VCINSTALLDIR}/include gettext/include ${EXTRA_INCLUDE})
- find_library(GETTEXT_LIBRARY libintl PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_INCLUDE})
- find_library(ICONV_LIBRARY libiconv PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_INCLUDE})
- find_library(MINGWEX_LIBRARY libmingwex PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_INCLUDE})
- find_library(GCC_LIBRARY libgcc PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_INCLUDE})
+ find_library(GETTEXT_LIBRARY libintl PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
+ find_library(ICONV_LIBRARY libiconv PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
+ find_library(MINGWEX_LIBRARY libmingwex PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
+ find_library(GCC_LIBRARY libgcc PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
find_program(GETTEXT_MSGFMT msgfmt PATHS ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/bin $ENV{VCINSTALLDIR}/bin gettext/bin ${EXTRA_INCLUDE})
if(GETTEXT_INCLUDE AND GETTEXT_MSGFMT AND ICONV_LIBRARY AND MINGWEX_LIBRARY AND GCC_LIBRARY)
set(GETTEXT_FOUND TRUE)
@@ -27,7 +28,7 @@ if(GETTEXT_FOUND)
set(GETTEXT_LIBRARIES libiconv libintl libmingwex libgcc)
else(WIN32)
if(GETTEXT_LIBRARY)
- set(GETTEXT_LIBRARIES ${GETTEXT_LIBRARY})
+ set(GETTEXT_LIBRARIES ${GETTEXT_LIBRARY} ${ICONV_LIBRARY})
endif(GETTEXT_LIBRARY)
endif(WIN32)
endif(GETTEXT_FOUND)
diff --git a/language/CMakeLists.txt b/language/CMakeLists.txt
index 26b9b40ee..577e132a3 100644
--- a/language/CMakeLists.txt
+++ b/language/CMakeLists.txt
@@ -29,7 +29,6 @@ if(GETTEXT_FOUND)
endif(NOT WIN32)
# Install the new language file
- install(CODE "FILE(MAKE_DIRECTORY \"${LOCALE_DIR}/${LANG_LANG}/LC_MESSAGES/\")")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG_MO} DESTINATION ${LOCALE_DIR}/${LANG_LANG}/LC_MESSAGES RENAME ${LANG_DOMAIN}.mo PERMISSIONS ${PERMS})
endforeach(LANG_PO)
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index 32fccd2d4..228618b0e 100644
--- a/modules/CMakeLists.txt
+++ b/modules/CMakeLists.txt
@@ -78,7 +78,6 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS})
endif(WIN32)
set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}" INSTALL_RPATH_USE_LINK_PATH ON BUILD_WITH_INSTALL_RPATH ON)
add_dependencies(${SO} ${PROGRAM_NAME})
- target_link_libraries(${SO} ${PROGRAM_NAME})
if(GETTEXT_FOUND)
add_dependencies(${SO} module_language)
endif(GETTEXT_FOUND)
@@ -87,7 +86,7 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS})
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY} ${TEMP_DEPENDENCIES})
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
else(WIN32)
- target_link_libraries(${SO} ${PROGRAM_NAME} ${TEMP_DEPENDENCIES})
+ target_link_libraries(${SO} ${TEMP_DEPENDENCIES})
endif(WIN32)
# Set the module to be installed to the module directory under the data directory
install(TARGETS ${SO}
diff --git a/modules/extra/m_ssl.cpp b/modules/extra/m_ssl.cpp
index 9929c6f15..7158a5ce5 100644
--- a/modules/extra/m_ssl.cpp
+++ b/modules/extra/m_ssl.cpp
@@ -1,4 +1,4 @@
-/* RequiredLibraries: ssl,crypt */
+/* RequiredLibraries: ssl,crypto */
#include "module.h"
#include "ssl.h"
diff --git a/src/channels.cpp b/src/channels.cpp
index 2e6023dae..fb0994626 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -125,13 +125,6 @@ void Channel::CheckModes()
return;
}
- if (this->chanserv_modetime != Anope::CurTime)
- {
- this->chanserv_modecount = 0;
- this->chanserv_modetime = Anope::CurTime;
- }
- this->chanserv_modecount++;
-
EventReturn MOD_RESULT;
FOREACH_RESULT(I_OnCheckModes, OnCheckModes(this));
if (MOD_RESULT == EVENT_STOP)
@@ -484,6 +477,17 @@ void Channel::SetMode(BotInfo *bi, ChannelMode *cm, const Anope::string &param,
return;
}
+ if (Me->IsSynced())
+ {
+ if (this->chanserv_modetime != Anope::CurTime)
+ {
+ this->chanserv_modecount = 0;
+ this->chanserv_modetime = Anope::CurTime;
+ }
+
+ this->chanserv_modecount++;
+ }
+
ModeManager::StackerAdd(bi, this, cm, true, param);
MessageSource ms(bi);
SetModeInternal(ms, cm, param, enforce_mlock);
@@ -524,6 +528,17 @@ void Channel::RemoveMode(BotInfo *bi, ChannelMode *cm, const Anope::string &para
this->GetParam(cmp->name, realparam);
}
+ if (Me->IsSynced())
+ {
+ if (this->chanserv_modetime != Anope::CurTime)
+ {
+ this->chanserv_modecount = 0;
+ this->chanserv_modetime = Anope::CurTime;
+ }
+
+ this->chanserv_modecount++;
+ }
+
ModeManager::StackerAdd(bi, this, cm, false, realparam);
MessageSource ms(bi);
RemoveModeInternal(ms, cm, realparam, enforce_mlock);
@@ -616,7 +631,7 @@ void Channel::SetModes(BotInfo *bi, bool enforce_mlock, const char *cmodes, ...)
void Channel::SetModesInternal(MessageSource &source, const Anope::string &mode, time_t ts, bool enforce_mlock)
{
- if (source.GetServer())
+ if (source.GetServer() && source.GetServer()->IsSynced())
{
if (Anope::CurTime != this->server_modetime)
{
diff --git a/src/servers.cpp b/src/servers.cpp
index 2b4fea2db..1dd9d8a37 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -280,9 +280,7 @@ void Server::Sync(bool sync_links)
for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it)
{
Channel *c = it->second;
- c->CheckModes();
- if (c->ci)
- c->ci->RestoreTopic();
+ c->Sync();
}
if (!Anope::NoFork && Anope::AtTerm())