1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 18:33:12 +02:00

Changed the language system to use gettext

This commit is contained in:
Adam
2010-09-26 02:33:01 -04:00
parent 05e6815d91
commit d646d455e2
239 changed files with 168730 additions and 90259 deletions
+1
View File
@@ -331,6 +331,7 @@ check_function_exists(strlcpy HAVE_STRLCPY)
check_function_exists(umask HAVE_UMASK)
check_function_exists(backtrace HAVE_BACKTRACE)
check_function_exists(eventfd HAVE_EVENTFD)
check_function_exists(gettext HAVE_GETTEXT)
# Check for the existance of the following types
check_type_size(uint8_t UINT8_T)
+10 -8
View File
@@ -902,10 +902,17 @@ nickserv
defaults="secure private hideemail hideusermask memosignon memoreceive autoop"
/*
* Default language that non- and newly-registered nicks will receive messages in. The number
* here is the same as the number in NickServ's SET LANGUAGE help.
* A list of languages to load on startup that will be available in /nickserv set language.
* Useful if you translate Anope to your language. (Explained further in docs/LANGUAGE).
* Note that english should not be listed here
*/
defaultlanguage = 1
languages = "ca_ES de_DE el_GR es_ES fr_FR hu_HU it_IT nl_NL pl_PL pt_PT ru_RU tr_TR"
/*
* Default language that non- and newly-registered nicks will receive messages in.
* Leave empty to default to English.
*/
#defaultlanguage = "es_ES"
/*
* The minimum length of time between consecutive uses of NickServ's REGISTER command. This
@@ -1700,11 +1707,6 @@ hs_request
* If set, Services will send a memo to all Services staff when a new vHost is requested.
*/
#memooper = yes
/*
* If set, Services will send a memo to all Host Setters when a new vHost is requested.
*/
#memosetters = yes
}
ns_maxemail
+1 -1
View File
@@ -155,7 +155,7 @@ class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag, NI_END
Anope::string pass; /* Password of the nicks */
Anope::string email; /* E-mail associated to the nick */
Anope::string greet; /* Greet associated to the nick */
uint16 language; /* Language selected by nickname owner (LANG_*) */
Anope::string language; /* Language name */
std::vector<Anope::string> access; /* Access list, vector of strings */
MemoInfo memos;
uint16 channelcount; /* Number of channels currently registered */
+3 -1
View File
@@ -585,8 +585,10 @@ class ServerConfig
bool NSNoGroupChange;
/* Default flags for newly registered nicks */
Flags<NickCoreFlag, NI_END> NSDefFlags;
/* All languages Anope is aware about */
Anope::string Languages;
/* Default language used by services */
unsigned NSDefLanguage;
Anope::string NSDefLanguage;
/* Users must be connected this long before they can register
* Not to be confused with NickRegDelay */
time_t NSRegDelay;
+10 -16
View File
@@ -154,19 +154,15 @@ E Uplink *uplink_server;
E void pmodule_ircd_proto(IRCDProto *);
E void pmodule_ircd_var(IRCDVar *ircdvar);
/**** language.c ****/
E char **langtexts[NUM_LANGS];
E char *langnames[NUM_LANGS];
E int langlist[NUM_LANGS];
E void lang_init();
E int strftime_lang(char *buf, int size, User *u, int format, struct tm *tm);
E void syntax_error(const Anope::string &service, User *u, const Anope::string &command, int msgnum);
E const char *getstring(NickAlias *na, int index);
E const char *getstring(const NickCore *nc, int index);
E const char *getstring(const User *nc, int index);
E const char *getstring(int index);
/**** language.cpp ****/
E std::vector<Anope::string> languages;
E void InitLanguages();
E const Anope::string GetString(Anope::string language, LanguageString string);
E const Anope::string GetString(LanguageString string);
E const Anope::string GetString(const NickCore *nc, LanguageString string);
E const Anope::string GetString(const User *u, LanguageString string);
E Anope::string language_strings[LANG_STRING_COUNT];
E void SyntaxError(BotInfo *bi, User *u, const Anope::string &command, LanguageString message);
/*** logger.cpp ***/
E void InitLogChannels(ServerConfig *);
@@ -239,6 +235,7 @@ E const char *merge_args(int argc, const char **argv);
E time_t dotime(const Anope::string &s);
E Anope::string duration(const NickCore *nc, time_t seconds);
E Anope::string expire_left(const NickCore *nc, time_t expires);
E Anope::string do_strftime(const time_t &t);
E bool doValidHost(const Anope::string &host, int type);
E bool isValidHost(const Anope::string &host, int type);
@@ -314,9 +311,6 @@ E void send_cmd(const Anope::string &source, const char *fmt, ...) FORMAT(printf
E void notice_server(const Anope::string &source, const Server *s, const char *fmt, ...) FORMAT(printf, 3, 4);
E void notice_lang(const Anope::string &source, const User *dest, int message, ...); // MARK_DEPRECATED;
E void notice_help(const Anope::string &source, const User *dest, int message, ...); // MARK_DEPRECATED;
/**** sessions.c ****/
E std::vector<Exception *> exceptions;
+1648
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -3,8 +3,8 @@
#include "anope.h"
extern CoreExport bool Mail(User *u, NickRequest *nr, const Anope::string &service, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool Mail(User *u, NickCore *nc, const Anope::string &service, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool Mail(User *u, NickRequest *nr, BotInfo *service, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool Mail(User *u, NickCore *nc, BotInfo *service, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool Mail(NickCore *nc, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool MailValidate(const Anope::string &email);
+7 -1
View File
@@ -3,7 +3,13 @@
#include "services.h"
#include "commands.h"
#include "language.h"
#include "modules.h"
#if HAVE_GETTEXT
# include <libintl.h>
# define _(x) gettext(x)
#else
# define _(x) x
#endif
#endif // MODULE_H
+6 -36
View File
@@ -240,12 +240,6 @@ class CoreExport Module : public virtual Base
*/
MODType type;
struct ModuleLang
{
int argc;
char **argv;
} lang[NUM_LANGS];
/** Creates and initialises a new module.
* @param loadernick The nickname of the user loading the module.
*/
@@ -290,36 +284,12 @@ class CoreExport Module : public virtual Base
*/
Version GetVersion() const;
/**
* Allow a module to add a set of language strings to anope
* @param langNumber the language number for the strings
* @param ac The language count for the strings
* @param av The language sring list.
**/
void InsertLanguage(int langNumber, int ac, const char **av);
/**
* Delete a language from a module
* @param langNumber the language Number to delete
**/
void DeleteLanguage(int langNumber);
/**
* Get the text of the given lanugage string in the corrent language, or
* in english.
* @param u The user to send the message to
* @param number The message number
**/
const char *GetLangString(User *u, int number);
/**
* Send a notice to the user in the correct language, or english.
* @param source Who sends the notice
* @param u The user to send the message to
* @param number The message number
* @param ... The argument list
**/
void NoticeLang(const Anope::string &source, const User *u, int number, ...) const;
/** Send a message to a user in their language, if a translation is available
* @param from Client to send the message from
* @param to User to send the message to
* @param fmt The message
*/
void SendMessage(BotInfo *from, User *to, const char *fmt, ...);
/**
* Add a module provided command to the given service.
+10 -44
View File
@@ -708,19 +708,11 @@ enum
/*************************************************************************/
struct LevelInfo
{
int what;
Anope::string name;
int desc;
};
/*************************************************************************/
/* This structure stocks ban data since it must not be removed when
* user is kicked.
*/
#include "language.h"
#include "users.h"
#include "account.h"
#include "bots.h"
@@ -732,6 +724,13 @@ struct BanData
int16 ttb[TTB_SIZE];
};
struct LevelInfo
{
int what;
Anope::string name;
LanguageString desc;
};
#include "channels.h"
/** Channelban type flags
@@ -777,8 +776,6 @@ struct IgnoreData
/* News stuff */
#define MSG_MAX 11
enum NewsType
{
NEWS_LOGON,
@@ -786,11 +783,11 @@ enum NewsType
NEWS_OPER
};
struct newsmsgs
struct NewsMessages
{
NewsType type;
Anope::string name;
int msgs[MSG_MAX + 1];
LanguageString msgs[10];
};
struct NewsItem
@@ -857,37 +854,6 @@ enum DefconLevel
/*************************************************************************/
/* Languages. Never insert anything in the middle of this list, or
* everybody will start getting the wrong language! If you want to change
* the order the languages are displayed in for NickServ HELP SET LANGUAGE,
* do it in language.c.
*/
enum Languages
{
LANG_EN_US, /* United States English */
LANG_JA_JIS, /* Japanese (JIS encoding) */
LANG_JA_EUC, /* Japanese (EUC encoding) */
LANG_JA_SJIS, /* Japanese (SJIS encoding) */
LANG_ES, /* Spanish */
LANG_PT, /* Portugese */
LANG_FR, /* French */
LANG_TR, /* Turkish */
LANG_IT, /* Italian */
LANG_DE, /* German */
LANG_CAT, /* Catalan */
LANG_GR, /* Greek */
LANG_NL, /* Dutch */
LANG_RU, /* Russian */
LANG_HUN, /* Hungarian */
LANG_PL, /* Polish */
NUM_LANGS /* Number of languages */
};
static const int USED_LANGS = 13; /* Number of languages provided */
static const int DEF_LANGUAGE = LANG_EN_US;
/*************************************************************************/
/**
* RFC: defination of a valid nick
* nickname = ( letter / special ) *8( letter / digit / special / "-" )
+2
View File
@@ -17,6 +17,8 @@
#cmakedefine HAVE_STRLCPY 1
#cmakedefine HAVE_SYS_SELECT_H 1
#cmakedefine HAVE_UMASK 1
#cmakedefine HAVE_EVENTFD 1
#cmakedefine HAVE_GETTEXT 1
#cmakedefine RUNGROUP "@RUNGROUP@"
#cmakedefine SERVICES_BIN "@SERVICES_BIN@"
+7
View File
@@ -158,6 +158,13 @@ class CoreExport User : public Extensible
virtual void SendMessage(const Anope::string &source, const char *fmt, ...) const;
virtual void SendMessage(const Anope::string &source, const Anope::string &msg) const;
/** Send a language string message to a user
* @param source Sender
* @param message The message num
* @param ... parameters
*/
void SendMessage(BotInfo *source, LanguageString message, ...) const;
/** Collide a nick
* See the comment in users.cpp
* @param na The nick
+31 -108
View File
@@ -1,113 +1,36 @@
# Set the source file for langcomp to use C++ as well as set it's compile flags
set_source_files_properties(langcomp.c PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
# Generate langcomp and set it's linker flags
add_executable(langcomp langcomp.c)
set_target_properties(langcomp PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
# Get the location of the binary to use later
get_target_property(langcomp_BINARY langcomp LOCATION)
# Add the executable to the list of files for CPack to ignore
file(RELATIVE_PATH langcomp_BINARY_RELATIVE ${Anope_BINARY_DIR} ${langcomp_BINARY})
add_to_cpack_ignored_files("${langcomp_BINARY_RELATIVE}$" TRUE)
# Only do this if gettext is installed
if(HAVE_GETTEXT)
# Get all of the .po files
file(GLOB LANG_SRCS_PO RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.*.po")
sort_list(LANG_SRCS_PO)
# Determine if langtool should be built
if(MSVC)
set(BUILD_LANGTOOL TRUE)
else(MSVC)
if(NOT GREP OR NOT PERL)
set(BUILD_LANGTOOL TRUE)
else(NOT GREP OR NOT PERL)
set(BUILD_LANGTOOL FALSE)
endif(NOT GREP OR NOT PERL)
endif(MSVC)
foreach(LANG_PO ${LANG_SRCS_PO})
# Get the domain for this language file
string(LENGTH ${LANG_PO} LANG_PO_LENGTH)
math(EXPR DOMAIN_LENGTH "${LANG_PO_LENGTH} - 9")
string(SUBSTRING ${LANG_PO} 0 ${DOMAIN_LENGTH} LANG_DOMAIN)
# If grep or perl don't exist on the system, build langtool to generate index and language.h
if(BUILD_LANGTOOL)
# Set the source file for langtool to use C++ as well as set it's compile flags
set_source_files_properties(langtool.c PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
# Generate langtool and set it's linker flags
add_executable(langtool langtool.c)
set_target_properties(langtool PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
# Get the location of the binary to use later)
get_target_property(langtool_BINARY langtool LOCATION)
# Add the executable to the list of files for CPack to ignore
file(RELATIVE_PATH langtool_BINARY_RELATIVE ${Anope_BINARY_DIR} ${langtool_BINARY})
add_to_cpack_ignored_files("${langtool_BINARY_RELATIVE}$" TRUE)
endif(BUILD_LANGTOOL)
# Get the language for this language file
math(EXPR DOMAIN_LENGTH "${LANG_PO_LENGTH} - 8")
string(SUBSTRING ${LANG_PO} ${DOMAIN_LENGTH} 5 LANG_LANG)
# If grep exists (and we aren't using Visual Studio, it hates this), use it to generate the index file
if(NOT MSVC AND GREP)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/index
COMMAND ${GREP} '^[A-Z]' ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l > ${CMAKE_CURRENT_BINARY_DIR}/index
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l
)
# Otherwise, use langtool to generate the index file
else(NOT MSVC AND GREP)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/index
COMMAND ${langtool_BINARY} index ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l ${CMAKE_CURRENT_BINARY_DIR}/index
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l DEPENDS langtool
)
endif(NOT MSVC AND GREP)
# Add the index file to the list of files for CPack to ignore
file(RELATIVE_PATH index_RELATIVE ${Anope_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/index)
add_to_cpack_ignored_files("${index_RELATIVE}$")
# Get the .mo file name
string(REGEX REPLACE "\\.po$" ".mo" LANG_MO ${LANG_PO})
# Add the .mo file to a list for use later with add_custom_target
append_to_list(LANG_SRCS_MO ${CMAKE_CURRENT_BINARY_DIR}/${LANG_MO})
# Run msgfmt on the language file, depends on the .po file
add_custom_command(OUTPUT ${LANG_MO} COMMAND msgfmt -c ${CMAKE_CURRENT_SOURCE_DIR}/${LANG_PO} -o ${CMAKE_CURRENT_BINARY_DIR}/${LANG_MO} MAIN_DEPENDENCY ${LANG_PO})
# Add to cpack ignored files if not on Windows.
file(RELATIVE_PATH LANG_RELATIVE ${Anope_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${LANG_LANG})
if(NOT WIN32)
add_to_cpack_ignored_files("${LANG_MO}")
endif(NOT WIN32)
# Find all the *.l files within the current source directory, and sort the list
file(GLOB LANG_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.l")
sort_list(LANG_SRCS)
# Install the new language file
install(CODE "FILE(MAKE_DIRECTORY \${CMAKE_INSTALL_PREFIX}/data/languages/${LANG_LANG}/LC_MESSAGES/)")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG_MO} DESTINATION data/languages/${LANG_LANG}/LC_MESSAGES RENAME ${LANG_DOMAIN}.mo PERMISSIONS ${PERMS})
endforeach(LANG_PO)
# Iterate through the language files
foreach(LANG_L ${LANG_SRCS})
# Convert the language file's extension to have no extension
STRING(REGEX REPLACE "\\.l$" "" LANG ${LANG_L})
# Add the language file to the list of compiled language files
append_to_list(LANGS ${CMAKE_CURRENT_BINARY_DIR}/${LANG})
# Generate a compiled language file using langcomp, as well as having a dependency on the index file being generated
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${LANG}
COMMAND ${langcomp_BINARY} ${CMAKE_CURRENT_SOURCE_DIR}/${LANG_L} ${CMAKE_CURRENT_BINARY_DIR}/${LANG}
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${LANG_L} DEPENDS langcomp ${CMAKE_CURRENT_BINARY_DIR}/index
)
# Add the language file to the list of files for CPack to ignore
file(RELATIVE_PATH LANG_RELATIVE ${Anope_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${LANG})
add_to_cpack_ignored_files("${LANG_RELATIVE}$")
endforeach(LANG_L)
# If perl exists (and we aren't using Visual Studio, it hates this), use it to generate language.h
if(NOT MSVC AND PERL)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/language.h
COMMAND ${PERL} -e < ${CMAKE_CURRENT_BINARY_DIR}/index > ${CMAKE_CURRENT_BINARY_DIR}/language.h 'print STDERR \"Generating language.h... \"\; $$i=0\; while \(<>\) { chop\; printf \"\#define %-32s %d\\n\", $$_, $$i++\; } print \"\\n\#define NUM_STRINGS $$i\\n\"\; print STDERR \"$$i strings\\n\"\;'
MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/index
)
# Otherwise, use langtool to generate language.h
else(NOT MSVC AND PERL)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/language.h
COMMAND ${langtool_BINARY} language.h ${CMAKE_CURRENT_BINARY_DIR}/index ${CMAKE_CURRENT_BINARY_DIR}/language.h
MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/index DEPENDS langtool
)
endif(NOT MSVC AND PERL)
# Add language.h to the list of files for CPack to ignore
add_to_cpack_ignored_files("language.h$" TRUE)
# Add a custom target to depend on the language files and language.h
add_custom_target(language DEPENDS ${LANGS} ${CMAKE_CURRENT_BINARY_DIR}/language.h)
# If RUNGROUP was set, make the permissions be to have owner read/write as well as group read/write
if(RUNGROUP)
set(PERMS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE)
# Otherwise, only make the permissions be owner read/write
else(RUNGROUP)
set(PERMS OWNER_READ OWNER_WRITE)
endif(RUNGROUP)
# Set the language files to be installed to the languages directory under the data directory
install(FILES ${LANGS}
DESTINATION data/languages
PERMISSIONS ${PERMS}
)
# On non-Windows platforms, if RUNGROUP is set, change the permissions of the languages directory
if(NOT WIN32)
if(RUNGROUP)
install(CODE "execute_process(COMMAND ${CHMOD} 2770 \"\${CMAKE_INSTALL_PREFIX}/data/languages\")")
else(RUNGROUP)
install(CODE "execute_process(COMMAND ${CHMOD} 0700 \"\${CMAKE_INSTALL_PREFIX}/data/languages\")")
endif(RUNGROUP)
endif(NOT WIN32)
# Generate languages, depends on the mo files
add_custom_target(language DEPENDS ${LANG_SRCS_MO})
endif(HAVE_GETTEXT)
+12381
View File
File diff suppressed because it is too large Load Diff
+12505
View File
File diff suppressed because it is too large Load Diff
+12349
View File
File diff suppressed because it is too large Load Diff
+12379
View File
File diff suppressed because it is too large Load Diff
+12395
View File
File diff suppressed because it is too large Load Diff
+12213
View File
File diff suppressed because it is too large Load Diff
+12314
View File
File diff suppressed because it is too large Load Diff
+12262
View File
File diff suppressed because it is too large Load Diff
+12190
View File
File diff suppressed because it is too large Load Diff
+9705
View File
File diff suppressed because it is too large Load Diff
+12206
View File
File diff suppressed because it is too large Load Diff
+12584
View File
File diff suppressed because it is too large Load Diff
+12141
View File
File diff suppressed because it is too large Load Diff
-6576
View File
File diff suppressed because it is too large Load Diff
+36
View File
@@ -0,0 +1,36 @@
# German translations for cs_appendtopic
# German messages for cs_appendtopic
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 20:53-0400\n"
"PO-Revision-Date: 2010-09-25 20:57-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cs_appendtopic.cpp:105
msgid " APPENDTOPIC Add text to a channels topic"
msgstr " APPENDTOPIC Fügt einen Text zu einem Channel-Topic hinzu."
#: cs_appendtopic.cpp:89 cs_appendtopic.cpp:100
msgid "Syntax: APPENDTOPIC channel text"
msgstr "Syntax: APPENDTOPIC Channel Text"
#: cs_appendtopic.cpp:91
msgid ""
"This command allows users to append text to a currently set\n"
"channel topic. When TOPICLOCK is on, the topic is updated and\n"
"the new, updated topic is locked."
msgstr ""
"Dieser Befehl erlaubt Benutzern, einen Text zu dem vorhandenen Channel-Topic\n"
"hinzuzufügen. Wenn TOPICLOCK gesetzt ist, wird das Topic aktualisiert\n"
"und das neue, aktualisierte Topic wird gesperrt."
+36
View File
@@ -0,0 +1,36 @@
# Italian translations for cs_appendtopic
# Traduzioni italiane per il cs_appendtopic
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 20:53-0400\n"
"PO-Revision-Date: 2010-09-25 21:04-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Italian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cs_appendtopic.cpp:105
msgid " APPENDTOPIC Add text to a channels topic"
msgstr " APPENDTOPIC Aggiunge del testo al topic di un canale"
#: cs_appendtopic.cpp:89 cs_appendtopic.cpp:100
msgid "Syntax: APPENDTOPIC channel text"
msgstr "Sintassi: APPENDTOPIC canale testo"
#: cs_appendtopic.cpp:91
msgid ""
"This command allows users to append text to a currently set\n"
"channel topic. When TOPICLOCK is on, the topic is updated and\n"
"the new, updated topic is locked."
msgstr ""
"Questo comando permette agli utenti di aggiungere del testo ad un topic di un canale\n"
"già impostato. Se TOPICLOCK è attivato, il topic viene aggiornato e il nuovo topic\n"
"viene bloccato."
+37
View File
@@ -0,0 +1,37 @@
# Dutch translations for cs_appendtopic
# Engelse vertalingen voor het cs_appendtopic
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 20:53-0400\n"
"PO-Revision-Date: 2010-09-25 20:55-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Dutch\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cs_appendtopic.cpp:105
msgid " APPENDTOPIC Add text to a channels topic"
msgstr " APPENDTOPIC Voeg tekst aan een kanaal onderwerp toe"
#: cs_appendtopic.cpp:89 cs_appendtopic.cpp:100
msgid "Syntax: APPENDTOPIC channel text"
msgstr "Gebruik: APPENDTOPIC kanaal tekst"
#: cs_appendtopic.cpp:91
msgid ""
"This command allows users to append text to a currently set\n"
"channel topic. When TOPICLOCK is on, the topic is updated and\n"
"the new, updated topic is locked."
msgstr ""
"Dit command stelt gebruikers in staat om text toe te voegen\n"
"achter het huidige onderwerp van een kanaal. Als TOPICLOCK aan\n"
"staat, zal het onderwerp worden bijgewerkt en zal het nieuwe,\n"
"bijgewerkte topic worden geforceerd."
+32
View File
@@ -0,0 +1,32 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 20:53-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: cs_appendtopic.cpp:105
msgid " APPENDTOPIC Add text to a channels topic"
msgstr ""
#: cs_appendtopic.cpp:89 cs_appendtopic.cpp:100
msgid "Syntax: APPENDTOPIC channel text"
msgstr ""
#: cs_appendtopic.cpp:91
msgid ""
"This command allows users to append text to a currently set\n"
"channel topic. When TOPICLOCK is on, the topic is updated and\n"
"the new, updated topic is locked."
msgstr ""
+35
View File
@@ -0,0 +1,35 @@
# Portuguese translations for cs_appendtopic
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 20:53-0400\n"
"PO-Revision-Date: 2010-09-25 21:00-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Portuguese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cs_appendtopic.cpp:105
msgid " APPENDTOPIC Add text to a channels topic"
msgstr " APPENDTOPIC Adiciona texto ao tópico de um canal"
#: cs_appendtopic.cpp:89 cs_appendtopic.cpp:100
msgid "Syntax: APPENDTOPIC channel text"
msgstr "Sintaxe: APPENDTOPIC canal texto"
#: cs_appendtopic.cpp:91
msgid ""
"This command allows users to append text to a currently set\n"
"channel topic. When TOPICLOCK is on, the topic is updated and\n"
"the new, updated topic is locked."
msgstr ""
"Este comando permite aos usuários anexar texto a um tópico de canal\n"
"já definido. Quando TOPICLOCK está ativado, o tópico é atualizado e\n"
"o novo tópico é travado."
+37
View File
@@ -0,0 +1,37 @@
# Russian translations for cs_appendtopic
# ?????????? ???????? ??? ?????? cs_appendtopic
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 20:53-0400\n"
"PO-Revision-Date: 2010-09-25 21:02-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Russian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: cs_appendtopic.cpp:105
msgid " APPENDTOPIC Add text to a channels topic"
msgstr " APPENDTOPIC Äîáàâëÿåò òåêñò ê òîïèêó êàíàëà"
#: cs_appendtopic.cpp:89 cs_appendtopic.cpp:100
msgid "Syntax: APPENDTOPIC channel text"
msgstr "Ñèíòàêñèñ: APPENDTOPIC #êàíàë òåêñò"
#: cs_appendtopic.cpp:91
msgid ""
"This command allows users to append text to a currently set\n"
"channel topic. When TOPICLOCK is on, the topic is updated and\n"
"the new, updated topic is locked."
msgstr ""
"Äàííàÿ êîìàíäà ïîçâîëÿåò äîáàâèòü òåêñò ê òîïèêó, êîòîðûé óñòàíîâëåí íà óêàçàííîì\n"
"êàíàëå. Åñëè àêòèâèðîâàí ðåæèì TOPICLOCK, òîïèê áóäåò îáíîâëåí è çàáëîêèðîâàí.\n"
"Ïðèìå÷àíèå: òåêñò áóäåò ÄÎÁÀÂËÅÍ ê òîïèêó, òî åñòü ñòàðûé òîïèê óäàëåí ÍÅ ÁÓÄÅÒ."
+85
View File
@@ -0,0 +1,85 @@
# German translations for cs_enforce
# German messages for cs_enforce
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 21:11-0400\n"
"PO-Revision-Date: 2010-09-25 21:12-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cs_enforce.cpp:215
msgid " ENFORCE Enforce various channel modes and set options"
msgstr " ENFORCE Erzwingt verschieden Modes und SET Optionen"
#: cs_enforce.cpp:180
msgid ""
"Enforce various channel modes and set options. The channel\n"
"option indicates what channel to enforce the modes and options\n"
"on. The what option indicates what modes and options to\n"
"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
"or +R. When left out, it defaults to SET.\n"
" \n"
"If what is SET, it will enforce SECUREOPS and RESTRICTED\n"
"on the users currently in the channel, if they are set. Give\n"
"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
"if it's not enabled."
msgstr ""
"Erzwingt verschieden Modes und SET Optionen. Die \037Channel\037\n"
"Option zeigt dir den Channel an, indem Modes und Optionen\n"
"zu erzwingen sind. Die \037was\037 Option zeigt dir welche Modes\n"
"und Optionen zu erzwingen sind. Die können nur SET, SECUREOPS,\n"
"RESTRICTED, MODES oder +R sein.Default ist SET.\n"
" \n"
"Wenn \037was\037 SET ist, wird SECUREOPS und RESTRICTED\n"
"auf die User die z.Z.in Channel sind erzwungen, wenn sie AN sind.\n"
"Benutze SECUREOPS oder RESTRICTED , um die Optionen einzeln\n"
"zu erzwingen, also wenn sie nicht eingeschaltet sind."
#: cs_enforce.cpp:147 cs_enforce.cpp:152 cs_enforce.cpp:157 cs_enforce.cpp:162
#: cs_enforce.cpp:167
#, c-format
msgid "Enforced %s"
msgstr "Erzwungen %s"
#: cs_enforce.cpp:193
msgid ""
"If what is MODES, it will enforce channelmode +R if it is\n"
"set. If +R is specified for what, the +R channelmode will\n"
"also be enforced, but even if it is not set. If it is not set,\n"
"users will be banned to ensure they don't just rejoin."
msgstr ""
"Wenn \037was\037 MODES ist, wird das ChannelMode +R erzwungen\n"
"falls an. Wenn \037was\037 +R ist, wird +R erzwungen aber eben\n"
"wenn noch nicht als Channel-Mode ist. Wenn +R noch nicht als\n"
"Channel-Mode war werden alle User aus den Channel gebannt um\n"
"sicher zu sein das sie nicht rejoinen."
#: cs_enforce.cpp:198
msgid ""
"If what is MODES, nothing will be enforced, since it would\n"
"enforce modes that the current ircd does not support. If +R is\n"
"specified for what, an equalivant of channelmode +R on\n"
"other ircds will be enforced. All users that are in the channel\n"
"but have not identified for their nickname will be kicked and\n"
"banned from the channel."
msgstr ""
"Wenn \037was\037 MODES ist, wird nichts erzwungen weil es MODES seine\n"
"können die dein IRCD nicht unterstützt. Wenn \037was\037 +R ist\n"
"oder ein Modes was auf ein anderen IRCD gleich +R ist, wird es\n"
"erzwungen. Alle User die nicht für deren Nicknamen identifiziert\n"
"sind werden aus den Channel gekickt und gebannt."
#: cs_enforce.cpp:178 cs_enforce.cpp:210
msgid "Syntax: ENFORCE channel [what]"
msgstr "Syntax: \002ENFORCE \037Channel\037 [\037was\037]\002"
+85
View File
@@ -0,0 +1,85 @@
# Italian translations for cs_enforce
# Traduzioni italiane per il cs_enforce
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 21:11-0400\n"
"PO-Revision-Date: 2010-09-25 21:55-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Italian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cs_enforce.cpp:215
msgid " ENFORCE Enforce various channel modes and set options"
msgstr " ENFORCE Forza diversi modi di canale ed opzioni SET"
#: cs_enforce.cpp:180
msgid ""
"Enforce various channel modes and set options. The channel\n"
"option indicates what channel to enforce the modes and options\n"
"on. The what option indicates what modes and options to\n"
"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
"or +R. When left out, it defaults to SET.\n"
" \n"
"If what is SET, it will enforce SECUREOPS and RESTRICTED\n"
"on the users currently in the channel, if they are set. Give\n"
"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
"if it's not enabled."
msgstr ""
"Forza diversi modi di canale ed opzioni SET. Il parametro \037canale\037\n"
"indica il canale sul quale forzare i modi e le opzioni. Il parametro\n"
"\037cosa\037 indica i modi e le opzioni da forzare, e possono essere\n"
"qualsiasi delle opzioni SET, SECUREOPS, RESTRICTED, MODES, o +R.\n"
"Se non specificato, viene sottointeso SET.\n"
" \n"
"Se \037cosa\037 è SET, forzerà SECUREOPS e RESTRICTED sugli utenti\n"
"attualmente nel canale, se sono impostati. Specifica SECUREOPS per\n"
"forzare l'opzione SECUREOPS, anche se non è attivata. Specifica\n"
"RESTRICTED per forzare l'opzione RESTRICTED, anche se non è\n"
"attivata."
#: cs_enforce.cpp:147 cs_enforce.cpp:152 cs_enforce.cpp:157 cs_enforce.cpp:162
#: cs_enforce.cpp:167
#, c-format
msgid "Enforced %s"
msgstr "Forzato %s"
#: cs_enforce.cpp:193
msgid ""
"If what is MODES, it will enforce channelmode +R if it is\n"
"set. If +R is specified for what, the +R channelmode will\n"
"also be enforced, but even if it is not set. If it is not set,\n"
"users will be banned to ensure they don't just rejoin."
msgstr ""
"Se \037cosa\037 è MODES, forzerà il modo del canale +R se è impostato.\n"
"Se +R è specificato per \037cosa\037, il modo del canale +R verrà\n"
"forzato, anche se non è impostato. Se non è impostato, gli utenti\n"
"verranno bannati per assicurare che non rientrino semplicemente."
#: cs_enforce.cpp:198
msgid ""
"If what is MODES, nothing will be enforced, since it would\n"
"enforce modes that the current ircd does not support. If +R is\n"
"specified for what, an equalivant of channelmode +R on\n"
"other ircds will be enforced. All users that are in the channel\n"
"but have not identified for their nickname will be kicked and\n"
"banned from the channel."
msgstr ""
"Se \037cosa\037 è MODES, niente verrà forzato, siccome forzerebbe\n"
"dei modi che l'ircd in uso non supporterebbe. Se +R è specificato\n"
"per \037cosa\037, un modo equivalente a +R sui altri ircd verrà\n"
"forzato. Tutti gli utenti presenti nel canale ma non identificati\n"
"per il loro nickname verranno bannati ed espulsi dal canale."
#: cs_enforce.cpp:178 cs_enforce.cpp:210
msgid "Syntax: ENFORCE channel [what]"
msgstr "Sintassi: \002ENFORCE \037canale\037 [\037cosa\037]\002"
+88
View File
@@ -0,0 +1,88 @@
# Dutch translations for cs_enforce
# Engelse vertalingen voor het cs_enforce
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as the Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 21:06-0400\n"
"PO-Revision-Date: 2010-09-25 21:07-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Dutch\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cs_enforce.cpp:215
msgid " ENFORCE Enforce various channel modes and set options"
msgstr " ENFORCE Forceer enkele kanaalmodes en set-opties"
#: cs_enforce.cpp:180
msgid ""
"Enforce various channel modes and set options. The channel\n"
"option indicates what channel to enforce the modes and options\n"
"on. The what option indicates what modes and options to\n"
"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
"or +R. When left out, it defaults to SET.\n"
" \n"
"If what is SET, it will enforce SECUREOPS and RESTRICTED\n"
"on the users currently in the channel, if they are set. Give\n"
"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
"if it's not enabled."
msgstr ""
"Forceer enkele kannalmodes en set-opties. De \037kanaal\037 optie\n"
"geeft aan op welk kanaal de modes en opties geforceerd moeten\n"
"worden. De \037wat\037 optie geeft aan welke modes en opties\n"
"geforceerd moeten worden; dit kan SET, SECUREOPS, RESTRICTED,\n"
"MODES, of +R zijn. Indien weggelaten is dit standaard SET.\n"
" \n"
"Als er voor \037wat\037 SET wordt ingevuld, zullen SECUREOPS en\n"
"RESTRICTED geforceerd worden op de gebruikers in het kanaal,\n"
"maar alleen als die opties aangezet zijn voor het kanaal. Als\n"
"SECUREOPS of RESTRICTED wordt gegeven voor \037wat\037 zal die optie\n"
"altijd geforceerd worden, ook als die niet is aangezet."
#: cs_enforce.cpp:147 cs_enforce.cpp:152 cs_enforce.cpp:157 cs_enforce.cpp:162
#: cs_enforce.cpp:167
#, c-format
msgid "Enforced %s"
msgstr ""
#: cs_enforce.cpp:193
msgid ""
"If what is MODES, it will enforce channelmode +R if it is\n"
"set. If +R is specified for what, the +R channelmode will\n"
"also be enforced, but even if it is not set. If it is not set,\n"
"users will be banned to ensure they don't just rejoin."
msgstr ""
"Als er voor \037wat\037 MODES wordt ingevuld, zal kanaalmode +R worden\n"
"geforceerd, als die op het kanaal aan staat. Als +R wordt ingevuld,\n"
"zal kanaalmode +R worden geforceerd, maar ook als die niet aan"
"staat voor het kanaal. Als +R niet aan staat, zullen alle ook\n"
"gebanned worden om te zorgen dat ze niet opnieuw het kanaal binnen\n"
"kunnen komen."
#: cs_enforce.cpp:198
msgid ""
"If what is MODES, nothing will be enforced, since it would\n"
"enforce modes that the current ircd does not support. If +R is\n"
"specified for what, an equalivant of channelmode +R on\n"
"other ircds will be enforced. All users that are in the channel\n"
"but have not identified for their nickname will be kicked and\n"
"banned from the channel."
msgstr ""
"Als er voor \037wat\037 MODES wordt ingevuld, zal er niks gebeuren.\n"
"Normaal gesproken wordt er een kanaalmode geforceerd die op deze\n"
"server niet ondersteund wordt. Als +R wordt ingevuld voor \037wat\037\n"
"zullen alle gebruikers die in het kanaal zitten maar zich niet\n"
"hebben geidentificeerd voor hun nick uit het kanaal gekicked en\n"
"verbannen worden."
#: cs_enforce.cpp:178 cs_enforce.cpp:210
msgid "Syntax: ENFORCE channel [what]"
msgstr "Syntax: \002ENFORCE \037kanaal\037 [\037wat\037]\002"
+64
View File
@@ -0,0 +1,64 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 21:11-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: cs_enforce.cpp:215
msgid " ENFORCE Enforce various channel modes and set options"
msgstr ""
#: cs_enforce.cpp:180
msgid ""
"Enforce various channel modes and set options. The channel\n"
"option indicates what channel to enforce the modes and options\n"
"on. The what option indicates what modes and options to\n"
"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
"or +R. When left out, it defaults to SET.\n"
" \n"
"If what is SET, it will enforce SECUREOPS and RESTRICTED\n"
"on the users currently in the channel, if they are set. Give\n"
"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
"if it's not enabled."
msgstr ""
#: cs_enforce.cpp:147 cs_enforce.cpp:152 cs_enforce.cpp:157 cs_enforce.cpp:162
#: cs_enforce.cpp:167
#, c-format
msgid "Enforced %s"
msgstr ""
#: cs_enforce.cpp:193
msgid ""
"If what is MODES, it will enforce channelmode +R if it is\n"
"set. If +R is specified for what, the +R channelmode will\n"
"also be enforced, but even if it is not set. If it is not set,\n"
"users will be banned to ensure they don't just rejoin."
msgstr ""
#: cs_enforce.cpp:198
msgid ""
"If what is MODES, nothing will be enforced, since it would\n"
"enforce modes that the current ircd does not support. If +R is\n"
"specified for what, an equalivant of channelmode +R on\n"
"other ircds will be enforced. All users that are in the channel\n"
"but have not identified for their nickname will be kicked and\n"
"banned from the channel."
msgstr ""
#: cs_enforce.cpp:178 cs_enforce.cpp:210
msgid "Syntax: ENFORCE channel [what]"
msgstr ""
+84
View File
@@ -0,0 +1,84 @@
# Portuguese translations for cs_enforce
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as the Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 21:11-0400\n"
"PO-Revision-Date: 2010-09-25 21:24-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Portuguese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cs_enforce.cpp:215
msgid " ENFORCE Enforce various channel modes and set options"
msgstr " ENFORCE Verifica o cumprimento de vários modos de canal e opções ajustadas"
#: cs_enforce.cpp:180
msgid ""
"Enforce various channel modes and set options. The channel\n"
"option indicates what channel to enforce the modes and options\n"
"on. The what option indicates what modes and options to\n"
"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
"or +R. When left out, it defaults to SET.\n"
" \n"
"If what is SET, it will enforce SECUREOPS and RESTRICTED\n"
"on the users currently in the channel, if they are set. Give\n"
"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
"if it's not enabled."
msgstr ""
"Verifica o cumprimento de vários modos de canal e opções ajustadas.\n"
"O campo \037canal\037 indica qual canal deve ter os modos e opções verificadas\n"
"O campo \037opção\037 indica quais modos e opções devem ser verificadas,\n"
"e pode ser: SET, SECUREOPS, RESTRICTED, MODES ou +R\n"
"Quando deixado em branco, o padrão é SET.\n"
" \n"
"Se \037opção\037 for SET, serão verificadas as opções SECUREOPS e RESTRICTED\n"
"para usuários que estiverem no canal, caso elas estejam ativadas. Use\n"
"SECUREOPS para verificar a opção SECUREOPS, mesmo que ela não esteja ativada\n"
"Use RESTRICTED para verificar a opção RESTRICTED, mesmo que ela não esteja\n"
"ativada."
#: cs_enforce.cpp:147 cs_enforce.cpp:152 cs_enforce.cpp:157 cs_enforce.cpp:162
#: cs_enforce.cpp:167
#, c-format
msgid "Enforced %s"
msgstr "Verificado %s"
#: cs_enforce.cpp:193
msgid ""
"If what is MODES, it will enforce channelmode +R if it is\n"
"set. If +R is specified for what, the +R channelmode will\n"
"also be enforced, but even if it is not set. If it is not set,\n"
"users will be banned to ensure they don't just rejoin."
msgstr ""
"Se \037opção\037 for MODES, será verificado o modo de canal +R caso ele\n"
"esteja ativado. Se +R for especificado para \037opção\037, o modo de canal\n"
"+R também será verificado, mesmo que ele não esteja ativado. Se ele não\n"
"estiver ativado, os usuários serão banidos para evitar que reentrem no canal."
#: cs_enforce.cpp:198
msgid ""
"If what is MODES, nothing will be enforced, since it would\n"
"enforce modes that the current ircd does not support. If +R is\n"
"specified for what, an equalivant of channelmode +R on\n"
"other ircds will be enforced. All users that are in the channel\n"
"but have not identified for their nickname will be kicked and\n"
"banned from the channel."
msgstr ""
"Se \037opção\037 for MODES, nada será verificado, visto que isto poderia\n"
"verificar modos que o IRCd atual não suporta. Se +R for especificado\n"
"para \037opção\037, um equivalente ao modo de canal +R em outros IRCds\n"
"será verificado. Todos os usuários que estão no canal, mas não estejam\n"
"identificados para seus nicks serão kickados e banidos do canal."
#: cs_enforce.cpp:178 cs_enforce.cpp:210
msgid "Syntax: ENFORCE channel [what]"
msgstr "Sintaxe: \002ENFORCE \037canal\037 [\037opção\037]\002"
+85
View File
@@ -0,0 +1,85 @@
# Russian translations for cs_enforce
# ?????????? ???????? ??? ?????? cs_enforce
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 21:11-0400\n"
"PO-Revision-Date: 2010-09-25 21:38-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Russian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: cs_enforce.cpp:215
msgid " ENFORCE Enforce various channel modes and set options"
msgstr " ENFORCE Ïåðåïðîâåðêà è óñòàíîâêà ðàçëè÷íûõ ðåæèìîâ è îïöèé êàíàëà"
#: cs_enforce.cpp:180
msgid ""
"Enforce various channel modes and set options. The channel\n"
"option indicates what channel to enforce the modes and options\n"
"on. The what option indicates what modes and options to\n"
"enforce, and can be any of SET, SECUREOPS, RESTRICTED, MODES,\n"
"or +R. When left out, it defaults to SET.\n"
" \n"
"If what is SET, it will enforce SECUREOPS and RESTRICTED\n"
"on the users currently in the channel, if they are set. Give\n"
"SECUREOPS to enforce the SECUREOPS option, even if it is not\n"
"enabled. Use RESTRICTED to enfore the RESTRICTED option, also\n"
"if it's not enabled."
msgstr ""
"Ïåðåïðîâåðêà è óñòàíîâêà ðàçëè÷íûõ ðåæèìîâ è îïöèé êàíàëà.\n"
"\037Ïàðàìåòð\037 óêàçûâàåò êàêèå îïöèè èëè ðåæèìû êàíàëà äîëæíû áûòü\n"
"ïåðåïðîâåðåíû.  êà÷åñòâå ïàðàìåòðà ìîãóò áûòü óêàçàíû: SET, SECUREOPS,\n"
"RESTRICTED, MODES, èëè +R. Åñëè ïàðàìåòð íå óêàçàí, ïî-óìîë÷àíèþ áóäåò SET.\n"
" \n"
"Åñëè â êà÷åñòâå \037ïàðàìåòðà\037 óêàçàíî SET, áóäóò ïåðåïðîâåðåíû îïöèè\n"
"SECUREOPS è RESTRICTED îòíîñèòåëüíî ïîëüçîâàòåëåé íà óêàçàííîì êàíàëå\n"
"(ïðè óñëîâèè, ÷òî îïöèè âêëþ÷åíû). Îòäåëüíî óêàçàííûé ïàðàìåòð SECUREOPS\n"
"ïðèìåíèò îïöèþ SECUREOPS (äàæå åñëè îíà \037ÍÅ\037 óñòàíîâëåíà). Ïàðàìåòð\n"
"RESTRICTED ïðèìåíèò îïöèþ RESTRICTED (äàæå åñëè îíà \037ÍÅ\037 óñòàíîâëåíà)"
#: cs_enforce.cpp:147 cs_enforce.cpp:152 cs_enforce.cpp:157 cs_enforce.cpp:162
#: cs_enforce.cpp:167
#, c-format
msgid "Enforced %s"
msgstr "Ïåðåïðîâåðåíî: %s"
#: cs_enforce.cpp:193
msgid ""
"If what is MODES, it will enforce channelmode +R if it is\n"
"set. If +R is specified for what, the +R channelmode will\n"
"also be enforced, but even if it is not set. If it is not set,\n"
"users will be banned to ensure they don't just rejoin."
msgstr ""
"Åñëè â êà÷åñòâå \037ïàðàìåòðà\037 óêàçàíî MODES, áóäåò ïåðåïðîâåðåí ðåæèì +R\n"
"(åñëè îí óñòàíîâëåí). Îòäåëüíî óêàçàííûé ïàðàìåòð \037+R\037 ïðèìåíèò\n"
"êàíàëüíûé ðåæèì +R, äàæå åñëè îí íå óñòàíîâëåí, è çàáàíèò âñåõ ïîëüçîâàòåëåé,\n"
"êîòîðûå íå èäåíòèôèöèðîâàëèñü ê ñâîåìó íèêó èëè íå èìåþò çàðåãèñòðèðîâàííîãî íèêà."
#: cs_enforce.cpp:198
msgid ""
"If what is MODES, nothing will be enforced, since it would\n"
"enforce modes that the current ircd does not support. If +R is\n"
"specified for what, an equalivant of channelmode +R on\n"
"other ircds will be enforced. All users that are in the channel\n"
"but have not identified for their nickname will be kicked and\n"
"banned from the channel."
msgstr ""
"Åñëè â êà÷åñòâå \037ïàðàìåòðà\037 óêàçàíî MODES, ïåðåïðîâåðêà îñóùåñòâëåíà\n"
"ÍÅ ÁÓÄÅÒ, òàê êàê òåêóùèé IRCD íå ïîääåðæèâàåò íåîáõîäèìûå ðåæèìû.\n"
"Îòäåëüíî óêàçàííûé ïàðàìåòð \037+R\037 ïðèìåíèò êàíàëüíûé ðåæèì, ýêâèâàëåíòíûé\n"
"ðåæèìó +R è çàáàíèò âñåõ ïîëüçîâàòåëåé, êîòîðûå íå èäåíòèôèöèðîâàëèñü ê ñâîåìó\n"
"íèêó èëè íå èìåþò çàðåãèñòðèðîâàííîãî íèêà."
#: cs_enforce.cpp:178 cs_enforce.cpp:210
msgid "Syntax: ENFORCE channel [what]"
msgstr "Ñèíòàêñèñ: \002ENFORCE \037#êàíàë\037 \037ïàðàìåòð\037\002"
+39
View File
@@ -0,0 +1,39 @@
# German translations for cs_tban
# German messages for cs_tban
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as the Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-26 00:14-0400\n"
"PO-Revision-Date: 2010-09-26 00:16-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cs_tban.cpp:104
msgid " TBAN Bans the user for a given length of time"
msgstr " TBAN Bant ein User für eine bestimmte Zeit aus ein Channel"
#: cs_tban.cpp:81
#, c-format
msgid "%s banned from %s, will auto-expire in %s"
msgstr "%s gebannt von %s, wird auto-auslaufen in %s"
#: cs_tban.cpp:91
msgid ""
"Bans the given user from a channel for a specified length of\n"
"time. If the ban is removed before by hand, it will NOT be replaced."
msgstr ""
"Bant ein User für eine bestimmte Zeit aus ein Channel\n"
"Wenn der Ban manuell entfernt wird, wird es NICHT ersetzt."
#: cs_tban.cpp:99
msgid "Syntax: TBAN channel nick time"
msgstr "Syntax: TBAN Channel Nickname Zeit"
+39
View File
@@ -0,0 +1,39 @@
# Italian translations for cs_tban
# Traduzioni italiane per il cs_tban
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as the Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-26 00:14-0400\n"
"PO-Revision-Date: 2010-09-26 00:22-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Italian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cs_tban.cpp:104
msgid " TBAN Bans the user for a given length of time"
msgstr " TBAN Banna l'utente per un periodo di tempo specificato"
#: cs_tban.cpp:81
#, c-format
msgid "%s banned from %s, will auto-expire in %s"
msgstr "%s bannato da %s, scadrà automaticamente tra %s"
#: cs_tban.cpp:91
msgid ""
"Bans the given user from a channel for a specified length of\n"
"time. If the ban is removed before by hand, it will NOT be replaced."
msgstr ""
"Banna l'utente specificato da un canale per un periodo di tempo\n"
"specificato. Se il ban viene rimosso a mano prima della scadenza, NON verrà rimpiazzato."
#: cs_tban.cpp:99
msgid "Syntax: TBAN channel nick time"
msgstr "Sintassi: TBAN canale nick tempo"
+40
View File
@@ -0,0 +1,40 @@
# Dutch translations for cs_tban
# Engelse vertalingen voor het cs_tban
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as the Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-26 00:14-0400\n"
"PO-Revision-Date: 2010-09-26 00:15-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Dutch\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cs_tban.cpp:104
msgid " TBAN Bans the user for a given length of time"
msgstr " TBAN Verban een gebruiker voor een bepaalde tijd"
#: cs_tban.cpp:81
#, c-format
msgid "%s banned from %s, will auto-expire in %s"
msgstr "%s verbannen van %s, zal verlopen in %s"
#: cs_tban.cpp:91
msgid ""
"Bans the given user from a channel for a specified length of\n"
"time. If the ban is removed before by hand, it will NOT be replaced."
msgstr ""
"Verbant de gegeven gebruiken van het gegeven kanaal voor de\n"
"gegeven tijdsduur. Als de verbanning eerder wordt verwijderd,\n"
"zal deze NIET worden vervangen."
#: cs_tban.cpp:99
msgid "Syntax: TBAN channel nick time"
msgstr "Syntax: TBAN kanaal nick tijd"
+36
View File
@@ -0,0 +1,36 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-26 00:14-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: cs_tban.cpp:104
msgid " TBAN Bans the user for a given length of time"
msgstr ""
#: cs_tban.cpp:81
#, c-format
msgid "%s banned from %s, will auto-expire in %s"
msgstr ""
#: cs_tban.cpp:91
msgid ""
"Bans the given user from a channel for a specified length of\n"
"time. If the ban is removed before by hand, it will NOT be replaced."
msgstr ""
#: cs_tban.cpp:99
msgid "Syntax: TBAN channel nick time"
msgstr ""
+38
View File
@@ -0,0 +1,38 @@
# Portuguese translations for cs_tban
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as the Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-26 00:14-0400\n"
"PO-Revision-Date: 2010-09-26 00:18-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Portuguese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cs_tban.cpp:104
msgid " TBAN Bans the user for a given length of time"
msgstr " TBAN Bane o usuário por um determinado período de tempo"
#: cs_tban.cpp:81
#, c-format
msgid "%s banned from %s, will auto-expire in %s"
msgstr "%s foi banido do %s, irá auto-expirar em %s"
#: cs_tban.cpp:91
msgid ""
"Bans the given user from a channel for a specified length of\n"
"time. If the ban is removed before by hand, it will NOT be replaced."
msgstr ""
"Bane de um canal o usuário especificado por um determinado período de\n"
"tempo. Se o ban for removido manualmente antes do tempo, ele não será recolocado."
#: cs_tban.cpp:99
msgid "Syntax: TBAN channel nick time"
msgstr "Sintaxe: TBAN canal nick tempo"
+41
View File
@@ -0,0 +1,41 @@
# Russian translations for cs_tban
# ?????????? ???????? ??? ?????? cs_tban
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as the Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-26 00:14-0400\n"
"PO-Revision-Date: 2010-09-26 00:20-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Russian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: cs_tban.cpp:104
msgid " TBAN Bans the user for a given length of time"
msgstr " TBAN Áàíèò ïîëüçîâàòåëÿ íà óêàçàííûé ïðîìåæóòîê âðåìåíè"
#: cs_tban.cpp:81
#, c-format
msgid "%s banned from %s, will auto-expire in %s"
msgstr "Óñòàíîâëåííûé áàí %s íà êàíàëå %s èñòå÷åò ÷åðåç %s ñåêóíä"
#: cs_tban.cpp:91
msgid ""
"Bans the given user from a channel for a specified length of\n"
"time. If the ban is removed before by hand, it will NOT be replaced."
msgstr ""
"Áàíèò ïîëüçîâàòåëÿ íà óêàçàííûé ïðîìåæóòîê âðåìåíè â ñåêóíäàõ\n"
"Ïðèìå÷àíèå: óäàëåííûé âðó÷íóþ (äî ñâîåãî èñòå÷åíèÿ) áàí ÍÅ ÁÓÄÅÒ\n"
"ïåðåóñòàíîâëåí ñåðâèñàìè àâòîìàòè÷åñêè!"
#: cs_tban.cpp:99
msgid "Syntax: TBAN channel nick time"
msgstr "Ñèíòàêñèñ: TBAN #êàíàë íèê âðåìÿ"
-6676
View File
File diff suppressed because it is too large Load Diff
-6362
View File
File diff suppressed because it is too large Load Diff
-6656
View File
File diff suppressed because it is too large Load Diff
-6689
View File
File diff suppressed because it is too large Load Diff
-6576
View File
File diff suppressed because it is too large Load Diff
+121
View File
@@ -0,0 +1,121 @@
# Italian translations for hs_request
# Traduzioni italiane per il hs_request
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 22:23-0400\n"
"PO-Revision-Date: 2010-09-25 23:42-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Italian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: hs_request.cpp:195
msgid ""
" ACTIVATE Approve the requested vHost of a user\n"
" REJECT Reject the requested vHost of a user\n"
" WAITING Convenience command for LIST +req"
msgstr ""
" ACTIVATE Approva il vHost richiesto di un utente\n"
" REJECT Rifiuta il vHost richiesto di un utente\n"
" WAITING Comando per LIST +req"
#: hs_request.cpp:137
msgid " REQUEST Request a vHost for your nick"
msgstr " REQUEST Richiede un vHost per il tuo nick"
#: hs_request.cpp:183 hs_request.cpp:245
msgid "A memo informing the user will also be sent."
msgstr "Viene inviato un memo per informare l'utente."
#: hs_request.cpp:181
msgid "Activate the requested vHost for the given nick."
msgstr "Attiva il vHost richiesto per il nick specificato."
#: hs_request.cpp:169 hs_request.cpp:234
#, c-format
msgid "No request for nick %s found."
msgstr "Nessuna richiesta trovata per il nick %s."
#: hs_request.cpp:104
#, c-format
msgid "Please wait %d seconds before requesting a new vHost"
msgstr "Prego attendere %d secondi prima di richiedere un nuovo vHost"
#: hs_request.cpp:243
msgid "Reject the requested vHost for the given nick."
msgstr "Rifiuta il vHost richiesto per il nick specificato."
#: hs_request.cpp:124
msgid ""
"Request the given vHost to be actived for your nick by the\n"
"network administrators. Please be patient while your request\n"
"is being considered."
msgstr ""
"Richiede l'attivazione del vHost specificato per il tuo nick da parte\n"
"degli amministratori di rete. Sei pregato di pazientare finchè la tua\n"
"richiesta viene elaborata."
#: hs_request.cpp:179 hs_request.cpp:190
msgid "Syntax: ACTIVATE nick"
msgstr "Sintassi: \002ACTIVATE \037nick\037\002"
#: hs_request.cpp:241 hs_request.cpp:252
msgid "Syntax: REJECT nick"
msgstr "Sintassi: \002REJECT \037nick\037\002"
#: hs_request.cpp:65 hs_request.cpp:122 hs_request.cpp:132
msgid "Syntax: REQUEST vhost"
msgstr "Sintassi: \002REQUEST \037vhost\037\002"
#: hs_request.cpp:307
msgid "Syntax: WAITING"
msgstr "Sintassi: \002WAITING\002"
#: hs_request.cpp:309
msgid ""
"This command is provided for convenience. It is essentially\n"
"the same as performing a LIST +req ."
msgstr ""
"Questo comando è per comodità. Praticamente è la stessa cosa che\n"
"eseguire un LIST +req ."
#: hs_request.cpp:110
msgid "Your vHost has been requested"
msgstr "Il tuo vHost è stato richiesto"
#: hs_request.cpp:161
msgid "[auto memo] Your requested vHost has been approved."
msgstr "[auto memo] Il vHost da te richiesto è stato approvato."
#: hs_request.cpp:225
#, c-format
msgid "[auto memo] Your requested vHost has been rejected."
msgstr "[auto memo] Il vHost da te richiesto è stato rifiutato."
#: hs_request.cpp:223
#, c-format
msgid "[auto memo] Your requested vHost has been rejected. Reason: %s"
msgstr "[auto memo] Il vHost da te richiesto è stato rifiutato. Motivo: %s"
#: hs_request.cpp:646
#, c-format
msgid "[auto memo] vHost %s has been requested."
msgstr "[auto memo] è stato richiesto il vHost \002%s\002."
#: hs_request.cpp:163
#, c-format
msgid "vHost for %s has been activated"
msgstr "Il vHost per %s è stato attivato"
#: hs_request.cpp:230
#, c-format
msgid "vHost for %s has been rejected"
msgstr "Il vHost per %s è stato rifiutato"
+121
View File
@@ -0,0 +1,121 @@
# Dutch translations for hs_request
# Engelse vertalingen voor het hs_request
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 22:23-0400\n"
"PO-Revision-Date: 2010-09-25 22:26-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Dutch\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: hs_request.cpp:195
msgid ""
" ACTIVATE Approve the requested vHost of a user\n"
" REJECT Reject the requested vHost of a user\n"
" WAITING Convenience command for LIST +req"
msgstr ""
" ACTIVATE Activeer de aangevraagde vHost voor een gebruiker\n"
" REJECT Keur de aangevraagde vHost voor een gebruiker af\n"
" WAITING Snelkoppeling naar LIST +req"
#: hs_request.cpp:137
msgid " REQUEST Request a vHost for your nick"
msgstr " REQUEST Vraag een vHost aan voor je nick"
#: hs_request.cpp:183 hs_request.cpp:245
msgid "A memo informing the user will also be sent."
msgstr "Een memo die de gebruiker op de hoogste stelt zal ook worden verstuurd."
#: hs_request.cpp:181
msgid "Activate the requested vHost for the given nick."
msgstr "Activeer de aangevraagde vHost voor de gegeven nick."
#: hs_request.cpp:169 hs_request.cpp:234
#, c-format
msgid "No request for nick %s found."
msgstr "Geen aanvraag voor nick %s gevonden."
#: hs_request.cpp:104
#, c-format
msgid "Please wait %d seconds before requesting a new vHost"
msgstr "Wacht %d seconden voor je een nieuwe vHost aanvraagt"
#: hs_request.cpp:243
msgid "Reject the requested vHost for the given nick."
msgstr "Keur de aangevraagde vHost voor de gegeven nick af."
#: hs_request.cpp:124
msgid ""
"Request the given vHost to be actived for your nick by the\n"
"network administrators. Please be patient while your request\n"
"is being considered."
msgstr ""
"Verzoek de gegeven vHost te activeren voor jouw nick bij de\n"
"netwerk beheerders. Het kan even duren voordat je aanvraag\n"
"afgehandeld wordt."
#: hs_request.cpp:179 hs_request.cpp:190
msgid "Syntax: ACTIVATE nick"
msgstr "Gebruik: \002ACTIVATE \037nick\037\002"
#: hs_request.cpp:241 hs_request.cpp:252
msgid "Syntax: REJECT nick"
msgstr "Gebruik: \002REJECT \037nick\037\002"
#: hs_request.cpp:65 hs_request.cpp:122 hs_request.cpp:132
msgid "Syntax: REQUEST vhost"
msgstr "Gebruik: \002REQUEST \037vhost\037\002"
#: hs_request.cpp:307
msgid "Syntax: WAITING"
msgstr "Gebruik: \002WAITING\002"
#: hs_request.cpp:309
msgid ""
"This command is provided for convenience. It is essentially\n"
"the same as performing a LIST +req ."
msgstr ""
"Dit commando is beschikbaar als handigheid. Het is simpelweg\n"
"hetzelfde als LIST +req ."
#: hs_request.cpp:110
msgid "Your vHost has been requested"
msgstr "Je vHost is aangevraagd"
#: hs_request.cpp:161
msgid "[auto memo] Your requested vHost has been approved."
msgstr "[auto memo] Je aangevraagde vHost is geaccepteerd."
#: hs_request.cpp:225
#, c-format
msgid "[auto memo] Your requested vHost has been rejected."
msgstr "[auto memo] Je aangevraagde vHost is afgekeurd."
#: hs_request.cpp:223
#, c-format
msgid "[auto memo] Your requested vHost has been rejected. Reason: %s"
msgstr "[auto memo] Je aangevraagde vHost is afgekeurd. Reden: %s"
#: hs_request.cpp:646
#, c-format
msgid "[auto memo] vHost %s has been requested."
msgstr "[auto memo] vHost \002%s\002 is aangevraagd."
#: hs_request.cpp:163
#, c-format
msgid "vHost for %s has been activated"
msgstr "vHost voor %s is geactiveerd"
#: hs_request.cpp:230
#, c-format
msgid "vHost for %s has been rejected"
msgstr "vHost voor %s is afgekeurd"
+112
View File
@@ -0,0 +1,112 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 22:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: hs_request.cpp:195
msgid ""
" ACTIVATE Approve the requested vHost of a user\n"
" REJECT Reject the requested vHost of a user\n"
" WAITING Convenience command for LIST +req"
msgstr ""
#: hs_request.cpp:137
msgid " REQUEST Request a vHost for your nick"
msgstr ""
#: hs_request.cpp:183 hs_request.cpp:245
msgid "A memo informing the user will also be sent."
msgstr ""
#: hs_request.cpp:181
msgid "Activate the requested vHost for the given nick."
msgstr ""
#: hs_request.cpp:169 hs_request.cpp:234
#, c-format
msgid "No request for nick %s found."
msgstr ""
#: hs_request.cpp:104
#, c-format
msgid "Please wait %d seconds before requesting a new vHost"
msgstr ""
#: hs_request.cpp:243
msgid "Reject the requested vHost for the given nick."
msgstr ""
#: hs_request.cpp:124
msgid ""
"Request the given vHost to be actived for your nick by the\n"
"network administrators. Please be patient while your request\n"
"is being considered."
msgstr ""
#: hs_request.cpp:179 hs_request.cpp:190
msgid "Syntax: ACTIVATE nick"
msgstr ""
#: hs_request.cpp:241 hs_request.cpp:252
msgid "Syntax: REJECT nick"
msgstr ""
#: hs_request.cpp:65 hs_request.cpp:122 hs_request.cpp:132
msgid "Syntax: REQUEST vhost"
msgstr ""
#: hs_request.cpp:307
msgid "Syntax: WAITING"
msgstr ""
#: hs_request.cpp:309
msgid ""
"This command is provided for convenience. It is essentially\n"
"the same as performing a LIST +req ."
msgstr ""
#: hs_request.cpp:110
msgid "Your vHost has been requested"
msgstr ""
#: hs_request.cpp:161
msgid "[auto memo] Your requested vHost has been approved."
msgstr ""
#: hs_request.cpp:225
#, c-format
msgid "[auto memo] Your requested vHost has been rejected."
msgstr ""
#: hs_request.cpp:223
#, c-format
msgid "[auto memo] Your requested vHost has been rejected. Reason: %s"
msgstr ""
#: hs_request.cpp:646
#, c-format
msgid "[auto memo] vHost %s has been requested."
msgstr ""
#: hs_request.cpp:163
#, c-format
msgid "vHost for %s has been activated"
msgstr ""
#: hs_request.cpp:230
#, c-format
msgid "vHost for %s has been rejected"
msgstr ""
+120
View File
@@ -0,0 +1,120 @@
# Portuguese translations for hs_request
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 22:23-0400\n"
"PO-Revision-Date: 2010-09-25 22:48-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Portuguese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: hs_request.cpp:195
msgid ""
" ACTIVATE Approve the requested vHost of a user\n"
" REJECT Reject the requested vHost of a user\n"
" WAITING Convenience command for LIST +req"
msgstr ""
" ACTIVATE Aprova o pedido de vHost de um usuário\n"
" REJECT Recusa o pedido de vHost de um usuário\n"
" WAITING Comando para LISTAR +req"
#: hs_request.cpp:137
msgid " REQUEST Request a vHost for your nick"
msgstr " REQUEST Request a vHost for your nick"
#: hs_request.cpp:183 hs_request.cpp:245
msgid "A memo informing the user will also be sent."
msgstr "Um memo informando o usuário também será enviado."
#: hs_request.cpp:181
msgid "Activate the requested vHost for the given nick."
msgstr "Ativa o vHost solicitado para o nick fornecido."
#: hs_request.cpp:169 hs_request.cpp:234
#, c-format
msgid "No request for nick %s found."
msgstr "Nenhum pedido encontrado para o nick %s."
#: hs_request.cpp:104
#, c-format
msgid "Please wait %d seconds before requesting a new vHost"
msgstr "Por favor, espere %d segundos antes de fazer um novo pedido de vHost"
#: hs_request.cpp:243
msgid "Reject the requested vHost for the given nick."
msgstr "Recusa o pedido de vHost para o nick fornecido."
#: hs_request.cpp:124
msgid ""
"Request the given vHost to be actived for your nick by the\n"
"network administrators. Please be patient while your request\n"
"is being considered."
msgstr ""
"Solicita a ativação do vHost fornecido em seu nick pelos\n"
"administradores da rede. Por favor, tenha paciência\n"
"enquanto seu pedido é analisado."
#: hs_request.cpp:179 hs_request.cpp:190
msgid "Syntax: ACTIVATE nick"
msgstr "Sintaxe: \002ACTIVATE \037nick\037\002"
#: hs_request.cpp:241 hs_request.cpp:252
msgid "Syntax: REJECT nick"
msgstr "Sintaxe: \002REJECT \037nick\037\002"
#: hs_request.cpp:65 hs_request.cpp:122 hs_request.cpp:132
msgid "Syntax: REQUEST vhost"
msgstr "Sintaxe: \002REQUEST \037vhost\037\002"
#: hs_request.cpp:307
msgid "Syntax: WAITING"
msgstr "Sintaxe: \002WAITING\002"
#: hs_request.cpp:309
msgid ""
"This command is provided for convenience. It is essentially\n"
"the same as performing a LIST +req ."
msgstr ""
"Este comando é usado por conveniência. É essencialmente\n"
"o mesmo que fazer um LIST +req"
#: hs_request.cpp:110
msgid "Your vHost has been requested"
msgstr "Seu pedido de vHost foi encaminhado"
#: hs_request.cpp:161
msgid "[auto memo] Your requested vHost has been approved."
msgstr "[Auto Memo] Seu pedido de vHost foi aprovado."
#: hs_request.cpp:225
#, c-format
msgid "[auto memo] Your requested vHost has been rejected."
msgstr "[Auto Memo] Seu pedido de vHost foi recusado."
#: hs_request.cpp:223
#, c-format
msgid "[auto memo] Your requested vHost has been rejected. Reason: %s"
msgstr "[Auto Memo] Seu pedido de vHost foi recusado. Motivo: %s"
#: hs_request.cpp:646
#, c-format
msgid "[auto memo] vHost %s has been requested."
msgstr "[Auto Memo] O vHost \002%s\002 foi solicitado."
#: hs_request.cpp:163
#, c-format
msgid "vHost for %s has been activated"
msgstr "O vHost para %s foi ativado"
#: hs_request.cpp:230
#, c-format
msgid "vHost for %s has been rejected"
msgstr "O vHost de %s foi recusado"
+122
View File
@@ -0,0 +1,122 @@
# Russian translations for hs_request
# ?????????? ???????? ??? ?????? PACKAGE.
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 22:23-0400\n"
"PO-Revision-Date: 2010-09-25 23:27-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Russian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: hs_request.cpp:195
msgid ""
" ACTIVATE Approve the requested vHost of a user\n"
" REJECT Reject the requested vHost of a user\n"
" WAITING Convenience command for LIST +req"
msgstr ""
" ACTIVATE Óòâåðäèòü çàïðàøèâàåìûé ïîëüçîâàòåëåì vHost\n"
" REJECT Îòêëîíèòü çàïðàøèâàåìûé ïîëüçîâàòåëåì vHost\n"
" WAITING Ñïèñîê çàïðîñîâ îæèäàþùèõ îáðàáîòêè (àíàëîã LIST +req)"
#: hs_request.cpp:137
msgid " REQUEST Request a vHost for your nick"
msgstr " REQUEST Çàïðîñ íà vHost äëÿ âàøåãî òåêóùåãî íèêà"
#: hs_request.cpp:183 hs_request.cpp:245
msgid "A memo informing the user will also be sent."
msgstr "Ïîëüçîâàòåëþ áóäåò ïîñëàíî àâòî-óâåäîìëåíèå îá àêòèâàöèè åãî çàïðîñà."
#: hs_request.cpp:181
msgid "Activate the requested vHost for the given nick."
msgstr "Óòâåðäèòü çàïðàøèâàåìûé vHost äëÿ óêàçàííîãî íèêà."
#: hs_request.cpp:169 hs_request.cpp:234
#, c-format
msgid "No request for nick %s found."
msgstr "Çàïðîñ íà vHost äëÿ íèêà %s íå íàéäåí."
#: hs_request.cpp:104
#, c-format
msgid "Please wait %d seconds before requesting a new vHost"
msgstr "Ïîæàëóéñòà, ïîäîæäèòå %d ñåêóíä, ïðåæäå ÷åì çàïðàøèâàòü íîâûé vHost"
#: hs_request.cpp:243
msgid "Reject the requested vHost for the given nick."
msgstr "Îòêëîíèòü çàïðàøèâàåìûé vHost äëÿ óêàçàííîãî íèêà."
#: hs_request.cpp:124
msgid ""
"Request the given vHost to be actived for your nick by the\n"
"network administrators. Please be patient while your request\n"
"is being considered."
msgstr ""
"Îòïðàâëÿåò çàïðîñ íà àêòèâàöèþ vHost, êîòîðûé áóäåò ðàññìîòðåí îäíèì èç\n"
"àäìèíèñòðàòîðîâ ñåòè. Ïðîñüáà ïðîÿâèòü òåðïåíèå, ïîêà çàïðîñ\n"
"ðàññìàòðèâàåòñÿ àäìèíèñòðàöèåé."
#: hs_request.cpp:179 hs_request.cpp:190
msgid "Syntax: ACTIVATE nick"
msgstr "Ñèíòàêñèñ: \002ACTIVATE \037íèê\037\002"
#: hs_request.cpp:241 hs_request.cpp:252
msgid "Syntax: REJECT nick"
msgstr "Ñèíòàêñèñ: \002REJECT \037íèê\037\002"
#: hs_request.cpp:65 hs_request.cpp:122 hs_request.cpp:132
msgid "Syntax: REQUEST vhost"
msgstr "Ñèíòàêñèñ: \002REQUEST \037vHost\037\002"
#: hs_request.cpp:307
msgid "Syntax: WAITING"
msgstr "Ñèíòàêñèñ: \002WAITING\002"
#: hs_request.cpp:309
msgid ""
"This command is provided for convenience. It is essentially\n"
"the same as performing a LIST +req ."
msgstr ""
"Äàííàÿ êîìàíäà ñîçäàíà äëÿ óäîáñòâà èñïîëüçîâàíèÿ è âûâîäèò ñïèñîê çàïðîñîâ,\n"
"îæèäàþùèõ îáðàáîòêè. Àíàëîãè÷íàÿ êîìàíäà: LIST +req ."
#: hs_request.cpp:110
msgid "Your vHost has been requested"
msgstr "Âàø çàïðîñ íà vHost îòïðàâëåí."
#: hs_request.cpp:161
msgid "[auto memo] Your requested vHost has been approved."
msgstr "[àâòî-ñîîáùåíèå] Çàïðàøèâàåìûé âàìè vHost óòâåðæäåí è àêòèâèðîâàí."
#: hs_request.cpp:225
#, c-format
msgid "[auto memo] Your requested vHost has been rejected."
msgstr "[àâòî-ñîîáùåíèå] Çàïðàøèâàåìûé âàìè vHost îòêëîíåí."
#: hs_request.cpp:223
#, c-format
msgid "[auto memo] Your requested vHost has been rejected. Reason: %s"
msgstr "[àâòî-ñîîáùåíèå] Çàïðàøèâàåìûé âàìè vHost îòêëîíåí. Ïðè÷èíà: %s"
#: hs_request.cpp:646
#, c-format
msgid "[auto memo] vHost %s has been requested."
msgstr "[àâòî-ñîîáùåíèå] Áûë çàïðîøåí vHost \002%s\002"
#: hs_request.cpp:163
#, c-format
msgid "vHost for %s has been activated"
msgstr "vHost äëÿ %s óñïåøíî àêòèâèðîâàí"
#: hs_request.cpp:230
#, c-format
msgid "vHost for %s has been rejected"
msgstr "vHost äëÿ %s îòêëîíåí."
-6467
View File
File diff suppressed because it is too large Load Diff
-6443
View File
File diff suppressed because it is too large Load Diff
-263
View File
@@ -1,263 +0,0 @@
/* Compiler for language definition files.
*
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
/*
* A language definition file contains all strings which Services sends to
* users in a particular language. A language file may contain comments
* (lines beginning with "#") and blank lines. All other lines must adhere
* to the following format:
*
* Each string definition begins with the C name of a message (as defined
* in the file "index"--see below). This must be alone on a line, preceded
* and followed by no blank space. Following this line are zero or more
* lines of text; each line of text must begin with exactly one tab
* character, which is discarded. Newlines are retained in the strings,
* except the last newline in the text, which is discarded. A message with
* no text is replaced by a null pointer in the array (not an empty
* string).
*
* All messages in the program are listed, one per line, in the "index"
* file. No comments or blank lines are permitted in that file. The index
* file can be generated from a language file with a command like:
* grep '^[A-Z]' en_us.l >index
*
* This program takes one parameter, the name of the language file. It
* generates a compiled language file whose name is created by removing any
* extension on the source file on the input filename.
*
* You may also pass a "-w" option to print warnings for missing strings.
*
* This program isn't very flexible, because it doesn't need to be, but
* anyone who wants to try making it more flexible is welcome to.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#undef getline
int numstrings = 0; /* Number of strings we should have */
char **stringnames; /* Names of the strings (from index file) */
char **strings; /* Strings we have loaded */
int linenum = 0; /* Current line number in input file */
#ifdef _WIN32
#define snprintf _snprintf
#endif
char *anopeStrDup(const char *src);
/*************************************************************************/
/* Read the index file and load numstrings and stringnames. Return -1 on
* error, 0 on success. */
int read_index_file()
{
FILE *f;
char buf[256];
int i;
if (!(f = fopen("index", "rb"))) {
perror("fopen(index)");
return -1;
}
while (fgets(buf, sizeof(buf), f))
numstrings++;
if (!(stringnames = static_cast<char **>(calloc(sizeof(char *), numstrings)))) {
perror("calloc(stringnames)");
return -1;
}
if (!(strings = static_cast<char **>(calloc(sizeof(char *), numstrings)))) {
perror("calloc(strings)");
return -1;
}
fseek(f, 0, SEEK_SET);
i = 0;
while (fgets(buf, sizeof(buf), f)) {
if (buf[strlen(buf) - 1] == '\n')
buf[strlen(buf) -1] = '\0';
if (!(stringnames[i++] = anopeStrDup(buf))) {
perror("strdup()");
return -1;
}
}
fclose(f);
return 0;
}
/*************************************************************************/
/* Return the index of a string name in stringnames, or -1 if not found. */
int stringnum(const char *name)
{
int i;
for (i = 0; i < numstrings; i++) {
if (strcmp(stringnames[i], name) == 0)
return i;
}
return -1;
}
/*************************************************************************/
/* Read a non-comment, non-blank line from the input file. Return NULL at
* end of file. */
char *ano_getline(FILE *f)
{
static char buf[1024];
char *s;
do {
if (!(fgets(buf, sizeof(buf), f)))
return NULL;
linenum++;
} while (*buf == '#' || *buf == '\n');
s = buf + strlen(buf) - 1;
if (*s == '\n')
*s = '\0';
return buf;
}
/*************************************************************************/
/* Write a 32-bit value to a file in big-endian order. */
int fput32(int val, FILE *f)
{
if (fputc(val >> 24, f) < 0 ||
fputc(val >> 16, f) < 0 ||
fputc(val >> 8, f) < 0 ||
fputc(val, f) < 0
) {
return -1;
} else {
return 0;
}
}
/*************************************************************************/
char *anopeStrDup(const char *src)
{
char *ret=NULL;
if (src) {
if ((ret = static_cast<char *>(malloc(strlen(src) + 1)))) {
strcpy(ret,src);
}
}
return ret;
}
/*************************************************************************/
int main(int ac, char **av)
{
char *filename = NULL, *outfile;
FILE *in, *out;
int warn = 0;
int retval = 0;
int curstring = -2, i;
char *line;
int pos;
int maxerr = 50; /* Max errors before we bail out */
if (ac >= 3 && strcmp(av[1], "-w") == 0) {
warn = 1;
av[1] = av[2];
av[2] = av[3];
ac--;
}
if (ac != 3) {
fprintf(stderr, "Usage: %s [-w] <lang-file> <out-file>\n", av[0]);
return 1;
}
filename = av[1];
outfile = av[2];
if (read_index_file() < 0)
return 1;
if (!(in = fopen(filename, "rb"))) {
perror(filename);
return 1;
}
if (!(out = fopen(outfile, "wb"))) {
perror(outfile);
return 1;
}
while (maxerr > 0 && (line = ano_getline(in)) != NULL) {
if (*line == '\t') {
if (curstring == -2) {
fprintf(stderr, "%s:%d: Junk at beginning of file\n", filename, linenum);
retval = 1;
} else if (curstring >= 0) {
line++;
i = strings[curstring] ? strlen(strings[curstring]) : 0;
if (!(strings[curstring] = static_cast<char *>(realloc(strings[curstring], i + strlen(line) + 2)))) {
fprintf(stderr, "%s:%d: Out of memory!\n", filename, linenum);
return 2;
}
snprintf(strings[curstring] + i, strlen(line) + 2, "%s\n", line);
}
} else {
if ((curstring = stringnum(line)) < 0) {
fprintf(stderr, "%s:%d: Unknown string name `%s'\n", filename, linenum, line);
retval = 1;
maxerr--;
} else if (strings[curstring]) {
fprintf(stderr, "%s:%d: Duplicate occurrence of string `%s'\n", filename, linenum, line);
retval = 1;
maxerr--;
} else {
if (!(strings[curstring] = static_cast<char *>(malloc(1)))) {
fprintf(stderr, "%s:%d: Out of memory!\n", filename, linenum);
return 2;
}
*strings[curstring] = '\0';
}
if (maxerr == 0)
fprintf(stderr, "%s:%d: Too many errors!\n", filename, linenum);
}
}
fput32(numstrings, out);
pos = numstrings * 8 + 4;
for (i = 0; i < numstrings; i++) {
int len = strings[i] && *strings[i] ? strlen(strings[i]) - 1 : 0;
fput32(pos, out);
fput32(len, out);
pos += len;
}
for (i = 0; i < numstrings; i++) {
if (strings[i]) {
if (*strings[i])
strings[i][strlen(strings[i])-1] = '\0'; /* kill last \n */
if (*strings[i])
fputs(strings[i], out);
} else if (warn) {
fprintf(stderr, "%s: String `%s' missing\n", filename, stringnames[i]);
}
}
fclose(in);
fclose(out);
return retval;
}
/*************************************************************************/
-76
View File
@@ -1,76 +0,0 @@
/* Language stuff generator for win32.
*
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* Written by Dominick Meglio <codemastr@unrealircd.com>
*
*/
#include <string.h>
#include <stdio.h>
#include <cstdlib>
#include <cctype>
char *strip(char *str)
{
char *c;
if ((c = strchr(str,'\n')))
*c = 0;
if ((c = strchr(str,'\r')))
*c = 0;
return str;
}
int main(int argc, char *argv[])
{
if (argc < 4)
exit(1);
/* Build the index file */
if (!strcmp(argv[1], "index"))
{
FILE *fd = fopen(argv[2], "rb");
FILE *fdout = fopen(argv[3], "wb");
char buf[1024];
if (!fd || !fdout)
exit(2);
while (fgets(buf, 1023, fd))
{
if (isupper(*buf))
fprintf(fdout, "%s", buf);
}
fclose(fd);
fclose(fdout);
}
/* Build the language.h file */
else if (!strcmp(argv[1], "language.h"))
{
FILE *fd = fopen(argv[2], "r");
FILE *fdout = fopen(argv[3], "w");
char buf[1024];
int i = 0;
if (!fd || !fdout)
exit(2);
fprintf(stderr, "Generating language.h... ");
while (fgets(buf, 1023, fd)) {
fprintf(fdout, "#define %-32s %d\n", strip(buf), i++);
}
fprintf(fdout, "#define NUM_STRINGS %d\n", i);
fprintf(stderr, "%d strings\n", i);
fclose(fd);
fclose(fdout);
}
return 0;
}
-6532
View File
File diff suppressed because it is too large Load Diff
+27
View File
@@ -0,0 +1,27 @@
# German translations for ns_maxemail
# German messages for ns_maxemail
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 23:51-0400\n"
"PO-Revision-Date: 2010-09-26 00:03-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ns_maxemail.cpp:33
#, c-format
msgid "The given email address has reached it's usage limit of %d users."
msgstr "Die angegebene eMail hat die limit Begrenzung von %d User erreicht."
#: ns_maxemail.cpp:31
msgid "The given email address has reached it's usage limit of 1 user."
msgstr "Die angegebene eMail hat die limit Begrenzung von 1 User erreicht."
+27
View File
@@ -0,0 +1,27 @@
# Italian translations for ns_maxemail
# Traduzioni italiane per il ns_maxemail
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 23:51-0400\n"
"PO-Revision-Date: 2010-09-26 00:11-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Italian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ns_maxemail.cpp:33
#, c-format
msgid "The given email address has reached it's usage limit of %d users."
msgstr "L'indirizzo email specificato ha raggiunto il suo limite d'utilizzo di %d utenti."
#: ns_maxemail.cpp:31
msgid "The given email address has reached it's usage limit of 1 user."
msgstr "L'indirizzo email specificato ha raggiunto il suo limite d'utilizzo di 1 utente."
+27
View File
@@ -0,0 +1,27 @@
# Dutch translations for ns_maxemail
# Engelse vertalingen voor het ns_maxemail
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 23:51-0400\n"
"PO-Revision-Date: 2010-09-25 23:57-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Dutch\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ns_maxemail.cpp:33
#, c-format
msgid "The given email address has reached it's usage limit of %d users."
msgstr "Het gegeven email adres heeft de limiet van %d gebruikers bereikt."
#: ns_maxemail.cpp:31
msgid "The given email address has reached it's usage limit of 1 user."
msgstr "Het gegeven email adres heeft de limiet van 1 gebruiker bereikt."
+26
View File
@@ -0,0 +1,26 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 23:51-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ns_maxemail.cpp:33
#, c-format
msgid "The given email address has reached it's usage limit of %d users."
msgstr ""
#: ns_maxemail.cpp:31
msgid "The given email address has reached it's usage limit of 1 user."
msgstr ""
+26
View File
@@ -0,0 +1,26 @@
# Portuguese translations for ns_maxemail
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 23:51-0400\n"
"PO-Revision-Date: 2010-09-26 00:05-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Portuguese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ns_maxemail.cpp:33
#, c-format
msgid "The given email address has reached it's usage limit of %d users."
msgstr "O endereço de email fornecido alcançou seu limite de uso de %d usuários."
#: ns_maxemail.cpp:31
msgid "The given email address has reached it's usage limit of 1 user."
msgstr "O endereço de email fornecido alcançou seu limite de uso de 1 usuário."
+28
View File
@@ -0,0 +1,28 @@
# Russian translations for ns_maxemail
# ?????????? ???????? ??? ?????? ns_maxemail
# Copyright (C) 2010 Anope Team
# This file is distributed under the same license as Anope IRC Services
# Adam <adam@anope.org>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-09-25 23:51-0400\n"
"PO-Revision-Date: 2010-09-26 00:07-0400\n"
"Last-Translator: Adam <adam@anope.org>\n"
"Language-Team: Russian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: ns_maxemail.cpp:33
#, c-format
msgid "The given email address has reached it's usage limit of %d users."
msgstr "Óêàçàííûé âàìè email-àäðåñ èñïîëüçóåòñÿ ìàêñèìàëüíî äîïóñòèìîå êîë-âî ðàç: %d"
#: ns_maxemail.cpp:31
msgid "The given email address has reached it's usage limit of 1 user."
msgstr "Óêàçàííûé âàìè email-àäðåñ óæå êåì-òî èñïîëüçóåòñÿ."
-7518
View File
File diff suppressed because it is too large Load Diff
-6378
View File
File diff suppressed because it is too large Load Diff
-6642
View File
File diff suppressed because it is too large Load Diff
-6498
View File
File diff suppressed because it is too large Load Diff
Executable
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
pushd ../src > /dev/null
xgettext -s -d Anope -o ../lang/anope.pot --from-code=utf-8 language.cpp
popd > /dev/null
for f in *.po
do
msgmerge -v -s -U $f `echo $f | cut -d'.' -f1`.pot
done
+6 -6
View File
@@ -27,19 +27,19 @@ class CommandBSAct : public Command
if (!check_access(u, ci, CA_SAY))
{
notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
u->SendMessage(BotServ, ACCESS_DENIED);
return MOD_CONT;
}
if (!ci->bi)
{
notice_help(Config->s_BotServ, u, BOT_NOT_ASSIGNED);
u->SendMessage(BotServ, BOT_NOT_ASSIGNED);
return MOD_CONT;
}
if (!ci->c || !ci->c->FindUser(ci->bi))
{
notice_lang(Config->s_BotServ, u, BOT_NOT_ON_CHANNEL, ci->name.c_str());
u->SendMessage(BotServ, BOT_NOT_ON_CHANNEL, ci->name.c_str());
return MOD_CONT;
}
@@ -58,18 +58,18 @@ class CommandBSAct : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_BotServ, u, "ACT", BOT_ACT_SYNTAX);
SyntaxError(BotServ, u, "ACT", BOT_ACT_SYNTAX);
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_BotServ, u, BOT_HELP_ACT);
u->SendMessage(BotServ, BOT_HELP_ACT);
return true;
}
void OnServHelp(User *u)
{
notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_ACT);
u->SendMessage(BotServ, BOT_HELP_CMD_ACT);
}
};
+9 -9
View File
@@ -29,13 +29,13 @@ class CommandBSAssign : public Command
if (readonly)
{
notice_lang(Config->s_BotServ, u, BOT_ASSIGN_READONLY);
u->SendMessage(BotServ, BOT_ASSIGN_READONLY);
return MOD_CONT;
}
if (!(bi = findbot(nick)))
{
notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, nick.c_str());
u->SendMessage(BotServ, BOT_DOES_NOT_EXIST, nick.c_str());
return MOD_CONT;
}
@@ -43,19 +43,19 @@ class CommandBSAssign : public Command
if (ci->botflags.HasFlag(BS_NOBOT) || (!check_access(u, ci, CA_ASSIGN) && !u->Account()->HasPriv("botserv/administration")))
{
notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
u->SendMessage(BotServ, ACCESS_DENIED);
return MOD_CONT;
}
if (bi->HasFlag(BI_PRIVATE) && !u->Account()->HasCommand("botserv/assign/private"))
{
notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
u->SendMessage(BotServ, ACCESS_DENIED);
return MOD_CONT;
}
if (ci->bi && nick.equals_ci(ci->bi->nick))
{
notice_lang(Config->s_BotServ, u, BOT_ASSIGN_ALREADY, ci->bi->nick.c_str(), chan.c_str());
u->SendMessage(BotServ, BOT_ASSIGN_ALREADY, ci->bi->nick.c_str(), chan.c_str());
return MOD_CONT;
}
@@ -63,24 +63,24 @@ class CommandBSAssign : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "for " << bi->nick;
bi->Assign(u, ci);
notice_lang(Config->s_BotServ, u, BOT_ASSIGN_ASSIGNED, bi->nick.c_str(), ci->name.c_str());
u->SendMessage(BotServ, BOT_ASSIGN_ASSIGNED, bi->nick.c_str(), ci->name.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_BotServ, u, BOT_HELP_ASSIGN);
u->SendMessage(BotServ, BOT_HELP_ASSIGN);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_BotServ, u, "ASSIGN", BOT_ASSIGN_SYNTAX);
SyntaxError(BotServ, u, "ASSIGN", BOT_ASSIGN_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_ASSIGN);
u->SendMessage(BotServ, BOT_HELP_CMD_ASSIGN);
}
};
+20 -20
View File
@@ -26,7 +26,7 @@ class BadwordsListCallback : public NumberList
~BadwordsListCallback()
{
if (!SentHeader)
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name.c_str());
u->SendMessage(BotServ, BOT_BADWORDS_NO_MATCH, ci->name.c_str());
}
void HandleNumber(unsigned Number)
@@ -37,7 +37,7 @@ class BadwordsListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_LIST_HEADER, ci->name.c_str());
u->SendMessage(BotServ, BOT_BADWORDS_LIST_HEADER, ci->name.c_str());
}
DoList(u, ci, Number - 1, ci->GetBadWord(Number - 1));
@@ -45,7 +45,7 @@ class BadwordsListCallback : public NumberList
static void DoList(User *u, ChannelInfo *ci, unsigned Number, BadWord *bw)
{
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_LIST_FORMAT, Number + 1, bw->word.c_str(), bw->type == BW_SINGLE ? "(SINGLE)" : (bw->type == BW_START ? "(START)" : (bw->type == BW_END ? "(END)" : "")));
u->SendMessage(BotServ, BOT_BADWORDS_LIST_FORMAT, Number + 1, bw->word.c_str(), bw->type == BW_SINGLE ? "(SINGLE)" : (bw->type == BW_START ? "(START)" : (bw->type == BW_END ? "(END)" : "")));
}
};
@@ -66,11 +66,11 @@ class BadwordsDelCallback : public NumberList
~BadwordsDelCallback()
{
if (!Deleted)
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name.c_str());
u->SendMessage(BotServ, BOT_BADWORDS_NO_MATCH, ci->name.c_str());
else if (Deleted == 1)
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_DELETED_ONE, ci->name.c_str());
u->SendMessage(BotServ, BOT_BADWORDS_DELETED_ONE, ci->name.c_str());
else
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_DELETED_SEVERAL, Deleted, ci->name.c_str());
u->SendMessage(BotServ, BOT_BADWORDS_DELETED_SEVERAL, Deleted, ci->name.c_str());
}
void HandleNumber(unsigned Number)
@@ -93,7 +93,7 @@ class CommandBSBadwords : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "LIST";
if (!ci->GetBadWordCount())
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_LIST_EMPTY, ci->name.c_str());
u->SendMessage(BotServ, BOT_BADWORDS_LIST_EMPTY, ci->name.c_str());
else if (!word.empty() && word.find_first_not_of("1234567890,-") == Anope::string::npos)
{
BadwordsListCallback list(u, ci, word);
@@ -113,14 +113,14 @@ class CommandBSBadwords : public Command
if (!SentHeader)
{
SentHeader = true;
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_LIST_HEADER, ci->name.c_str());
u->SendMessage(BotServ, BOT_BADWORDS_LIST_HEADER, ci->name.c_str());
}
BadwordsListCallback::DoList(u, ci, i, bw);
}
if (!SentHeader)
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_NO_MATCH, ci->name.c_str());
u->SendMessage(BotServ, BOT_BADWORDS_NO_MATCH, ci->name.c_str());
}
return MOD_CONT;
@@ -149,7 +149,7 @@ class CommandBSBadwords : public Command
if (ci->GetBadWordCount() >= Config->BSBadWordsMax)
{
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_REACHED_LIMIT, Config->BSBadWordsMax);
u->SendMessage(BotServ, BOT_BADWORDS_REACHED_LIMIT, Config->BSBadWordsMax);
return MOD_CONT;
}
@@ -159,7 +159,7 @@ class CommandBSBadwords : public Command
if (!bw->word.empty() && ((Config->BSCaseSensitive && realword.equals_cs(bw->word)) || (!Config->BSCaseSensitive && realword.equals_ci(bw->word))))
{
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_ALREADY_EXISTS, bw->word.c_str(), ci->name.c_str());
u->SendMessage(BotServ, BOT_BADWORDS_ALREADY_EXISTS, bw->word.c_str(), ci->name.c_str());
return MOD_CONT;
}
}
@@ -168,7 +168,7 @@ class CommandBSBadwords : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "ADD " << realword;
ci->AddBadWord(realword, type);
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_ADDED, realword.c_str(), ci->name.c_str());
u->SendMessage(BotServ, BOT_BADWORDS_ADDED, realword.c_str(), ci->name.c_str());
return MOD_CONT;
}
@@ -196,7 +196,7 @@ class CommandBSBadwords : public Command
if (i == end)
{
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_NOT_FOUND, word.c_str(), ci->name.c_str());
u->SendMessage(BotServ, BOT_BADWORDS_NOT_FOUND, word.c_str(), ci->name.c_str());
return MOD_CONT;
}
@@ -204,7 +204,7 @@ class CommandBSBadwords : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "DEL " << badword->word;
ci->EraseBadWord(i);
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_DELETED, badword->word.c_str(), ci->name.c_str());
u->SendMessage(BotServ, BOT_BADWORDS_DELETED, badword->word.c_str(), ci->name.c_str());
}
return MOD_CONT;
@@ -216,7 +216,7 @@ class CommandBSBadwords : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "CLEAR";
ci->ClearBadWords();
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_CLEAR);
u->SendMessage(BotServ, BOT_BADWORDS_CLEAR);
return MOD_CONT;
}
public:
@@ -242,13 +242,13 @@ class CommandBSBadwords : public Command
if (!check_access(u, ci, CA_BADWORDS) && (!need_args || !u->Account()->HasPriv("botserv/administration")))
{
notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
u->SendMessage(BotServ, ACCESS_DENIED);
return MOD_CONT;
}
if (readonly)
{
notice_lang(Config->s_BotServ, u, BOT_BADWORDS_DISABLED);
u->SendMessage(BotServ, BOT_BADWORDS_DISABLED);
return MOD_CONT;
}
@@ -268,18 +268,18 @@ class CommandBSBadwords : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_BotServ, u, BOT_HELP_BADWORDS);
u->SendMessage(BotServ, BOT_HELP_BADWORDS);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_BotServ, u, "BADWORDS", BOT_BADWORDS_SYNTAX);
SyntaxError(BotServ, u, "BADWORDS", BOT_BADWORDS_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_BADWORDS);
u->SendMessage(BotServ, BOT_HELP_CMD_BADWORDS);
}
};
+37 -37
View File
@@ -26,60 +26,60 @@ class CommandBSBot : public Command
if (findbot(nick))
{
notice_lang(Config->s_BotServ, u, BOT_BOT_ALREADY_EXISTS, nick.c_str());
u->SendMessage(BotServ, BOT_BOT_ALREADY_EXISTS, nick.c_str());
return MOD_CONT;
}
if (nick.length() > Config->NickLen)
{
notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
u->SendMessage(BotServ, BOT_BAD_NICK);
return MOD_CONT;
}
if (user.length() > Config->UserLen)
{
notice_lang(Config->s_BotServ, u, BOT_LONG_IDENT, Config->UserLen);
u->SendMessage(BotServ, BOT_LONG_IDENT, Config->UserLen);
return MOD_CONT;
}
if (host.length() > Config->HostLen)
{
notice_lang(Config->s_BotServ, u, BOT_LONG_HOST, Config->HostLen);
u->SendMessage(BotServ, BOT_LONG_HOST, Config->HostLen);
return MOD_CONT;
}
/* Check the nick is valid re RFC 2812 */
if (isdigit(nick[0]) || nick[0] == '-')
{
notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
u->SendMessage(BotServ, BOT_BAD_NICK);
return MOD_CONT;
}
for (unsigned i = 0, end = nick.length(); i < end && i < Config->NickLen; ++i)
if (!isvalidnick(nick[i]))
{
notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
u->SendMessage(BotServ, BOT_BAD_NICK);
return MOD_CONT;
}
/* check for hardcored ircd forbidden nicks */
if (!ircdproto->IsNickValid(nick))
{
notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
u->SendMessage(BotServ, BOT_BAD_NICK);
return MOD_CONT;
}
/* Check the host is valid re RFC 2812 */
if (!isValidHost(host, 3))
{
notice_lang(Config->s_BotServ, u, BOT_BAD_HOST);
u->SendMessage(BotServ, BOT_BAD_HOST);
return MOD_CONT;
}
for (unsigned i = 0, end = user.length(); i < end && i < Config->UserLen; ++i)
if (!isalnum(user[i]))
{
notice_lang(Config->s_BotServ, u, BOT_BAD_IDENT, Config->UserLen);
u->SendMessage(BotServ, BOT_BAD_IDENT, Config->UserLen);
return MOD_CONT;
}
@@ -89,20 +89,20 @@ class CommandBSBot : public Command
*/
if (findnick(nick))
{
notice_lang(Config->s_BotServ, u, NICK_ALREADY_REGISTERED, nick.c_str());
u->SendMessage(BotServ, NICK_ALREADY_REGISTERED, nick.c_str());
return MOD_CONT;
}
if (!(bi = new BotInfo(nick, user, host, real)))
{
// XXX this cant happen?
notice_lang(Config->s_BotServ, u, BOT_BOT_CREATION_FAILED);
u->SendMessage(BotServ, BOT_BOT_CREATION_FAILED);
return MOD_CONT;
}
Log(LOG_ADMIN, u, this) << "ADD " << bi->GetMask() << " " << bi->realname;
notice_lang(Config->s_BotServ, u, BOT_BOT_ADDED, bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
u->SendMessage(BotServ, BOT_BOT_ADDED, bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
FOREACH_MOD(I_OnBotCreate, OnBotCreate(bi));
return MOD_CONT;
@@ -125,37 +125,37 @@ class CommandBSBot : public Command
if (!(bi = findbot(oldnick)))
{
notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, oldnick.c_str());
u->SendMessage(BotServ, BOT_DOES_NOT_EXIST, oldnick.c_str());
return MOD_CONT;
}
if (!oldnick.equals_ci(nick) && nickIsServices(oldnick, false))
{
notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, oldnick.c_str());
u->SendMessage(BotServ, BOT_DOES_NOT_EXIST, oldnick.c_str());
return MOD_CONT;
}
if (nick.length() > Config->NickLen)
{
notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
u->SendMessage(BotServ, BOT_BAD_NICK);
return MOD_CONT;
}
if (!user.empty() && user.length() > Config->UserLen)
{
notice_lang(Config->s_BotServ, u, BOT_LONG_IDENT, Config->UserLen);
u->SendMessage(BotServ, BOT_LONG_IDENT, Config->UserLen);
return MOD_CONT;
}
if (!host.empty() && host.length() > Config->HostLen)
{
notice_lang(Config->s_BotServ, u, BOT_LONG_HOST, Config->HostLen);
u->SendMessage(BotServ, BOT_LONG_HOST, Config->HostLen);
return MOD_CONT;
}
if (!oldnick.equals_ci(nick) && nickIsServices(nick, false))
{
notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, oldnick.c_str());
u->SendMessage(BotServ, BOT_DOES_NOT_EXIST, oldnick.c_str());
return MOD_CONT;
}
@@ -166,34 +166,34 @@ class CommandBSBot : public Command
*/
if (nick.equals_cs(bi->nick) && (!user.empty() ? user.equals_cs(bi->GetIdent()) : 1) && (!host.empty() ? host.equals_cs(bi->host) : 1) && (!real.empty() ? real.equals_cs(bi->realname) : 1))
{
notice_lang(Config->s_BotServ, u, BOT_BOT_ANY_CHANGES);
u->SendMessage(BotServ, BOT_BOT_ANY_CHANGES);
return MOD_CONT;
}
/* Check the nick is valid re RFC 2812 */
if (isdigit(nick[0]) || nick[0] == '-')
{
notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
u->SendMessage(BotServ, BOT_BAD_NICK);
return MOD_CONT;
}
for (unsigned i = 0, end = nick.length(); i < end && i < Config->NickLen; ++i)
if (!isvalidnick(nick[i]))
{
notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
u->SendMessage(BotServ, BOT_BAD_NICK);
return MOD_CONT;
}
/* check for hardcored ircd forbidden nicks */
if (!ircdproto->IsNickValid(nick))
{
notice_lang(Config->s_BotServ, u, BOT_BAD_NICK);
u->SendMessage(BotServ, BOT_BAD_NICK);
return MOD_CONT;
}
if (!host.empty() && !isValidHost(host, 3))
{
notice_lang(Config->s_BotServ, u, BOT_BAD_HOST);
u->SendMessage(BotServ, BOT_BAD_HOST);
return MOD_CONT;
}
@@ -201,13 +201,13 @@ class CommandBSBot : public Command
for (unsigned i = 0, end = user.length(); i < end && i < Config->UserLen; ++i)
if (!isalnum(user[i]))
{
notice_lang(Config->s_BotServ, u, BOT_BAD_IDENT, Config->UserLen);
u->SendMessage(BotServ, BOT_BAD_IDENT, Config->UserLen);
return MOD_CONT;
}
if (!nick.equals_ci(bi->nick) && findbot(nick))
{
notice_lang(Config->s_BotServ, u, BOT_BOT_ALREADY_EXISTS, nick.c_str());
u->SendMessage(BotServ, BOT_BOT_ALREADY_EXISTS, nick.c_str());
return MOD_CONT;
}
@@ -219,7 +219,7 @@ class CommandBSBot : public Command
*/
if (findnick(nick))
{
notice_lang(Config->s_BotServ, u, NICK_ALREADY_REGISTERED, nick.c_str());
u->SendMessage(BotServ, NICK_ALREADY_REGISTERED, nick.c_str());
return MOD_CONT;
}
@@ -262,7 +262,7 @@ class CommandBSBot : public Command
bi->RejoinAll();
}
notice_lang(Config->s_BotServ, u, BOT_BOT_CHANGED, oldnick.c_str(), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
u->SendMessage(BotServ, BOT_BOT_CHANGED, oldnick.c_str(), bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str(), bi->realname.c_str());
Log(LOG_ADMIN, u, this) << "CHANGE " << oldnick << " to " << bi->GetMask() << " " << bi->realname;
FOREACH_MOD(I_OnBotChange, OnBotChange(bi));
@@ -282,13 +282,13 @@ class CommandBSBot : public Command
if (!(bi = findbot(nick)))
{
notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, nick.c_str());
u->SendMessage(BotServ, BOT_DOES_NOT_EXIST, nick.c_str());
return MOD_CONT;
}
if (nickIsServices(nick, false))
{
notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, nick.c_str());
u->SendMessage(BotServ, BOT_DOES_NOT_EXIST, nick.c_str());
return MOD_CONT;
}
@@ -301,7 +301,7 @@ class CommandBSBot : public Command
Log(LOG_ADMIN, u, this) << "DEL " << bi->nick;
delete bi;
notice_lang(Config->s_BotServ, u, BOT_BOT_DELETED, nick.c_str());
u->SendMessage(BotServ, BOT_BOT_DELETED, nick.c_str());
return MOD_CONT;
}
public:
@@ -316,7 +316,7 @@ class CommandBSBot : public Command
if (readonly)
{
notice_lang(Config->s_BotServ, u, BOT_BOT_READONLY);
u->SendMessage(BotServ, BOT_BOT_READONLY);
return MOD_CONT;
}
@@ -325,7 +325,7 @@ class CommandBSBot : public Command
// ADD nick user host real - 5
if (!u->Account()->HasCommand("botserv/bot/add"))
{
notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
u->SendMessage(BotServ, ACCESS_DENIED);
return MOD_CONT;
}
@@ -348,7 +348,7 @@ class CommandBSBot : public Command
// but only oldn and newn are required
if (!u->Account()->HasCommand("botserv/bot/change"))
{
notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
u->SendMessage(BotServ, ACCESS_DENIED);
return MOD_CONT;
}
@@ -365,7 +365,7 @@ class CommandBSBot : public Command
// DEL nick
if (!u->Account()->HasCommand("botserv/bot/del"))
{
notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
u->SendMessage(BotServ, ACCESS_DENIED);
return MOD_CONT;
}
@@ -385,18 +385,18 @@ class CommandBSBot : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_lang(Config->s_BotServ, u, BOT_SERVADMIN_HELP_BOT);
u->SendMessage(BotServ, BOT_SERVADMIN_HELP_BOT);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_BotServ, u, "BOT", BOT_BOT_SYNTAX);
SyntaxError(BotServ, u, "BOT", BOT_BOT_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_BOT);
u->SendMessage(BotServ, BOT_HELP_CMD_BOT);
}
};
+7 -7
View File
@@ -26,7 +26,7 @@ class CommandBSBotList : public Command
if (BotListByNick.empty())
{
notice_lang(Config->s_BotServ, u, BOT_BOTLIST_EMPTY);
u->SendMessage(BotServ, BOT_BOTLIST_EMPTY);
return MOD_CONT;
}
@@ -37,7 +37,7 @@ class CommandBSBotList : public Command
if (!bi->HasFlag(BI_PRIVATE))
{
if (!count)
notice_lang(Config->s_BotServ, u, BOT_BOTLIST_HEADER);
u->SendMessage(BotServ, BOT_BOTLIST_HEADER);
++count;
u->SendMessage(Config->s_BotServ, " %-15s (%s@%s)", bi->nick.c_str(), bi->GetIdent().c_str(), bi->host.c_str());
}
@@ -45,7 +45,7 @@ class CommandBSBotList : public Command
if (u->Account()->HasCommand("botserv/botlist") && count < BotListByNick.size())
{
notice_lang(Config->s_BotServ, u, BOT_BOTLIST_PRIVATE_HEADER);
u->SendMessage(BotServ, BOT_BOTLIST_PRIVATE_HEADER);
for (botinfo_map::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it)
{
@@ -60,22 +60,22 @@ class CommandBSBotList : public Command
}
if (!count)
notice_lang(Config->s_BotServ, u, BOT_BOTLIST_EMPTY);
u->SendMessage(BotServ, BOT_BOTLIST_EMPTY);
else
notice_lang(Config->s_BotServ, u, BOT_BOTLIST_FOOTER, count);
u->SendMessage(BotServ, BOT_BOTLIST_FOOTER, count);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_BotServ, u, BOT_HELP_BOTLIST);
u->SendMessage(BotServ, BOT_HELP_BOTLIST);
return true;
}
void OnServHelp(User *u)
{
notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_BOTLIST);
u->SendMessage(BotServ, BOT_HELP_CMD_BOTLIST);
}
};
+2 -2
View File
@@ -31,11 +31,11 @@ class CommandBSHelp : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
// Abuse syntax error to display general list help.
notice_help(Config->s_BotServ, u, BOT_HELP);
u->SendMessage(BotServ, BOT_HELP);
for (CommandMap::const_iterator it = BotServ->Commands.begin(), it_end = BotServ->Commands.end(); it != it_end; ++it)
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(u);
notice_help(Config->s_BotServ, u, BOT_HELP_FOOTER, Config->BSMinUsers);
u->SendMessage(BotServ, BOT_HELP_FOOTER, Config->BSMinUsers);
}
};
+48 -53
View File
@@ -53,20 +53,15 @@ class CommandBSInfo : public Command
int need_comma = 0;
char buf[BUFSIZE], *end;
const char *commastr = getstring(u, COMMA_SPACE);
if ((bi = findbot(query)))
{
struct tm *tm;
notice_lang(Config->s_BotServ, u, BOT_INFO_BOT_HEADER, bi->nick.c_str());
notice_lang(Config->s_BotServ, u, BOT_INFO_BOT_MASK, bi->GetIdent().c_str(), bi->host.c_str());
notice_lang(Config->s_BotServ, u, BOT_INFO_BOT_REALNAME, bi->realname.c_str());
tm = localtime(&bi->created);
strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm);
notice_lang(Config->s_BotServ, u, BOT_INFO_BOT_CREATED, buf);
notice_lang(Config->s_BotServ, u, BOT_INFO_BOT_OPTIONS, getstring(u, (bi->HasFlag(BI_PRIVATE) ? BOT_INFO_OPT_PRIVATE : BOT_INFO_OPT_NONE)));
notice_lang(Config->s_BotServ, u, BOT_INFO_BOT_USAGE, bi->chancount);
u->SendMessage(BotServ, BOT_INFO_BOT_HEADER, bi->nick.c_str());
u->SendMessage(BotServ, BOT_INFO_BOT_MASK, bi->GetIdent().c_str(), bi->host.c_str());
u->SendMessage(BotServ, BOT_INFO_BOT_REALNAME, bi->realname.c_str());
u->SendMessage(BotServ, BOT_INFO_BOT_CREATED, do_strftime(bi->created).c_str());
u->SendMessage(BotServ, BOT_INFO_BOT_OPTIONS, GetString(u, (bi->HasFlag(BI_PRIVATE) ? NICK_INFO_OPT_PRIVATE : NICK_INFO_OPT_NONE)).c_str());
u->SendMessage(BotServ, BOT_INFO_BOT_USAGE, bi->chancount);
if (u->Account()->HasPriv("botserv/administration"))
this->send_bot_channels(u, bi);
@@ -75,151 +70,151 @@ class CommandBSInfo : public Command
{
if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("botserv/administration"))
{
notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
u->SendMessage(BotServ, ACCESS_DENIED);
return MOD_CONT;
}
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_HEADER, ci->name.c_str());
u->SendMessage(BotServ, CHAN_INFO_HEADER, ci->name.c_str());
if (ci->bi)
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_BOT, ci->bi->nick.c_str());
u->SendMessage(BotServ, BOT_INFO_CHAN_BOT, ci->bi->nick.c_str());
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_BOT_NONE);
u->SendMessage(BotServ, BOT_INFO_CHAN_BOT_NONE);
if (ci->botflags.HasFlag(BS_KICK_BADWORDS))
{
if (ci->ttb[TTB_BADWORDS])
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_BADWORDS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_BADWORDS]);
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_BADWORDS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_BADWORDS]);
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_BADWORDS, getstring(u, BOT_INFO_ACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_BADWORDS, GetString(u, BOT_INFO_ACTIVE).c_str());
}
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_BADWORDS, getstring(u, BOT_INFO_INACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_BADWORDS, GetString(u, BOT_INFO_INACTIVE).c_str());
if (ci->botflags.HasFlag(BS_KICK_BOLDS))
{
if (ci->ttb[TTB_BOLDS])
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_BOLDS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_BOLDS]);
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_BOLDS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_BOLDS]);
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_BOLDS, getstring(u, BOT_INFO_ACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_BOLDS, GetString(u, BOT_INFO_ACTIVE).c_str());
}
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_BOLDS, getstring(u, BOT_INFO_INACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_BOLDS, GetString(u, BOT_INFO_INACTIVE).c_str());
if (ci->botflags.HasFlag(BS_KICK_CAPS))
{
if (ci->ttb[TTB_CAPS])
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_CAPS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_CAPS], ci->capsmin, ci->capspercent);
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_CAPS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_CAPS], ci->capsmin, ci->capspercent);
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_CAPS_ON, getstring(u, BOT_INFO_ACTIVE), ci->capsmin, ci->capspercent);
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_CAPS_ON, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->capsmin, ci->capspercent);
}
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_CAPS_OFF, getstring(u, BOT_INFO_INACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_CAPS_OFF, GetString(u, BOT_INFO_INACTIVE).c_str());
if (ci->botflags.HasFlag(BS_KICK_COLORS))
{
if (ci->ttb[TTB_COLORS])
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_COLORS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_COLORS]);
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_COLORS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_COLORS]);
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_COLORS, getstring(u, BOT_INFO_ACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_COLORS, GetString(u, BOT_INFO_ACTIVE).c_str());
}
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_COLORS, getstring(u, BOT_INFO_INACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_COLORS, GetString(u, BOT_INFO_INACTIVE).c_str());
if (ci->botflags.HasFlag(BS_KICK_FLOOD))
{
if (ci->ttb[TTB_FLOOD])
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_FLOOD_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_FLOOD], ci->floodlines, ci->floodsecs);
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_FLOOD_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_FLOOD], ci->floodlines, ci->floodsecs);
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_FLOOD_ON, getstring(u, BOT_INFO_ACTIVE), ci->floodlines, ci->floodsecs);
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_FLOOD_ON, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->floodlines, ci->floodsecs);
}
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_FLOOD_OFF, getstring(u, BOT_INFO_INACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_FLOOD_OFF, GetString(u, BOT_INFO_INACTIVE).c_str());
if (ci->botflags.HasFlag(BS_KICK_REPEAT))
{
if (ci->ttb[TTB_REPEAT])
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_REPEAT_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_REPEAT], ci->repeattimes);
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_REPEAT_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_REPEAT], ci->repeattimes);
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_REPEAT_ON, getstring(u, BOT_INFO_ACTIVE), ci->repeattimes);
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_REPEAT_ON, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->repeattimes);
}
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_REPEAT_OFF, getstring(u, BOT_INFO_INACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_REPEAT_OFF, GetString(u, BOT_INFO_INACTIVE).c_str());
if (ci->botflags.HasFlag(BS_KICK_REVERSES))
{
if (ci->ttb[TTB_REVERSES])
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_REVERSES_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_REVERSES]);
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_REVERSES_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_REVERSES]);
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_REVERSES, getstring(u, BOT_INFO_ACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_REVERSES, GetString(u, BOT_INFO_ACTIVE).c_str());
}
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_REVERSES, getstring(u, BOT_INFO_INACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_REVERSES, GetString(u, BOT_INFO_INACTIVE).c_str());
if (ci->botflags.HasFlag(BS_KICK_UNDERLINES))
{
if (ci->ttb[TTB_UNDERLINES])
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_UNDERLINES_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_UNDERLINES]);
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_UNDERLINES_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_UNDERLINES]);
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_UNDERLINES, getstring(u, BOT_INFO_ACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_UNDERLINES, GetString(u, BOT_INFO_ACTIVE).c_str());
}
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_UNDERLINES, getstring(u, BOT_INFO_INACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_UNDERLINES, GetString(u, BOT_INFO_INACTIVE).c_str());
if (ci->botflags.HasFlag(BS_KICK_ITALICS))
{
if (ci->ttb[TTB_ITALICS])
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_ITALICS_BAN, getstring(u, BOT_INFO_ACTIVE), ci->ttb[TTB_ITALICS]);
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_ITALICS_BAN, GetString(u, BOT_INFO_ACTIVE).c_str(), ci->ttb[TTB_ITALICS]);
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_ITALICS, getstring(u, BOT_INFO_ACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_ITALICS, GetString(u, BOT_INFO_ACTIVE).c_str());
}
else
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_KICK_ITALICS, getstring(u, BOT_INFO_INACTIVE));
u->SendMessage(BotServ, BOT_INFO_CHAN_KICK_ITALICS, GetString(u, BOT_INFO_INACTIVE).c_str());
end = buf;
*end = 0;
if (ci->botflags.HasFlag(BS_DONTKICKOPS))
{
end += snprintf(end, sizeof(buf) - (end - buf), "%s", getstring(u, BOT_INFO_OPT_DONTKICKOPS));
end += snprintf(end, sizeof(buf) - (end - buf), "%s", GetString(u, BOT_INFO_OPT_DONTKICKOPS).c_str());
need_comma = 1;
}
if (ci->botflags.HasFlag(BS_DONTKICKVOICES))
{
end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? commastr : "", getstring(u, BOT_INFO_OPT_DONTKICKVOICES));
end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_DONTKICKVOICES).c_str());
need_comma = 1;
}
if (ci->botflags.HasFlag(BS_FANTASY))
{
end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? commastr : "", getstring(u, BOT_INFO_OPT_FANTASY));
end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_FANTASY).c_str());
need_comma = 1;
}
if (ci->botflags.HasFlag(BS_GREET))
{
end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? commastr : "", getstring(u, BOT_INFO_OPT_GREET));
end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_GREET).c_str());
need_comma = 1;
}
if (ci->botflags.HasFlag(BS_NOBOT))
{
end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? commastr : "", getstring(u, BOT_INFO_OPT_NOBOT));
end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_NOBOT).c_str());
need_comma = 1;
}
if (ci->botflags.HasFlag(BS_SYMBIOSIS))
{
end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? commastr : "", getstring(u, BOT_INFO_OPT_SYMBIOSIS));
end += snprintf(end, sizeof(buf) - (end - buf), "%s%s", need_comma ? ", " : "", GetString(u, BOT_INFO_OPT_SYMBIOSIS).c_str());
need_comma = 1;
}
notice_lang(Config->s_BotServ, u, BOT_INFO_CHAN_OPTIONS, *buf ? buf : getstring(u, BOT_INFO_OPT_NONE));
u->SendMessage(BotServ, BOT_INFO_CHAN_OPTIONS, *buf ? buf : GetString(u, BOT_INFO_OPT_NONE).c_str());
}
else
notice_lang(Config->s_BotServ, u, BOT_INFO_NOT_FOUND, query.c_str());
u->SendMessage(BotServ, BOT_INFO_NOT_FOUND, query.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_BotServ, u, BOT_HELP_INFO);
u->SendMessage(BotServ, BOT_HELP_INFO);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_BotServ, u, "INFO", BOT_INFO_SYNTAX);
SyntaxError(BotServ, u, "INFO", BOT_INFO_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_INFO);
u->SendMessage(BotServ, BOT_HELP_CMD_INFO);
}
};
+54 -54
View File
@@ -31,15 +31,15 @@ class CommandBSKick : public Command
ChannelInfo *ci = cs_findchan(chan);
if (readonly)
notice_lang(Config->s_BotServ, u, BOT_KICK_DISABLED);
u->SendMessage(BotServ, BOT_KICK_DISABLED);
else if (chan.empty() || option.empty() || value.empty())
syntax_error(Config->s_BotServ, u, "KICK", BOT_KICK_SYNTAX);
SyntaxError(BotServ, u, "KICK", BOT_KICK_SYNTAX);
else if (!value.equals_ci("ON") && !value.equals_ci("OFF"))
syntax_error(Config->s_BotServ, u, "KICK", BOT_KICK_SYNTAX);
SyntaxError(BotServ, u, "KICK", BOT_KICK_SYNTAX);
else if (!check_access(u, ci, CA_SET) && !u->Account()->HasPriv("botserv/administration"))
notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
u->SendMessage(BotServ, ACCESS_DENIED);
else if (!ci->bi)
notice_help(Config->s_BotServ, u, BOT_NOT_ASSIGNED);
u->SendMessage(BotServ, BOT_NOT_ASSIGNED);
else
{
bool override = !check_access(u, ci, CA_SET);
@@ -60,7 +60,7 @@ class CommandBSKick : public Command
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_BADWORDS];
/* reset the value back to 0 - TSL */
ci->ttb[TTB_BADWORDS] = 0;
notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -68,14 +68,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_BADWORDS] = 0;
ci->botflags.SetFlag(BS_KICK_BADWORDS);
if (ci->ttb[TTB_BADWORDS])
notice_lang(Config->s_BotServ, u, BOT_KICK_BADWORDS_ON_BAN, ci->ttb[TTB_BADWORDS]);
u->SendMessage(BotServ, BOT_KICK_BADWORDS_ON_BAN, ci->ttb[TTB_BADWORDS]);
else
notice_lang(Config->s_BotServ, u, BOT_KICK_BADWORDS_ON);
u->SendMessage(BotServ, BOT_KICK_BADWORDS_ON);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_BADWORDS);
notice_lang(Config->s_BotServ, u, BOT_KICK_BADWORDS_OFF);
u->SendMessage(BotServ, BOT_KICK_BADWORDS_OFF);
}
}
else if (option.equals_ci("BOLDS"))
@@ -90,7 +90,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_BOLDS];
ci->ttb[TTB_BOLDS] = 0;
notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -98,14 +98,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_BOLDS] = 0;
ci->botflags.SetFlag(BS_KICK_BOLDS);
if (ci->ttb[TTB_BOLDS])
notice_lang(Config->s_BotServ, u, BOT_KICK_BOLDS_ON_BAN, ci->ttb[TTB_BOLDS]);
u->SendMessage(BotServ, BOT_KICK_BOLDS_ON_BAN, ci->ttb[TTB_BOLDS]);
else
notice_lang(Config->s_BotServ, u, BOT_KICK_BOLDS_ON);
u->SendMessage(BotServ, BOT_KICK_BOLDS_ON);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_BOLDS);
notice_lang(Config->s_BotServ, u, BOT_KICK_BOLDS_OFF);
u->SendMessage(BotServ, BOT_KICK_BOLDS_OFF);
}
}
else if (option.equals_ci("CAPS"))
@@ -123,7 +123,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_CAPS];
ci->ttb[TTB_CAPS] = 0;
notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -146,14 +146,14 @@ class CommandBSKick : public Command
ci->botflags.SetFlag(BS_KICK_CAPS);
if (ci->ttb[TTB_CAPS])
notice_lang(Config->s_BotServ, u, BOT_KICK_CAPS_ON_BAN, ci->capsmin, ci->capspercent, ci->ttb[TTB_CAPS]);
u->SendMessage(BotServ, BOT_KICK_CAPS_ON_BAN, ci->capsmin, ci->capspercent, ci->ttb[TTB_CAPS]);
else
notice_lang(Config->s_BotServ, u, BOT_KICK_CAPS_ON, ci->capsmin, ci->capspercent);
u->SendMessage(BotServ, BOT_KICK_CAPS_ON, ci->capsmin, ci->capspercent);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_CAPS);
notice_lang(Config->s_BotServ, u, BOT_KICK_CAPS_OFF);
u->SendMessage(BotServ, BOT_KICK_CAPS_OFF);
}
}
else if (option.equals_ci("COLORS"))
@@ -168,7 +168,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_COLORS];
ci->ttb[TTB_COLORS] = 0;
notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -176,14 +176,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_COLORS] = 0;
ci->botflags.SetFlag(BS_KICK_COLORS);
if (ci->ttb[TTB_COLORS])
notice_lang(Config->s_BotServ, u, BOT_KICK_COLORS_ON_BAN, ci->ttb[TTB_COLORS]);
u->SendMessage(BotServ, BOT_KICK_COLORS_ON_BAN, ci->ttb[TTB_COLORS]);
else
notice_lang(Config->s_BotServ, u, BOT_KICK_COLORS_ON);
u->SendMessage(BotServ, BOT_KICK_COLORS_ON);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_COLORS);
notice_lang(Config->s_BotServ, u, BOT_KICK_COLORS_OFF);
u->SendMessage(BotServ, BOT_KICK_COLORS_OFF);
}
}
else if (option.equals_ci("FLOOD"))
@@ -201,7 +201,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_FLOOD];
ci->ttb[TTB_FLOOD] = 0;
notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -224,14 +224,14 @@ class CommandBSKick : public Command
ci->botflags.SetFlag(BS_KICK_FLOOD);
if (ci->ttb[TTB_FLOOD])
notice_lang(Config->s_BotServ, u, BOT_KICK_FLOOD_ON_BAN, ci->floodlines, ci->floodsecs, ci->ttb[TTB_FLOOD]);
u->SendMessage(BotServ, BOT_KICK_FLOOD_ON_BAN, ci->floodlines, ci->floodsecs, ci->ttb[TTB_FLOOD]);
else
notice_lang(Config->s_BotServ, u, BOT_KICK_FLOOD_ON, ci->floodlines, ci->floodsecs);
u->SendMessage(BotServ, BOT_KICK_FLOOD_ON, ci->floodlines, ci->floodsecs);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_FLOOD);
notice_lang(Config->s_BotServ, u, BOT_KICK_FLOOD_OFF);
u->SendMessage(BotServ, BOT_KICK_FLOOD_OFF);
}
}
else if (option.equals_ci("REPEAT"))
@@ -248,7 +248,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_REPEAT];
ci->ttb[TTB_REPEAT] = 0;
notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -264,14 +264,14 @@ class CommandBSKick : public Command
ci->botflags.SetFlag(BS_KICK_REPEAT);
if (ci->ttb[TTB_REPEAT])
notice_lang(Config->s_BotServ, u, BOT_KICK_REPEAT_ON_BAN, ci->repeattimes, ci->ttb[TTB_REPEAT]);
u->SendMessage(BotServ, BOT_KICK_REPEAT_ON_BAN, ci->repeattimes, ci->ttb[TTB_REPEAT]);
else
notice_lang(Config->s_BotServ, u, BOT_KICK_REPEAT_ON, ci->repeattimes);
u->SendMessage(BotServ, BOT_KICK_REPEAT_ON, ci->repeattimes);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_REPEAT);
notice_lang(Config->s_BotServ, u, BOT_KICK_REPEAT_OFF);
u->SendMessage(BotServ, BOT_KICK_REPEAT_OFF);
}
}
else if (option.equals_ci("REVERSES"))
@@ -286,7 +286,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_REVERSES];
ci->ttb[TTB_REVERSES] = 0;
notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -294,14 +294,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_REVERSES] = 0;
ci->botflags.SetFlag(BS_KICK_REVERSES);
if (ci->ttb[TTB_REVERSES])
notice_lang(Config->s_BotServ, u, BOT_KICK_REVERSES_ON_BAN, ci->ttb[TTB_REVERSES]);
u->SendMessage(BotServ, BOT_KICK_REVERSES_ON_BAN, ci->ttb[TTB_REVERSES]);
else
notice_lang(Config->s_BotServ, u, BOT_KICK_REVERSES_ON);
u->SendMessage(BotServ, BOT_KICK_REVERSES_ON);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_REVERSES);
notice_lang(Config->s_BotServ, u, BOT_KICK_REVERSES_OFF);
u->SendMessage(BotServ, BOT_KICK_REVERSES_OFF);
}
}
else if (option.equals_ci("UNDERLINES"))
@@ -316,7 +316,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_UNDERLINES];
ci->ttb[TTB_UNDERLINES] = 0;
notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -324,14 +324,14 @@ class CommandBSKick : public Command
ci->ttb[TTB_UNDERLINES] = 0;
ci->botflags.SetFlag(BS_KICK_UNDERLINES);
if (ci->ttb[TTB_UNDERLINES])
notice_lang(Config->s_BotServ, u, BOT_KICK_UNDERLINES_ON_BAN, ci->ttb[TTB_UNDERLINES]);
u->SendMessage(BotServ, BOT_KICK_UNDERLINES_ON_BAN, ci->ttb[TTB_UNDERLINES]);
else
notice_lang(Config->s_BotServ, u, BOT_KICK_UNDERLINES_ON);
u->SendMessage(BotServ, BOT_KICK_UNDERLINES_ON);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_UNDERLINES);
notice_lang(Config->s_BotServ, u, BOT_KICK_UNDERLINES_OFF);
u->SendMessage(BotServ, BOT_KICK_UNDERLINES_OFF);
}
}
else if (option.equals_ci("ITALICS"))
@@ -346,7 +346,7 @@ class CommandBSKick : public Command
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_ITALICS];
ci->ttb[TTB_ITALICS] = 0;
notice_lang(Config->s_BotServ, u, BOT_KICK_BAD_TTB, ttb.c_str());
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
}
}
@@ -354,18 +354,18 @@ class CommandBSKick : public Command
ci->ttb[TTB_ITALICS] = 0;
ci->botflags.SetFlag(BS_KICK_ITALICS);
if (ci->ttb[TTB_ITALICS])
notice_lang(Config->s_BotServ, u, BOT_KICK_ITALICS_ON_BAN, ci->ttb[TTB_ITALICS]);
u->SendMessage(BotServ, BOT_KICK_ITALICS_ON_BAN, ci->ttb[TTB_ITALICS]);
else
notice_lang(Config->s_BotServ, u, BOT_KICK_ITALICS_ON);
u->SendMessage(BotServ, BOT_KICK_ITALICS_ON);
}
else
{
ci->botflags.UnsetFlag(BS_KICK_ITALICS);
notice_lang(Config->s_BotServ, u, BOT_KICK_ITALICS_OFF);
u->SendMessage(BotServ, BOT_KICK_ITALICS_OFF);
}
}
else
notice_help(Config->s_BotServ, u, BOT_KICK_UNKNOWN, option.c_str());
u->SendMessage(BotServ, BOT_KICK_UNKNOWN, option.c_str());
}
return MOD_CONT;
}
@@ -373,25 +373,25 @@ class CommandBSKick : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
if (subcommand.empty())
notice_help(Config->s_BotServ, u, BOT_HELP_KICK);
u->SendMessage(BotServ, BOT_HELP_KICK);
else if (subcommand.equals_ci("BADWORDS"))
notice_help(Config->s_BotServ, u, BOT_HELP_KICK_BADWORDS);
u->SendMessage(BotServ, BOT_HELP_KICK_BADWORDS);
else if (subcommand.equals_ci("BOLDS"))
notice_help(Config->s_BotServ, u, BOT_HELP_KICK_BOLDS);
u->SendMessage(BotServ, BOT_HELP_KICK_BOLDS);
else if (subcommand.equals_ci("CAPS"))
notice_help(Config->s_BotServ, u, BOT_HELP_KICK_CAPS);
u->SendMessage(BotServ, BOT_HELP_KICK_CAPS);
else if (subcommand.equals_ci("COLORS"))
notice_help(Config->s_BotServ, u, BOT_HELP_KICK_COLORS);
u->SendMessage(BotServ, BOT_HELP_KICK_COLORS);
else if (subcommand.equals_ci("FLOOD"))
notice_help(Config->s_BotServ, u, BOT_HELP_KICK_FLOOD);
u->SendMessage(BotServ, BOT_HELP_KICK_FLOOD);
else if (subcommand.equals_ci("REPEAT"))
notice_help(Config->s_BotServ, u, BOT_HELP_KICK_REPEAT);
u->SendMessage(BotServ, BOT_HELP_KICK_REPEAT);
else if (subcommand.equals_ci("REVERSES"))
notice_help(Config->s_BotServ, u, BOT_HELP_KICK_REVERSES);
u->SendMessage(BotServ, BOT_HELP_KICK_REVERSES);
else if (subcommand.equals_ci("UNDERLINES"))
notice_help(Config->s_BotServ, u, BOT_HELP_KICK_UNDERLINES);
u->SendMessage(BotServ, BOT_HELP_KICK_UNDERLINES);
else if (subcommand.equals_ci("ITALICS"))
notice_help(Config->s_BotServ, u, BOT_HELP_KICK_ITALICS);
u->SendMessage(BotServ, BOT_HELP_KICK_ITALICS);
else
return false;
@@ -400,12 +400,12 @@ class CommandBSKick : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_BotServ, u, "KICK", BOT_KICK_SYNTAX);
SyntaxError(BotServ, u, "KICK", BOT_KICK_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_KICK);
u->SendMessage(BotServ, BOT_HELP_CMD_KICK);
}
};
+6 -6
View File
@@ -31,19 +31,19 @@ class CommandBSSay : public Command
if (!check_access(u, ci, CA_SAY))
{
notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
u->SendMessage(BotServ, ACCESS_DENIED);
return MOD_CONT;
}
if (!ci->bi)
{
notice_help(Config->s_BotServ, u, BOT_NOT_ASSIGNED);
u->SendMessage(BotServ, BOT_NOT_ASSIGNED);
return MOD_CONT;
}
if (!ci->c || !ci->c->FindUser(ci->bi))
{
notice_lang(Config->s_BotServ, u, BOT_NOT_ON_CHANNEL, ci->name.c_str());
u->SendMessage(BotServ, BOT_NOT_ON_CHANNEL, ci->name.c_str());
return MOD_CONT;
}
@@ -64,18 +64,18 @@ class CommandBSSay : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_BotServ, u, BOT_HELP_SAY);
u->SendMessage(BotServ, BOT_HELP_SAY);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_BotServ, u, "SAY", BOT_SAY_SYNTAX);
SyntaxError(BotServ, u, "SAY", BOT_SAY_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_SAY);
u->SendMessage(BotServ, BOT_HELP_CMD_SAY);
}
};
+37 -37
View File
@@ -30,7 +30,7 @@ class CommandBSSet : public Command
if (readonly)
{
notice_lang(Config->s_BotServ, u, BOT_SET_DISABLED);
u->SendMessage(BotServ, BOT_SET_DISABLED);
return MOD_CONT;
}
@@ -40,28 +40,28 @@ class CommandBSSet : public Command
if (!(bi = findbot(chan)))
{
notice_lang(Config->s_BotServ, u, BOT_DOES_NOT_EXIST, chan.c_str());
u->SendMessage(BotServ, BOT_DOES_NOT_EXIST, chan.c_str());
return MOD_CONT;
}
if (value.equals_ci("ON"))
{
bi->SetFlag(BI_PRIVATE);
notice_lang(Config->s_BotServ, u, BOT_SET_PRIVATE_ON, bi->nick.c_str());
u->SendMessage(BotServ, BOT_SET_PRIVATE_ON, bi->nick.c_str());
}
else if (value.equals_ci("OFF"))
{
bi->UnsetFlag(BI_PRIVATE);
notice_lang(Config->s_BotServ, u, BOT_SET_PRIVATE_OFF, bi->nick.c_str());
u->SendMessage(BotServ, BOT_SET_PRIVATE_OFF, bi->nick.c_str());
}
else
syntax_error(Config->s_BotServ, u, "SET PRIVATE", BOT_SET_PRIVATE_SYNTAX);
SyntaxError(BotServ, u, "SET PRIVATE", BOT_SET_PRIVATE_SYNTAX);
return MOD_CONT;
}
else if (!(ci = cs_findchan(chan)))
notice_lang(Config->s_BotServ, u, CHAN_X_NOT_REGISTERED, chan.c_str());
u->SendMessage(BotServ, CHAN_X_NOT_REGISTERED, chan.c_str());
else if (!u->Account()->HasPriv("botserv/administration") && !check_access(u, ci, CA_SET))
notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
u->SendMessage(BotServ, ACCESS_DENIED);
else
{
bool override = !check_access(u, ci, CA_SET);
@@ -72,60 +72,60 @@ class CommandBSSet : public Command
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_DONTKICKOPS);
notice_lang(Config->s_BotServ, u, BOT_SET_DONTKICKOPS_ON, ci->name.c_str());
u->SendMessage(BotServ, BOT_SET_DONTKICKOPS_ON, ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_DONTKICKOPS);
notice_lang(Config->s_BotServ, u, BOT_SET_DONTKICKOPS_OFF, ci->name.c_str());
u->SendMessage(BotServ, BOT_SET_DONTKICKOPS_OFF, ci->name.c_str());
}
else
syntax_error(Config->s_BotServ, u, "SET DONTKICKOPS", BOT_SET_DONTKICKOPS_SYNTAX);
SyntaxError(BotServ, u, "SET DONTKICKOPS", BOT_SET_DONTKICKOPS_SYNTAX);
}
else if (option.equals_ci("DONTKICKVOICES"))
{
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_DONTKICKVOICES);
notice_lang(Config->s_BotServ, u, BOT_SET_DONTKICKVOICES_ON, ci->name.c_str());
u->SendMessage(BotServ, BOT_SET_DONTKICKVOICES_ON, ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_DONTKICKVOICES);
notice_lang(Config->s_BotServ, u, BOT_SET_DONTKICKVOICES_OFF, ci->name.c_str());
u->SendMessage(BotServ, BOT_SET_DONTKICKVOICES_OFF, ci->name.c_str());
}
else
syntax_error(Config->s_BotServ, u, "SET DONTKICKVOICES", BOT_SET_DONTKICKVOICES_SYNTAX);
SyntaxError(BotServ, u, "SET DONTKICKVOICES", BOT_SET_DONTKICKVOICES_SYNTAX);
}
else if (option.equals_ci("FANTASY"))
{
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_FANTASY);
notice_lang(Config->s_BotServ, u, BOT_SET_FANTASY_ON, ci->name.c_str());
u->SendMessage(BotServ, BOT_SET_FANTASY_ON, ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_FANTASY);
notice_lang(Config->s_BotServ, u, BOT_SET_FANTASY_OFF, ci->name.c_str());
u->SendMessage(BotServ, BOT_SET_FANTASY_OFF, ci->name.c_str());
}
else
syntax_error(Config->s_BotServ, u, "SET FANTASY", BOT_SET_FANTASY_SYNTAX);
SyntaxError(BotServ, u, "SET FANTASY", BOT_SET_FANTASY_SYNTAX);
}
else if (option.equals_ci("GREET"))
{
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_GREET);
notice_lang(Config->s_BotServ, u, BOT_SET_GREET_ON, ci->name.c_str());
u->SendMessage(BotServ, BOT_SET_GREET_ON, ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_GREET);
notice_lang(Config->s_BotServ, u, BOT_SET_GREET_OFF, ci->name.c_str());
u->SendMessage(BotServ, BOT_SET_GREET_OFF, ci->name.c_str());
}
else
syntax_error(Config->s_BotServ, u, "SET GREET", BOT_SET_GREET_SYNTAX);
SyntaxError(BotServ, u, "SET GREET", BOT_SET_GREET_SYNTAX);
}
else if (u->Account()->HasCommand("botserv/set/nobot") && option.equals_ci("NOBOT"))
{
@@ -134,33 +134,33 @@ class CommandBSSet : public Command
ci->botflags.SetFlag(BS_NOBOT);
if (ci->bi)
ci->bi->UnAssign(u, ci);
notice_lang(Config->s_BotServ, u, BOT_SET_NOBOT_ON, ci->name.c_str());
u->SendMessage(BotServ, BOT_SET_NOBOT_ON, ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_NOBOT);
notice_lang(Config->s_BotServ, u, BOT_SET_NOBOT_OFF, ci->name.c_str());
u->SendMessage(BotServ, BOT_SET_NOBOT_OFF, ci->name.c_str());
}
else
syntax_error(Config->s_BotServ, u, "SET NOBOT", BOT_SET_NOBOT_SYNTAX);
SyntaxError(BotServ, u, "SET NOBOT", BOT_SET_NOBOT_SYNTAX);
}
else if (option.equals_ci("SYMBIOSIS"))
{
if (value.equals_ci("ON"))
{
ci->botflags.SetFlag(BS_SYMBIOSIS);
notice_lang(Config->s_BotServ, u, BOT_SET_SYMBIOSIS_ON, ci->name.c_str());
u->SendMessage(BotServ, BOT_SET_SYMBIOSIS_ON, ci->name.c_str());
}
else if (value.equals_ci("OFF"))
{
ci->botflags.UnsetFlag(BS_SYMBIOSIS);
notice_lang(Config->s_BotServ, u, BOT_SET_SYMBIOSIS_OFF, ci->name.c_str());
u->SendMessage(BotServ, BOT_SET_SYMBIOSIS_OFF, ci->name.c_str());
}
else
syntax_error(Config->s_BotServ, u, "SET SYMBIOSIS", BOT_SET_SYMBIOSIS_SYNTAX);
SyntaxError(BotServ, u, "SET SYMBIOSIS", BOT_SET_SYMBIOSIS_SYNTAX);
}
else
notice_help(Config->s_BotServ, u, BOT_SET_UNKNOWN, option.c_str());
u->SendMessage(BotServ, BOT_SET_UNKNOWN, option.c_str());
}
return MOD_CONT;
}
@@ -169,24 +169,24 @@ class CommandBSSet : public Command
{
if (subcommand.empty())
{
notice_help(Config->s_BotServ, u, BOT_HELP_SET);
u->SendMessage(BotServ, BOT_HELP_SET);
if (u->Account() && u->Account()->IsServicesOper())
notice_help(Config->s_BotServ, u, BOT_SERVADMIN_HELP_SET);
u->SendMessage(BotServ, BOT_SERVADMIN_HELP_SET);
}
else if (subcommand.equals_ci("DONTKICKOPS"))
notice_help(Config->s_BotServ, u, BOT_HELP_SET_DONTKICKOPS);
u->SendMessage(BotServ, BOT_HELP_SET_DONTKICKOPS);
else if (subcommand.equals_ci("DONTKICKVOICES"))
notice_help(Config->s_BotServ, u, BOT_HELP_SET_DONTKICKVOICES);
u->SendMessage(BotServ, BOT_HELP_SET_DONTKICKVOICES);
else if (subcommand.equals_ci("FANTASY"))
notice_help(Config->s_BotServ, u, BOT_HELP_SET_FANTASY);
u->SendMessage(BotServ, BOT_HELP_SET_FANTASY);
else if (subcommand.equals_ci("GREET"))
notice_help(Config->s_BotServ, u, BOT_HELP_SET_GREET);
u->SendMessage(BotServ, BOT_HELP_SET_GREET);
else if (subcommand.equals_ci("SYMBIOSIS"))
notice_lang(Config->s_BotServ, u, BOT_HELP_SET_SYMBIOSIS, Config->s_ChanServ.c_str());
u->SendMessage(BotServ, BOT_HELP_SET_SYMBIOSIS, Config->s_ChanServ.c_str());
else if (subcommand.equals_ci("NOBOT"))
notice_lang(Config->s_BotServ, u, BOT_SERVADMIN_HELP_SET_NOBOT);
u->SendMessage(BotServ, BOT_SERVADMIN_HELP_SET_NOBOT);
else if (subcommand.equals_ci("PRIVATE"))
notice_lang(Config->s_BotServ, u, BOT_SERVADMIN_HELP_SET_PRIVATE);
u->SendMessage(BotServ, BOT_SERVADMIN_HELP_SET_PRIVATE);
else
return false;
@@ -195,12 +195,12 @@ class CommandBSSet : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_BotServ, u, "SET", BOT_SET_SYNTAX);
SyntaxError(BotServ, u, "SET", BOT_SET_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_SET);
u->SendMessage(BotServ, BOT_HELP_CMD_SET);
}
};
+8 -8
View File
@@ -27,38 +27,38 @@ class CommandBSUnassign : public Command
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_PERM);
if (readonly)
notice_lang(Config->s_BotServ, u, BOT_ASSIGN_READONLY);
u->SendMessage(BotServ, BOT_ASSIGN_READONLY);
else if (!u->Account()->HasPriv("botserv/administration") && !check_access(u, ci, CA_ASSIGN))
notice_lang(Config->s_BotServ, u, ACCESS_DENIED);
u->SendMessage(BotServ, ACCESS_DENIED);
else if (!ci->bi)
notice_help(Config->s_BotServ, u, BOT_NOT_ASSIGNED);
u->SendMessage(BotServ, BOT_NOT_ASSIGNED);
else if (ci->HasFlag(CI_PERSIST) && !cm)
notice_help(Config->s_BotServ, u, BOT_UNASSIGN_PERSISTANT_CHAN);
u->SendMessage(BotServ, BOT_UNASSIGN_PERSISTANT_CHAN);
else
{
bool override = !check_access(u, ci, CA_ASSIGN);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "for " << ci->bi->nick;
ci->bi->UnAssign(u, ci);
notice_lang(Config->s_BotServ, u, BOT_UNASSIGN_UNASSIGNED, ci->name.c_str());
u->SendMessage(BotServ, BOT_UNASSIGN_UNASSIGNED, ci->name.c_str());
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_BotServ, u, BOT_HELP_UNASSIGN);
u->SendMessage(BotServ, BOT_HELP_UNASSIGN);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_BotServ, u, "UNASSIGN", BOT_UNASSIGN_SYNTAX);
SyntaxError(BotServ, u, "UNASSIGN", BOT_UNASSIGN_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_BotServ, u, BOT_HELP_CMD_UNASSIGN);
u->SendMessage(BotServ, BOT_HELP_CMD_UNASSIGN);
}
};
+81 -71
View File
@@ -27,9 +27,9 @@ class AccessListCallback : public NumberList
~AccessListCallback()
{
if (SentHeader)
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
else
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
}
virtual void HandleNumber(unsigned Number)
@@ -40,7 +40,7 @@ class AccessListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
}
DoList(u, ci, Number - 1, ci->GetAccess(Number - 1));
@@ -51,10 +51,10 @@ class AccessListCallback : public NumberList
if (ci->HasFlag(CI_XOP))
{
Anope::string xop = get_xop_level(access->level);
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_XOP_FORMAT, Number + 1, xop.c_str(), access->nc->display.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_LIST_XOP_FORMAT, Number + 1, xop.c_str(), access->nc->display.c_str());
}
else
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_AXS_FORMAT, Number + 1, access->level, access->nc->display.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_LIST_AXS_FORMAT, Number + 1, access->level, access->nc->display.c_str());
}
};
@@ -73,7 +73,7 @@ class AccessViewCallback : public AccessListCallback
if (!SentHeader)
{
SentHeader = true;
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
}
DoList(u, ci, Number - 1, ci->GetAccess(Number - 1));
@@ -81,26 +81,21 @@ class AccessViewCallback : public AccessListCallback
static void DoList(User *u, ChannelInfo *ci, unsigned Number, ChanAccess *access)
{
char timebuf[64] = "";
struct tm tm;
Anope::string timebuf;
if (ci->c && u->Account() && nc_on_chan(ci->c, u->Account()))
snprintf(timebuf, sizeof(timebuf), "Now");
timebuf = "Now";
else if (access->last_seen == 0)
snprintf(timebuf, sizeof(timebuf), "Never");
timebuf = "Never";
else
{
tm = *localtime(&access->last_seen);
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_DATE_TIME_FORMAT, &tm);
}
timebuf = do_strftime(access->last_seen);
if (ci->HasFlag(CI_XOP))
{
Anope::string xop = get_xop_level(access->level);
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_VIEW_XOP_FORMAT, Number + 1, xop.c_str(), access->nc->display.c_str(), access->creator.c_str(), timebuf);
u->SendMessage(ChanServ, CHAN_ACCESS_VIEW_XOP_FORMAT, Number + 1, xop.c_str(), access->nc->display.c_str(), access->creator.c_str(), timebuf.c_str());
}
else
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_VIEW_AXS_FORMAT, Number + 1, access->level, access->nc->display.c_str(), access->creator.c_str(), timebuf);
u->SendMessage(ChanServ, CHAN_ACCESS_VIEW_AXS_FORMAT, Number + 1, access->level, access->nc->display.c_str(), access->creator.c_str(), timebuf.c_str());
}
};
@@ -123,17 +118,17 @@ class AccessDelCallback : public NumberList
~AccessDelCallback()
{
if (Denied && !Deleted)
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else if (!Deleted)
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
else
{
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, c, ci) << "for user" << (Deleted == 1 ? " " : "s ") << Nicks;
if (Deleted == 1)
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_DELETED_ONE, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_DELETED_ONE, ci->name.c_str());
else
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_DELETED_SEVERAL, Deleted, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_DELETED_SEVERAL, Deleted, ci->name.c_str());
}
}
@@ -172,18 +167,18 @@ class CommandCSAccess : public Command
if (level >= ulev && !u->Account()->HasPriv("chanserv/access/modify"))
{
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
return MOD_CONT;
}
if (!level)
{
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LEVEL_NONZERO);
u->SendMessage(ChanServ, CHAN_ACCESS_LEVEL_NONZERO);
return MOD_CONT;
}
else if (level <= ACCESS_INVALID || level >= ACCESS_FOUNDER)
{
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LEVEL_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
u->SendMessage(ChanServ, CHAN_ACCESS_LEVEL_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
return MOD_CONT;
}
@@ -192,12 +187,12 @@ class CommandCSAccess : public Command
NickAlias *na = findnick(nick);
if (!na)
{
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_NICKS_ONLY);
u->SendMessage(ChanServ, CHAN_ACCESS_NICKS_ONLY);
return MOD_CONT;
}
else if (na->HasFlag(NS_FORBIDDEN))
{
notice_lang(Config->s_ChanServ, u, NICK_X_FORBIDDEN, nick.c_str());
u->SendMessage(ChanServ, NICK_X_FORBIDDEN, nick.c_str());
return MOD_CONT;
}
@@ -208,12 +203,12 @@ class CommandCSAccess : public Command
/* Don't allow lowering from a level >= ulev */
if (access->level >= ulev && !u->Account()->HasPriv("chanserv/access/modify"))
{
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
return MOD_CONT;
}
if (access->level == level)
{
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LEVEL_UNCHANGED, access->nc->display.c_str(), ci->name.c_str(), level);
u->SendMessage(ChanServ, CHAN_ACCESS_LEVEL_UNCHANGED, access->nc->display.c_str(), ci->name.c_str(), level);
return MOD_CONT;
}
access->level = level;
@@ -221,13 +216,13 @@ class CommandCSAccess : public Command
FOREACH_MOD(I_OnAccessChange, OnAccessChange(ci, u, na->nc, level));
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "ADD " << na->nick << " (group: " << nc->display << ") (level: " << level << ") as level " << ulev;
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LEVEL_CHANGED, nc->display.c_str(), ci->name.c_str(), level);
u->SendMessage(ChanServ, CHAN_ACCESS_LEVEL_CHANGED, nc->display.c_str(), ci->name.c_str(), level);
return MOD_CONT;
}
if (ci->GetAccessCount() >= Config->CSAccessMax)
{
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_REACHED_LIMIT, Config->CSAccessMax);
u->SendMessage(ChanServ, CHAN_ACCESS_REACHED_LIMIT, Config->CSAccessMax);
return MOD_CONT;
}
@@ -236,7 +231,7 @@ class CommandCSAccess : public Command
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, u, nc, level));
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "ADD " << na->nick << " (group: " << nc->display << ") (level: " << level << ") as level " << ulev;
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_ADDED, nc->display.c_str(), ci->name.c_str(), level);
u->SendMessage(ChanServ, CHAN_ACCESS_ADDED, nc->display.c_str(), ci->name.c_str(), level);
return MOD_CONT;
}
@@ -246,7 +241,7 @@ class CommandCSAccess : public Command
Anope::string nick = params[2];
if (!ci->GetAccessCount())
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
else if (isdigit(nick[0]) && nick.find_first_not_of("1234567890,-") == Anope::string::npos)
{
AccessDelCallback list(u, ci, this, nick);
@@ -257,7 +252,7 @@ class CommandCSAccess : public Command
NickAlias *na = findnick(nick);
if (!na)
{
notice_lang(Config->s_ChanServ, u, NICK_X_NOT_REGISTERED, nick.c_str());
u->SendMessage(ChanServ, NICK_X_NOT_REGISTERED, nick.c_str());
return MOD_CONT;
}
@@ -274,12 +269,12 @@ class CommandCSAccess : public Command
}
if (i == end)
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_NOT_FOUND, nick.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_NOT_FOUND, nick.c_str(), ci->name.c_str());
else if (get_access(u, ci) <= access->level && !u->Account()->HasPriv("chanserv/access/modify"))
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else
{
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_DELETED, access->nc->display.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_DELETED, access->nc->display.c_str(), ci->name.c_str());
bool override = !check_access(u, ci, CA_ACCESS_CHANGE);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "DEL " << na->nick << " (group: " << access->nc->display << ") from level " << access->level;
@@ -297,7 +292,7 @@ class CommandCSAccess : public Command
Anope::string nick = params.size() > 2 ? params[2] : "";
if (!ci->GetAccessCount())
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
else if (!nick.empty() && nick.find_first_not_of("1234567890,-") == Anope::string::npos)
{
AccessListCallback list(u, ci, nick);
@@ -317,16 +312,16 @@ class CommandCSAccess : public Command
if (!SentHeader)
{
SentHeader = true;
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
}
AccessListCallback::DoList(u, ci, i, access);
}
if (SentHeader)
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
else
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
}
return MOD_CONT;
@@ -337,7 +332,7 @@ class CommandCSAccess : public Command
Anope::string nick = params.size() > 2 ? params[2] : "";
if (!ci->GetAccessCount())
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_LIST_EMPTY, ci->name.c_str());
else if (!nick.empty() && nick.find_first_not_of("1234567890,-") == Anope::string::npos)
{
AccessViewCallback list(u, ci, nick);
@@ -357,16 +352,16 @@ class CommandCSAccess : public Command
if (!SentHeader)
{
SentHeader = true;
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_LIST_HEADER, ci->name.c_str());
}
AccessViewCallback::DoList(u, ci, i, access);
}
if (SentHeader)
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_LIST_FOOTER, ci->name.c_str());
else
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_NO_MATCH, ci->name.c_str());
}
return MOD_CONT;
@@ -375,14 +370,14 @@ class CommandCSAccess : public Command
CommandReturn DoClear(User *u, ChannelInfo *ci)
{
if (!IsFounder(u, ci) && !u->Account()->HasPriv("chanserv/access/modify"))
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else
{
ci->ClearAccess();
FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, u));
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_CLEAR, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_CLEAR, ci->name.c_str());
bool override = !IsFounder(u, ci);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "CLEAR";
@@ -417,14 +412,14 @@ class CommandCSAccess : public Command
else if (ci->HasFlag(CI_XOP) && !is_list && !is_clear)
{
if (ModeManager::FindChannelModeByName(CMODE_HALFOP))
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_XOP_HOP, Config->s_ChanServ.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_XOP_HOP, Config->s_ChanServ.c_str());
else
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_XOP, Config->s_ChanServ.c_str());
u->SendMessage(ChanServ, CHAN_ACCESS_XOP, Config->s_ChanServ.c_str());
}
else if ((is_list && !check_access(u, ci, CA_ACCESS_LIST) && !u->Account()->HasCommand("chanserv/access/list")) || (!is_list && !check_access(u, ci, CA_ACCESS_CHANGE) && !u->Account()->HasPriv("chanserv/access/modify")))
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else if (readonly && (cmd.equals_ci("ADD") || cmd.equals_ci("DEL") || cmd.equals_ci("CLEAR")))
notice_lang(Config->s_ChanServ, u, CHAN_ACCESS_DISABLED);
u->SendMessage(ChanServ, CHAN_ACCESS_DISABLED);
else if (cmd.equals_ci("ADD"))
this->DoAdd(u, ci, params);
else if (cmd.equals_ci("DEL"))
@@ -443,14 +438,14 @@ class CommandCSAccess : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_ACCESS);
notice_help(Config->s_ChanServ, u, CHAN_HELP_ACCESS_LEVELS);
u->SendMessage(ChanServ, CHAN_HELP_ACCESS);
u->SendMessage(ChanServ, CHAN_HELP_ACCESS_LEVELS);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "ACCESS", CHAN_ACCESS_SYNTAX);
SyntaxError(ChanServ, u, "ACCESS", CHAN_ACCESS_SYNTAX);
}
};
@@ -475,7 +470,7 @@ class CommandCSLevels : public Command
if (!error.empty())
this->OnSyntaxError(u, "SET");
else if (level <= ACCESS_INVALID || level > ACCESS_FOUNDER)
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
u->SendMessage(ChanServ, CHAN_LEVELS_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
else
{
for (int i = 0; levelinfo[i].what >= 0; ++i)
@@ -489,14 +484,14 @@ class CommandCSLevels : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "SET " << levelinfo[i].name << " to " << level;
if (level == ACCESS_FOUNDER)
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_CHANGED_FOUNDER, levelinfo[i].name.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_LEVELS_CHANGED_FOUNDER, levelinfo[i].name.c_str(), ci->name.c_str());
else
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_CHANGED, levelinfo[i].name.c_str(), ci->name.c_str(), level);
u->SendMessage(ChanServ, CHAN_LEVELS_CHANGED, levelinfo[i].name.c_str(), ci->name.c_str(), level);
return MOD_CONT;
}
}
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_UNKNOWN, what.c_str(), Config->s_ChanServ.c_str());
u->SendMessage(ChanServ, CHAN_LEVELS_UNKNOWN, what.c_str(), Config->s_ChanServ.c_str());
}
return MOD_CONT;
@@ -518,19 +513,19 @@ class CommandCSLevels : public Command
bool override = !check_access(u, ci, CA_FOUNDER);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "DISABLE " << levelinfo[i].name;
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_DISABLED, levelinfo[i].name.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_LEVELS_DISABLED, levelinfo[i].name.c_str(), ci->name.c_str());
return MOD_CONT;
}
}
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_UNKNOWN, what.c_str(), Config->s_ChanServ.c_str());
u->SendMessage(ChanServ, CHAN_LEVELS_UNKNOWN, what.c_str(), Config->s_ChanServ.c_str());
return MOD_CONT;
}
CommandReturn DoList(User *u, ChannelInfo *ci)
{
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_LIST_HEADER, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_LEVELS_LIST_HEADER, ci->name.c_str());
if (!levelinfo_maxwidth)
for (int i = 0; levelinfo[i].what >= 0; ++i)
@@ -549,14 +544,14 @@ class CommandCSLevels : public Command
j = levelinfo[i].what;
if (j == CA_AUTOOP || j == CA_AUTODEOP || j == CA_AUTOVOICE || j == CA_NOJOIN)
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_LIST_DISABLED, levelinfo_maxwidth, levelinfo[i].name.c_str());
u->SendMessage(ChanServ, CHAN_LEVELS_LIST_DISABLED, levelinfo_maxwidth, levelinfo[i].name.c_str());
else
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_LIST_DISABLED, levelinfo_maxwidth, levelinfo[i].name.c_str());
u->SendMessage(ChanServ, CHAN_LEVELS_LIST_DISABLED, levelinfo_maxwidth, levelinfo[i].name.c_str());
}
else if (j == ACCESS_FOUNDER)
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_LIST_FOUNDER, levelinfo_maxwidth, levelinfo[i].name.c_str());
u->SendMessage(ChanServ, CHAN_LEVELS_LIST_FOUNDER, levelinfo_maxwidth, levelinfo[i].name.c_str());
else
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_LIST_NORMAL, levelinfo_maxwidth, levelinfo[i].name.c_str(), j);
u->SendMessage(ChanServ, CHAN_LEVELS_LIST_NORMAL, levelinfo_maxwidth, levelinfo[i].name.c_str(), j);
}
return MOD_CONT;
@@ -570,7 +565,7 @@ class CommandCSLevels : public Command
bool override = !check_access(u, ci, CA_FOUNDER);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "RESET";
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_RESET, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_LEVELS_RESET, ci->name.c_str());
return MOD_CONT;
}
@@ -594,9 +589,9 @@ class CommandCSLevels : public Command
if (cmd.equals_ci("SET") ? s.empty() : (cmd.substr(0, 3).equals_ci("DIS") ? (what.empty() || !s.empty()) : !what.empty()))
this->OnSyntaxError(u, cmd);
else if (ci->HasFlag(CI_XOP))
notice_lang(Config->s_ChanServ, u, CHAN_LEVELS_XOP);
u->SendMessage(ChanServ, CHAN_LEVELS_XOP);
else if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("chanserv/access/modify"))
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else if (cmd.equals_ci("SET"))
this->DoSet(u, ci, params);
else if (cmd.equals_ci("DIS") || cmd.equals_ci("DISABLE"))
@@ -613,19 +608,34 @@ class CommandCSLevels : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_LEVELS);
if (subcommand == "DESC")
{
int i;
u->SendMessage(ChanServ, CHAN_HELP_LEVELS_DESC);
if (!levelinfo_maxwidth)
for (i = 0; levelinfo[i].what >= 0; ++i)
{
int len = levelinfo[i].name.length();
if (len > levelinfo_maxwidth)
levelinfo_maxwidth = len;
}
for (i = 0; levelinfo[i].what >= 0; ++i)
u->SendMessage(ChanServ, CHAN_HELP_LEVELS_DESC_FORMAT, levelinfo_maxwidth, levelinfo[i].name.c_str(), GetString(u, levelinfo[i].desc).c_str());
}
else
u->SendMessage(ChanServ, CHAN_HELP_LEVELS);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "LEVELS", CHAN_LEVELS_SYNTAX);
SyntaxError(ChanServ, u, "LEVELS", CHAN_LEVELS_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_ACCESS);
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_LEVELS);
u->SendMessage(ChanServ, CHAN_HELP_CMD_ACCESS);
u->SendMessage(ChanServ, CHAN_HELP_CMD_LEVELS);
}
};
+43 -53
View File
@@ -65,7 +65,7 @@ class AkickListCallback : public NumberList
~AkickListCallback()
{
if (!SentHeader)
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NO_MATCH, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_NO_MATCH, ci->name.c_str());
}
virtual void HandleNumber(unsigned Number)
@@ -76,7 +76,7 @@ class AkickListCallback : public NumberList
if (!SentHeader)
{
SentHeader = true;
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
}
DoList(u, ci, Number - 1, ci->GetAkick(Number - 1));
@@ -84,7 +84,7 @@ class AkickListCallback : public NumberList
static void DoList(User *u, ChannelInfo *ci, unsigned index, AutoKick *akick)
{
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_FORMAT, index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() :akick->mask.c_str(), !akick->reason.empty() ? akick->reason.c_str() : getstring(u, NO_REASON));
u->SendMessage(ChanServ, CHAN_AKICK_LIST_FORMAT, index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() :akick->mask.c_str(), !akick->reason.empty() ? akick->reason.c_str() : GetString(u, NO_REASON).c_str());
}
};
@@ -103,7 +103,7 @@ class AkickViewCallback : public AkickListCallback
if (!SentHeader)
{
SentHeader = true;
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
}
DoList(u, ci, Number - 1, ci->GetAkick(Number - 1));
@@ -111,26 +111,16 @@ class AkickViewCallback : public AkickListCallback
static void DoList(User *u, ChannelInfo *ci, unsigned index, AutoKick *akick)
{
char timebuf[64] = "";
struct tm tm;
Anope::string timebuf;
if (akick->addtime)
{
tm = *localtime(&akick->addtime);
strftime_lang(timebuf, sizeof(timebuf), u, STRFTIME_SHORT_DATE_FORMAT, &tm);
}
timebuf = do_strftime(akick->addtime);
else
snprintf(timebuf, sizeof(timebuf), "%s", getstring(u, UNKNOWN));
timebuf = GetString(u, UNKNOWN);
notice_lang(Config->s_ChanServ, u, akick->HasFlag(AK_STUCK) ? CHAN_AKICK_VIEW_FORMAT_STUCK : CHAN_AKICK_VIEW_FORMAT, index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), !akick->creator.empty() ? akick->creator.c_str() : getstring(u, UNKNOWN), timebuf, !akick->reason.empty() ? akick->reason.c_str() : getstring(u, NO_REASON));
u->SendMessage(ChanServ, akick->HasFlag(AK_STUCK) ? CHAN_AKICK_VIEW_FORMAT_STUCK : CHAN_AKICK_VIEW_FORMAT, index + 1, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), !akick->creator.empty() ? akick->creator.c_str() : GetString(u, UNKNOWN).c_str(), timebuf.c_str(), !akick->reason.empty() ? akick->reason.c_str() : GetString(u, NO_REASON).c_str());
if (akick->last_used)
{
char last_used[64];
tm = *localtime(&akick->last_used);
strftime_lang(last_used, sizeof(last_used), u, STRFTIME_SHORT_DATE_FORMAT, &tm);
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LAST_USED, last_used);
}
u->SendMessage(ChanServ, CHAN_AKICK_LAST_USED, do_strftime(akick->last_used).c_str());
}
};
@@ -151,11 +141,11 @@ class AkickDelCallback : public NumberList
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, c, ci) << "DEL on " << Deleted << " users";
if (!Deleted)
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NO_MATCH, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_NO_MATCH, ci->name.c_str());
else if (Deleted == 1)
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_DELETED_ONE, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_DELETED_ONE, ci->name.c_str());
else
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_DELETED_SEVERAL, Deleted, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_DELETED_SEVERAL, Deleted, ci->name.c_str());
}
void HandleNumber(unsigned Number)
@@ -189,7 +179,7 @@ class CommandCSAKick : public Command
{
if (na->HasFlag(NS_FORBIDDEN))
{
notice_lang(Config->s_ChanServ, u, NICK_X_FORBIDDEN, mask.c_str());
u->SendMessage(ChanServ, NICK_X_FORBIDDEN, mask.c_str());
return;
}
@@ -199,7 +189,7 @@ class CommandCSAKick : public Command
/* Check excepts BEFORE we get this far */
if (ModeManager::FindChannelModeByName(CMODE_EXCEPT) && is_excepted_mask(ci, mask))
{
notice_lang(Config->s_ChanServ, u, CHAN_EXCEPTED, mask.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_EXCEPTED, mask.c_str(), ci->name.c_str());
return;
}
@@ -209,7 +199,7 @@ class CommandCSAKick : public Command
{
if (nc == ci->founder || get_access_level(ci, nc) >= get_access(u, ci))
{
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
return;
}
}
@@ -223,7 +213,7 @@ class CommandCSAKick : public Command
if ((check_access(u2, ci, CA_FOUNDER) || get_access(u2, ci) >= get_access(u, ci)) && match_usermask(mask, u2))
{
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
return;
}
}
@@ -242,7 +232,7 @@ class CommandCSAKick : public Command
Anope::string buf = na2->nick + "!" + na2->last_usermask;
if (Anope::Match(buf, mask))
{
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
return;
}
}
@@ -254,14 +244,14 @@ class CommandCSAKick : public Command
akick = ci->GetAkick(j);
if (akick->HasFlag(AK_ISNICK) ? akick->nc == nc : mask.equals_ci(akick->mask))
{
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_ALREADY_EXISTS, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_ALREADY_EXISTS, akick->HasFlag(AK_ISNICK) ? akick->nc->display.c_str() : akick->mask.c_str(), ci->name.c_str());
return;
}
}
if (ci->GetAkickCount() >= Config->CSAutokickMax)
{
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_REACHED_LIMIT, Config->CSAutokickMax);
u->SendMessage(ChanServ, CHAN_AKICK_REACHED_LIMIT, Config->CSAutokickMax);
return;
}
@@ -275,7 +265,7 @@ class CommandCSAKick : public Command
FOREACH_MOD(I_OnAkickAdd, OnAkickAdd(u, ci, akick));
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_ADDED, mask.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_ADDED, mask.c_str(), ci->name.c_str());
this->DoEnforce(u, ci);
}
@@ -290,7 +280,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
return;
}
@@ -309,7 +299,7 @@ class CommandCSAKick : public Command
if (i == end)
{
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
return;
}
@@ -317,7 +307,7 @@ class CommandCSAKick : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "STICK " << akick->mask;
akick->SetFlag(AK_STUCK);
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_STUCK, akick->mask.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_STUCK, akick->mask.c_str(), ci->name.c_str());
if (ci->c)
stick_mask(ci, akick);
@@ -333,7 +323,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
return;
}
@@ -352,7 +342,7 @@ class CommandCSAKick : public Command
if (i == end)
{
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
return;
}
@@ -360,7 +350,7 @@ class CommandCSAKick : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "UNSTICK " << akick->mask;
akick->UnsetFlag(AK_STUCK);
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_UNSTUCK, akick->mask.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_UNSTUCK, akick->mask.c_str(), ci->name.c_str());
}
void DoDel(User *u, ChannelInfo *ci, const std::vector<Anope::string> &params)
@@ -371,7 +361,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
return;
}
@@ -396,7 +386,7 @@ class CommandCSAKick : public Command
if (i == ci->GetAkickCount())
{
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_NOT_FOUND, mask.c_str(), ci->name.c_str());
return;
}
@@ -405,7 +395,7 @@ class CommandCSAKick : public Command
ci->EraseAkick(i);
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_DELETED, mask.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_DELETED, mask.c_str(), ci->name.c_str());
}
}
@@ -418,7 +408,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
return;
}
@@ -446,14 +436,14 @@ class CommandCSAKick : public Command
if (!SentHeader)
{
SentHeader = true;
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
}
AkickListCallback::DoList(u, ci, i, akick);
}
if (!SentHeader)
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NO_MATCH, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_NO_MATCH, ci->name.c_str());
}
}
@@ -466,7 +456,7 @@ class CommandCSAKick : public Command
if (!ci->GetAkickCount())
{
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_LIST_EMPTY, ci->name.c_str());
return;
}
@@ -494,14 +484,14 @@ class CommandCSAKick : public Command
if (!SentHeader)
{
SentHeader = true;
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_LIST_HEADER, ci->name.c_str());
}
AkickViewCallback::DoList(u, ci, i, akick);
}
if (!SentHeader)
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_NO_MATCH, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_NO_MATCH, ci->name.c_str());
}
}
@@ -512,7 +502,7 @@ class CommandCSAKick : public Command
if (!c)
{
notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, ci->name.c_str());
return;
}
@@ -527,7 +517,7 @@ class CommandCSAKick : public Command
bool override = !check_access(u, ci, CA_AKICK);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "ENFORCE, affects " << count << " users";
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_ENFORCE_DONE, ci->name.c_str(), count);
u->SendMessage(ChanServ, CHAN_AKICK_ENFORCE_DONE, ci->name.c_str(), count);
}
void DoClear(User *u, ChannelInfo *ci)
@@ -536,7 +526,7 @@ class CommandCSAKick : public Command
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "CLEAR";
ci->ClearAkick();
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_CLEAR, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_AKICK_CLEAR, ci->name.c_str());
}
public:
@@ -555,9 +545,9 @@ class CommandCSAKick : public Command
if (mask.empty() && (cmd.equals_ci("ADD") || cmd.equals_ci("STICK") || cmd.equals_ci("UNSTICK") || cmd.equals_ci("DEL")))
this->OnSyntaxError(u, cmd);
else if (!check_access(u, ci, CA_AKICK) && !u->Account()->HasPriv("chanserv/access/modify"))
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else if (!cmd.equals_ci("LIST") && !cmd.equals_ci("VIEW") && !cmd.equals_ci("ENFORCE") && readonly)
notice_lang(Config->s_ChanServ, u, CHAN_AKICK_DISABLED);
u->SendMessage(ChanServ, CHAN_AKICK_DISABLED);
else if (cmd.equals_ci("ADD"))
this->DoAdd(u, ci, params);
else if (cmd.equals_ci("STICK"))
@@ -582,18 +572,18 @@ class CommandCSAKick : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_AKICK);
u->SendMessage(ChanServ, CHAN_HELP_AKICK);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "AKICK", CHAN_AKICK_SYNTAX);
SyntaxError(ChanServ, u, "AKICK", CHAN_AKICK_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_AKICK);
u->SendMessage(ChanServ, CHAN_HELP_CMD_AKICK);
}
};
+9 -9
View File
@@ -38,21 +38,21 @@ class CommandCSBan : public Command
ci = c->ci;
if (!c)
notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, chan.c_str());
else if (is_same ? !(u2 = u) : !(u2 = finduser(target)))
notice_lang(Config->s_ChanServ, u, NICK_X_NOT_IN_USE, target.c_str());
u->SendMessage(ChanServ, NICK_X_NOT_IN_USE, target.c_str());
else if (!is_same ? !check_access(u, ci, CA_BAN) : !check_access(u, ci, CA_BANME))
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else if (!is_same && (ci->HasFlag(CI_PEACE)) && (get_access(u2, ci) >= get_access(u, ci)))
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
/*
* Dont ban/kick the user on channels where he is excepted
* to prevent services <-> server wars.
*/
else if (ModeManager::FindChannelModeByName(CMODE_EXCEPT) && is_excepted(ci, u2))
notice_lang(Config->s_ChanServ, u, CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
u->SendMessage(ChanServ, CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str());
else if (u2->IsProtected())
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else
{
Anope::string mask;
@@ -78,18 +78,18 @@ class CommandCSBan : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_BAN);
u->SendMessage(ChanServ, CHAN_HELP_BAN);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "BAN", CHAN_BAN_SYNTAX);
SyntaxError(ChanServ, u, "BAN", CHAN_BAN_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_BAN);
u->SendMessage(ChanServ, CHAN_HELP_CMD_BAN);
}
};
+12 -12
View File
@@ -39,33 +39,33 @@ class CommandCSClear : public Command
Log(LOG_COMMAND, u, this, ci) << what;
if (!c)
notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, chan.c_str());
else if (!check_access(u, ci, CA_CLEAR))
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else if (what.equals_ci("bans"))
{
c->ClearBans();
notice_lang(Config->s_ChanServ, u, CHAN_CLEARED_BANS, chan.c_str());
u->SendMessage(ChanServ, CHAN_CLEARED_BANS, chan.c_str());
}
else if (ModeManager::FindChannelModeByName(CMODE_EXCEPT) && what.equals_ci("excepts"))
{
c->ClearExcepts();
notice_lang(Config->s_ChanServ, u, CHAN_CLEARED_EXCEPTS, chan.c_str());
u->SendMessage(ChanServ, CHAN_CLEARED_EXCEPTS, chan.c_str());
}
else if (ModeManager::FindChannelModeByName(CMODE_INVITE) && what.equals_ci("invites"))
{
c->ClearInvites();
notice_lang(Config->s_ChanServ, u, CHAN_CLEARED_INVITES, chan.c_str());
u->SendMessage(ChanServ, CHAN_CLEARED_INVITES, chan.c_str());
}
else if (what.equals_ci("modes"))
{
c->ClearModes();
check_modes(c);
notice_lang(Config->s_ChanServ, u, CHAN_CLEARED_MODES, chan.c_str());
u->SendMessage(ChanServ, CHAN_CLEARED_MODES, chan.c_str());
}
else if (what.equals_ci("ops"))
{
@@ -105,7 +105,7 @@ class CommandCSClear : public Command
}
}
notice_lang(Config->s_ChanServ, u, CHAN_CLEARED_OPS, chan.c_str());
u->SendMessage(ChanServ, CHAN_CLEARED_OPS, chan.c_str());
}
else if ((halfop && what.equals_ci("hops")) || (voice && what.equals_ci("voices")))
{
@@ -139,28 +139,28 @@ class CommandCSClear : public Command
c->Kick(NULL, uc->user, "%s", buf.c_str());
}
notice_lang(Config->s_ChanServ, u, CHAN_CLEARED_USERS, chan.c_str());
u->SendMessage(ChanServ, CHAN_CLEARED_USERS, chan.c_str());
}
else
syntax_error(Config->s_ChanServ, u, "CLEAR", CHAN_CLEAR_SYNTAX);
SyntaxError(ChanServ, u, "CLEAR", CHAN_CLEAR_SYNTAX);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_CLEAR);
u->SendMessage(ChanServ, CHAN_HELP_CLEAR);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "CLEAR", CHAN_CLEAR_SYNTAX);
SyntaxError(ChanServ, u, "CLEAR", CHAN_CLEAR_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_CLEAR);
u->SendMessage(ChanServ, CHAN_HELP_CMD_CLEAR);
}
};
+9 -9
View File
@@ -29,7 +29,7 @@ class CommandCSDrop : public Command
if (readonly)
{
notice_lang(Config->s_ChanServ, u, CHAN_DROP_DISABLED); // XXX: READ_ONLY_MODE?
u->SendMessage(ChanServ, CHAN_DROP_DISABLED); // XXX: READ_ONLY_MODE?
return MOD_CONT;
}
@@ -37,19 +37,19 @@ class CommandCSDrop : public Command
if (ci->HasFlag(CI_FORBIDDEN) && !u->Account()->HasCommand("chanserv/drop"))
{
notice_lang(Config->s_ChanServ, u, CHAN_X_FORBIDDEN, chan.c_str());
u->SendMessage(ChanServ, CHAN_X_FORBIDDEN, chan.c_str());
return MOD_CONT;
}
if (ci->HasFlag(CI_SUSPENDED) && !u->Account()->HasCommand("chanserv/drop"))
{
notice_lang(Config->s_ChanServ, u, CHAN_X_FORBIDDEN, chan.c_str());
u->SendMessage(ChanServ, CHAN_X_FORBIDDEN, chan.c_str());
return MOD_CONT;
}
if ((ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER)) && !u->Account()->HasCommand("chanserv/drop"))
{
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
return MOD_CONT;
}
@@ -69,7 +69,7 @@ class CommandCSDrop : public Command
delete ci;
notice_lang(Config->s_ChanServ, u, CHAN_DROPPED, chan.c_str());
u->SendMessage(ChanServ, CHAN_DROPPED, chan.c_str());
FOREACH_MOD(I_OnChanDrop, OnChanDrop(chan));
@@ -79,21 +79,21 @@ class CommandCSDrop : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
if (u->Account() && u->Account()->IsServicesOper())
notice_help(Config->s_ChanServ, u, CHAN_SERVADMIN_HELP_DROP);
u->SendMessage(ChanServ, CHAN_SERVADMIN_HELP_DROP);
else
notice_help(Config->s_ChanServ, u, CHAN_HELP_DROP);
u->SendMessage(ChanServ, CHAN_HELP_DROP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "DROP", CHAN_DROP_SYNTAX);
SyntaxError(ChanServ, u, "DROP", CHAN_DROP_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_DROP);
u->SendMessage(ChanServ, CHAN_HELP_CMD_DROP);
}
};
+9 -9
View File
@@ -31,19 +31,19 @@ class CommandCSForbid : public Command
if (Config->ForceForbidReason && reason.empty())
{
syntax_error(Config->s_ChanServ, u, "FORBID", CHAN_FORBID_SYNTAX_REASON);
SyntaxError(ChanServ, u, "FORBID", CHAN_FORBID_SYNTAX_REASON);
return MOD_CONT;
}
if (chan[0] != '#')
{
notice_lang(Config->s_ChanServ, u, CHAN_SYMBOL_REQUIRED);
u->SendMessage(ChanServ, CHAN_SYMBOL_REQUIRED);
return MOD_CONT;
}
if (readonly)
{
notice_lang(Config->s_ChanServ, u, READ_ONLY_MODE);
u->SendMessage(ChanServ, READ_ONLY_MODE);
return MOD_CONT;
}
@@ -55,7 +55,7 @@ class CommandCSForbid : public Command
{
// this cant happen?
//Alog() << Config->s_ChanServ << ": Valid FORBID for " << ci->name << " by " << u->nick << " failed";
notice_lang(Config->s_ChanServ, u, CHAN_FORBID_FAILED, chan.c_str());
u->SendMessage(ChanServ, CHAN_FORBID_FAILED, chan.c_str());
return MOD_CONT;
}
@@ -77,7 +77,7 @@ class CommandCSForbid : public Command
if (is_oper(uc->user))
continue;
c->Kick(ChanServ, uc->user, "%s", !reason.empty() ? reason.c_str() : getstring(uc->user->Account(), CHAN_FORBID_REASON));
c->Kick(ChanServ, uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user, CHAN_FORBID_REASON).c_str());
}
}
@@ -91,7 +91,7 @@ class CommandCSForbid : public Command
ircdproto->SendGlobops(ChanServ, "\2%s\2 used FORBID on channel \2%s\2", u->nick.c_str(), ci->name.c_str());
Log(LOG_ADMIN, u, this, ci) << (!ci->forbidreason.empty() ? ci->forbidreason : "No reason");
notice_lang(Config->s_ChanServ, u, CHAN_FORBID_SUCCEEDED, chan.c_str());
u->SendMessage(ChanServ, CHAN_FORBID_SUCCEEDED, chan.c_str());
FOREACH_MOD(I_OnChanForbidden, OnChanForbidden(ci));
@@ -100,18 +100,18 @@ class CommandCSForbid : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_SERVADMIN_HELP_FORBID);
u->SendMessage(ChanServ, CHAN_SERVADMIN_HELP_FORBID);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "FORBID", CHAN_FORBID_SYNTAX);
SyntaxError(ChanServ, u, "FORBID", CHAN_FORBID_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_FORBID);
u->SendMessage(ChanServ, CHAN_HELP_CMD_FORBID);
}
};
+6 -6
View File
@@ -30,37 +30,37 @@ class CommandCSGetKey : public Command
if (!check_access(u, ci, CA_GETKEY) && !u->Account()->HasCommand("chanserv/getkey"))
{
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
return MOD_CONT;
}
if (!ci->c || !ci->c->GetParam(CMODE_KEY, key))
{
notice_lang(Config->s_ChanServ, u, CHAN_GETKEY_NOKEY, chan.c_str());
u->SendMessage(ChanServ, CHAN_GETKEY_NOKEY, chan.c_str());
return MOD_CONT;
}
bool override = !check_access(u, ci, CA_GETKEY);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci);
notice_lang(Config->s_ChanServ, u, CHAN_GETKEY_KEY, chan.c_str(), key.c_str());
u->SendMessage(ChanServ, CHAN_GETKEY_KEY, chan.c_str(), key.c_str());
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_GETKEY);
u->SendMessage(ChanServ, CHAN_HELP_GETKEY);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "GETKEY", CHAN_GETKEY_SYNTAX);
SyntaxError(ChanServ, u, "GETKEY", CHAN_GETKEY_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_GETKEY);
u->SendMessage(ChanServ, CHAN_HELP_CMD_GETKEY);
}
};
+4 -21
View File
@@ -24,38 +24,21 @@ class CommandCSHelp : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
Anope::string cmd = params[0];
if (cmd.equals_ci("LEVELS DESC"))
{
int i;
notice_help(Config->s_ChanServ, u, CHAN_HELP_LEVELS_DESC);
if (!levelinfo_maxwidth)
for (i = 0; levelinfo[i].what >= 0; ++i)
{
int len = levelinfo[i].name.length();
if (len > levelinfo_maxwidth)
levelinfo_maxwidth = len;
}
for (i = 0; levelinfo[i].what >= 0; ++i)
notice_help(Config->s_ChanServ, u, CHAN_HELP_LEVELS_DESC_FORMAT, levelinfo_maxwidth, levelinfo[i].name.c_str(), getstring(u, levelinfo[i].desc));
}
else
mod_help_cmd(ChanServ, u, cmd);
mod_help_cmd(ChanServ, u, params[0]);
return MOD_CONT;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP);
u->SendMessage(ChanServ, CHAN_HELP);
for (CommandMap::const_iterator it = ChanServ->Commands.begin(); it != ChanServ->Commands.end(); ++it)
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
it->second->OnServHelp(u);
if (Config->CSExpire >= 86400)
notice_help(Config->s_ChanServ, u, CHAN_HELP_EXPIRES, Config->CSExpire / 86400);
u->SendMessage(ChanServ, CHAN_HELP_EXPIRES, Config->CSExpire / 86400);
if (u->Account() && u->Account()->IsServicesOper())
notice_help(Config->s_ChanServ, u, CHAN_SERVADMIN_HELP);
u->SendMessage(ChanServ, CHAN_SERVADMIN_HELP);
}
};
+34 -47
View File
@@ -19,9 +19,8 @@ class CommandCSInfo : public Command
{
if (ci->HasFlag(opt))
{
const char *commastr = getstring(nc, COMMA_SPACE);
if (!buf.empty())
buf += commastr;
buf += ", ";
buf += str;
}
@@ -38,20 +37,17 @@ class CommandCSInfo : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
Anope::string chan = params[0];
char buf[BUFSIZE];
struct tm *tm;
bool has_auspex = u->IsIdentified() && u->Account()->HasPriv("chanserv/auspex");
bool show_all = false;
time_t expt;
ChannelInfo *ci = cs_findchan(chan);
if (ci->HasFlag(CI_FORBIDDEN))
{
if (is_oper(u) && !ci->forbidby.empty())
notice_lang(Config->s_ChanServ, u, CHAN_X_FORBIDDEN_OPER, chan.c_str(), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : getstring(u, NO_REASON));
u->SendMessage(ChanServ, CHAN_X_FORBIDDEN_OPER, chan.c_str(), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : GetString(u, NO_REASON).c_str());
else
notice_lang(Config->s_ChanServ, u, CHAN_X_FORBIDDEN, chan.c_str());
u->SendMessage(ChanServ, CHAN_X_FORBIDDEN, chan.c_str());
return MOD_CONT;
}
@@ -60,66 +56,57 @@ class CommandCSInfo : public Command
if (has_auspex || check_access(u, ci, CA_INFO))
show_all = true;
notice_lang(Config->s_ChanServ, u, CHAN_INFO_HEADER, chan.c_str());
notice_lang(Config->s_ChanServ, u, CHAN_INFO_NO_FOUNDER, ci->founder->display.c_str());
u->SendMessage(ChanServ, CHAN_INFO_HEADER, chan.c_str());
u->SendMessage(ChanServ, CHAN_INFO_NO_FOUNDER, ci->founder->display.c_str());
if (show_all && ci->successor)
notice_lang(Config->s_ChanServ, u, CHAN_INFO_NO_SUCCESSOR, ci->successor->display.c_str());
u->SendMessage(ChanServ, CHAN_INFO_NO_SUCCESSOR, ci->successor->display.c_str());
notice_lang(Config->s_ChanServ, u, CHAN_INFO_DESCRIPTION, ci->desc.c_str());
tm = localtime(&ci->time_registered);
strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm);
notice_lang(Config->s_ChanServ, u, CHAN_INFO_TIME_REGGED, buf);
tm = localtime(&ci->last_used);
strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm);
notice_lang(Config->s_ChanServ, u, CHAN_INFO_LAST_USED, buf);
u->SendMessage(ChanServ, CHAN_INFO_DESCRIPTION, ci->desc.c_str());
u->SendMessage(ChanServ, CHAN_INFO_TIME_REGGED, do_strftime(ci->time_registered).c_str());
u->SendMessage(ChanServ, CHAN_INFO_LAST_USED, do_strftime(ci->last_used).c_str());
if (!ci->last_topic.empty() && (show_all || (!ci->HasMLock(CMODE_SECRET, true) && (!ci->c || !ci->c->HasMode(CMODE_SECRET)))))
{
notice_lang(Config->s_ChanServ, u, CHAN_INFO_LAST_TOPIC, ci->last_topic.c_str());
notice_lang(Config->s_ChanServ, u, CHAN_INFO_TOPIC_SET_BY, ci->last_topic_setter.c_str());
u->SendMessage(ChanServ, CHAN_INFO_LAST_TOPIC, ci->last_topic.c_str());
u->SendMessage(ChanServ, CHAN_INFO_TOPIC_SET_BY, ci->last_topic_setter.c_str());
}
if (!ci->entry_message.empty() && show_all)
notice_lang(Config->s_ChanServ, u, CHAN_INFO_ENTRYMSG, ci->entry_message.c_str());
u->SendMessage(ChanServ, CHAN_INFO_ENTRYMSG, ci->entry_message.c_str());
if (show_all)
{
notice_lang(Config->s_ChanServ, u, CHAN_INFO_BANTYPE, ci->bantype);
u->SendMessage(ChanServ, CHAN_INFO_BANTYPE, ci->bantype);
Anope::string optbuf;
CheckOptStr(optbuf, CI_KEEPTOPIC, getstring(u, CHAN_INFO_OPT_KEEPTOPIC), ci, u->Account());
CheckOptStr(optbuf, CI_OPNOTICE, getstring(u, CHAN_INFO_OPT_OPNOTICE), ci, u->Account());
CheckOptStr(optbuf, CI_PEACE, getstring(u, CHAN_INFO_OPT_PEACE), ci, u->Account());
CheckOptStr(optbuf, CI_PRIVATE, getstring(u, CHAN_INFO_OPT_PRIVATE), ci, u->Account());
CheckOptStr(optbuf, CI_RESTRICTED, getstring(u, CHAN_INFO_OPT_RESTRICTED), ci, u->Account());
CheckOptStr(optbuf, CI_SECURE, getstring(u, CHAN_INFO_OPT_SECURE), ci, u->Account());
CheckOptStr(optbuf, CI_SECUREFOUNDER, getstring(u, CHAN_INFO_OPT_SECUREFOUNDER), ci, u->Account());
CheckOptStr(optbuf, CI_SECUREOPS, getstring(u, CHAN_INFO_OPT_SECUREOPS), ci, u->Account());
CheckOptStr(optbuf, CI_KEEPTOPIC, GetString(u, CHAN_INFO_OPT_KEEPTOPIC), ci, u->Account());
CheckOptStr(optbuf, CI_OPNOTICE, GetString(u, CHAN_INFO_OPT_OPNOTICE), ci, u->Account());
CheckOptStr(optbuf, CI_PEACE, GetString(u, CHAN_INFO_OPT_PEACE), ci, u->Account());
CheckOptStr(optbuf, CI_PRIVATE, GetString(u, NICK_INFO_OPT_PRIVATE), ci, u->Account());
CheckOptStr(optbuf, CI_RESTRICTED, GetString(u, CHAN_INFO_OPT_RESTRICTED), ci, u->Account());
CheckOptStr(optbuf, CI_SECURE, GetString(u, CHAN_INFO_OPT_SECURE), ci, u->Account());
CheckOptStr(optbuf, CI_SECUREFOUNDER, GetString(u, CHAN_INFO_OPT_SECUREFOUNDER), ci, u->Account());
CheckOptStr(optbuf, CI_SECUREOPS, GetString(u, CHAN_INFO_OPT_SECUREOPS), ci, u->Account());
if (ci->HasFlag(CI_SIGNKICK))
CheckOptStr(optbuf, CI_SIGNKICK, getstring(u, CHAN_INFO_OPT_SIGNKICK), ci, u->Account());
CheckOptStr(optbuf, CI_SIGNKICK, GetString(u, CHAN_INFO_OPT_SIGNKICK), ci, u->Account());
else
CheckOptStr(optbuf, CI_SIGNKICK_LEVEL, getstring(u, CHAN_INFO_OPT_SIGNKICK), ci, u->Account());
CheckOptStr(optbuf, CI_TOPICLOCK, getstring(u, CHAN_INFO_OPT_TOPICLOCK), ci, u->Account());
CheckOptStr(optbuf, CI_XOP, getstring(u, CHAN_INFO_OPT_XOP), ci, u->Account());
CheckOptStr(optbuf, CI_PERSIST, getstring(u, CHAN_INFO_OPT_PERSIST), ci, u->Account());
CheckOptStr(optbuf, CI_SIGNKICK_LEVEL, GetString(u, CHAN_INFO_OPT_SIGNKICK), ci, u->Account());
CheckOptStr(optbuf, CI_TOPICLOCK, GetString(u, CHAN_INFO_OPT_TOPICLOCK), ci, u->Account());
CheckOptStr(optbuf, CI_XOP, GetString(u, CHAN_INFO_OPT_XOP), ci, u->Account());
CheckOptStr(optbuf, CI_PERSIST, GetString(u, CHAN_INFO_OPT_PERSIST), ci, u->Account());
notice_lang(Config->s_ChanServ, u, CHAN_INFO_OPTIONS, optbuf.empty() ? getstring(u, CHAN_INFO_OPT_NONE) : optbuf.c_str());
notice_lang(Config->s_ChanServ, u, CHAN_INFO_MODE_LOCK, get_mlock_modes(ci, 1).c_str());
u->SendMessage(ChanServ, NICK_INFO_OPTIONS, optbuf.empty() ? GetString(u, NICK_INFO_OPT_NONE).c_str() : optbuf.c_str());
u->SendMessage(ChanServ, CHAN_INFO_MODE_LOCK, get_mlock_modes(ci, 1).c_str());
// XXX: we could just as easily (and tidily) merge this in with the flags display above.
if (ci->HasFlag(CI_NO_EXPIRE))
notice_lang(Config->s_ChanServ, u, CHAN_INFO_NO_EXPIRE);
u->SendMessage(ChanServ, CHAN_INFO_NO_EXPIRE);
else
{
expt = ci->last_used + Config->CSExpire;
tm = localtime(&expt);
strftime_lang(buf, sizeof(buf), u, STRFTIME_DATE_TIME_FORMAT, tm);
notice_lang(Config->s_ChanServ, u, CHAN_INFO_EXPIRE, buf);
}
u->SendMessage(ChanServ, CHAN_INFO_EXPIRE, do_strftime(ci->last_used + Config->CSExpire).c_str());
}
if (ci->HasFlag(CI_SUSPENDED))
notice_lang(Config->s_ChanServ, u, CHAN_X_SUSPENDED, ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : getstring(u, NO_REASON));
u->SendMessage(ChanServ, CHAN_X_SUSPENDED, ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : GetString(u, NO_REASON).c_str());
FOREACH_MOD(I_OnChanInfo, OnChanInfo(u, ci, show_all));
@@ -128,19 +115,19 @@ class CommandCSInfo : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_INFO);
u->SendMessage(ChanServ, CHAN_HELP_INFO);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "INFO", CHAN_INFO_SYNTAX);
SyntaxError(ChanServ, u, "INFO", CHAN_INFO_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_INFO);
u->SendMessage(ChanServ, CHAN_HELP_CMD_INFO);
}
};
+9 -9
View File
@@ -29,7 +29,7 @@ class CommandCSInvite : public Command
if (!(c = findchan(chan)))
{
notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, chan.c_str());
return MOD_CONT;
}
@@ -37,7 +37,7 @@ class CommandCSInvite : public Command
if (!check_access(u, ci, CA_INVITE))
{
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
return MOD_CONT;
}
@@ -47,7 +47,7 @@ class CommandCSInvite : public Command
{
if (!(u2 = finduser(params[1])))
{
notice_lang(Config->s_ChanServ, u, NICK_X_NOT_IN_USE, params[1].c_str());
u->SendMessage(ChanServ, NICK_X_NOT_IN_USE, params[1].c_str());
return MOD_CONT;
}
}
@@ -56,30 +56,30 @@ class CommandCSInvite : public Command
Log(LOG_COMMAND, u, this, ci) << "for " << u2->nick;
if (c->FindUser(u2))
notice_lang(Config->s_ChanServ, u, CHAN_INVITE_ALREADY_IN, c->name.c_str());
u->SendMessage(ChanServ, CHAN_INVITE_ALREADY_IN, c->name.c_str());
else
{
ircdproto->SendInvite(whosends(ci), chan, u2->nick);
notice_lang(whosends(ci)->nick, u, CHAN_INVITE_OTHER_SUCCESS, u2->nick.c_str(), c->name.c_str());
notice_lang(whosends(ci)->nick, u2, CHAN_INVITE_SUCCESS, c->name.c_str());
u->SendMessage(whosends(ci), CHAN_INVITE_OTHER_SUCCESS, u2->nick.c_str(), c->name.c_str());
u->SendMessage(whosends(ci), CHAN_INVITE_SUCCESS, c->name.c_str());
}
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_INVITE);
u->SendMessage(ChanServ, CHAN_HELP_INVITE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "INVITE", CHAN_INVITE_SYNTAX);
SyntaxError(ChanServ, u, "INVITE", CHAN_INVITE_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_INVITE);
u->SendMessage(ChanServ, CHAN_HELP_CMD_INVITE);
}
};
+9 -9
View File
@@ -38,17 +38,17 @@ class CommandCSKick : public Command
ci = c->ci;
if (!c)
notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, chan.c_str());
else if (is_same ? !(u2 = u) : !(u2 = finduser(target)))
notice_lang(Config->s_ChanServ, u, NICK_X_NOT_IN_USE, target.c_str());
u->SendMessage(ChanServ, NICK_X_NOT_IN_USE, target.c_str());
else if (!is_same ? !check_access(u, ci, CA_KICK) : !check_access(u, ci, CA_KICKME))
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else if (!is_same && (ci->HasFlag(CI_PEACE)) && get_access(u2, ci) >= get_access(u, ci))
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else if (u2->IsProtected())
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else if (!c->FindUser(u2))
notice_lang(Config->s_ChanServ, u, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
u->SendMessage(ChanServ, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
else
{
// XXX
@@ -64,18 +64,18 @@ class CommandCSKick : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_KICK);
u->SendMessage(ChanServ, CHAN_HELP_KICK);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "KICK", CHAN_KICK_SYNTAX);
SyntaxError(ChanServ, u, "KICK", CHAN_KICK_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_KICK);
u->SendMessage(ChanServ, CHAN_HELP_CMD_KICK);
}
};
+14 -14
View File
@@ -33,7 +33,7 @@ public:
if (Config->CSListOpersOnly && !is_oper(u))
{
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
return MOD_STOP;
}
@@ -42,28 +42,28 @@ public:
Anope::string tmp = myStrGetToken(pattern.substr(1), '-', 0); /* Read FROM out */
if (tmp.empty())
{
notice_lang(Config->s_ChanServ, u, LIST_INCORRECT_RANGE);
notice_lang(Config->s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
u->SendMessage(ChanServ, LIST_INCORRECT_RANGE);
u->SendMessage(ChanServ, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
if (!tmp.is_number_only())
{
notice_lang(Config->s_ChanServ, u, LIST_INCORRECT_RANGE);
notice_lang(Config->s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
u->SendMessage(ChanServ, LIST_INCORRECT_RANGE);
u->SendMessage(ChanServ, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
from = convertTo<int>(tmp);
tmp = myStrGetTokenRemainder(pattern, '-', 1); /* Read TO out */
if (tmp.empty())
{
notice_lang(Config->s_ChanServ, u, LIST_INCORRECT_RANGE);
notice_lang(Config->s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
u->SendMessage(ChanServ, LIST_INCORRECT_RANGE);
u->SendMessage(ChanServ, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
if (!tmp.is_number_only())
{
notice_lang(Config->s_ChanServ, u, LIST_INCORRECT_RANGE);
notice_lang(Config->s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
u->SendMessage(ChanServ, LIST_INCORRECT_RANGE);
u->SendMessage(ChanServ, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
to = convertTo<int>(tmp);
@@ -89,7 +89,7 @@ public:
Anope::string spattern = "#" + pattern;
notice_lang(Config->s_ChanServ, u, CHAN_LIST_HEADER, pattern.c_str());
u->SendMessage(ChanServ, NICK_LIST_HEADER, pattern.c_str());
for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
{
@@ -125,24 +125,24 @@ public:
}
}
notice_lang(Config->s_ChanServ, u, CHAN_LIST_END, nchans > Config->CSListMax ? Config->CSListMax : nchans, nchans);
u->SendMessage(ChanServ, CHAN_LIST_END, nchans > Config->CSListMax ? Config->CSListMax : nchans, nchans);
return MOD_CONT;
}
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_LIST);
u->SendMessage(ChanServ, CHAN_HELP_LIST);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "LIST", CHAN_LIST_SYNTAX);
SyntaxError(ChanServ, u, "LIST", NICK_LIST_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_LIST);
u->SendMessage(ChanServ, CHAN_HELP_CMD_LIST);
}
};
+36 -36
View File
@@ -35,17 +35,17 @@ static CommandReturn do_util(User *u, Command *com, ChannelMode *cm, const Anope
bool is_same = u->nick.equals_ci(realnick);
if (!c)
notice_lang(Config->s_ChanServ, u, CHAN_X_NOT_IN_USE, chan.c_str());
u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, chan.c_str());
else if (is_same ? !(u2 = u) : !(u2 = finduser(realnick)))
notice_lang(Config->s_ChanServ, u, NICK_X_NOT_IN_USE, realnick.c_str());
u->SendMessage(ChanServ, NICK_X_NOT_IN_USE, realnick.c_str());
else if (is_same ? !check_access(u, ci, levelself) : !check_access(u, ci, level))
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else if (!set && !is_same && (ci->HasFlag(CI_PEACE)) && (get_access(u2, ci) >= get_access(u, ci)))
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else if (!set && u2->IsProtected() && !is_same)
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
else if (!c->FindUser(u2))
notice_lang(Config->s_ChanServ, u, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
u->SendMessage(ChanServ, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
else
{
if (set)
@@ -77,18 +77,18 @@ class CommandCSOp : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_OP);
u->SendMessage(ChanServ, CHAN_HELP_OP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "OP", CHAN_OP_SYNTAX);
SyntaxError(ChanServ, u, "OP", CHAN_OP_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_OP);
u->SendMessage(ChanServ, CHAN_HELP_CMD_OP);
}
};
@@ -108,18 +108,18 @@ class CommandCSDeOp : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_DEOP);
u->SendMessage(ChanServ, CHAN_HELP_DEOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "DEOP", CHAN_DEOP_SYNTAX);
SyntaxError(ChanServ, u, "DEOP", CHAN_DEOP_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_DEOP);
u->SendMessage(ChanServ, CHAN_HELP_CMD_DEOP);
}
};
@@ -139,18 +139,18 @@ class CommandCSVoice : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_VOICE);
u->SendMessage(ChanServ, CHAN_HELP_VOICE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "VOICE", CHAN_VOICE_SYNTAX);
SyntaxError(ChanServ, u, "VOICE", CHAN_VOICE_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_VOICE);
u->SendMessage(ChanServ, CHAN_HELP_CMD_VOICE);
}
};
@@ -170,18 +170,18 @@ class CommandCSDeVoice : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_DEVOICE);
u->SendMessage(ChanServ, CHAN_HELP_DEVOICE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "DEVOICE", CHAN_DEVOICE_SYNTAX);
SyntaxError(ChanServ, u, "DEVOICE", CHAN_DEVOICE_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_DEVOICE);
u->SendMessage(ChanServ, CHAN_HELP_CMD_DEVOICE);
}
};
@@ -206,18 +206,18 @@ class CommandCSHalfOp : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_HALFOP);
u->SendMessage(ChanServ, CHAN_HELP_HALFOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "HALFOP", CHAN_HALFOP_SYNTAX);
SyntaxError(ChanServ, u, "HALFOP", CHAN_HALFOP_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_HALFOP);
u->SendMessage(ChanServ, CHAN_HELP_CMD_HALFOP);
}
};
@@ -240,18 +240,18 @@ class CommandCSDeHalfOp : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_DEHALFOP);
u->SendMessage(ChanServ, CHAN_HELP_DEHALFOP);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "DEHALFOP", CHAN_DEHALFOP_SYNTAX);
SyntaxError(ChanServ, u, "DEHALFOP", CHAN_DEHALFOP_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_DEHALFOP);
u->SendMessage(ChanServ, CHAN_HELP_CMD_DEHALFOP);
}
};
@@ -274,18 +274,18 @@ class CommandCSProtect : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_PROTECT);
u->SendMessage(ChanServ, CHAN_HELP_PROTECT);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "PROTECT", CHAN_PROTECT_SYNTAX);
SyntaxError(ChanServ, u, "PROTECT", CHAN_PROTECT_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_PROTECT);
u->SendMessage(ChanServ, CHAN_HELP_CMD_PROTECT);
}
};
@@ -308,18 +308,18 @@ class CommandCSDeProtect : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_DEPROTECT);
u->SendMessage(ChanServ, CHAN_HELP_DEPROTECT);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "DEPROTECT", CHAN_DEPROTECT_SYNTAX);
SyntaxError(ChanServ, u, "DEPROTECT", CHAN_DEPROTECT_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_DEPROTECT);
u->SendMessage(ChanServ, CHAN_HELP_CMD_DEPROTECT);
}
};
@@ -342,18 +342,18 @@ class CommandCSOwner : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_OWNER);
u->SendMessage(ChanServ, CHAN_HELP_OWNER);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "OWNER", CHAN_OWNER_SYNTAX);
SyntaxError(ChanServ, u, "OWNER", CHAN_OWNER_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_OWNER);
u->SendMessage(ChanServ, CHAN_HELP_CMD_OWNER);
}
};
@@ -376,18 +376,18 @@ class CommandCSDeOwner : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_DEOWNER);
u->SendMessage(ChanServ, CHAN_HELP_DEOWNER);
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "DEOWNER", CHAN_DEOWNER_SYNTAX);
SyntaxError(ChanServ, u, "DEOWNER", CHAN_DEOWNER_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_DEOWNER);
u->SendMessage(ChanServ, CHAN_HELP_CMD_DEOWNER);
}
};
+11 -16
View File
@@ -31,30 +31,25 @@ class CommandCSRegister : public Command
if (readonly)
{
notice_lang(Config->s_ChanServ, u, CHAN_REGISTER_DISABLED);
u->SendMessage(ChanServ, CHAN_REGISTER_DISABLED);
return MOD_CONT;
}
if (chan[0] == '&')
notice_lang(Config->s_ChanServ, u, CHAN_REGISTER_NOT_LOCAL);
u->SendMessage(ChanServ, CHAN_REGISTER_NOT_LOCAL);
else if (chan[0] != '#')
notice_lang(Config->s_ChanServ, u, CHAN_SYMBOL_REQUIRED);
u->SendMessage(ChanServ, CHAN_SYMBOL_REQUIRED);
else if (!ircdproto->IsChannelValid(chan))
notice_lang(Config->s_ChanServ, u, CHAN_X_INVALID, chan.c_str());
u->SendMessage(ChanServ, CHAN_X_INVALID, chan.c_str());
else if ((ci = cs_findchan(chan)))
notice_lang(Config->s_ChanServ, u, CHAN_ALREADY_REGISTERED, chan.c_str());
u->SendMessage(ChanServ, CHAN_ALREADY_REGISTERED, chan.c_str());
else if (c && !c->HasUserStatus(u, CMODE_OP))
notice_lang(Config->s_ChanServ, u, CHAN_MUST_BE_CHANOP);
u->SendMessage(ChanServ, CHAN_MUST_BE_CHANOP);
else if (Config->CSMaxReg && u->Account()->channelcount >= Config->CSMaxReg && !u->Account()->HasPriv("chanserv/no-register-limit"))
notice_lang(Config->s_ChanServ, u, u->Account()->channelcount > Config->CSMaxReg ? CHAN_EXCEEDED_CHANNEL_LIMIT : CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg);
else if (!(ci = new ChannelInfo(chan)))
{
// not possible ?
//Alog() << Config->s_ChanServ << ": makechan() failed for REGISTER " << chan;
notice_lang(Config->s_ChanServ, u, CHAN_REGISTRATION_FAILED);
}
u->SendMessage(ChanServ, u->Account()->channelcount > Config->CSMaxReg ? CHAN_EXCEEDED_CHANNEL_LIMIT : CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg);
else
{
ci = new ChannelInfo(chan);
ci->founder = u->Account();
ci->desc = desc;
@@ -70,7 +65,7 @@ class CommandCSRegister : public Command
ci->bi = NULL;
++ci->founder->channelcount;
Log(LOG_COMMAND, u, this, ci);
notice_lang(Config->s_ChanServ, u, CHAN_REGISTERED, chan.c_str(), u->nick.c_str());
u->SendMessage(ChanServ, CHAN_REGISTERED, chan.c_str(), u->nick.c_str());
/* Implement new mode lock */
if (c)
@@ -97,13 +92,13 @@ class CommandCSRegister : public Command
bool OnHelp(User *u, const Anope::string &subcommand)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_REGISTER, Config->s_ChanServ.c_str());
u->SendMessage(ChanServ, CHAN_HELP_REGISTER, Config->s_ChanServ.c_str());
return true;
}
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "REGISTER", CHAN_REGISTER_SYNTAX);
SyntaxError(ChanServ, u, "REGISTER", CHAN_REGISTER_SYNTAX);
}
};
+7 -7
View File
@@ -32,7 +32,7 @@ class CommandCSSASet : public Command
{
if (readonly)
{
notice_lang(Config->s_ChanServ, u, CHAN_SET_DISABLED);
u->SendMessage(ChanServ, CHAN_SET_DISABLED);
return MOD_CONT;
}
@@ -49,8 +49,8 @@ class CommandCSSASet : public Command
}
else
{
notice_lang(Config->s_ChanServ, u, CHAN_SET_UNKNOWN_OPTION, params[1].c_str());
notice_lang(Config->s_ChanServ, u, MORE_INFO, Config->s_ChanServ.c_str(), "SET");
u->SendMessage(ChanServ, NICK_SET_UNKNOWN_OPTION, params[1].c_str());
u->SendMessage(ChanServ, MORE_INFO, Config->s_ChanServ.c_str(), "SET");
}
return MOD_CONT;
@@ -60,10 +60,10 @@ class CommandCSSASet : public Command
{
if (subcommand.empty())
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_SASET_HEAD);
u->SendMessage(ChanServ, CHAN_HELP_SASET_HEAD);
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
it->second->OnServHelp(u);
notice_help(Config->s_ChanServ, u, CHAN_HELP_SASET_TAIL);
u->SendMessage(ChanServ, CHAN_HELP_SASET_TAIL);
return true;
}
else
@@ -79,12 +79,12 @@ class CommandCSSASet : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
SyntaxError(ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SASET);
u->SendMessage(ChanServ, CHAN_HELP_CMD_SASET);
}
bool AddSubcommand(Command *c)
+5 -5
View File
@@ -29,12 +29,12 @@ class CommandCSSASetNoexpire : public Command
if (params[1].equals_ci("ON"))
{
ci->SetFlag(CI_NO_EXPIRE);
notice_lang(Config->s_ChanServ, u, CHAN_SET_NOEXPIRE_ON, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_SET_NOEXPIRE_ON, ci->name.c_str());
}
else if (params[1].equals_ci("OFF"))
{
ci->UnsetFlag(CI_NO_EXPIRE);
notice_lang(Config->s_ChanServ, u, CHAN_SET_NOEXPIRE_OFF, ci->name.c_str());
u->SendMessage(ChanServ, CHAN_SET_NOEXPIRE_OFF, ci->name.c_str());
}
else
this->OnSyntaxError(u, "NOEXPIRE");
@@ -44,18 +44,18 @@ class CommandCSSASetNoexpire : public Command
bool OnHelp(User *u, const Anope::string &)
{
notice_help(Config->s_ChanServ, u, CHAN_SERVADMIN_HELP_SET_NOEXPIRE);
u->SendMessage(ChanServ, CHAN_SERVADMIN_HELP_SET_NOEXPIRE);
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
syntax_error(Config->s_ChanServ, u, "SET NOEXPIRE", CHAN_SET_NOEXPIRE_SYNTAX);
SyntaxError(ChanServ, u, "SET NOEXPIRE", CHAN_SET_NOEXPIRE_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_NOEXPIRE);
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_NOEXPIRE);
}
};
+8 -8
View File
@@ -32,12 +32,12 @@ class CommandCSSet : public Command
{
if (readonly)
{
notice_lang(Config->s_ChanServ, u, CHAN_SET_DISABLED);
u->SendMessage(ChanServ, CHAN_SET_DISABLED);
return MOD_CONT;
}
if (!check_access(u, cs_findchan(params[0]), CA_SET))
{
notice_lang(Config->s_ChanServ, u, ACCESS_DENIED);
u->SendMessage(ChanServ, ACCESS_DENIED);
return MOD_CONT;
}
@@ -53,8 +53,8 @@ class CommandCSSet : public Command
}
else
{
notice_lang(Config->s_ChanServ, u, CHAN_SET_UNKNOWN_OPTION, params[1].c_str());
notice_lang(Config->s_ChanServ, u, MORE_INFO, Config->s_ChanServ.c_str(), "SET");
u->SendMessage(ChanServ, NICK_SET_UNKNOWN_OPTION, params[1].c_str());
u->SendMessage(ChanServ, MORE_INFO, Config->s_ChanServ.c_str(), "SET");
}
return MOD_CONT;
@@ -64,10 +64,10 @@ class CommandCSSet : public Command
{
if (subcommand.empty())
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_HEAD);
u->SendMessage(ChanServ, CHAN_HELP_SET_HEAD);
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
it->second->OnServHelp(u);
notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_TAIL);
u->SendMessage(ChanServ, CHAN_HELP_SET_TAIL);
return true;
}
else
@@ -83,12 +83,12 @@ class CommandCSSet : public Command
void OnSyntaxError(User *u, const Anope::string &subcommand)
{
syntax_error(Config->s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
SyntaxError(ChanServ, u, "SET", CHAN_SET_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET);
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET);
}
bool AddSubcommand(Command *c)
+7 -7
View File
@@ -31,11 +31,11 @@ class CommandCSSetBanType : public Command
int16 bantype = convertTo<int16>(params[1], end, false);
if (!end.empty() || bantype < 0 || bantype > 3)
notice_lang(Config->s_ChanServ, u, CHAN_SET_BANTYPE_INVALID, params[1].c_str());
u->SendMessage(ChanServ, CHAN_SET_BANTYPE_INVALID, params[1].c_str());
else
{
ci->bantype = bantype;
notice_lang(Config->s_ChanServ, u, CHAN_SET_BANTYPE_CHANGED, ci->name.c_str(), ci->bantype);
u->SendMessage(ChanServ, CHAN_SET_BANTYPE_CHANGED, ci->name.c_str(), ci->bantype);
}
return MOD_CONT;
@@ -43,19 +43,19 @@ class CommandCSSetBanType : public Command
bool OnHelp(User *u, const Anope::string &)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_BANTYPE, "SET");
u->SendMessage(ChanServ, CHAN_HELP_SET_BANTYPE, "SET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
syntax_error(Config->s_ChanServ, u, "SET", CHAN_SET_SYNTAX);
SyntaxError(ChanServ, u, "SET", CHAN_SET_SYNTAX);
}
void OnServHelp(User *u)
{
notice_lang(Config->s_ChanServ, u, CHAN_HELP_CMD_SET_BANTYPE);
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_BANTYPE);
}
};
@@ -68,14 +68,14 @@ class CommandCSSASetBanType : public CommandCSSetBanType
bool OnHelp(User *u, const Anope::string &)
{
notice_help(Config->s_ChanServ, u, CHAN_HELP_SET_BANTYPE, "SASET");
u->SendMessage(ChanServ, CHAN_HELP_SET_BANTYPE, "SASET");
return true;
}
void OnSyntaxError(User *u, const Anope::string &)
{
// XXX
syntax_error(Config->s_ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
SyntaxError(ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
}
};

Some files were not shown because too many files have changed in this diff Show More