summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-10-26 20:14:39 -0400
committerAdam <Adam@anope.org>2010-10-26 20:14:39 -0400
commit09160d1289d9359c090ce2f6cf47335dbf51223c (patch)
treec0f1abbde6e8b097a98443f0e7ce1d8325bee955 /src/modules.cpp
parent1d931401cd00848b7ba10c13b0e2771935395aa6 (diff)
Fixed Windows build with gettext
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index afcbb9ae6..eb7462d1a 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -286,6 +286,10 @@ Version Module::GetVersion() const
return Version(VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD);
}
+#if GETTEXT_FOUND
+/* Used by gettext to make it always dynamically load language strings (so we can drop them in while Anope is running) */
+extern "C" int _nl_msg_cat_cntr;
+#endif
void Module::SendMessage(BotInfo *from, User *to, const char *fmt, ...)
{
Anope::string language = (to && to->Account() ? to->Account()->language : "");
@@ -299,7 +303,6 @@ void Module::SendMessage(BotInfo *from, User *to, const char *fmt, ...)
#if GETTEXT_FOUND
if (!language.empty())
{
- extern int _nl_msg_cat_cntr;
++_nl_msg_cat_cntr;
setenv("LANGUAGE", language.c_str(), 1);
setlocale(LC_ALL, "en_US");