From 6dc783309e7773a21c6e8c6c16d6f038ad18810f Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 25 Mar 2014 21:07:54 +0400 Subject: [PATCH 001/144] magic mod new config options --- conf/bnetd.conf.in | 12 ++++++++ conf/bnetd.conf.win32 | 12 ++++++++ src/bnetd/prefs.cpp | 62 +++++++++++++++++++++++++++++++++++++++ src/bnetd/prefs.h | 6 ++++ src/common/setup_before.h | 2 ++ 5 files changed, 94 insertions(+) diff --git a/conf/bnetd.conf.in b/conf/bnetd.conf.in index 5e54a7cc4..a27c78021 100644 --- a/conf/bnetd.conf.in +++ b/conf/bnetd.conf.in @@ -644,3 +644,15 @@ clan_channel_default_private = 0 # without accepted invitations need. This does not affect WAR3/W3XP ingame # clan management. clan_min_invites = 2 + + +############################################################################### +# Magic Mod configuration # +#-----------------------------------------------------------------------------# + +# Bot login, it should has full admin rights +bot_username = "admin" + +# redirect commands that are removed from command_groups.conf +# but not removed from the code +bot_redirect_disabled_commands = true diff --git a/conf/bnetd.conf.win32 b/conf/bnetd.conf.win32 index 01157df92..edca17100 100644 --- a/conf/bnetd.conf.win32 +++ b/conf/bnetd.conf.win32 @@ -625,3 +625,15 @@ clan_channel_default_private = 0 # without accepted invitations need. This does not affect WAR3/W3XP ingame # clan management. clan_min_invites = 2 + + +############################################################################### +# Magic Mod configuration # +#-----------------------------------------------------------------------------# + +# Bot login, it should has full admin rights +bot_username = "admin" + +# redirect commands that are removed from command_groups.conf +# but not removed from the code +bot_redirect_disabled_commands = true diff --git a/src/bnetd/prefs.cpp b/src/bnetd/prefs.cpp index cca1a461c..ba436a159 100644 --- a/src/bnetd/prefs.cpp +++ b/src/bnetd/prefs.cpp @@ -144,6 +144,7 @@ namespace pvpgn char const * tournament_file; char const * aliasfile; char const * anongame_infos_file; + char const * magicfile; unsigned int max_conns_per_IP; unsigned int max_friends; unsigned int clan_newer_time; @@ -171,6 +172,10 @@ namespace pvpgn char const * wol_autoupdate_serverhost; char const * wol_autoupdate_username; char const * wol_autoupdate_password; + + char const * bot_username; + unsigned int bot_redirect_disabled_commands; + } prefs_runtime_config; static int conf_set_filedir(const char *valstr); @@ -689,6 +694,16 @@ namespace pvpgn static const char *conf_get_wol_autoupdate_password(void); static int conf_setdef_wol_autoupdate_password(void); + + static int conf_setdef_bot_username(void); + static int conf_set_bot_username(const char *valstr); + static const char *conf_get_bot_username(void); + + static int conf_set_bot_redirect_disabled_commands(const char *valstr); + static const char *conf_get_bot_redirect_disabled_commands(void); + static int conf_setdef_bot_redirect_disabled_commands(void); + + /* directive set method get method */ static t_conf_entry conf_table[] = { @@ -796,6 +811,7 @@ namespace pvpgn { "tournament_file", conf_set_tournament_file, conf_get_tournament_file, conf_setdef_tournament_file }, { "aliasfile", conf_set_aliasfile, conf_get_aliasfile, conf_setdef_aliasfile }, { "anongame_infos_file", conf_set_anongame_infos_file, conf_get_anongame_infos_file, conf_setdef_anongame_infos_file }, + { "max_conns_per_IP", conf_set_max_conns_per_IP, conf_get_max_conns_per_IP, conf_setdef_max_conns_per_IP }, { "max_friends", conf_set_max_friends, conf_get_max_friends, conf_setdef_max_friends }, { "clan_newer_time", conf_set_clan_newer_time, conf_get_clan_newer_time, conf_setdef_clan_newer_time }, @@ -823,6 +839,9 @@ namespace pvpgn { "wol_autoupdate_username", conf_set_wol_autoupdate_username, conf_get_wol_autoupdate_username, conf_setdef_wol_autoupdate_username }, { "wol_autoupdate_password", conf_set_wol_autoupdate_password, conf_get_wol_autoupdate_password, conf_setdef_wol_autoupdate_password }, + { "bot_username", conf_set_bot_username, conf_get_bot_username, conf_setdef_bot_username }, + { "bot_redirect_disabled_commands", conf_set_bot_redirect_disabled_commands, conf_get_bot_redirect_disabled_commands, conf_setdef_bot_redirect_disabled_commands }, + { NULL, NULL, NULL, NONE }, }; @@ -3602,6 +3621,49 @@ namespace pvpgn return conf_set_str(&prefs_runtime_config.wol_autoupdate_password, NULL, 0); } + + /** + * Magic Mod Extensions + */ + extern char const * prefs_get_bot_username(void) + { + return prefs_runtime_config.bot_username; + } + + static int conf_set_bot_username(const char *valstr) + { + return conf_set_str(&prefs_runtime_config.bot_username, valstr, NULL); + } + + static int conf_setdef_bot_username(void) + { + return conf_set_str(&prefs_runtime_config.bot_username, NULL, BNETD_BOT_USERNAME); + } + + static const char* conf_get_bot_username(void) + { + return prefs_runtime_config.bot_username; + } + + extern int prefs_get_bot_redirect_disabled_commands(void) + { + return prefs_runtime_config.bot_redirect_disabled_commands; + } + + static int conf_set_bot_redirect_disabled_commands(const char *valstr) + { + return conf_set_bool(&prefs_runtime_config.bot_redirect_disabled_commands, valstr, 0); + } + + static int conf_setdef_bot_redirect_disabled_commands(void) + { + return conf_set_bool(&prefs_runtime_config.bot_redirect_disabled_commands, NULL, 1); + } + + static const char* conf_get_bot_redirect_disabled_commands(void) + { + return conf_get_bool(prefs_runtime_config.bot_redirect_disabled_commands); + } } } diff --git a/src/bnetd/prefs.h b/src/bnetd/prefs.h index 962c3cc21..62897f6dd 100644 --- a/src/bnetd/prefs.h +++ b/src/bnetd/prefs.h @@ -193,6 +193,12 @@ namespace pvpgn extern char const * prefs_get_wol_autoupdate_serverhost(void); extern char const * prefs_get_wol_autoupdate_username(void); extern char const * prefs_get_wol_autoupdate_password(void); + + /** + * Magic Mod Extensions + */ + extern char const * prefs_get_bot_username(void); + extern int prefs_get_bot_redirect_disabled_commands(void); } } diff --git a/src/common/setup_before.h b/src/common/setup_before.h index 32a68c618..793526a9b 100644 --- a/src/common/setup_before.h +++ b/src/common/setup_before.h @@ -183,6 +183,8 @@ const int BNETD_WOLV2_PORT = 4005; const char * const BNETD_WGAMERES_ADDRS = ""; const int BNETD_WGAMERES_PORT = 4807; +/* Magic Mod default configuration values */ +const char * const BNETD_BOT_USERNAME = ""; /* other default configuration values */ const char * const BNETD_LOG_LEVELS = "warn,error"; From b5da29b39211ad9ae289763aff829336739a7ce6 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Mon, 7 Apr 2014 21:26:31 +0400 Subject: [PATCH 002/144] Update README.md --- README.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e84fd4bb4..547e40485 100644 --- a/README.md +++ b/README.md @@ -2,21 +2,32 @@ Player versus Player Gaming Network ===== ![](http://harpywar.com/images/items/pvpgn.gif) -Original PvPGN 1.99 source with tweaks. +Original PvPGN 1.99 source code with tweaks. Source Code changes -- +* add display custom icons depends on a user rating, custom output for command `/stats`; works with Warcraft and Starcraft (see [icons.conf](https://github.com/HarpyWar/pvpgn/blob/master/conf/icons.conf.in)) commits [1](https://github.com/HarpyWar/pvpgn/commit/c11af352603e18acc52102ba8574776425248331), [2](https://github.com/HarpyWar/pvpgn/commit/368c4b9296d18a515af746b65fe69054ab6f4236), [3](https://github.com/HarpyWar/pvpgn/commit/f1a96c392055a777b48dc4d77631c5e906161e28) * fix command send flooding [commit](https://github.com/HarpyWar/pvpgn/commit/74f9e4faafe24699597e4be5bfda83bf255ba72e) * fix compile error when pointer size is larger than int [commit](https://github.com/HarpyWar/pvpgn/commit/1ea116434ce009bad4903ff72bd69bbb8987ce06) * fix Warcraft 3 ICON SWITCH hack [commit](https://github.com/HarpyWar/pvpgn/commit/84811bcfe875d6c42cd8271bbdae757f0b5d445b) * fix saving sql fields with custom characters in the name [commit](https://github.com/HarpyWar/pvpgn/commit/18713ffe35cbe9a12193e5c1f1caf5031d4c4731) * add game id field in status.xml output [commit](https://github.com/HarpyWar/pvpgn/commit/b989d26e1182a3ee8cf62f3ee79dfb231fd66e23) * add game id field and user game version in status.dat output (the same as status.xml) [commit](https://github.com/HarpyWar/pvpgn/commit/39d0b2be71c7ddd808a20f97fe6ac17078ce013f) - +* welcome text for Warcraft 3 is moved from the code into a new file `bnmotd_w3.txt` ([example](http://img21.imageshack.us/img21/1808/j2py.png) with colored text is included) + [commit](https://github.com/HarpyWar/pvpgn/commit/ff8ca941cd7942bab201607fbc31382837a35617) + New commands -- * `/save` immediately save changes of accounts and clans from the cache to a storage (useful for testing) [commit](https://github.com/HarpyWar/pvpgn/commit/be8d65d16f910b2090b0db9e7eb2c043b816dae7) +* `/icon [CODE]` set userselected_icon for a user, works with Warcraft and Starcraft [commit](https://github.com/HarpyWar/pvpgn/commit/1ade081c6b10a3e710130b88613b71b880ba0cd7) +* `/find ` search account by part of the name - [patch #1526](http://developer.berlios.de/patch/?func=detailpatch&patch_id=1526&group_id=2291) from berlios [commit](https://github.com/HarpyWar/pvpgn/commit/c229c6693b3dd55f02fe3a81403870044c0786b2) +Modified commands +-- +* `/set` exclusion to get/set a password hash and user id; feature to empty key with "null" value; more info in output of the command and examples commits [1](https://github.com/HarpyWar/pvpgn/commit/d96e1029478d92f67000761983e83ccfde2abbdf), [2](https://github.com/HarpyWar/pvpgn/commit/1ade081c6b10a3e710130b88613b71b880ba0cd7#diff-ef576b6b7e90128c3718523eaaf1b894R4716) +* `/finger` more info in the command output - [patch #2859](http://developer.berlios.de/patch/?func=detailpatch&patch_id=2859&group_id=2291) from berlios [commit](https://github.com/HarpyWar/pvpgn/commit/bdb450084704da1f33e28c9edd3d2d16b720a946) +* `/games lobby` show games in lobby only - [patch #3235](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3235&group_id=2291) from berlios [commit](https://github.com/HarpyWar/pvpgn/commit/5d27cece2c24b5fe779f1560162a31442bf02617) +* `/friends online` show online friends only - [patch #3236](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3236&group_id=2291) from berlios [commit](https://github.com/HarpyWar/pvpgn/commit/8762667276b535d3385d51941d41d780089a7049) Minor changes -- @@ -27,9 +38,21 @@ Minor changes * skip_versioncheck, allow_bad_version are enabled by default in bnetd.conf - for easy start * source code is formatted for better reading * unused files are removed, only pvpgn source here +* move directory `files` to `var\files` on Windows (like Unix) +* unknown udp packets are logged with enabled debug mode only (it always chokes a log file before) [commit](https://github.com/HarpyWar/pvpgn/commit/c39f9f03159b2edc8d2457d8134d84486378f9b1) +* add a file location for all the text files like MOTD (often a server admin doesn't know where a file is located) +* add option ignore-version for programs **bnchat** and **bnstat** - [patch #3184](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3184&group_id=2291) from berlios [commit](https://github.com/HarpyWar/pvpgn/commit/a1fb914c30d9d69d062e8f698f7d0e9bacf41367) + Build source code -- + +#### Windows +Use [Magic Builder](http://code.google.com/p/pvpgn-magic-builder/). + +Download code manually and put into `source` directory (button [Download ZIP](https://github.com/HarpyWar/pvpgn/archive/master.zip) on the right side of this repository page) + +#### Linux [Русский](http://harpywar.com/?a=articles&b=2&c=1&d=74) | [English](http://harpywar.com/?a=articles&b=2&c=1&d=74&lang=en) [![Vimeo](http://habrastorage.org/storage3/48c/5a9/4b1/48c5a94b1173242e311f8376be80a585.png)](https://vimeo.com/83763862) From 33dec831465cf7fd6bee2f7e25b7568b783c9591 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 15 Apr 2014 18:09:16 +0400 Subject: [PATCH 003/144] When there is a user notification message, such as one of your friends entering the server, joining a game, leaving a game, or leaving a server, the message is sent by the server name, instead of the user triggering the event, which Battle.net does. This allows the /r command to go to the user triggering the event. http://developer.berlios.de/bugs/?func=detailbug&bug_id=15327&group_id=2291 --- src/bnetd/watch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bnetd/watch.cpp b/src/bnetd/watch.cpp index ed634e61b..f5b05e80b 100644 --- a/src/bnetd/watch.cpp +++ b/src/bnetd/watch.cpp @@ -181,7 +181,7 @@ namespace pvpgn else { cnt++; /* keep track of successful whispers */ if (friend_get_mutual(fr)) - message_send_text(dest_c, message_type_whisper, NULL, msg); + message_send_text(dest_c, message_type_whisper, my_c, msg); } } } @@ -212,7 +212,7 @@ namespace pvpgn { if (it->getOwner() && (!it->getAccount() || it->getAccount() == account) && (!it->getClientTag() || (clienttag == it->getClientTag())) && (it->getEventMask() & event)) { - message_send_text(it->getOwner(), message_type_whisper, NULL, msg); + message_send_text(it->getOwner(), message_type_whisper, my_c, msg); } } From 6c31420ffd7933cf1f90804228cbfe0fc7a7d378 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Wed, 16 Apr 2014 00:08:07 +0400 Subject: [PATCH 004/144] First look with LUA * load & execute all .lua scripts from scriptdir * lua test event for handle_command * first lua registered function message_send_text --- conf/bnetd.conf.in | 1 + conf/bnetd.conf.win32 | 1 + src/bnetd/command.cpp | 9 + src/bnetd/icons.cpp | 2 + src/bnetd/icons.h | 2 + src/bnetd/luainterface.cpp | 198 +++++++++++++++++++++ src/bnetd/luainterface.h | 54 ++++++ src/bnetd/luawrapper.cpp | 138 +++++++++++++++ src/bnetd/luawrapper.h | 352 +++++++++++++++++++++++++++++++++++++ src/bnetd/main.cpp | 14 ++ src/bnetd/prefs.cpp | 34 +++- src/bnetd/prefs.h | 3 + src/bnetd/server.cpp | 9 + src/common/setup_before.h | 6 + src/common/util.cpp | 88 ++++++++++ src/common/util.h | 9 + 16 files changed, 919 insertions(+), 1 deletion(-) create mode 100644 src/bnetd/luainterface.cpp create mode 100644 src/bnetd/luainterface.h create mode 100644 src/bnetd/luawrapper.cpp create mode 100644 src/bnetd/luawrapper.h diff --git a/conf/bnetd.conf.in b/conf/bnetd.conf.in index 5ae4659a3..4c8885e4b 100644 --- a/conf/bnetd.conf.in +++ b/conf/bnetd.conf.in @@ -79,6 +79,7 @@ storage_path = "file:mode=plain;dir=${LOCALSTATEDIR}/users;clan=${LOCALSTATEDIR} #----------------------------------------------------------------------------# filedir = "${LOCALSTATEDIR}/files" +scriptdir = "${LOCALSTATEDIR}/script" reportdir = "${LOCALSTATEDIR}/reports" chanlogdir = "${LOCALSTATEDIR}/chanlogs" motdfile = "${SYSCONFDIR}/bnmotd.txt" diff --git a/conf/bnetd.conf.win32 b/conf/bnetd.conf.win32 index 7b5880eae..c8201b28d 100644 --- a/conf/bnetd.conf.win32 +++ b/conf/bnetd.conf.win32 @@ -59,6 +59,7 @@ storage_path = file:mode=plain;dir=var\users;clan=var\clans;team=var\teams;defau #----------------------------------------------------------------------------# filedir = files +scriptdir = script reportdir = var\reports chanlogdir = var\chanlogs motdfile = conf\bnmotd.txt diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 4c6c5e01e..aa963299f 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -9,6 +9,7 @@ * Copyright (C) 2003,2004 Aaron * Copyright (C) 2004 Donny Redmond (dredmond@linuxmail.org) * Copyright (C) 2008 Pelish (pelish@gmail.com) + * Copyright (C) 2014 HarpyWar (harpywar@gmail.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -80,6 +81,10 @@ #include "attrlayer.h" +#ifdef WITH_LUA +#include "luainterface.h" +#endif + namespace pvpgn { @@ -504,6 +509,10 @@ namespace pvpgn return 0; } +#ifdef WITH_LUA + if (lua_handle_command(c, text) > 0) + return 0; +#endif for (p = standard_command_table; p->command_string != NULL; p++) { if (strstart(text, p->command_string) == 0) diff --git a/src/bnetd/icons.cpp b/src/bnetd/icons.cpp index 3d79d18d9..73901e048 100644 --- a/src/bnetd/icons.cpp +++ b/src/bnetd/icons.cpp @@ -1,4 +1,6 @@ /* +* Copyright (C) 2014 HarpyWar (harpywar@gmail.com) +* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 diff --git a/src/bnetd/icons.h b/src/bnetd/icons.h index 2812b03b3..9afadddd8 100644 --- a/src/bnetd/icons.h +++ b/src/bnetd/icons.h @@ -1,4 +1,6 @@ /* +* Copyright (C) 2014 HarpyWar (harpywar@gmail.com) +* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp new file mode 100644 index 000000000..c8534c5aa --- /dev/null +++ b/src/bnetd/luainterface.cpp @@ -0,0 +1,198 @@ +/* +* Copyright (C) 2014 HarpyWar (harpywar@gmail.com) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +#include "common/setup_before.h" +#include "command.h" + +#include +#include +#include +#include + +#include "compat/strcasecmp.h" +#include "compat/snprintf.h" +#include "common/tag.h" +#include "common/util.h" +#include "common/version.h" +#include "common/eventlog.h" +#include "common/bnettime.h" +#include "common/addr.h" +#include "common/packet.h" +#include "common/bnethash.h" +#include "common/list.h" +#include "common/proginfo.h" +#include "common/queue.h" +#include "common/bn_type.h" +#include "common/xalloc.h" +#include "common/xstr.h" +#include "common/trans.h" +#include "common/lstr.h" +#include "common/hashtable.h" + +#include "connection.h" +#include "message.h" +#include "channel.h" +#include "game.h" +#include "team.h" +#include "account.h" +#include "account_wrap.h" +#include "server.h" +#include "prefs.h" +#include "ladder.h" +#include "timer.h" +#include "helpfile.h" +#include "mail.h" +#include "runprog.h" +#include "alias_command.h" +#include "realm.h" +#include "ipban.h" +#include "command_groups.h" +#include "news.h" +#include "topic.h" +#include "friends.h" +#include "clan.h" +#include "common/setup_after.h" +#include "common/flags.h" +#include "common/util.h" + +#include "attrlayer.h" + + +#include "luawrapper.h" + +namespace pvpgn +{ + + namespace bnetd + { + lua::vm vm; + + void _register_functions(); + + int _sum(lua_State* L); + int __message_send_text(lua_State* L); + + char xmsgtemp[MAX_MESSAGE_LEN]; + char xmsgtemp2[MAX_MESSAGE_LEN]; + + + /* Reload all the lua scripts */ + extern void lua_unload() + { + + } + + /* Initialize lua, register functions and load scripts */ + extern void lua_load(char const * scriptdir) + { + try + { + // initialize + vm.initialize(); + + std::vector files = dir_getfiles(std::string(scriptdir), ".lua", true); + + // load all files from the script directory + for (int i = 0; i < files.size(); ++i) + vm.load_file(files[i].c_str()); + + _register_functions(); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + } + + /* Register C++ functions to be able use them from lua scripts */ + void _register_functions() + { + // register CFunction + vm.reg("sum", _sum); + vm.reg("message_send_text", __message_send_text); + + + } + +/* Lua Events */ +#ifndef _LUA_EVENTS_ + + extern int lua_handle_command(t_connection * c, char const * text) + { + unsigned int sessionkey; // FIXME: unsigned int + int result; + + sessionkey = conn_get_sessionkey(c); + + lua::transaction(vm) << lua::lookup("handle_command") << sessionkey << text << lua::invoke >> result << lua::end; + + return result; + } + +#endif + +/* --- Lua Functions (called from scripts) */ +#ifndef _LUA_FUNCTIONS_ + + int __message_send_text(lua_State* L) + { + lua::stack st(L); + unsigned int sessionkey_src, sessionkey_dst; + const char *text; + int message_type; + t_connection *c_src, *c_dst; + + // get vars + st.at(1, sessionkey_dst); + st.at(2, message_type); + st.at(3, sessionkey_src); + st.at(4, text); + + // get user connections + c_dst = connlist_find_connection_by_sessionkey(sessionkey_dst); + c_src = connlist_find_connection_by_sessionkey(sessionkey_src); + + // send message + message_send_text(c_dst, (t_message_type)message_type, c_src, text); + + return 0; + } + + + + int _sum(lua_State* L) + { + lua::stack st(L); + + double a = 0, b = 0; + + st.at(1, a); // begin from 1 + st.at(2, b); + + st.push(a + b); + + return 1; // number of return values (st.push) + } + +#endif + + } +} \ No newline at end of file diff --git a/src/bnetd/luainterface.h b/src/bnetd/luainterface.h new file mode 100644 index 000000000..142539755 --- /dev/null +++ b/src/bnetd/luainterface.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2014 HarpyWar (harpywar@gmail.com) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +/*****/ +#ifndef JUST_NEED_TYPES +#ifndef INCLUDED_LUA_PROTOS +#define INCLUDED_LUA_PROTOS + + +// FIXME: include one time on pvpgn load +#include "luawrapper.h" +#include + +#ifdef WIN32 +#pragma comment(lib, "lua5.1.lib") +#endif + + +#define JUST_NEED_TYPES +#include "connection.h" +#undef JUST_NEED_TYPES + +namespace pvpgn +{ + + namespace bnetd + { + + + extern void lua_load(char const * scriptdir); + extern void lua_unload(); + + extern int lua_handle_command(t_connection * c, char const * text); + + } + +} + +#endif +#endif diff --git a/src/bnetd/luawrapper.cpp b/src/bnetd/luawrapper.cpp new file mode 100644 index 000000000..34e304d7b --- /dev/null +++ b/src/bnetd/luawrapper.cpp @@ -0,0 +1,138 @@ + +/* + * Copyright (C) Anton Burdinuk + */ + + +#include "luawrapper.h" + +namespace lua +{ + invoke_type invoke; + m_invoke_type m_invoke; + release_type end; +} + + +void lua::throw_lua_exception(lua_State* st,const std::string& addinfo) throw(std::exception) +{ + size_t len=0; + + const char* p=lua_tolstring(st,-1,&len); + + std::string s(p,len); + + if(addinfo.length()) + { + s.append(" ",1); + s.append(addinfo); + } + + lua_pop(st,1); + + throw(exception(s)); +} + +void lua::vm::initialize(void) throw(std::exception) +{ + done(); + + st=lua_open(); + + if(!st) + throw(exception("can`t create lua virtual machine instance")); + + luaL_openlibs(st); +} + +void lua::vm::load_file(const char* file) throw(std::exception) +{ + if(!st) + throw(exception("lua virtual machine is not ready")); + + if(luaL_loadfile(st,file) || lua_pcall(st,0,0,0)) + throw_lua_exception(st); +} + + +void lua::vm::eval(const std::string& stmt,int offset) throw(std::exception) +{ + enum {max_chunk_name_len=64}; + + if(offset>stmt.length()) + offset=stmt.length(); + + const char* p=stmt.c_str()+offset; + + int n=stmt.length()-offset; + + if(luaL_loadbuffer(st,p,n,n>max_chunk_name_len?(std::string(p,max_chunk_name_len)+"...").c_str():p) || lua_pcall(st,0,0,0)) + throw_lua_exception(st); +} + + +void lua::bind::lookup(const char* name) throw() +{ + if(!refuse) + { + if(lua_type(st,cur_index)!=LUA_TNIL) + { + lua_getfield(st,cur_index,name); + cur_index=size(); + } + } +} + +void lua::bind::end(void) throw() +{ + if(!refuse && mutex) + { + int n=size()-st_top; + if(n>0) + lua_pop(st,n); + + mutex=0; + + args_number=retvals_number=0; + cur_index=LUA_GLOBALSINDEX; + } +} + +void lua::bind::invoke(void) throw(std::exception) +{ + int function_index=-(args_number+1); + + if(!refuse && lua_isfunction(st,function_index)) + { + int n=size(); + + if(lua_pcall(st,args_number,LUA_MULTRET,0)) + throw_lua_exception(st); + + retvals_number=size()+args_number+1-n; + } +} + +void lua::bind::m_invoke(void) throw(std::exception) +{ + if(!refuse) + { + int function_index=-(args_number+1); + int this_index=function_index-1; + + if(lua_isfunction(st,function_index) && lua_istable(st,this_index)) + { + lua_pushvalue(st,this_index); + args_number++; + lua_insert(st,-args_number); + + + int n=size(); + + if(lua_pcall(st,args_number,LUA_MULTRET,0)) + throw_lua_exception(st); + + retvals_number=size()+args_number+1-n; + } + } +} diff --git a/src/bnetd/luawrapper.h b/src/bnetd/luawrapper.h new file mode 100644 index 000000000..ae3cd8ccf --- /dev/null +++ b/src/bnetd/luawrapper.h @@ -0,0 +1,352 @@ +/* + * Copyright (C) Anton Burdinuk + * https://code.google.com/p/luasp/ + */ + + +#ifndef __LUAWRAPPER_H +#define __LUAWRAPPER_H + +extern "C" +{ +#include +#include +#include +} + +#include +#include +#include +#include + +namespace lua +{ + // lua exception + + class exception : public std::exception + { + protected: + std::string _what; + public: + explicit exception(const std::string s) :_what(s) {} + + virtual ~exception(void) throw() {} + + virtual const char* what(void) const throw() { return _what.c_str(); } + }; + + // check Lua VM for errors and throw C++ lua::exception + void throw_lua_exception(lua_State* st, const std::string& addinfo = std::string()) throw(std::exception); + + // Lua VM instance + + class vm + { + protected: + lua_State* st; + + // mutex for lua::bind + int mutex; + + public: + vm(void) :st(0), mutex(0) {} + + explicit vm(lua_State* _st) :st(_st), mutex(0) {} + + ~vm(void) throw() { done(); } + + // create new Lua VM instance + void initialize(void) throw(std::exception); + + // load and execute Lua script from file + void load_file(const char* file) throw(std::exception); + + // load and execute Lua statement from string + void eval(const std::string& stmt, int offset = 0) throw(std::exception); + + // register external C function + void reg(const char* name, lua_CFunction func) throw() { lua_register(st, name, func); } + void reg(const char* package, const luaL_Reg* members) throw() { luaL_register(st, package, members); } + + // destroy Lua VM instance + void done(void) throw() { if (st) { lua_close(st); st = 0; } } + + lua_State* get_st(void) const throw() { return st; } + + friend class stack; + friend class bind; + }; + + + // Lua stack wrapper (use in custom CFunctions only) + + class stack + { + protected: + lua_State* st; + + int st_top; + + public: + // initialize stack + stack(void) :st(0), st_top(0) {} + explicit stack(lua_State* _st) :st(_st), st_top(_st ? lua_gettop(_st) : 0) {} + explicit stack(const vm& _vm) :st(_vm.st), st_top(_vm.st ? lua_gettop(_vm.st) : 0) {} + + // return current stack size + int size(void) const throw() { return lua_gettop(st); } + + // find field in table + void find(const char* name, int index = LUA_GLOBALSINDEX) throw() { lua_getfield(st, index, name); } + + // push to stack scalar + void push(unsigned int v) throw() { lua_pushinteger(st, v); } + void push(int v) throw() { lua_pushinteger(st, v); } + void push_boolean(int v) throw() { lua_pushboolean(st, v); } + void push(double v) throw() { lua_pushnumber(st, v); } + void push(const std::string& v) throw() { lua_pushlstring(st, v.c_str(), v.length()); } + void push(const char* v) throw() { lua_pushlstring(st, v, strlen(v)); } + + // push to stack std::map + template + void push(const std::map<_key, _val, _comp, _alloc>& v) throw() + { + lua_newtable(st); + + for (typename std::map<_key, _val, _comp, _alloc>::const_iterator i = v.begin(); i != v.end(); ++i) + { + push(i->first); + push(i->second); + lua_rawset(st, -3); + } + } + + // push to stack std::vector + template + void push(const std::vector<_val, _alloc>& v) throw() + { + lua_newtable(st); + + for (int i = 0; i < v.size(); ++i) + { + push(i); + push(v[i]); + lua_rawset(st, -3); + } + } + + + // recv from stack scalar + void get(unsigned int& v, int index) throw() { v = lua_tointeger(st, index); } + void get(int& v, int index) throw() { v = lua_tointeger(st, index); } + void get(double& v, int index) throw() { v = lua_tonumber(st, index); } + void get(const char*& v, int index) throw() + { + size_t len = 0; + v = lua_tolstring(st, index, &len); + } + void get(std::string& v, int index) throw() + { + size_t len = 0; + + const char* p = lua_tolstring(st, index, &len); + if (p) + v.assign(p, len); + } + + // recv from stack std::map + template + void get(std::map<_key, _val, _comp, _alloc>& v, int index) throw() + { + if (lua_type(st, index) == LUA_TTABLE) + { + if (index < 0) + index = lua_gettop(st) + 1 + index; + + lua_pushnil(st); + + while (lua_next(st, index)) + { + _val _v; get(_v, -1); + _key _k; get(_k, -2); + v[_k] = _v; + pop(); + } + } + } + + // recv from stack std::vector (use std::map instead) + template + void get(std::vector<_val, _alloc>& v, int index) throw() + { + if (lua_type(st, index) == LUA_TTABLE) + { + if (index < 0) + index = lua_gettop(st) + 1 + index; + + lua_pushnil(st); + while (lua_next(st, index)) + { + _val _v; get(_v, -1); + + if (lua_type(st, -2) == LUA_TNUMBER) + { + int _k = lua_tointeger(st, -2); + if (_k >= 0) + { + if (_k >= v.size()) + v.resize(_k + 1); + v[_k] = _v; + } + } + + pop(); + } + } + } + + + // get value of stack with index check + template + void at(int index, T& v) throw() + { + if (index > 0 && index <= size()) + get(v, index); + else + v = T(); + } + + // pop last values from stack + void pop(void) throw() { lua_pop(st, 1); } + void popn(int n) throw() { lua_pop(st, n); } + }; + + + // manipulators for lua::bind + + class invoke_type {}; + class m_invoke_type {}; + class release_type {}; + + extern invoke_type invoke; // execute function + extern m_invoke_type m_invoke; // execute function as method (insert this pointer before argument list) + extern release_type end; // release lua::bind (pop staff from Lua stack) + + class lookup // find field in last table (or LUA_GLOBALSINDEX if first) + { + protected: + std::string name; + public: + lookup(const std::string& _name) :name(_name) {} + + friend class bind; + }; + + + // class for direct access to Lua table fields + + class table : protected stack + { + protected: + int index; + public: + table(void) :stack(0), index(0) {} + explicit table(lua_State* _st, int _index) :stack(_st), index(_index) {} + explicit table(vm& _vm) :stack(_vm.get_st()), index(LUA_GLOBALSINDEX) {} + + // get field value + template + void query(const char* name, _VAL& val) throw() + { + if (st) + { + lua_getfield(st, index, name); + stack::get(val, -1); + stack::pop(); + } + } + + // set field value + template + void update(const char* name, const _VAL& val) throw() + { + if (st) + { + stack::push(val); + lua_setfield(st, index, name); + } + } + }; + + + // Lua transaction class (only one per vm instance) + + class bind : protected stack + { + private: + int& mutex; + int refuse; + + protected: + int args_number, retvals_number; + int cur_index; + + public: + explicit bind(vm& _vm) :stack(_vm), refuse(0), args_number(0), retvals_number(0), + cur_index(LUA_GLOBALSINDEX), mutex(_vm.mutex) + { + if (mutex) refuse++; else mutex++; + } + + ~bind(void) throw() { end(); } + + // find field in last table + void lookup(const char* name) throw(); + + // return lua::table object for last table + lua::table table(void) throw() + { + if (lua_type(st, -1) == LUA_TTABLE) + return lua::table(st, lua_gettop(st)); + return lua::table(); + } + + // execute last function + void invoke(void) throw(std::exception); + + // execute last function as method + void m_invoke(void) throw(std::exception); + + // end transaction (free Lua stack) + void end(void) throw(); + + // push function argument to Lua stack + template bind& operator<<(const T& v) throw() { if (!refuse) { push(v); args_number++; } return *this; } + + // pop function return value from stack + template bind& operator>>(T& v) throw() + { + if (refuse || retvals_number < 1) + v = T(); + else + { + get(v, -retvals_number); retvals_number--; + } + + return *this; + } + + // for manipulators + bind& operator<<(const lua::lookup& f) throw(std::exception) { bind::lookup(f.name.c_str()); return *this; } + bind& operator<<(const lua::invoke_type&) throw(std::exception) { bind::invoke(); return *this; } + bind& operator<<(const lua::m_invoke_type&) throw(std::exception) { bind::m_invoke(); return *this; } + bind& operator<<(const lua::release_type&) throw(std::exception) { bind::end(); return *this; } + }; + + typedef bind transaction; + typedef lookup function; + typedef lookup field; +} + + +#endif diff --git a/src/bnetd/main.cpp b/src/bnetd/main.cpp index ab475ee56..fc118fdc9 100644 --- a/src/bnetd/main.cpp +++ b/src/bnetd/main.cpp @@ -91,6 +91,11 @@ #include "handle_apireg.h" #include "common/setup_after.h" +#ifdef WITH_LUA +#include "luainterface.h" +#endif + + /* out of memory safety */ #define OOM_SAFE_MEM 1000000 /* 1 Mbyte of safety memory */ @@ -295,6 +300,7 @@ char * write_to_pidfile(void) return pidfile; } + /* Initialize config files */ int pre_server_startup(void) { @@ -328,6 +334,7 @@ int pre_server_startup(void) eventlog(eventlog_level_error, __FUNCTION__, "error initilizing fdwatch"); return STATUS_FDWATCH_FAILURE; } + connlist_create(); gamelist_create(); timerlist_create(); @@ -374,6 +381,13 @@ int pre_server_startup(void) if (realmlist_create(prefs_get_realmfile()) < 0) eventlog(eventlog_level_error, __FUNCTION__, "could not load realm list"); topiclist_load(prefs_get_topicfile()); + + +#ifdef WITH_LUA + lua_load(prefs_get_scriptdir()); +#endif + + return 0; } diff --git a/src/bnetd/prefs.cpp b/src/bnetd/prefs.cpp index 1ce760c6c..07d2cf2eb 100644 --- a/src/bnetd/prefs.cpp +++ b/src/bnetd/prefs.cpp @@ -144,9 +144,11 @@ namespace pvpgn char const * command_groups_file; char const * tournament_file; char const * customicons_file; +#ifdef WITH_LUA + char const * scriptdir; +#endif char const * aliasfile; char const * anongame_infos_file; - char const * magicfile; unsigned int max_conns_per_IP; unsigned int max_friends; unsigned int clan_newer_time; @@ -596,6 +598,12 @@ namespace pvpgn static const char *conf_get_customicons_file(void); static int conf_setdef_customicons_file(void); +#ifdef WITH_LUA + static int conf_set_scriptdir(const char *valstr); + static const char *conf_get_scriptdir(void); + static int conf_setdef_scriptdir(void); +#endif + static int conf_set_aliasfile(const char *valstr); static const char *conf_get_aliasfile(void); static int conf_setdef_aliasfile(void); @@ -821,6 +829,9 @@ namespace pvpgn { "command_groups_file", conf_set_command_groups_file, conf_get_command_groups_file, conf_setdef_command_groups_file }, { "tournament_file", conf_set_tournament_file, conf_get_tournament_file, conf_setdef_tournament_file }, { "customicons_file", conf_set_customicons_file, conf_get_customicons_file, conf_setdef_customicons_file }, +#ifdef WITH_LUA + { "scriptdir", conf_set_scriptdir, conf_get_scriptdir, conf_setdef_scriptdir }, +#endif { "aliasfile", conf_set_aliasfile, conf_get_aliasfile, conf_setdef_aliasfile }, { "anongame_infos_file", conf_set_anongame_infos_file, conf_get_anongame_infos_file, conf_setdef_anongame_infos_file }, @@ -3084,6 +3095,27 @@ namespace pvpgn return prefs_runtime_config.customicons_file; } +#ifdef WITH_LUA + extern char const * prefs_get_scriptdir(void) + { + return prefs_runtime_config.scriptdir; + } + + static int conf_set_scriptdir(const char *valstr) + { + return conf_set_str(&prefs_runtime_config.scriptdir, valstr, NULL); + } + + static int conf_setdef_scriptdir(void) + { + return conf_set_str(&prefs_runtime_config.scriptdir, NULL, BNETD_SCRIPT_DIR); + } + + static const char* conf_get_scriptdir(void) + { + return prefs_runtime_config.scriptdir; + } +#endif extern char const * prefs_get_aliasfile(void) { diff --git a/src/bnetd/prefs.h b/src/bnetd/prefs.h index f5ea3f28d..8afd08457 100644 --- a/src/bnetd/prefs.h +++ b/src/bnetd/prefs.h @@ -158,6 +158,9 @@ namespace pvpgn extern char const * prefs_get_command_groups_file(void); extern char const * prefs_get_tournament_file(void); extern char const * prefs_get_customicons_file(void); +#ifdef WITH_LUA + extern char const * prefs_get_scriptdir(void); +#endif extern char const * prefs_get_aliasfile(void); extern char const * prefs_get_anongame_infos_file(void); diff --git a/src/bnetd/server.cpp b/src/bnetd/server.cpp index 4d10e0e82..56148ecef 100644 --- a/src/bnetd/server.cpp +++ b/src/bnetd/server.cpp @@ -88,6 +88,10 @@ #include "topic.h" #include "common/setup_after.h" +#ifdef WITH_LUA +#include "luainterface.h" +#endif + extern std::FILE * hexstrm; /* from main.c */ extern int g_ServiceStatus; @@ -1420,6 +1424,11 @@ namespace pvpgn if (topiclist_load(prefs_get_topicfile()) < 0) eventlog(eventlog_level_error, __FUNCTION__, "could not load new topic list"); +#ifdef WITH_LUA + lua_unload(); + lua_load(prefs_get_scriptdir()); +#endif + eventlog(eventlog_level_info, __FUNCTION__, "done reconfiguring"); do_restart = 0; diff --git a/src/common/setup_before.h b/src/common/setup_before.h index 639a14c13..8401049a9 100644 --- a/src/common/setup_before.h +++ b/src/common/setup_before.h @@ -126,6 +126,7 @@ const bool BNETD_CHANLOG = false; # define BNETD_DEFAULT_CONF_FILE "conf/bnetd.conf" #endif const char * const BNETD_FILE_DIR = "files"; +const char * const BNETD_SCRIPT_DIR = "script"; const char * const BNETD_STORAGE_PATH = ""; const char * const BNETD_REPORT_DIR = "reports"; const char * const BNETD_LOG_FILE = "logs/bnetd.log"; @@ -392,4 +393,9 @@ const int BNETD_MAX_SOCKVAL = 8192; #define WITH_SQL 1 #endif +// FIXME: change it +//#if defined(WITH_LUA) +#define WITH_LUA 1 +//#endif + #endif diff --git a/src/common/util.cpp b/src/common/util.cpp index a9870881e..0cfdff6d2 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -689,4 +689,92 @@ namespace pvpgn for (; *str; str++) *str = std::tolower(*str); } + /* Returns a list of files in a directory (except the ones that begin with a dot) */ + extern std::vector dir_getfiles(const std::string &directory, const char* ext, bool recursive) + { + std::vector files; + const char* _ext; + +#ifdef WIN32 + HANDLE dir; + WIN32_FIND_DATA file_data; + + if ((dir = FindFirstFile((directory + "/*").c_str(), &file_data)) == INVALID_HANDLE_VALUE) + return files; /* No files found */ + + do { + const std::string file_name = file_data.cFileName; + const std::string full_file_name = directory + "/" + file_name; + const bool is_directory = (file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0; + + if (file_name[0] == '.') + continue; + + if (is_directory) + { + // iterate subdirectories + if (recursive) + { + std::vector subfiles = dir_getfiles(full_file_name, ext, recursive); + + for (int i = 0; i < subfiles.size(); ++i) + files.push_back(subfiles[i]); + } + continue; + } + + // filter by extension + _ext = strrchr(file_name.c_str(), '.'); + if ( strcmp(ext, "*") != 0) + if (!_ext || strcasecmp(_ext, ext) != 0) + continue; + + files.push_back(full_file_name); + } while (FindNextFile(dir, &file_data)); + + FindClose(dir); +#else + DIR *dir; + class dirent *ent; + class stat st; + + dir = opendir(directory); + while ((ent = readdir(dir)) != NULL) { + const std::string file_name = ent->d_name; + const std::string full_file_name = directory + "/" + file_name; + + if (file_name[0] == '.') + continue; + + if (stat(full_file_name.c_str(), &st) == -1) + continue; + + const bool is_directory = (st.st_mode & S_IFDIR) != 0; + + if (is_directory) + { + // iterate subdirectories + if (recursive) + { + std::vector subfiles = dir_getfiles(full_file_name, ext, recursive); + + for (int i = 0; i < subfiles.size(); ++i) + files.push_back(subfiles[i]); + } + continue; + } + + // filter by extension + _ext = strrchr(file_name.c_str(), '.'); + if (strcmp(ext, "*") != 0) + if (!_ext || strcasecmp(_ext, ext) != 0) + continue; + + files.push_back(full_file_name); + } + closedir(dir); +#endif + return files; + } + } diff --git a/src/common/util.h b/src/common/util.h index 8f6a0532a..f1b56c4dc 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -24,6 +24,14 @@ #include #include +#include + +/* platform dependent directory list api */ +#ifdef WIN32 +#include +#else +#include +#endif namespace pvpgn { @@ -45,6 +53,7 @@ namespace pvpgn extern char * buildpath(char const *root, const char *suffix); extern int timestr_to_time(char const * timestr, std::time_t* ptime); extern void strlower(char* str); + extern std::vector dir_getfiles(const std::string &directory, const char* ext, bool recursive); static inline char * str_skip_space(char *str) { From 4ea106be50b38d5e9fa692c2124d68c2aa47c8ef Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Wed, 16 Apr 2014 11:10:52 +0400 Subject: [PATCH 005/144] /rehash configs separately --- src/bnetd/command.cpp | 56 +++++++++++++- src/bnetd/server.cpp | 165 ++++++++++++++++++++++++++++-------------- src/bnetd/server.h | 25 ++++++- src/win32/winmain.cpp | 2 +- 4 files changed, 190 insertions(+), 58 deletions(-) diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index aa963299f..d2abc79a4 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -3922,7 +3922,61 @@ namespace pvpgn static int _handle_rehash_command(t_connection * c, char const *text) { - server_restart_wraper(); + int mode = restart_mode_all; // all by default + + text = skip_command(text); + + if (text[0] == '\0') + { + message_send_text(c, message_type_info, c, "Usage:"); + message_send_text(c, message_type_info, c, "/rehash "); + message_send_text(c, message_type_info, c, " = all | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua"); + return 0; + } + + if (!strcasecmp(text, "all")) + mode = restart_mode_channels; + else if (!strcasecmp(text, "channels")) + mode = restart_mode_channels; + else if (!strcasecmp(text, "realms")) + mode = restart_mode_realms; + else if (!strcasecmp(text, "autoupdate")) + mode = restart_mode_autoupdate; + else if (!strcasecmp(text, "news")) + mode = restart_mode_news; + else if (!strcasecmp(text, "versioncheck")) + mode = restart_mode_versioncheck; + else if (!strcasecmp(text, "ipbans")) + mode = restart_mode_ipbans; + else if (!strcasecmp(text, "helpfile")) + mode = restart_mode_helpfile; + else if (!strcasecmp(text, "banners")) + mode = restart_mode_banners; + else if (!strcasecmp(text, "tracker")) + mode = restart_mode_tracker; + else if (!strcasecmp(text, "commandgroups")) + mode = restart_mode_commandgroups; + else if (!strcasecmp(text, "aliasfile")) + mode = restart_mode_aliasfile; + else if (!strcasecmp(text, "transfile")) + mode = restart_mode_transfile; + else if (!strcasecmp(text, "tournament")) + mode = restart_mode_tournament; + else if (!strcasecmp(text, "icons")) + mode = restart_mode_icons; + else if (!strcasecmp(text, "anongame")) + mode = restart_mode_anongame; + else if (!strcasecmp(text, "topiclist")) + mode = restart_mode_topiclist; + else if (!strcasecmp(text, "lua")) + mode = restart_mode_lua; + else + { + message_send_text(c, message_type_info, c, "Invalid mode."); + return 0; + } + + server_restart_wraper(mode); return 0; } diff --git a/src/bnetd/server.cpp b/src/bnetd/server.cpp index 56148ecef..614f4c457 100644 --- a/src/bnetd/server.cpp +++ b/src/bnetd/server.cpp @@ -139,8 +139,8 @@ namespace pvpgn sigexittime = std::time(NULL) + (std::time_t)prefs_get_shutdown_delay(); } - extern void server_restart_wraper(void){ - do_restart = 1; + extern void server_restart_wraper(int mode){ + do_restart = mode; } extern void server_save_wraper(void){ @@ -1352,81 +1352,136 @@ namespace pvpgn if (do_restart) { - eventlog(eventlog_level_info, __FUNCTION__, "reading configuration files"); - if (cmdline_get_preffile()) + if (do_restart == restart_mode_all) { - if (prefs_load(cmdline_get_preffile()) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not parse configuration file"); - } - else - if (prefs_load(BNETD_DEFAULT_CONF_FILE) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "using default configuration"); + eventlog(eventlog_level_info, __FUNCTION__, "reading configuration files"); + if (cmdline_get_preffile()) + { + if (prefs_load(cmdline_get_preffile()) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not parse configuration file"); + } + else + if (prefs_load(BNETD_DEFAULT_CONF_FILE) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "using default configuration"); - if (eventlog_open(prefs_get_logfile()) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not use the file \"%s\" for the eventlog", prefs_get_logfile()); + if (eventlog_open(prefs_get_logfile()) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not use the file \"%s\" for the eventlog", prefs_get_logfile()); - /* FIXME: load new network settings */ + /* FIXME: load new network settings */ - /* reload server name */ - server_set_hostname(); + /* reload server name */ + server_set_hostname(); - attrlayer_load_default(); + attrlayer_load_default(); + } - channellist_reload(); + if (do_restart == restart_mode_all || do_restart == restart_mode_channels) + { + channellist_reload(); + } - if (realmlist_reload(prefs_get_realmfile()) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not reload realm list"); + if (do_restart == restart_mode_all || do_restart == restart_mode_realms) + { + if (realmlist_reload(prefs_get_realmfile()) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not reload realm list"); + } - autoupdate_unload(); - if (autoupdate_load(prefs_get_mpqfile()) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not load autoupdate list"); + if (do_restart == restart_mode_all || do_restart == restart_mode_autoupdate) + { + autoupdate_unload(); + if (autoupdate_load(prefs_get_mpqfile()) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not load autoupdate list"); + } - news_unload(); - if (news_load(prefs_get_newsfile()) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not load news list"); + if (do_restart == restart_mode_all || do_restart == restart_mode_news) + { + news_unload(); + if (news_load(prefs_get_newsfile()) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not load news list"); + } - versioncheck_unload(); - if (versioncheck_load(prefs_get_versioncheck_file()) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not load versioncheck list"); + if (do_restart == restart_mode_all || do_restart == restart_mode_versioncheck) + { + versioncheck_unload(); + if (versioncheck_load(prefs_get_versioncheck_file()) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not load versioncheck list"); + } - if (ipbanlist_destroy() < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not unload old IP ban list"); - ipbanlist_create(); - if (ipbanlist_load(prefs_get_ipbanfile()) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not load new IP ban list"); + if (do_restart == restart_mode_all || do_restart == restart_mode_ipbans) + { + if (ipbanlist_destroy() < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not unload old IP ban list"); + ipbanlist_create(); + if (ipbanlist_load(prefs_get_ipbanfile()) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not load new IP ban list"); + } - helpfile_unload(); - if (helpfile_init(prefs_get_helpfile()) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not load the helpfile"); + if (do_restart == restart_mode_all || do_restart == restart_mode_helpfile) + { + helpfile_unload(); + if (helpfile_init(prefs_get_helpfile()) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not load the helpfile"); + } - adbannerlist.reset(new AdBannerComponent(prefs_get_adfile())); + if (do_restart == restart_mode_all || do_restart == restart_mode_banners) + { + adbannerlist.reset(new AdBannerComponent(prefs_get_adfile())); + } - if (prefs_get_track()) - tracker_set_servers(prefs_get_trackserv_addrs()); - if (command_groups_reload(prefs_get_command_groups_file()) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not load new command_groups list"); + if (do_restart == restart_mode_all || do_restart == restart_mode_tracker) + { + if (prefs_get_track()) + tracker_set_servers(prefs_get_trackserv_addrs()); + } + + if (do_restart == restart_mode_all || do_restart == restart_mode_commandgroups) + { + if (command_groups_reload(prefs_get_command_groups_file()) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not load new command_groups list"); + } - aliasfile_unload(); - aliasfile_load(prefs_get_aliasfile()); + if (do_restart == restart_mode_all || do_restart == restart_mode_aliasfile) + { + aliasfile_unload(); + aliasfile_load(prefs_get_aliasfile()); + } - if (trans_reload(prefs_get_transfile(), TRANS_BNETD) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not reload trans list"); + if (do_restart == restart_mode_all || do_restart == restart_mode_transfile) + { + if (trans_reload(prefs_get_transfile(), TRANS_BNETD) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not reload trans list"); + } - tournament_reload(prefs_get_tournament_file()); + if (do_restart == restart_mode_all || do_restart == restart_mode_tournament) + { + tournament_reload(prefs_get_tournament_file()); + } - customicons_unload(); - customicons_load(prefs_get_customicons_file()); + if (do_restart == restart_mode_all || do_restart == restart_mode_icons) + { + customicons_unload(); + customicons_load(prefs_get_customicons_file()); + } - anongame_infos_unload(); - anongame_infos_load(prefs_get_anongame_infos_file()); + if (do_restart == restart_mode_all || do_restart == restart_mode_anongame) + { + anongame_infos_unload(); + anongame_infos_load(prefs_get_anongame_infos_file()); + } - topiclist_unload(); - if (topiclist_load(prefs_get_topicfile()) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not load new topic list"); + if (do_restart == restart_mode_all || do_restart == restart_mode_topiclist) + { + topiclist_unload(); + if (topiclist_load(prefs_get_topicfile()) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not load new topic list"); + } #ifdef WITH_LUA - lua_unload(); - lua_load(prefs_get_scriptdir()); + if (do_restart == restart_mode_all || do_restart == restart_mode_lua) + { + lua_unload(); + lua_load(prefs_get_scriptdir()); + } #endif eventlog(eventlog_level_info, __FUNCTION__, "done reconfiguring"); diff --git a/src/bnetd/server.h b/src/bnetd/server.h index cce484f4f..6723efe28 100644 --- a/src/bnetd/server.h +++ b/src/bnetd/server.h @@ -71,6 +71,29 @@ namespace pvpgn namespace bnetd { + enum restart_mode + { + restart_mode_none, // always first (0) + + restart_mode_all, + restart_mode_channels, + restart_mode_realms, + restart_mode_autoupdate, + restart_mode_news, + restart_mode_versioncheck, + restart_mode_ipbans, + restart_mode_helpfile, + restart_mode_banners, + restart_mode_tracker, + restart_mode_commandgroups, + restart_mode_aliasfile, + restart_mode_transfile, + restart_mode_tournament, + restart_mode_icons, + restart_mode_anongame, + restart_mode_topiclist, + restart_mode_lua + }; extern unsigned int server_get_uptime(void); extern unsigned int server_get_starttime(void); @@ -81,7 +104,7 @@ namespace pvpgn extern int server_process(void); extern void server_quit_wraper(void); - extern void server_restart_wraper(void); + extern void server_restart_wraper(int mode); extern void server_save_wraper(void); } diff --git a/src/win32/winmain.cpp b/src/win32/winmain.cpp index bf70e56f0..5c4d2ccf4 100644 --- a/src/win32/winmain.cpp +++ b/src/win32/winmain.cpp @@ -287,7 +287,7 @@ namespace pvpgn else if (id == IDM_SAVE) server_save_wraper(); else if (id == IDM_RESTART) - server_restart_wraper(); + server_restart_wraper(restart_mode_all); else if (id == IDM_SHUTDOWN) server_quit_wraper(); else if (id == IDM_CLEAR) From 843825907737934a5d8b029649dffc0f57cb20e7 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 18 Apr 2014 21:57:45 +0400 Subject: [PATCH 006/144] New Lua events implemented: handle_game_create, handle_game_report, handle_game_end, handle_game_destroy, handle_game_changestatus, handle_user_joingame, handle_user_leftgame, New Lua function: get_account --- src/bnetd/account.cpp | 13 +- src/bnetd/connection.cpp | 14 ++ src/bnetd/game.cpp | 22 +++ src/bnetd/handle_bnet.cpp | 16 +- src/bnetd/luainterface.cpp | 364 ++++++++++++++++++++++++++++++++++--- src/bnetd/luainterface.h | 27 +++ src/bnetd/luawrapper.cpp | 170 ++++++++--------- src/bnetd/luawrapper.h | 4 +- 8 files changed, 512 insertions(+), 118 deletions(-) diff --git a/src/bnetd/account.cpp b/src/bnetd/account.cpp index 43d0a9345..b1cff2792 100644 --- a/src/bnetd/account.cpp +++ b/src/bnetd/account.cpp @@ -81,16 +81,25 @@ namespace pvpgn register unsigned int h; register unsigned int len = std::strlen(username); + int c; for (h = 5381; len > 0; --len, ++username) { h += h << 5; - if (std::isupper((int)*username) == 0) + + c = (int)*username; + // FIXME: (HarpyWar) I add this condition because if we call connlist_find_connection_by_accountname + // with wrong account name, then it fails on std::isupper(c) + if (c < -1 || c > 255) + break; + + if (std::isupper(c) == 0) h ^= *username; else - h ^= std::tolower((int)*username); + h ^= std::tolower(c); } return h; } + static t_account * account_create(char const * username, char const * passhash1) { t_account * account; diff --git a/src/bnetd/connection.cpp b/src/bnetd/connection.cpp index 04c8c7139..305d4a170 100644 --- a/src/bnetd/connection.cpp +++ b/src/bnetd/connection.cpp @@ -76,6 +76,10 @@ #include "common/setup_after.h" #include "icons.h" +#ifdef WITH_LUA +#include "luainterface.h" +#endif + namespace pvpgn { @@ -2185,6 +2189,7 @@ namespace pvpgn if (!(c->protocol.game = gamelist_find_game_available(gamename, c->protocol.client.clienttag, type)) && !gamelist_find_game_available(gamename, c->protocol.client.clienttag, game_type_all)) { /* do not allow creation of games with same name of same clienttag when game is not started or done */ + // create game with initial values c->protocol.game = game_create(gamename, gamepass, gameinfo, type, version, c->protocol.client.clienttag, conn_get_gameversion(c)); if (c->protocol.game && conn_get_realm(c) && conn_get_charname(c)) { @@ -2195,11 +2200,18 @@ namespace pvpgn } if (c->protocol.game) { + // add new player to the game if (game_add_player(conn_get_game(c), gamepass, version, c) < 0) { c->protocol.game = NULL; // bad password or version # return -1; } +#ifdef WITH_LUA + // handle game create when it's owner joins the game + if (c == game_get_owner(c->protocol.game)) + lua_handle_game(c->protocol.game, luaevent_game_create); +#endif + if (game_is_ladder(c->protocol.game)) { if (c == game_get_owner(c->protocol.game)) message_send_text(c, message_type_info, c, "Created ladder game"); @@ -2207,6 +2219,8 @@ namespace pvpgn message_send_text(c, message_type_info, c, "Joined ladder game"); } } + + } else c->protocol.game = NULL; diff --git a/src/bnetd/game.cpp b/src/bnetd/game.cpp index d5a0bbe96..f5eb2960a 100644 --- a/src/bnetd/game.cpp +++ b/src/bnetd/game.cpp @@ -42,6 +42,9 @@ #include "game_conv.h" #include "common/setup_after.h" +#ifdef WITH_LUA +#include "luainterface.h" +#endif namespace pvpgn { @@ -471,6 +474,10 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "got NULL game"); return; } + +#ifdef WITH_LUA + lua_handle_game(game, luaevent_game_destroy); +#endif elist_del(&game->glist_link); glist_length--; @@ -736,6 +743,10 @@ namespace pvpgn return -1; } +#ifdef WITH_LUA + lua_handle_game(game, luaevent_game_end); +#endif + if (game->clienttag == CLIENTTAG_WARCRAFT3_UINT || game->clienttag == CLIENTTAG_WAR3XP_UINT) // war3 game reporting is done elsewhere, so we can skip this function return 0; @@ -1098,6 +1109,10 @@ namespace pvpgn } std::fprintf(fp, "\nThis game lasted %lu minutes (elapsed).\n", ((unsigned long int)std::difftime(now, game->start_time)) / 60); + +#ifdef WITH_LUA + lua_handle_game(game, luaevent_game_report); +#endif if (std::fclose(fp) < 0) { @@ -1437,6 +1452,10 @@ namespace pvpgn if (status == game_status_started && game->start_time == (std::time_t)0) game->start_time = now; game->status = status; + +#ifdef WITH_LUA + lua_handle_game(game, luaevent_game_changestatus); +#endif } @@ -1730,6 +1749,9 @@ namespace pvpgn game_choose_host(game); +#ifdef WITH_LUA + lua_handle_user(c, game, luaevent_user_leftgame); +#endif return 0; } diff --git a/src/bnetd/handle_bnet.cpp b/src/bnetd/handle_bnet.cpp index 76fd50463..bfa0f7503 100644 --- a/src/bnetd/handle_bnet.cpp +++ b/src/bnetd/handle_bnet.cpp @@ -76,7 +76,9 @@ #include #endif #include "common/setup_after.h" - +#ifdef WITH_LUA +#include "luainterface.h" +#endif namespace pvpgn { @@ -3793,6 +3795,10 @@ namespace pvpgn else eventlog(eventlog_level_info, __FUNCTION__, "[%d] \"%s\" joined game \"%s\"", conn_get_socket(c), conn_get_username(c), gamename); +#ifdef WITH_LUA + lua_handle_user(c, game, luaevent_user_joingame); +#endif + return 0; } @@ -4029,6 +4035,7 @@ namespace pvpgn else { eventlog(eventlog_level_error, __FUNCTION__, "[%d] unknown startgame4 status %d (clienttag: %s)", conn_get_socket(c), status, clienttag_uint_to_str(conn_get_clienttag(c))); } + } else if ((status & CLIENT_STARTGAME4_STATUSMASK_INIT_VALID) == status) { /*valid creation status would be: @@ -4041,11 +4048,13 @@ namespace pvpgn gtype = bngtype_to_gtype(conn_get_clienttag(c), bngtype); if ((gtype == game_type_ladder && account_get_auth_createladdergame(conn_get_account(c)) == 0) || (gtype != game_type_ladder && account_get_auth_createnormalgame(conn_get_account(c)) == 0)) eventlog(eventlog_level_info, __FUNCTION__, "[%d] game start for \"%s\" refused (no authority)", conn_get_socket(c), conn_get_username(c)); - else { + else + { //find is there any existing game with same name and allow the host to create game // with same name only when another game is already started or already done if ((!(game = gamelist_find_game_available(gamename, conn_get_clienttag(c), game_type_all))) && - (conn_set_game(c, gamename, gamepass, gameinfo, gtype, STARTVER_GW4) == 0)) { + (conn_set_game(c, gamename, gamepass, gameinfo, gtype, STARTVER_GW4) == 0)) + { game_set_option(conn_get_game(c), bngoption_to_goption(conn_get_clienttag(c), gtype, option)); if (status & CLIENT_STARTGAME4_STATUS_PRIVATE) game_set_flag(conn_get_game(c), game_flag_private); @@ -4054,6 +4063,7 @@ namespace pvpgn if (bngtype == CLIENT_GAMELISTREQ_LOADED) /* PELISH: seems strange but it is really needed for loaded games */ game_set_status(conn_get_game(c), game_status_loaded); //FIXME: still need special handling for status disc-is-loss and replay + } } } diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index c8534c5aa..26a2b896e 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -15,6 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#define GAME_INTERNAL_ACCESS + #include "common/setup_before.h" #include "command.h" @@ -23,6 +25,8 @@ #include #include + + #include "compat/strcasecmp.h" #include "compat/snprintf.h" #include "common/tag.h" @@ -71,8 +75,8 @@ #include "attrlayer.h" - #include "luawrapper.h" +#include "luainterface.h" namespace pvpgn { @@ -83,34 +87,53 @@ namespace pvpgn void _register_functions(); + std::map get_account_object(const char *username); + std::map get_account_object(t_connection * c); + std::map get_game_object(t_game * game); + + + template + T join(const A &begin, const A &end, const T &t); + int _sum(lua_State* L); int __message_send_text(lua_State* L); + int __eventlog(lua_State* L); + int __get_account(lua_State* L); - char xmsgtemp[MAX_MESSAGE_LEN]; - char xmsgtemp2[MAX_MESSAGE_LEN]; + char _msgtemp[MAX_MESSAGE_LEN]; + char _msgtemp2[MAX_MESSAGE_LEN]; - /* Reload all the lua scripts */ + /* Unload all the lua scripts */ extern void lua_unload() { - + // nothing to do, "vm.initialize()" already destroys lua vm before initialize } /* Initialize lua, register functions and load scripts */ extern void lua_load(char const * scriptdir) { + eventlog(eventlog_level_info, __FUNCTION__, "Loading Lua interface..."); + try { - // initialize vm.initialize(); std::vector files = dir_getfiles(std::string(scriptdir), ".lua", true); - + // load all files from the script directory for (int i = 0; i < files.size(); ++i) + { vm.load_file(files[i].c_str()); + snprintf(_msgtemp, sizeof(_msgtemp), "%s", files[i].c_str()); + eventlog(eventlog_level_info, __FUNCTION__, _msgtemp); + } + _register_functions(); + + snprintf(_msgtemp, sizeof(_msgtemp), "Lua sripts were successfully loaded (%u files)", files.size()); + eventlog(eventlog_level_info, __FUNCTION__, _msgtemp); } catch (const std::exception& e) { @@ -122,60 +145,220 @@ namespace pvpgn } } + /* Register C++ functions to be able use them from lua scripts */ void _register_functions() { + // global variables + lua::table g(vm); + g.update("PVPGN_SOFTWARE", PVPGN_SOFTWARE); + g.update("PVPGN_VERSION", PVPGN_VERSION); + // register CFunction vm.reg("sum", _sum); vm.reg("message_send_text", __message_send_text); + vm.reg("eventlog", __eventlog); + vm.reg("get_account", __get_account); // FIXME: - + // register package 'event' + static const luaL_Reg event[] = + { + { 0, 0 } + }; + vm.reg("event", event); } -/* Lua Events */ + + /* Lua Events (called from scripts) */ #ifndef _LUA_EVENTS_ extern int lua_handle_command(t_connection * c, char const * text) { - unsigned int sessionkey; // FIXME: unsigned int - int result; + int result = 0; + std::map o_account = get_account_object(c); + try + { + // invoke lua method + lua::transaction(vm) << lua::lookup("handle_command") << o_account << text << lua::invoke >> result << lua::end; + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return result; + } + + extern void lua_handle_game(t_game * game, t_luaevent_type luaevent) + { + const char * func_name; + switch (luaevent) + { + case luaevent_game_create: + func_name = "handle_game_create"; + break; + case luaevent_game_report: + func_name = "handle_game_report"; + break; + case luaevent_game_end: + func_name = "handle_game_end"; + break; + case luaevent_game_destroy: + func_name = "handle_game_destroy"; + break; + case luaevent_game_changestatus: + func_name = "handle_game_changestatus"; + break; + } + + try + { + std::map o_game = get_game_object(game); + lua::transaction(vm) << lua::lookup(func_name) << o_game << lua::invoke << lua::end; + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + } - sessionkey = conn_get_sessionkey(c); + extern void lua_handle_user(t_connection * c, t_game * game, t_luaevent_type luaevent) + { + const char * func_name; + switch (luaevent) + { + case luaevent_user_joingame: + func_name = "handle_user_joingame"; + break; - lua::transaction(vm) << lua::lookup("handle_command") << sessionkey << text << lua::invoke >> result << lua::end; + case luaevent_user_leftgame: + func_name = "handle_user_leftgame"; + break; + } - return result; + std::map o_account = get_account_object(c); + std::map o_game = get_game_object(game); + try + { + lua::transaction(vm) << lua::lookup("handle_user_leftgame") << o_account << o_game << lua::invoke << lua::end; + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } } #endif -/* --- Lua Functions (called from scripts) */ + /* --- Lua Functions (called from scripts) */ #ifndef _LUA_FUNCTIONS_ + /* Send message text to user */ int __message_send_text(lua_State* L) { - lua::stack st(L); - unsigned int sessionkey_src, sessionkey_dst; const char *text; + const char *username_src, *username_dst; int message_type; - t_connection *c_src, *c_dst; + t_connection *c_src = NULL, *c_dst = NULL; - // get vars - st.at(1, sessionkey_dst); - st.at(2, message_type); - st.at(3, sessionkey_src); - st.at(4, text); + try + { + lua::stack st(L); + // get args + st.at(1, username_dst); + st.at(2, message_type); + st.at(3, username_src); + st.at(4, text); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } // get user connections - c_dst = connlist_find_connection_by_sessionkey(sessionkey_dst); - c_src = connlist_find_connection_by_sessionkey(sessionkey_src); + if (t_account * account = accountlist_find_account(username_dst)) + c_dst = account_get_conn(account); + + if (username_src) + if (t_account * account = accountlist_find_account(username_src)) + c_src = account_get_conn(account); // send message - message_send_text(c_dst, (t_message_type)message_type, c_src, text); + // (source can be NULL, but destination cant) + if (c_dst) + message_send_text(c_dst, (t_message_type)message_type, c_src, text); + + return 0; + } + + /* Log text into logfile */ + int __eventlog(lua_State* L) + { + int loglevel; + const char *text, *function; + + try + { + lua::stack st(L); + // get args + st.at(1, loglevel); + st.at(2, function); + st.at(3, text); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + eventlog(t_eventlog_level(loglevel), function, text); return 0; } + /* Log text into logfile */ + int __get_account(lua_State* L) + { + const char *username; + std::map o_account; + + try + { + lua::stack st(L); + // get args + st.at(1, username); + o_account = get_account_object(username); + + st.push(o_account); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + + return 1; + } int _sum(lua_State* L) @@ -194,5 +377,134 @@ namespace pvpgn #endif + + std::map get_account_object(const char *username) + { + std::map o_account; + if (t_connection *c = connlist_find_connection_by_accountname(username)) + o_account = get_account_object(c); + + return o_account; + } + + std::map get_account_object(t_connection * c) + { + std::map o_account; + + t_account * account = conn_get_account(c); + if (!account) + return o_account; + + o_account["id"] = std::to_string(account_get_uid(account)); + o_account["name"] = account_get_name(account); + o_account["email"] = account_get_email(account); + o_account["commandgroups"] = std::to_string(account_get_command_groups(account)); + o_account["locked"] = account_get_auth_lock(account) ? "true" : "false"; + o_account["muted"] = account_get_auth_mute(account) ? "true" : "false"; + o_account["country"] = conn_get_country(c); + o_account["clientver"] = conn_get_clientver(c); + o_account["latency"] = std::to_string(conn_get_latency(c)); + if (t_clienttag clienttag = conn_get_clienttag(c)) + o_account["clienttag"] = clienttag_uint_to_str(clienttag); + if (t_game *game = conn_get_game(c)) + o_account["game_id"] = std::to_string(game_get_id(game)); + if (t_channel *channel = conn_get_channel(c)) + o_account["channel_id"] = std::to_string(channel_get_channelid(channel)); + + return o_account; + } + + + std::map get_game_object(t_game * game) + { + std::map o_game; + + if (!game) + return o_game; + + o_game["id"] = std::to_string(game->id); + o_game["name"] = game->name; + o_game["pass"] = game->pass; + o_game["info"] = game->info; + o_game["type"] = std::to_string(game->type); + o_game["flag"] = std::to_string(game->flag); + + o_game["address"] = addr_num_to_ip_str(game->addr); + o_game["port"] = std::to_string(game->port); + o_game["status"] = std::to_string(game->status); + o_game["currentplayers"] = std::to_string(game->ref); + o_game["totalplayers"] = std::to_string(game->count); + o_game["maxplayers"] = std::to_string(game->maxplayers); + o_game["mapname"] = game->mapname; + o_game["option"] = std::to_string(game->option); + o_game["maptype"] = std::to_string(game->maptype); + o_game["tileset"] = std::to_string(game->tileset); + o_game["speed"] = std::to_string(game->speed); + o_game["mapsize_x"] = std::to_string(game->mapsize_x); + o_game["mapsize_y"] = std::to_string(game->mapsize_y); + if (t_connection *c = game->owner) + { + if (t_account *account = conn_get_account(c)) + o_game["owner"] = account_get_name(account); + } + + std::vector players; + for (int i = 0; i < game->ref; i++) + { + if (t_account *account = game->players[i]) + players.push_back(account_get_name(account)); + } + o_game["players"] = join(players.begin(), players.end(), std::string(",")); + + + o_game["bad"] = std::to_string(game->bad); // if 1, then the results will be ignored + + std::vector results; + if (game->results) + { + for (int i = 0; i < game->count; i++) + results.push_back(std::to_string(game->results[i])); + } + o_game["results"] = join(results.begin(), results.end(), std::string(",")); + // UNDONE: add report_heads and report_bodies: they are XML strings + + o_game["create_time"] = std::to_string(game->create_time); + o_game["start_time"] = std::to_string(game->start_time); + o_game["lastaccess_time"] = std::to_string(game->lastaccess_time); + + o_game["difficulty"] = std::to_string(game->difficulty); + o_game["version"] = vernum_to_verstr(game->version); + o_game["startver"] = std::to_string(game->startver); + + if (t_clienttag clienttag = game->clienttag) + o_game["clienttag"] = clienttag_uint_to_str(clienttag); + + + if (game->description) + o_game["description"] = game->description; + if (game->realmname) + o_game["realmname"] = game->realmname; + + return o_game; + } + + + + + /* Join two vector objects to string by delimeter */ + template + T join(const A &begin, const A &end, const T &t) + { + T result; + for (A it = begin; + it != end; + it++) + { + if (!result.empty()) + result.append(t); + result.append(*it); + } + return result; + } } } \ No newline at end of file diff --git a/src/bnetd/luainterface.h b/src/bnetd/luainterface.h index 142539755..3ce2899b3 100644 --- a/src/bnetd/luainterface.h +++ b/src/bnetd/luainterface.h @@ -39,12 +39,39 @@ namespace pvpgn namespace bnetd { + typedef enum { + luaevent_game_create, + luaevent_game_report, + luaevent_game_end, + luaevent_game_destroy, + luaevent_game_changestatus, + + luaevent_channel_create, + luaevent_channel_destroy, + + luaevent_user_joingame, + luaevent_user_leftgame, + luaevent_user_joinchannel, + luaevent_user_leftchannel, + + luaevent_user_message, // user-to-channel + luaevent_user_whisper, // user-to-user + luaevent_user_login, + luaevent_user_disconnect + + } t_luaevent_type; extern void lua_load(char const * scriptdir); extern void lua_unload(); extern int lua_handle_command(t_connection * c, char const * text); + extern void lua_handle_game(t_game * game, t_luaevent_type luaevent); // game events + extern void lua_handle_user(t_connection * c, t_game * game, t_luaevent_type luaevent); // + //extern void lua_handle_user(t_connection * c, t_connection * c_dst, const char * text, t_luaevent_type luaevent); + //extern void lua_handle_user(t_connection * c, t_channel * channel, const char * text, t_luaevent_type luaevent); + //extern void lua_handle_user(t_connection * c, t_channel * channel, t_luaevent_type luaevent); + //extern void lua_handle_user(t_connection * c, t_luaevent_type luaevent); } diff --git a/src/bnetd/luawrapper.cpp b/src/bnetd/luawrapper.cpp index 34e304d7b..16882148c 100644 --- a/src/bnetd/luawrapper.cpp +++ b/src/bnetd/luawrapper.cpp @@ -1,138 +1,138 @@ -/* - * Copyright (C) Anton Burdinuk +/* + * Copyright (C) Anton Burdinuk */ - + #include "luawrapper.h" namespace lua { - invoke_type invoke; - m_invoke_type m_invoke; - release_type end; + invoke_type invoke; + m_invoke_type m_invoke; + release_type end; } -void lua::throw_lua_exception(lua_State* st,const std::string& addinfo) throw(std::exception) +void lua::throw_lua_exception(lua_State* st, const std::string& addinfo) throw(std::exception) { - size_t len=0; - - const char* p=lua_tolstring(st,-1,&len); - - std::string s(p,len); - - if(addinfo.length()) - { - s.append(" ",1); - s.append(addinfo); - } - - lua_pop(st,1); - - throw(exception(s)); + size_t len = 0; + + const char* p = lua_tolstring(st, -1, &len); + + std::string s(p, len); + + if (addinfo.length()) + { + s.append(" ", 1); + s.append(addinfo); + } + + lua_pop(st, 1); + + throw(exception(s)); } void lua::vm::initialize(void) throw(std::exception) { - done(); + done(); - st=lua_open(); + st = lua_open(); - if(!st) - throw(exception("can`t create lua virtual machine instance")); + if (!st) + throw(exception("can`t create lua virtual machine instance")); - luaL_openlibs(st); + luaL_openlibs(st); } void lua::vm::load_file(const char* file) throw(std::exception) { - if(!st) - throw(exception("lua virtual machine is not ready")); - - if(luaL_loadfile(st,file) || lua_pcall(st,0,0,0)) - throw_lua_exception(st); + if (!st) + throw(exception("lua virtual machine is not ready")); + + if (luaL_loadfile(st, file) || lua_pcall(st, 0, 0, 0)) + throw_lua_exception(st); } -void lua::vm::eval(const std::string& stmt,int offset) throw(std::exception) +void lua::vm::eval(const std::string& stmt, int offset) throw(std::exception) { - enum {max_chunk_name_len=64}; + enum { max_chunk_name_len = 64 }; - if(offset>stmt.length()) - offset=stmt.length(); + if (offset > stmt.length()) + offset = stmt.length(); - const char* p=stmt.c_str()+offset; + const char* p = stmt.c_str() + offset; - int n=stmt.length()-offset; + int n = stmt.length() - offset; - if(luaL_loadbuffer(st,p,n,n>max_chunk_name_len?(std::string(p,max_chunk_name_len)+"...").c_str():p) || lua_pcall(st,0,0,0)) - throw_lua_exception(st); + if (luaL_loadbuffer(st, p, n, n > max_chunk_name_len ? (std::string(p, max_chunk_name_len) + "...").c_str() : p) || lua_pcall(st, 0, 0, 0)) + throw_lua_exception(st); } void lua::bind::lookup(const char* name) throw() { - if(!refuse) - { - if(lua_type(st,cur_index)!=LUA_TNIL) + if (!refuse) { - lua_getfield(st,cur_index,name); - cur_index=size(); + if (lua_type(st, cur_index) != LUA_TNIL) + { + lua_getfield(st, cur_index, name); + cur_index = size(); + } } - } } void lua::bind::end(void) throw() { - if(!refuse && mutex) - { - int n=size()-st_top; - if(n>0) - lua_pop(st,n); - - mutex=0; - - args_number=retvals_number=0; - cur_index=LUA_GLOBALSINDEX; - } + if (!refuse && mutex) + { + int n = size() - st_top; + if (n > 0) + lua_pop(st, n); + + mutex = 0; + + args_number = retvals_number = 0; + cur_index = LUA_GLOBALSINDEX; + } } void lua::bind::invoke(void) throw(std::exception) { - int function_index=-(args_number+1); - - if(!refuse && lua_isfunction(st,function_index)) - { - int n=size(); - - if(lua_pcall(st,args_number,LUA_MULTRET,0)) - throw_lua_exception(st); - - retvals_number=size()+args_number+1-n; - } + int function_index = -(args_number + 1); + + if (!refuse && lua_isfunction(st, function_index)) + { + int n = size(); + + if (lua_pcall(st, args_number, LUA_MULTRET, 0)) + throw_lua_exception(st); + + retvals_number = size() + args_number + 1 - n; + } } void lua::bind::m_invoke(void) throw(std::exception) { - if(!refuse) - { - int function_index=-(args_number+1); - int this_index=function_index-1; - - if(lua_isfunction(st,function_index) && lua_istable(st,this_index)) + if (!refuse) { - lua_pushvalue(st,this_index); - args_number++; - lua_insert(st,-args_number); - - - int n=size(); - - if(lua_pcall(st,args_number,LUA_MULTRET,0)) - throw_lua_exception(st); + int function_index = -(args_number + 1); + int this_index = function_index - 1; + + if (lua_isfunction(st, function_index) && lua_istable(st, this_index)) + { + lua_pushvalue(st, this_index); + args_number++; + lua_insert(st, -args_number); + + + int n = size(); + + if (lua_pcall(st, args_number, LUA_MULTRET, 0)) + throw_lua_exception(st); - retvals_number=size()+args_number+1-n; + retvals_number = size() + args_number + 1 - n; + } } - } } diff --git a/src/bnetd/luawrapper.h b/src/bnetd/luawrapper.h index ae3cd8ccf..15f520d11 100644 --- a/src/bnetd/luawrapper.h +++ b/src/bnetd/luawrapper.h @@ -141,8 +141,8 @@ namespace lua void get(int& v, int index) throw() { v = lua_tointeger(st, index); } void get(double& v, int index) throw() { v = lua_tonumber(st, index); } void get(const char*& v, int index) throw() - { - size_t len = 0; + { + size_t len = 0; v = lua_tolstring(st, index, &len); } void get(std::string& v, int index) throw() From 2e87533c0c7c86131e371e34953198989cf0d989 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 18 Apr 2014 23:52:27 +0400 Subject: [PATCH 007/144] Fix to find account by name offline, but not only online (connlist_find_connection_by_accountname -> accountlist_find_account) New Lua functions: account_attr_get account_attr_set --- src/bnetd/luainterface.cpp | 236 +++++++++++++++++++++++++++++-------- src/bnetd/luawrapper.h | 1 + 2 files changed, 188 insertions(+), 49 deletions(-) diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 26a2b896e..79adaf9b9 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -87,8 +87,8 @@ namespace pvpgn void _register_functions(); + std::map get_account_object(t_account *account); std::map get_account_object(const char *username); - std::map get_account_object(t_connection * c); std::map get_game_object(t_game * game); @@ -98,12 +98,22 @@ namespace pvpgn int _sum(lua_State* L); int __message_send_text(lua_State* L); int __eventlog(lua_State* L); - int __get_account(lua_State* L); + int __account_get(lua_State* L); + int __account_get_attr(lua_State* L); + int __account_set_attr(lua_State* L); char _msgtemp[MAX_MESSAGE_LEN]; char _msgtemp2[MAX_MESSAGE_LEN]; + typedef enum { + attr_type_str, + attr_type_num, + attr_type_bool, + attr_type_raw + } t_attr_type; + + /* Unload all the lua scripts */ extern void lua_unload() { @@ -120,7 +130,7 @@ namespace pvpgn vm.initialize(); std::vector files = dir_getfiles(std::string(scriptdir), ".lua", true); - + // load all files from the script directory for (int i = 0; i < files.size(); ++i) { @@ -158,14 +168,10 @@ namespace pvpgn vm.reg("sum", _sum); vm.reg("message_send_text", __message_send_text); vm.reg("eventlog", __eventlog); - vm.reg("get_account", __get_account); // FIXME: + vm.reg("account_get", __account_get); + vm.reg("account_get_attr", __account_get_attr); + vm.reg("account_set_attr", __account_set_attr); - // register package 'event' - static const luaL_Reg event[] = - { - { 0, 0 } - }; - vm.reg("event", event); } @@ -174,12 +180,17 @@ namespace pvpgn extern int lua_handle_command(t_connection * c, char const * text) { + t_account * account; int result = 0; - std::map o_account = get_account_object(c); try { + if (!(account = conn_get_account(c))) + return 0; + + std::map o_account = get_account_object(account); // invoke lua method lua::transaction(vm) << lua::lookup("handle_command") << o_account << text << lua::invoke >> result << lua::end; + } catch (const std::exception& e) { @@ -197,26 +208,27 @@ namespace pvpgn const char * func_name; switch (luaevent) { - case luaevent_game_create: - func_name = "handle_game_create"; - break; - case luaevent_game_report: - func_name = "handle_game_report"; - break; - case luaevent_game_end: - func_name = "handle_game_end"; - break; - case luaevent_game_destroy: - func_name = "handle_game_destroy"; - break; - case luaevent_game_changestatus: - func_name = "handle_game_changestatus"; - break; + case luaevent_game_create: + func_name = "handle_game_create"; + break; + case luaevent_game_report: + func_name = "handle_game_report"; + break; + case luaevent_game_end: + func_name = "handle_game_end"; + break; + case luaevent_game_destroy: + func_name = "handle_game_destroy"; + break; + case luaevent_game_changestatus: + func_name = "handle_game_changestatus"; + break; } try { std::map o_game = get_game_object(game); + // invoke lua method lua::transaction(vm) << lua::lookup(func_name) << o_game << lua::invoke << lua::end; } catch (const std::exception& e) @@ -231,6 +243,7 @@ namespace pvpgn extern void lua_handle_user(t_connection * c, t_game * game, t_luaevent_type luaevent) { + t_account * account; const char * func_name; switch (luaevent) { @@ -242,11 +255,14 @@ namespace pvpgn func_name = "handle_user_leftgame"; break; } - - std::map o_account = get_account_object(c); - std::map o_game = get_game_object(game); try { + if (!(account = conn_get_account(c))) + return; + + std::map o_account = get_account_object(account); + std::map o_game = get_game_object(game); + lua::transaction(vm) << lua::lookup("handle_user_leftgame") << o_account << o_game << lua::invoke << lua::end; } catch (const std::exception& e) @@ -333,8 +349,8 @@ namespace pvpgn return 0; } - /* Log text into logfile */ - int __get_account(lua_State* L) + /* Get account table object */ + int __account_get(lua_State* L) { const char *username; std::map o_account; @@ -360,7 +376,126 @@ namespace pvpgn return 1; } + /* Get account attribute value */ + int __account_get_attr(lua_State* L) + { + const char *username, *attrkey; + int attrtype; + std::string attrvalue; + std::map o_account; + + try + { + lua::stack st(L); + // get args + st.at(1, username); + st.at(2, attrkey); + st.at(3, attrtype); + + if (t_account *account = accountlist_find_account(username)) + { + switch ((t_attr_type)attrtype) + { + case attr_type_str: + attrvalue = account_get_strattr(account, attrkey); + break; + case attr_type_num: + attrvalue = std::to_string(account_get_numattr(account, attrkey)); + break; + case attr_type_bool: + attrvalue = account_get_boolattr(account, attrkey) == 0 ? "false" : "true"; + break; + case attr_type_raw: + attrvalue = account_get_rawattr(account, attrkey); + break; + } + } + + st.push(attrvalue); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + + return 1; + } + + /* Set account attribute value + * (Return 0 if attribute is not set, and 1 if set) + */ + int __account_set_attr(lua_State* L) + { + const char *username, *attrkey; + int attrtype; + std::map o_account; + int result = 0; + try + { + lua::stack st(L); + // get args + st.at(1, username); + st.at(2, attrkey); + st.at(3, attrtype); + + if (t_account *account = accountlist_find_account(username)) + { + switch ((t_attr_type)attrtype) + { + case attr_type_str: + const char * strvalue; + st.at(4, strvalue); + + if (account_set_strattr(account, attrkey, strvalue) >= 0) + result = 1; + break; + case attr_type_num: + int numvalue; + st.at(4, numvalue); + + if (account_set_numattr(account, attrkey, numvalue) >= 0) + result = 1; + break; + case attr_type_bool: + bool boolvalue; + st.at(4, boolvalue); + + if (account_set_boolattr(account, attrkey, boolvalue ? 1 : 0) >= 0) + result = 1; + break; + case attr_type_raw: + const char * rawvalue; + int length; + st.at(4, rawvalue); + st.at(5, length); + + if (account_set_rawattr(account, attrkey, rawvalue, length) >= 0) + result = 1; + break; + } + } + + st.push(result); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + + return 1; + } + + // TODO: remove it + /* Just a test function */ int _sum(lua_State* L) { lua::stack st(L); @@ -377,21 +512,19 @@ namespace pvpgn #endif - - std::map get_account_object(const char *username) + std::map get_account_object(const char * username) { std::map o_account; - if (t_connection *c = connlist_find_connection_by_accountname(username)) - o_account = get_account_object(c); - - return o_account; + + if (t_account * account = accountlist_find_account(username)) + return get_account_object(account); + else + return o_account; } - - std::map get_account_object(t_connection * c) + std::map get_account_object(t_account * account) { std::map o_account; - t_account * account = conn_get_account(c); if (!account) return o_account; @@ -401,15 +534,20 @@ namespace pvpgn o_account["commandgroups"] = std::to_string(account_get_command_groups(account)); o_account["locked"] = account_get_auth_lock(account) ? "true" : "false"; o_account["muted"] = account_get_auth_mute(account) ? "true" : "false"; - o_account["country"] = conn_get_country(c); - o_account["clientver"] = conn_get_clientver(c); - o_account["latency"] = std::to_string(conn_get_latency(c)); - if (t_clienttag clienttag = conn_get_clienttag(c)) - o_account["clienttag"] = clienttag_uint_to_str(clienttag); - if (t_game *game = conn_get_game(c)) - o_account["game_id"] = std::to_string(game_get_id(game)); - if (t_channel *channel = conn_get_channel(c)) - o_account["channel_id"] = std::to_string(channel_get_channelid(channel)); + + // if user online + if (t_connection * c = account_get_conn(account)) + { + o_account["country"] = conn_get_country(c); + o_account["clientver"] = conn_get_clientver(c); + o_account["latency"] = std::to_string(conn_get_latency(c)); + if (t_clienttag clienttag = conn_get_clienttag(c)) + o_account["clienttag"] = clienttag_uint_to_str(clienttag); + if (t_game *game = conn_get_game(c)) + o_account["game_id"] = std::to_string(game_get_id(game)); + if (t_channel *channel = conn_get_channel(c)) + o_account["channel_id"] = std::to_string(channel_get_channelid(channel)); + } return o_account; } diff --git a/src/bnetd/luawrapper.h b/src/bnetd/luawrapper.h index 15f520d11..55749754f 100644 --- a/src/bnetd/luawrapper.h +++ b/src/bnetd/luawrapper.h @@ -139,6 +139,7 @@ namespace lua // recv from stack scalar void get(unsigned int& v, int index) throw() { v = lua_tointeger(st, index); } void get(int& v, int index) throw() { v = lua_tointeger(st, index); } + void get(bool& v, int index) throw() { v = lua_toboolean(st, index); } void get(double& v, int index) throw() { v = lua_tonumber(st, index); } void get(const char*& v, int index) throw() { From 906596a15c9854805ae4d3f5e036ce55d050262a Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 20 Apr 2014 13:01:01 +0400 Subject: [PATCH 008/144] fix /icon (it reverses icon code each time when invoked) --- src/bnetd/command.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 4c6c5e01e..5e8d0a114 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -5382,7 +5382,7 @@ namespace pvpgn { if (usericon = account_get_user_icon(user_account, user_clienttag)) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s has custom icon \"%.4s\"", account_get_name(user_account), strreverse((char*)usericon)); + snprintf(msgtemp, sizeof(msgtemp), "%.64s has custom icon \"%.4s\"", account_get_name(user_account), strreverse(xstrdup(usericon))); message_send_text(c, message_type_error, c, msgtemp); } else @@ -5390,24 +5390,23 @@ namespace pvpgn snprintf(msgtemp, sizeof(msgtemp), "Custom icon for %.64s currently not set", account_get_name(user_account)); message_send_text(c, message_type_error, c, msgtemp); } - return 0; } for (int i = 0; i < strlen(code); i++) code[i] = toupper(code[i]); + snprintf(msgtemp, sizeof(msgtemp), "Set icon \"%.4s\" to %.64s", code, account_get_name(user_account)); + message_send_text(c, message_type_error, c, msgtemp); + // unset value if (strcasecmp(code, "null") == 0) usericon = NULL; else - usericon = strreverse(xstrdup(code)); - - - snprintf(msgtemp, sizeof(msgtemp), "Set icon \"%.4s\" to %.64s", code, account_get_name(user_account)); - message_send_text(c, message_type_error, c, msgtemp); + usericon = strreverse(code); + // set reversed account_set_user_icon(user_account, user_clienttag, usericon); - + // if user online then force him to rejoin channel if (user_c) { @@ -5417,5 +5416,4 @@ namespace pvpgn } } - } From c3507e496854502eab676f8cec4070f54d5e2b18 Mon Sep 17 00:00:00 2001 From: xboi209 Date: Sun, 20 Apr 2014 13:06:37 +0400 Subject: [PATCH 009/144] Update default trackers https://github.com/HarpyWar/pvpgn/issues/7 --- conf/bnetd.conf.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/conf/bnetd.conf.in b/conf/bnetd.conf.in index 38e14a6df..77eeeef0b 100644 --- a/conf/bnetd.conf.in +++ b/conf/bnetd.conf.in @@ -441,13 +441,12 @@ max_friends = 20 # of seconds between sending tracking packets. This is OFF by default. #track = 0 track = 60 -# 10 minutes # Tracking server(s) # Use a comma delimited list of hostnames with optional UDP port numbers # after colons. (port 6114 is the default for the newer tracking protocol) -#trackaddrs = "track.bnetd.org,localhost:9999" -#trackaddrs = "track.pvpgn.org" +#trackaddrs = "track.pvpgn.org,localhost:9999" +#trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net" # Change these to match your system, for example: location = "unknown" From 7e5a95b9140a00873f5ae38ac7ccad81459f1eff Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 20 Apr 2014 13:59:54 +0400 Subject: [PATCH 010/144] forgot add to changed from previous commit to windows config https://github.com/HarpyWar/pvpgn/issues/7 --- conf/bnetd.conf.win32 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/conf/bnetd.conf.win32 b/conf/bnetd.conf.win32 index 9e9251483..874dc3d2d 100644 --- a/conf/bnetd.conf.win32 +++ b/conf/bnetd.conf.win32 @@ -418,13 +418,12 @@ max_friends = 20 # of seconds between sending tracking packets. This is OFF by default. #track = 0 track = 60 -# 10 minutes # Tracking server(s) # Use a comma delimited list of hostnames with optional UDP port numbers # after colons. (port 6114 is the default for the newer tracking protocol) -#trackaddrs = "track.bnetd.org,localhost:9999" -#trackaddrs = "track.pvpgn.org" +#trackaddrs = "track.pvpgn.org,localhost:9999" +#trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net" # Change these to match your system, for example: location = "unknown" From 0e72ec967b9af78bf6c5a1e7f99c7306984cdea5 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Mon, 21 Apr 2014 17:15:30 +0400 Subject: [PATCH 011/144] Command /topic modifications: * new line symbol "\n" is available * remove required channel name from arguments: /topic [message] https://github.com/HarpyWar/pvpgn/issues/6 --- conf/bnhelp.conf.in | 6 +-- src/bnetd/command.cpp | 84 +++++++++++----------------------------- src/bnetd/connection.cpp | 8 ++-- src/bnetd/topic.cpp | 48 +++++++++++++++++++++++ src/bnetd/topic.h | 3 ++ 5 files changed, 80 insertions(+), 69 deletions(-) diff --git a/conf/bnhelp.conf.in b/conf/bnhelp.conf.in index e23ce9502..ea3bba914 100644 --- a/conf/bnhelp.conf.in +++ b/conf/bnhelp.conf.in @@ -299,9 +299,9 @@ Example: /voice user Removes from the VOP list and removes temporary voice privileges. Example: /devoice user %topic -/topic [[channel] "[message]"] -Sets or displays [channel]'s topic. -Example: /topic Moderated Support "Supported is given in this channel..." +/topic [message] +Sets or displays current channel's topic. +Example: /topic Supported is given in this channel...\n(some text on a new line) %moderate /moderate Toggles the current channel's moderated status. diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index eca3196ae..c02cd0f45 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -5014,87 +5014,49 @@ namespace pvpgn static int _handle_topic_command(t_connection * c, char const * text) { char const * channel_name; - char const * topic; - char * tmp; + const char * topic; t_channel * channel; int do_save = NO_SAVE_TOPIC; - channel_name = skip_command(text); + topic = skip_command(text); - if ((topic = std::strchr(channel_name, '"'))) - { - tmp = (char *)topic; - for (tmp--; tmp[0] == ' '; tmp--); - tmp[1] = '\0'; - topic++; - tmp = std::strchr((char *)topic, '"'); - if (tmp) tmp[0] = '\0'; - } - if (!(conn_get_channel(c))) { + if (!(channel = conn_get_channel(c))) { message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); return -1; } - if (channel_name[0] == '\0') - { - if (channel_get_topic(channel_get_name(conn_get_channel(c)))) - { - snprintf(msgtemp, sizeof(msgtemp), "%.64s topic: %.128s", channel_get_name(conn_get_channel(c)), channel_get_topic(channel_get_name(conn_get_channel(c)))); - } - else - { - snprintf(msgtemp, sizeof(msgtemp), "%.64s topic: no topic", channel_get_name(conn_get_channel(c))); - } - message_send_text(c, message_type_info, c, msgtemp); - - return 0; - } + channel_name = channel_get_name(channel); - if (!(topic)) + // set channel topic + if (topic[0] != '\0') { - if (channel_get_topic(channel_name)) + if (std::strlen(topic) >= MAX_TOPIC_LEN) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s topic: %.128s", channel_name, channel_get_topic(channel_name)); + snprintf(msgtemp, sizeof(msgtemp), "Max topic length exceeded (max %d symbols)", MAX_TOPIC_LEN); + message_send_text(c, message_type_error, c, msgtemp); + return -1; } - else - { - snprintf(msgtemp, sizeof(msgtemp), "%.64s topic: no topic", channel_name); + + if (!(account_is_operator_or_admin(conn_get_account(c), channel_name))) { + snprintf(msgtemp, sizeof(msgtemp), "You must be at least a Channel Operator of %.64s to set the topic", channel_name); + message_send_text(c, message_type_error, c, msgtemp); + return -1; } - message_send_text(c, message_type_info, c, msgtemp); - return 0; - } - if (!(channel = channellist_find_channel_by_name(channel_name, conn_get_country(c), realm_get_name(conn_get_realm(c))))) - { - snprintf(msgtemp, sizeof(msgtemp), "There is no such channel."); - message_send_text(c, message_type_error, c, msgtemp); - return -1; - } + if (channel_get_permanent(channel)) + do_save = DO_SAVE_TOPIC; - if (std::strlen(topic) >= MAX_TOPIC_LEN) - { - snprintf(msgtemp, sizeof(msgtemp), "Max topic length exceeded (max %d symbols)", MAX_TOPIC_LEN); - message_send_text(c, message_type_error, c, msgtemp); - return -1; + channel_set_topic(channel_name, topic, do_save); } - channel_name = channel_get_name(channel); - - if (!(account_is_operator_or_admin(conn_get_account(c), channel_name))) { - snprintf(msgtemp, sizeof(msgtemp), "You must be at least a Channel Operator of %.64s to set the topic", channel_name); - message_send_text(c, message_type_error, c, msgtemp); - return -1; + // display channel topic + if (channel_display_topic(c, channel_name) < 0) + { + snprintf(msgtemp, sizeof(msgtemp), "%.64s topic: no topic", channel_name); + message_send_text(c, message_type_info, c, msgtemp); } - if (channel_get_permanent(channel)) - do_save = DO_SAVE_TOPIC; - - channel_set_topic(channel_name, topic, do_save); - - snprintf(msgtemp, sizeof(msgtemp), "%.64s topic: %.128s", channel_name, topic); - message_send_text(c, message_type_info, c, msgtemp); - return 0; } diff --git a/src/bnetd/connection.cpp b/src/bnetd/connection.cpp index 04c8c7139..ed473854c 100644 --- a/src/bnetd/connection.cpp +++ b/src/bnetd/connection.cpp @@ -2071,12 +2071,10 @@ namespace pvpgn message_send_text(c, message_type_info, c, msgtemp); } - if (channel_get_topic(channel_get_name(c->protocol.chat.channel)) && ((conn_is_irc_variant(c)) == 0)) + + if (conn_is_irc_variant(c) == 0) { - char msgtemp[MAX_MESSAGE_LEN]; - - std::sprintf(msgtemp, "%s topic: %s", channel_get_name(c->protocol.chat.channel), channel_get_topic(channel_get_name(c->protocol.chat.channel))); - message_send_text(c, message_type_info, c, msgtemp); + channel_display_topic(c, channel_get_name(c->protocol.chat.channel)); } if (c->protocol.chat.channel && (channel_get_flags(c->protocol.chat.channel) & channel_flags_moderated)) diff --git a/src/bnetd/topic.cpp b/src/bnetd/topic.cpp index 37473e078..9dcc3dda8 100644 --- a/src/bnetd/topic.cpp +++ b/src/bnetd/topic.cpp @@ -20,11 +20,15 @@ #include #include "compat/strcasecmp.h" +#include "compat/snprintf.h" + #include "common/list.h" #include "common/eventlog.h" #include "common/xalloc.h" #include "common/field_sizes.h" +#include "message.h" + #include "prefs.h" #include "common/setup_after.h" @@ -207,6 +211,50 @@ namespace pvpgn return 0; } + /* Display topic with new lines formatting (\n) */ + int channel_display_topic(t_connection * c, const char * channel_name) + { + char msgtemp[MAX_MESSAGE_LEN]; + char *topic, *tmp, *token; + char * delim = "\\"; + if (!(topic = channel_get_topic(channel_name))) + return -1; + + tmp = xstrdup(topic); + + token = strtok(tmp, delim); + bool first = true; + bool start_with_bs = (topic[0] == '\\'); + + while (token) + { + if (token[0] == 'n') + { + *token++; + if (first && start_with_bs) + { + snprintf(msgtemp, sizeof(msgtemp), "%.64s topic:", channel_name); + message_send_text(c, message_type_info, c, msgtemp); + first = false; + } + } + + if (first) + snprintf(msgtemp, sizeof(msgtemp), "%.64s topic: %.128s", channel_name, token); + else + snprintf(msgtemp, sizeof(msgtemp), token); + + message_send_text(c, message_type_info, c, msgtemp); + + token = strtok(NULL, delim); + first = false; + } + xfree((void *)tmp); + + return 0; + } + + } } diff --git a/src/bnetd/topic.h b/src/bnetd/topic.h index 07fd16c58..6352389ba 100644 --- a/src/bnetd/topic.h +++ b/src/bnetd/topic.h @@ -17,6 +17,8 @@ #ifndef INCLUDED_TOPIC_TYPES #define INCLUDED_TOPIC_TYPES +#include "connection.h" + namespace pvpgn { @@ -56,6 +58,7 @@ namespace pvpgn int topiclist_unload(void); int channel_set_topic(char const * channel_name, char const * topic_text, int do_save); char * channel_get_topic(char const * channel_name); + int channel_display_topic(t_connection * c, const char * channel_name); } From d2fffcf408300fbae13d981db6ece8ae2f65967a Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 26 Apr 2014 18:46:33 +0400 Subject: [PATCH 012/144] * display help for commands from bnhelp.conf instead of hardcoded strings https://github.com/HarpyWar/pvpgn/issues/5 * better view for help output, commands are highlited, tabs replaces with spaces http://i.imgur.com/vrj9QG1.png * add aliases /mute /unmute /lock /unlock = /muteacct /unmuteacct /lockacct /unlockacct) * command.cpp code refactoring and fixes (including /icon https://github.com/HarpyWar/pvpgn/issues/9) --- conf/bnhelp.conf.in | 625 +++++++++---- conf/command_groups.conf.in | 5 +- src/bnetd/command.cpp | 1714 +++++++++++++++-------------------- src/bnetd/helpfile.cpp | 36 +- src/bnetd/helpfile.h | 2 +- src/common/tag.cpp | 18 + src/common/tag.h | 1 + src/common/xstring.cpp | 72 +- 8 files changed, 1235 insertions(+), 1238 deletions(-) diff --git a/conf/bnhelp.conf.in b/conf/bnhelp.conf.in index ea3bba914..1d4c86c8c 100644 --- a/conf/bnhelp.conf.in +++ b/conf/bnhelp.conf.in @@ -7,313 +7,584 @@ # # # You can enter comments by starting a line with #. Comments extend to the # # end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # # # +############################################################################## + %whois whereis where +-------------------------------------------------------- /whois (aliases: /where /whereis) -Displays where a is on the server. -Example: /whois user + Displays where a is on the server. + + Example: /whois nomad + %msg whisper m w +-------------------------------------------------------- /whisper (aliases: /w /m /msg) -Sends a private to -Example: /whisper user How are you doing? + Sends a private to + + Example: /whisper nomad How are you doing? + %ignore squelch +-------------------------------------------------------- /squelch (alias: ignore, see also: /unsquelch) -Blocks future messages sent from . -Example: /squelch user + Blocks future messages sent from . + + Example: /squelch nomad + %unignore unsquelch +-------------------------------------------------------- /unsquelch (alias: /unignore) -Allows a previously squelched to talk to you normally. -Example: /unsquelch user + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + %away -/away [] -Displays [] to users who whisper to you. To disable, use the /away command again with no []. -Example: /away Eating dinner +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + %dnd -/dnd [] -Prevents all whispers from displaying to your screen. To disable, use the command again with no []. -Example: /dnd I'm playing a game and don't want to hear whispers. +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + %who +-------------------------------------------------------- /who -Displays a list of users in -Example: /who Moderated Support + Displays a list of users in + + Example: /who Moderated Support + %stats astat -/stats [] [] (alias: /astat) -Displays a []'s Win/Loss record. -Example: /stats user +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + %status users -/users (alias: /status) -Displays the current number of users connected to the server. +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + %time +-------------------------------------------------------- /time -Displays the current server and your local time. + Displays the current server and your local time. + %channel join j +-------------------------------------------------------- /channel (alias: /join /j) -Moves you to -Example: /channel Moderated Support + Moves you to + + Example: /channel Moderated Support + %rejoin +-------------------------------------------------------- /rejoin (alias: /resign) -Removes your status as the channel Operator. + Removes your status as the channel Operator. + %me emote +-------------------------------------------------------- /me (alias: /emote) -Displays your name and in a different color. -Example: /emote wants to play a game. + Displays your name and in a different color. + + Example: /emote wants to play a game. + %kick +-------------------------------------------------------- /kick -Kicks from the channel. -Example: /kick user + Kicks from the channel. + + Example: /kick nomad + %ban +-------------------------------------------------------- /ban (see also: /unban) -Bans from the channel, and prevents him from returning. -Example: /ban user + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + %unban +-------------------------------------------------------- /unban -Allows a banned to return to the channel. -Example: /unban user + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + %whoami +-------------------------------------------------------- /whoami -Displays where you are on the server. + Displays where you are on the server. + %uptime +-------------------------------------------------------- /uptime -Displays how long the server has been running. + Displays how long the server has been running. + %version +-------------------------------------------------------- /version -Displays the version of the server + Displays the version of the server + %lusers +-------------------------------------------------------- /lusers -Displays a list of players who have been banned from the channel + Displays a list of players who have been banned from the channel + %games -/games [] -Displays a list of games. +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games [l]obby + Displays a list of games in lobby. + %channels chs -/channels [all] (alias: /chs) -Displays a list of channels. +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + %connections con +-------------------------------------------------------- /connections (alis: /con) -Displays a list of connections. + Displays a list of connections. + %finger -/finger [] -Displays detailed information about [] -Example: /finger user +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + %admins +-------------------------------------------------------- /admins -Displays a list of all currently logged in administrators. + Displays a list of all currently logged in administrators. + %reply r +-------------------------------------------------------- /reply (alias: /r) -Replies to the last player who whispered you with . -Example: /r Hello user! + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + %announce ann +-------------------------------------------------------- /announce (alias: /ann) -Announces to everyone. -Example: /ann Hello everyone! + Announces to everyone. + + Example: /ann Hello everyone! + %realmann +-------------------------------------------------------- /realmann -Announces to everyone in the current realm. -Example: /realmann Hello everyone! + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + %news +-------------------------------------------------------- /news -Displays the news. + Displays the news. + %logout quit exit +-------------------------------------------------------- /logout (alias: /quit /exit) -Disconnects you from the server. + Disconnects you from the server. + %kill -/kill [] [min] -Disconnects [] from the server and bans the player's IP address for [min] minutes. -Example: /kill user 5 +-------------------------------------------------------- +/kill {|#} [] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + %killsession -/killsession [] [min] -Disconnects the session from the server and bans the session's IP address for [min] minutes. -Example: /killsession 1 5 +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + %watch +-------------------------------------------------------- /watch -Enables notifications for . -Example: /watch user + Enables notifications for . + + Example: /watch nomad + %unwatch +-------------------------------------------------------- /unwatch -Disables notifications for . -Example: /unwatch user + Disables notifications for . + + Example: /unwatch nomad + %watchall -/watchall -Enables notifications for everyone. +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + %unwatchall -/unwatchall -Disables notifications for everyone. +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + %gameinfo -/gameinfo [] -Displays information about []. -Example: /gameinfo FS 1v1!!! +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + %ladderactivate +-------------------------------------------------------- /ladderactivate -Copies current ladder statistics to active ladder statistics. + Copies current ladder statistics to active ladder statistics. + %ladderinfo -/ladderinfo [] -Displays ladder information for of [] -Example: /ladderinfo 1000 SEXP +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + %timer -/timer [] [] -Displays [] after [] seconds. -Example: /timer 60 1 minute has passed. +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + %netinfo -/netinfo [] -Displays []'s network information. -Example: /netinfo user +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + %addacct +-------------------------------------------------------- /addacct -Creates a new account named with password . -Example: /addacct user password + Creates a new account named with password . + + Example: /addacct nomad password + %chpass +-------------------------------------------------------- /chpass [] - change a player's password -Changes []'s password to . -Example: /chpass user password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + %quota +-------------------------------------------------------- /quota -Displays your message quota. + Displays your message quota. + %shutdown -/shutdown [] -Sets the shutdown sequence at [] seconds or cancels it if set to zero. -Example: /shutdown 300 -%lockacct -/lockacct -Locks 's account to prevent him/her from logging in with it. -Example: /lockacct user -%unlockacct -/unlockacct -Unlocks 's account to allow him/her to log in with it. -Example: /unlockacct user +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + + Example: /lock nomad + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + + Example: /mute nomad + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + %friends f -/friends [otions] (alias: /f) - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + %mail -/mail [] +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- /mail send - Sends mail to with . - /mail read [] - Reads mail [] + Sends mail to with . + /mail read [index] + Reads mail [index] /mail delete {all|} - Deletes mail or [all] mail. + Deletes mail or [all] mail. + %flag +-------------------------------------------------------- /flag -A debug tool for icon flags. + A debug tool for icon flags. + %tag +-------------------------------------------------------- /tag -A debug tool for client tags. + A debug tool for client tags. + %help -/help [] -Displays help about [] -Example: /help whisper +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + %ipban -/ipban [] [option] [time] +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- /ipban [l[ist]] - Displays a list of banned IP addresses + Displays a list of banned IP addresses /ipban c[heck] - Checks if IP address is banned or not. + Checks if IP address is banned or not. /ipban d[el] - Deletes IP address or + Deletes IP address or /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban + Bans IP address for [time] minutes. [time] = 0 - permanent ban /ipban h[elp] - Displays help for this command. + Displays help for this command. + %set +-------------------------------------------------------- /set [value] -Sets or returns the value of for account . -Example: /set user BNET\acct\lastlogin_owner user + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + %motd +-------------------------------------------------------- /motd -Displays the MOTD. + Displays the MOTD. + %tos +-------------------------------------------------------- /tos /warranty /license -Displays the Terms of Service. + Displays the Terms of Service. + %admin +-------------------------------------------------------- /admin [+|-] -Promotes/demotes to/from server administrator. -Example: /admin +user -%rank_all_accounts -/rank_all_accounts -Forces the server to add all accounts to the WarCraft 3 ladder. + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + %rehash +-------------------------------------------------------- /rehash -Forces the server to reload bnetd.conf + Forces the server to reload bnetd.conf + %clan -/clan [] [option] - /clan public (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan private (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan motd - Update the clan's Message of the Day to . +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan [m]sg (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan [inv]ite + Invite to your clan. + /clan [inv]ite get + Show clanname which you have been invited + /clan [inv]ite accept + Accept invitation to clan + /clan [inv]ite decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan [pub]lic (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan [priv]ate (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan [dis]band + Disband your clan. + %ping p latency +-------------------------------------------------------- /ping (alias: /p /latency) -Displays your ping to the server. + Displays your ping to the server. + %command_groups cg -/command_groups [] (alias: /cg) +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- /cg list - Displays 's command groups. + Displays 's command groups. /cg add - Adds command group(s) to . + Adds command group(s) to . /cg del - Deletes command group(s) from . - /cg help - Displays help for this command. + Deletes command group(s) from . + %operator +-------------------------------------------------------- /operator [+|-] (alias: /op) -Promotes/demotes to/from server operator. -Example: /operator +user + Promotes/demotes to/from server operator. + + Example: /operator +nomad + %aop +-------------------------------------------------------- /aop -Promotes to channel administrator. -Example: /aop user + Promotes to channel administrator. + + Example: /aop nomad + %op +-------------------------------------------------------- /op -Promotes to channel operator. -Example: /op user + Promotes to channel operator. + + Example: /op nomad %deop +-------------------------------------------------------- /deop -Demotes from channel administrator or operator. -Example: /deop user + Demotes from channel administrator or operator. + + Example: /deop nomad + %tmpop +-------------------------------------------------------- /tmpop -Promotes to temporary channel operator. -Example: /tmpop + Promotes to temporary channel operator. + + Example: /tmpop + %vop +-------------------------------------------------------- /vop -Adds to the VOP list. -Example: /vop user + Adds to the VOP list. + + Example: /vop nomad + %voice +-------------------------------------------------------- /voice -Temporarily gives voice privileges to . -Example: /voice user + Temporarily gives voice privileges to . + + Example: /voice nomad + %devoice +-------------------------------------------------------- /devoice -Removes from the VOP list and removes temporary voice privileges. -Example: /devoice user + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + %topic +-------------------------------------------------------- /topic [message] -Sets or displays current channel's topic. -Example: /topic Supported is given in this channel...\n(some text on a new line) + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + %moderate +-------------------------------------------------------- /moderate -Toggles the current channel's moderated status. + Toggles the current channel's moderated status. + %clearstats +-------------------------------------------------------- /clearstats -Clears 's statistics. -Example: /clearstats user SEXP + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + %find +-------------------------------------------------------- /find -Finds users with in their username. MUST be lowercase! + Finds users with in their username. MUST be lowercase! + %save +-------------------------------------------------------- /save -Forces the server to save account and clan changes to the database. -# # -############################################################################## + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [code] [gametag] + Set custom usericon. If [gametag] is empty then last user clienttag is used. + Set [code] = null to enable default icon. + + Example: /icon nomad W3D6 + Example: /icon nomad EYES SEXP + + + + + + diff --git a/conf/command_groups.conf.in b/conf/command_groups.conf.in index bf39358ff..8c962172d 100644 --- a/conf/command_groups.conf.in +++ b/conf/command_groups.conf.in @@ -155,11 +155,10 @@ 4 /kill /killsession 4 /addacct -4 /lockacct /unlockacct -4 /muteacct /unmuteacct +4 /lock /lockacct /unlock /unlockacct +4 /mute /muteacct /unmute /unmuteacct 5 /ladderactivate -# 5 /rank_all_accounts # -- Access to group '6' allows users to not only make others Server Admins & Server Operators # but will allow them to make themselves Server Admin & Server Operator. diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index c02cd0f45..a823e7db9 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -27,10 +27,14 @@ #include "common/setup_before.h" #include "command.h" +#include #include #include #include #include +#include +#include +#include #include "compat/strcasecmp.h" #include "compat/snprintf.h" @@ -51,6 +55,7 @@ #include "common/trans.h" #include "common/lstr.h" #include "common/hashtable.h" +#include "common/xstring.h" #include "connection.h" #include "message.h" @@ -85,7 +90,6 @@ namespace pvpgn namespace bnetd { - static char const * bnclass_get_str(unsigned int cclass); static void do_whisper(t_connection * user_c, char const * dest, char const * text); static void do_whois(t_connection * c, char const * dest); @@ -308,8 +312,6 @@ namespace pvpgn static int _handle_dnd_command(t_connection * c, char const * text); static int _handle_squelch_command(t_connection * c, char const * text); static int _handle_unsquelch_command(t_connection * c, char const * text); - //static int _handle_designate_command(t_connection * c, char const * text); Obsolete function [Omega] - //static int _handle_resign_command(t_connection * c, char const * text); Obsolete function [Omega] static int _handle_kick_command(t_connection * c, char const * text); static int _handle_ban_command(t_connection * c, char const * text); static int _handle_unban_command(t_connection * c, char const * text); @@ -338,7 +340,6 @@ namespace pvpgn static int _handle_find_command(t_connection * c, char const *text); static int _handle_save_command(t_connection * c, char const * text); - //static int _handle_rank_all_accounts_command(t_connection * c, char const * text); static int _handle_shutdown_command(t_connection * c, char const * text); static int _handle_ladderinfo_command(t_connection * c, char const * text); static int _handle_timer_command(t_connection * c, char const * text); @@ -351,7 +352,6 @@ namespace pvpgn static int _handle_unmuteacct_command(t_connection * c, char const * text); static int _handle_flag_command(t_connection * c, char const * text); static int _handle_tag_command(t_connection * c, char const * text); - //static int _handle_ipban_command(t_connection * c, char const * text); Redirected to handle_ipban_command() in ipban.c [Omega] static int _handle_ipscan_command(t_connection * c, char const * text); static int _handle_set_command(t_connection * c, char const * text); static int _handle_motd_command(t_connection * c, char const * text); @@ -404,8 +404,6 @@ namespace pvpgn { "/squelch", _handle_squelch_command }, { "/unignore", _handle_unsquelch_command }, { "/unsquelch", _handle_unsquelch_command }, - // { "/designate" , _handle_designate_command }, Obsotele command [Omega] - // { "/resign" , _handle_resign_command }, Obsolete command [Omega] { "/kick", _handle_kick_command }, { "/ban", _handle_ban_command }, { "/unban", _handle_unban_command }, @@ -453,7 +451,6 @@ namespace pvpgn { "/rehash", _handle_rehash_command }, { "/find", _handle_find_command }, { "/save", _handle_save_command }, - // { "/rank_all_accounts" , _handle_rank_all_accounts_command }, { "/shutdown", _handle_shutdown_command }, { "/ladderinfo", _handle_ladderinfo_command }, { "/timer", _handle_timer_command }, @@ -461,9 +458,13 @@ namespace pvpgn { "/netinfo", _handle_netinfo_command }, { "/quota", _handle_quota_command }, { "/lockacct", _handle_lockacct_command }, + { "/lock", _handle_lockacct_command }, { "/unlockacct", _handle_unlockacct_command }, + { "/unlock", _handle_unlockacct_command }, { "/muteacct", _handle_muteacct_command }, + { "/mute", _handle_muteacct_command }, { "/unmuteacct", _handle_unmuteacct_command }, + { "/unmute", _handle_unmuteacct_command }, { "/flag", _handle_flag_command }, { "/tag", _handle_tag_command }, { "/help", handle_help_command }, @@ -487,14 +488,52 @@ namespace pvpgn }; - char const * skip_command(char const * org_text) + /* + * Split text by spaces and return array of arguments. + * First text argument is a command name (index = 0) + * Last text argument always reads to end + */ + std::vector split_command(char const * text, int args_count) { - unsigned int i; - char * text = (char *)org_text; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - if (text[i] != '\0') text[i++] = '\0'; /* \0-terminate command */ - for (; text[i] == ' '; i++); - return &text[i]; + int count = 1 + args_count; + std::vector result(count); + + std::string s(text); + std::istringstream iss(s); + + int i = 0; + std::string tmp = std::string(); // to end + do + { + std::string sub; + iss >> sub; + + if (sub.empty()) + continue; + + // remove slash from the command + if (i == 0) + sub.erase(0,1); + + if (i < args_count) + { + result[i] = sub; + i++; + } + else + { + if (!tmp.empty()) + tmp += " "; + tmp += sub; + } + + } while (iss); + + // push remaining text at the end + if (tmp.length() > 0) + result[count-1] = tmp; + + return result; } extern int handle_command(t_connection * c, char const * text) @@ -575,87 +614,86 @@ namespace pvpgn ERROR0("got NULL account"); } - text = skip_command(text); + std::vector args = split_command(text, 2); + + if (args[1].empty()) { + describe_command(c, args[0].c_str()); + return -1; + } + /* FIXME: can get clan as is in creating process */ - if ((member = account_get_clanmember_forced(acc)) && (clan = clanmember_get_clan(member)) && (clanmember_get_fullmember(member) == 1)) { - if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage:"); - message_send_text(c, message_type_info, c, "/clan msg "); - message_send_text(c, message_type_info, c, "Whispers a message to all your fellow clan members."); - if (clanmember_get_status(member) >= CLAN_SHAMAN) { - message_send_text(c, message_type_info, c, "/clan public /clan pub"); - message_send_text(c, message_type_info, c, "Opens the clan channel up to the public so that anyone may enter."); - message_send_text(c, message_type_info, c, "/clan private /clan priv"); - message_send_text(c, message_type_info, c, "Closes the clan channel such that only members of the clan may enter."); - message_send_text(c, message_type_info, c, "/clan motd "); - message_send_text(c, message_type_info, c, "Update the clan message of the day to ."); - message_send_text(c, message_type_info, c, "/clan invite "); - message_send_text(c, message_type_info, c, "Invite to your clan."); - } - if (clanmember_get_status(member) == CLAN_CHIEFTAIN) { - message_send_text(c, message_type_info, c, "/clan disband"); - message_send_text(c, message_type_info, c, "Disband your clan."); - } - return 0; - } - if (strstart(text, "msg") == 0 || strstart(text, "m") == 0 || strstart(text, "w") == 0 || strstart(text, "whisper") == 0) { - char const *msg = skip_command(text); - if (msg[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage:"); - message_send_text(c, message_type_info, c, "/clan msg "); - message_send_text(c, message_type_info, c, "Whispers a message to all your fellow clan members."); - } - else { + + // user in clan + if ((member = account_get_clanmember_forced(acc)) && (clan = clanmember_get_clan(member))) + { + // user is full member of clan + if (clanmember_get_fullmember(member) == 1) + { + if (args[1] == "msg" || args[1] == "m" || args[1] == "w" || args[1] == "whisper") + { + if (args[2].empty()) { + describe_command(c, args[0].c_str()); + return -1; + } + char const *msg = args[2].c_str(); // message + if (clan_send_message_to_online_members(clan, message_type_whisper, c, msg) >= 1) message_send_text(c, message_type_info, c, "Message was sent to all currently available clan members."); else message_send_text(c, message_type_info, c, "All fellow members of your clan are currently offline."); + + return 0; } - } - else - if (clanmember_get_status(member) >= CLAN_SHAMAN) { - if (strstart(text, "public") == 0 || strstart(text, "pub") == 0) { - if (clan_get_channel_type(clan) != 0) { - clan_set_channel_type(clan, 0); - message_send_text(c, message_type_info, c, "Clan channel is opened up!"); - } - else - message_send_text(c, message_type_error, c, "Clan channel has already been opened up!"); - } - else if (strstart(text, "private") == 0 || strstart(text, "priv") == 0) { - if (clan_get_channel_type(clan) != 1) { - clan_set_channel_type(clan, 1); - message_send_text(c, message_type_info, c, "Clan channel is closed!"); + + if (clanmember_get_status(member) >= CLAN_SHAMAN) + { + if (args[1] == "public" || args[1] == "pub") + { + if (clan_get_channel_type(clan) != 0) { + clan_set_channel_type(clan, 0); + message_send_text(c, message_type_info, c, "Clan channel is opened up!"); + } + else + message_send_text(c, message_type_error, c, "Clan channel has already been opened up!"); + return 0; } - else - message_send_text(c, message_type_error, c, "Clan channel has already been closed!"); - } - else if (strstart(text, "motd") == 0) { - const char * msg = skip_command(text); - if (msg[0] == '\0') + else if (args[1] == "private" || args[1] == "priv") { - message_send_text(c, message_type_info, c, "Usage:"); - message_send_text(c, message_type_info, c, "/clan motd "); - message_send_text(c, message_type_info, c, "Update the clan message of the day to ."); + if (clan_get_channel_type(clan) != 1) { + clan_set_channel_type(clan, 1); + message_send_text(c, message_type_info, c, "Clan channel is closed!"); + } + else + message_send_text(c, message_type_error, c, "Clan channel has already been closed!"); + return 0; } - else + else if (args[1] == "motd") { + if (args[2].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } + const char * msg = args[2].c_str(); // message + clan_set_motd(clan, msg); message_send_text(c, message_type_info, c, "Clan message of day is updated!"); + return 0; } - } - else if (strstart(text, "invite") == 0 || strstart(text, "inv") == 0) { - const char * username = skip_command(text); - t_account * dest_account; - t_connection * dest_conn; - if (username[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage:"); - message_send_text(c, message_type_info, c, "/clan invite "); - message_send_text(c, message_type_info, c, "Invite to your clan."); - } - else { + else if (args[1] == "invite" || args[1] == "inv") + { + t_account * dest_account; + t_connection * dest_conn; + if (args[2].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } + const char * username = args[2].c_str(); + if ((dest_account = accountlist_find_account(username)) && (dest_conn = account_get_conn(dest_account)) - && (account_get_clan(dest_account) == NULL) && (account_get_creating_clan(dest_account) == NULL)) { + && (account_get_clan(dest_account) == NULL) && (account_get_creating_clan(dest_account) == NULL)) + { if (prefs_get_clan_newer_time() > 0) clan_add_member(clan, dest_account, CLAN_NEW); else @@ -669,15 +707,14 @@ namespace pvpgn snprintf(msgtemp, sizeof(msgtemp), "User %s is not online or is already member of clan!", username); message_send_text(c, message_type_error, c, msgtemp); } + return 0; } - } - else if (strstart(text, "disband") == 0) { - const char * ack = skip_command(text); - if (ack[0] == '\0') { - message_send_text(c, message_type_info, c, "This is one-way action! If you really want"); - message_send_text(c, message_type_info, c, "to disband your clan, type /clan disband yes"); - } - else if (strstart(ack, "yes") == 0) { + else if (args[1] == "disband" || args[1] == "dis") + { + if (args[2] != "yes") { + message_send_text(c, message_type_info, c, "This is one-way action! If you really want"); + message_send_text(c, message_type_info, c, "to disband your clan, type /clan disband yes"); + } /* PELISH: fixme - Find out better solution! */ if (clanlist_remove_clan(clan) == 0) { if (clan_get_created(clan) == 1) @@ -685,32 +722,26 @@ namespace pvpgn clan_destroy(clan); message_send_text(c, message_type_info, c, "Your clan was disbanded."); } + return 0; } } } - } - else - if ((member = account_get_clanmember_forced(acc)) && (clan = clanmember_get_clan(member)) && (clanmember_get_fullmember(member) == 0)) { - /* User is not in clan, but he can accept invitation to someone */ - if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage:"); - message_send_text(c, message_type_info, c, "/clan invite get (show clanname which you have been invited)"); - message_send_text(c, message_type_info, c, "/clan invite accept (accept invitation to clan)"); - message_send_text(c, message_type_info, c, "/clan invite decline (decline invitation to clan)"); - } - if (strstart(text, "invite") == 0 || strstart(text, "inv") == 0) { - text = skip_command(text); - if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage:"); - message_send_text(c, message_type_info, c, "/clan invite get (show clanname which you have been invited)"); - message_send_text(c, message_type_info, c, "/clan invite accept (accept invitation to clan)"); - message_send_text(c, message_type_info, c, "/clan invite decline (decline invitation to clan)"); + // user is not full member (invitation was not accepted yet) + else if (clanmember_get_fullmember(member) == 0) + { + /* User is not in clan, but he can accept invitation to someone */ + if (args[1] != "invite" && args[1] != "inv") + { + describe_command(c, args[0].c_str()); + return -1; } - else if (strstart(text, "get") == 0) { + + if (args[2] == "get") { snprintf(msgtemp, sizeof(msgtemp), "You have been invited to %s", clan_get_name(clan)); message_send_text(c, message_type_info, c, msgtemp); + return 0; } - else if (strstart(text, "accept") == 0 || strstart(text, "acc") == 0) { + else if (args[2] == "accept" || args[2] == "acc") { int created = clan_get_created(clan); clanmember_set_fullmember(member, 1); @@ -719,7 +750,7 @@ namespace pvpgn message_send_text(c, message_type_info, c, msgtemp); if (created > 0) { DEBUG1("clan %s has already been created", clan_get_name(clan)); - return 0; + return -1; } created++; if (created >= 0) { @@ -733,49 +764,40 @@ namespace pvpgn } else clan_set_created(clan, created); + return 0; } - else if (strstart(text, "decline") == 0 || strstart(text, "dec") == 0) { + else if (args[2] == "decline" || args[2] == "dec") { clan_remove_member(clan, member); snprintf(msgtemp, sizeof(msgtemp), "You are no longer ivited to %s", clan_get_name(clan)); message_send_text(c, message_type_info, c, msgtemp); + return 0; } } } - else { - if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage:"); - message_send_text(c, message_type_info, c, "/clan create (Create a new clan)"); - } - else if (strstart(text, "create") == 0 || strstart(text, "cre") == 0) { - unsigned int i, j; - char clantag[CLANSHORT_NAME_MAX + 1]; - char clanname[CLAN_NAME_MAX]; - - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get clantag */ - if (j < sizeof(clantag)-1) clantag[j++] = text[i]; - clantag[j] = '\0'; - - for (; text[i] == ' '; i++); /* skip spaces */ - for (j = 0; text[i] != '\0'; i++) /* get clanname (spaces are allowed) */ - if (j < sizeof(clanname)-1) clanname[j++] = text[i]; - clanname[j] = '\0'; - - if ((clantag[0] == '\0') || (clanname[0] == '\0')) { - message_send_text(c, message_type_info, c, "Usage:"); - message_send_text(c, message_type_info, c, "/clan create (Create a new clan)"); - return 0; + // user not in clan + else + { + if ((args[1] == "create" || args[1] == "cre")) + { + char const *clantag, *clanname; + std::vector args = split_command(text, 3); + + if (args[3].empty()) + { + describe_command(c, args[0].c_str()); + return -1; } + clantag = args[2].c_str(); // clan tag + clanname = args[3].c_str(); // clan name if (clan = clanlist_find_clan_by_clantag(str_to_clantag(clantag))) { message_send_text(c, message_type_error, c, "Clan with your specified already exist!"); message_send_text(c, message_type_error, c, "Please choice another one."); - return 0; + return -1; } - if ((clan = clan_create(conn_get_account(c), str_to_clantag(clantag), clanname, NULL)) && clanlist_add_clan(clan)) { + if ((clan = clan_create(conn_get_account(c), str_to_clantag(clantag), clanname, NULL)) && clanlist_add_clan(clan)) + { member = account_get_clanmember_forced(acc); if (prefs_get_clan_min_invites() == 0) { clan_set_created(clan, 1); @@ -788,14 +810,17 @@ namespace pvpgn clan_set_created(clan, -prefs_get_clan_min_invites() + 1); //Pelish: +1 means that creator of clan is already invited snprintf(msgtemp, sizeof(msgtemp), "Clan %s is pre-created, please invite", clan_get_name(clan)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "at last %u players to your clan by using", prefs_get_clan_min_invites()); + snprintf(msgtemp, sizeof(msgtemp), "at least %u players to your clan by using", prefs_get_clan_min_invites()); message_send_text(c, message_type_info, c, msgtemp); message_send_text(c, message_type_info, c, "/clan invite command."); } } + return 0; } } - return 0; + + describe_command(c, args[0].c_str()); + return -1; } static int command_set_flags(t_connection * c) @@ -811,16 +836,16 @@ namespace pvpgn t_connection * dst_c; int changed = 0; - text = skip_command(text); + std::vector args = split_command(text, 1); - if ((text[0] == '\0') || ((text[0] != '+') && (text[0] != '-'))) { - message_send_text(c, message_type_info, c, "Usage: /admin +username to promote user to Server Admin."); - message_send_text(c, message_type_info, c, " /admin -username to demote user from Server Admin."); + if (args[1].empty() || (args[1][0] != '+' && args[1][0] != '-')) { + describe_command(c, args[0].c_str()); return -1; } - command = text[0]; - username = &text[1]; + text = args[1].c_str(); + command = text[0]; // command type (+/-) + username = &text[1]; // username if (!*username) { message_send_text(c, message_type_info, c, "You must supply a username."); @@ -870,16 +895,16 @@ namespace pvpgn t_connection * dst_c; int changed = 0; - text = skip_command(text); + std::vector args = split_command(text, 1); - if ((text[0] == '\0') || ((text[0] != '+') && (text[0] != '-'))) { - message_send_text(c, message_type_info, c, "Usage: /operator +username to promote user to Server Operator."); - message_send_text(c, message_type_info, c, " /operator -username to demote user from Server Operator."); + if (args[1].empty() || (args[1][0] != '+' && args[1][0] != '-')) { + describe_command(c, args[0].c_str()); return -1; } - command = text[0]; - username = &text[1]; + text = args[1].c_str(); + command = text[0]; // command type (+/-) + username = &text[1]; // username if (!*username) { message_send_text(c, message_type_info, c, "You must supply a username."); @@ -938,12 +963,13 @@ namespace pvpgn return -1; } - text = skip_command(text); + std::vector args = split_command(text, 1); - if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You must supply a username."); + if (args[1].empty()) { + describe_command(c, args[0].c_str()); return -1; } + username = args[1].c_str(); // username if (!(acc = accountlist_find_account(username))) { snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); @@ -986,12 +1012,13 @@ namespace pvpgn return -1; } - text = skip_command(text); + std::vector args = split_command(text, 1); - if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You must supply a username."); + if (args[1].empty()) { + describe_command(c, args[0].c_str()); return -1; } + username = args[1].c_str(); // username if (!(acc = accountlist_find_account(username))) { snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); @@ -1034,12 +1061,13 @@ namespace pvpgn return -1; } - text = skip_command(text); + std::vector args = split_command(text, 1); - if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You must supply a username."); + if (args[1].empty()) { + describe_command(c, args[0].c_str()); return -1; } + username = args[1].c_str(); // username if (!(acc = accountlist_find_account(username))) { snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); @@ -1098,12 +1126,13 @@ namespace pvpgn return -1; } - text = skip_command(text); + std::vector args = split_command(text, 1); - if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You must supply a username."); + if (args[1].empty()) { + describe_command(c, args[0].c_str()); return -1; } + username = args[1].c_str(); // username if (!(acc = accountlist_find_account(username))) { snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); @@ -1182,12 +1211,13 @@ namespace pvpgn return -1; } - text = skip_command(text); + std::vector args = split_command(text, 1); - if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You must supply a username."); + if (args[1].empty()) { + describe_command(c, args[0].c_str()); return -1; } + username = args[1].c_str(); // username if (!(acc = accountlist_find_account(username))) { snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); @@ -1249,12 +1279,13 @@ namespace pvpgn return -1; } - text = skip_command(text); + std::vector args = split_command(text, 1); - if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You must supply a username."); + if (args[1].empty()) { + describe_command(c, args[0].c_str()); return -1; } + username = args[1].c_str(); // username if (!(acc = accountlist_find_account(username))) { snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); @@ -1318,12 +1349,14 @@ namespace pvpgn return -1; } - text = skip_command(text); + std::vector args = split_command(text, 1); - if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You must supply a username."); + if (args[1].empty()) { + describe_command(c, args[0].c_str()); return -1; } + username = args[1].c_str(); // username + if (!(acc = accountlist_find_account(username))) { snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); @@ -1405,10 +1438,9 @@ namespace pvpgn int i; t_account *my_acc = conn_get_account(c); - text = skip_command(text);; + std::vector args = split_command(text, 2); - if (strstart(text, "add") == 0 || strstart(text, "a") == 0) { - char msgtemp[MAX_MESSAGE_LEN]; + if (args[1] == "add" || args[1] == "a") { t_packet * rpacket; t_connection * dest_c; t_account * friend_acc; @@ -1419,12 +1451,11 @@ namespace pvpgn t_list * flist; t_friend * fr; - text = skip_command(text); - - if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage: /f add "); + if (args[2].empty()) { + describe_command(c, args[0].c_str()); return 0; } + text = args[2].c_str(); // username if (!(friend_acc = accountlist_find_account(text))) { message_send_text(c, message_type_info, c, "That user does not exist."); @@ -1509,7 +1540,7 @@ namespace pvpgn conn_push_outqueue(c, rpacket); packet_del_ref(rpacket); } - else if (strstart(text, "msg") == 0 || strstart(text, "w") == 0 || strstart(text, "whisper") == 0 || strstart(text, "m") == 0) + else if (args[1] == "msg" || args[1] == "w" || args[1] == "whisper" || args[1] == "m") { char const *msg; int cnt = 0; @@ -1518,12 +1549,11 @@ namespace pvpgn t_friend * fr; t_list * flist; - msg = skip_command(text); - /* if the message test is empty then ignore command */ - if (msg[0] == '\0') { - message_send_text(c, message_type_info, c, "Did not message any friends. Type some text next time."); - return 0; + if (args[2].empty()) { + describe_command(c, args[0].c_str()); + return -1; } + msg = args[2].c_str(); // message flist = account_get_friends(my_acc); if (flist == NULL) @@ -1547,19 +1577,16 @@ namespace pvpgn else message_send_text(c, message_type_info, c, "All of your friends are offline."); } - else if (strstart(text, "r") == 0 || strstart(text, "remove") == 0 - || strstart(text, "del") == 0 || strstart(text, "delete") == 0) { - + else if (args[1] == "r" || args[1] == "remove" || args[1] == "del" || args[1] == "delete") + { int num; - char msgtemp[MAX_MESSAGE_LEN]; t_packet * rpacket; - text = skip_command(text); - - if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage: /f remove "); - return 0; + if (args[2].empty()) { + describe_command(c, args[0].c_str()); + return -1; } + text = args[2].c_str(); // username switch ((num = account_remove_friend2(my_acc, text))) { case -1: return -1; @@ -1585,10 +1612,9 @@ namespace pvpgn return 0; } } - else if (strstart(text, "p") == 0 || strstart(text, "promote") == 0) { + else if (args[1] == "p" || args[1] == "promote") { int num; int n; - char msgtemp[MAX_MESSAGE_LEN]; char const * dest_name; t_packet * rpacket; t_list * flist; @@ -1596,12 +1622,11 @@ namespace pvpgn t_account * dest_acc; unsigned int dest_uid; - text = skip_command(text); - - if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage: /f promote "); - return 0; + if (args[2].empty()) { + describe_command(c, args[0].c_str()); + return -1; } + text = args[2].c_str(); // username num = account_get_friendcount(my_acc); flist = account_get_friends(my_acc); @@ -1630,10 +1655,9 @@ namespace pvpgn return 0; } } - else if (strstart(text, "d") == 0 || strstart(text, "demote") == 0) { + else if (args[1] == "d" || args[1] == "demote") { int num; int n; - char msgtemp[MAX_MESSAGE_LEN]; char const * dest_name; t_packet * rpacket; t_list * flist; @@ -1641,12 +1665,11 @@ namespace pvpgn t_account * dest_acc; unsigned int dest_uid; - text = skip_command(text); - - if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage: /f demote "); - return 0; + if (args[2].empty()) { + describe_command(c, args[0].c_str()); + return -1; } + text = args[2].c_str(); // username num = account_get_friendcount(my_acc); flist = account_get_friends(my_acc); @@ -1675,11 +1698,10 @@ namespace pvpgn return 0; } } - else if (strstart(text, "list") == 0 || strstart(text, "l") == 0 || strstart(text, "online") == 0 || strstart(text, "o") == 0) { + else if (args[1] == "list" || args[1] == "l" || args[1] == "online" || args[1] == "o") { char const * frienduid; char status[128]; char software[64]; - char msgtemp[MAX_MESSAGE_LEN]; t_connection * dest_c; t_account * friend_acc; t_game const * game; @@ -1690,7 +1712,7 @@ namespace pvpgn unsigned int uid; bool online_only = false; - if (strstart(text, "online") == 0 || strstart(text, "o") == 0) + if (args[1] == "online" || args[1] == "o") { online_only = true; } @@ -1759,14 +1781,7 @@ namespace pvpgn message_send_text(c, message_type_info, c, "End of Friends List"); } else { - message_send_text(c, message_type_info, c, "Friends List (Used in Arranged Teams and finding online friends.)"); - message_send_text(c, message_type_info, c, "Type: /f add (adds a friend to your list)"); - message_send_text(c, message_type_info, c, "Type: /f del (removes a friend from your list)"); - message_send_text(c, message_type_info, c, "Type: /f promote (promote a friend in your list)"); - message_send_text(c, message_type_info, c, "Type: /f demote (demote a friend in your list)"); - message_send_text(c, message_type_info, c, "Type: /f list (shows your full friends list)"); - message_send_text(c, message_type_info, c, "Type: /f online (shows your online friends list)"); - message_send_text(c, message_type_info, c, "Type: /f msg (whispers a message to all your friends at once)"); + describe_command(c, args[0].c_str()); } return 0; @@ -1779,217 +1794,66 @@ namespace pvpgn if (!(channel = conn_get_channel(c))) { message_send_text(c, message_type_error, c, "You are not in a channel."); - return 0; + return -1; } + + std::vector args = split_command(text, 1); + + if (args[1].empty()) { + describe_command(c, args[0].c_str()); + return -1; + } + text = args[1].c_str(); // message - text = skip_command(text); - - if ((text[0] != '\0') && (!conn_quota_exceeded(c, text))) + if (!conn_quota_exceeded(c, text)) channel_message_send(channel, message_type_emote, c, text); return 0; } static int _handle_whisper_command(t_connection * c, char const *text) { - char dest[MAX_USERNAME_LEN + MAX_REALMNAME_LEN]; /* both include NUL, so no need to add one for middle @ or * */ - unsigned int i, j; + char const * username; /* both include NUL, so no need to add one for middle @ or * */ - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get dest */ - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 2); - if ((dest[0] == '\0') || (text[i] == '\0')) + if (args[2].empty()) { - message_send_text(c, message_type_info, c, "Usage: /whisper "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + username = args[1].c_str(); // username + text = args[2].c_str(); // message - do_whisper(c, dest, &text[i]); + do_whisper(c, username, text); return 0; } static int _handle_status_command(t_connection * c, char const *text) { - char ctag[5]; - unsigned int i, j; + char const * ctag; t_clienttag clienttag; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get clienttag */ - if (j < sizeof(ctag)-1) ctag[j++] = text[i]; - ctag[j] = '\0'; + // get clienttag + std::vector args = split_command(text, 1); - if (ctag[0] == '\0') { - snprintf(msgtemp, sizeof(msgtemp), "There are currently %d users online, in %d games, and in %d channels.", - connlist_login_get_length(), - gamelist_get_length(), - channellist_get_length()); + if (!args[1].empty() && (clienttag = tag_validate_client(args[1].c_str()))) + { + // clienttag status + snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", + conn_get_user_count_by_clienttag(clienttag), + game_get_count_by_clienttag(clienttag), + clienttag_get_title(clienttag)); message_send_text(c, message_type_info, c, msgtemp); - tag_uint_to_str(ctag, conn_get_clienttag(c)); } - - for (i = 0; i < std::strlen(ctag); i++) - if (isascii((int)ctag[i]) && std::islower((int)ctag[i])) - ctag[i] = std::toupper((int)ctag[i]); - - if (std::strcmp(ctag, "ALL") == 0) - clienttag = 0; else - clienttag = tag_case_str_to_uint(ctag); - - switch (clienttag) { - case 0: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %d users online, in %d games and %d channels.", + // overall status + snprintf(msgtemp, sizeof(msgtemp), "There are currently %d users online, in %d games, and in %d channels.", connlist_login_get_length(), gamelist_get_length(), channellist_get_length()); message_send_text(c, message_type_info, c, msgtemp); - case CLIENTTAG_WAR3XP_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_WAR3XP_UINT), - game_get_count_by_clienttag(CLIENTTAG_WAR3XP_UINT), - clienttag_get_title(CLIENTTAG_WAR3XP_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_WARCRAFT3_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_WARCRAFT3_UINT), - game_get_count_by_clienttag(CLIENTTAG_WARCRAFT3_UINT), - clienttag_get_title(CLIENTTAG_WARCRAFT3_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_DIABLO2XP_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_DIABLO2XP_UINT), - game_get_count_by_clienttag(CLIENTTAG_DIABLO2XP_UINT), - clienttag_get_title(CLIENTTAG_DIABLO2XP_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_DIABLO2DV_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_DIABLO2DV_UINT), - game_get_count_by_clienttag(CLIENTTAG_DIABLO2DV_UINT), - clienttag_get_title(CLIENTTAG_DIABLO2DV_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_BROODWARS_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_BROODWARS_UINT), - game_get_count_by_clienttag(CLIENTTAG_BROODWARS_UINT), - clienttag_get_title(CLIENTTAG_BROODWARS_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_STARCRAFT_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_STARCRAFT_UINT), - game_get_count_by_clienttag(CLIENTTAG_STARCRAFT_UINT), - clienttag_get_title(CLIENTTAG_STARCRAFT_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_WARCIIBNE_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_WARCIIBNE_UINT), - game_get_count_by_clienttag(CLIENTTAG_WARCIIBNE_UINT), - clienttag_get_title(CLIENTTAG_WARCIIBNE_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_DIABLORTL_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_DIABLORTL_UINT), - game_get_count_by_clienttag(CLIENTTAG_DIABLORTL_UINT), - clienttag_get_title(CLIENTTAG_DIABLORTL_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_WCHAT_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_WCHAT_UINT), - game_get_count_by_clienttag(CLIENTTAG_WCHAT_UINT), - clienttag_get_title(CLIENTTAG_WCHAT_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_TIBERNSUN_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_TIBERNSUN_UINT), - game_get_count_by_clienttag(CLIENTTAG_TIBERNSUN_UINT), - clienttag_get_title(CLIENTTAG_TIBERNSUN_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_TIBSUNXP_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_TIBSUNXP_UINT), - game_get_count_by_clienttag(CLIENTTAG_TIBSUNXP_UINT), - clienttag_get_title(CLIENTTAG_TIBSUNXP_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_REDALERT_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_REDALERT_UINT), - game_get_count_by_clienttag(CLIENTTAG_REDALERT_UINT), - clienttag_get_title(CLIENTTAG_REDALERT_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_REDALERT2_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_REDALERT2_UINT), - game_get_count_by_clienttag(CLIENTTAG_REDALERT2_UINT), - clienttag_get_title(CLIENTTAG_REDALERT2_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_DUNE2000_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_DUNE2000_UINT), - game_get_count_by_clienttag(CLIENTTAG_DUNE2000_UINT), - clienttag_get_title(CLIENTTAG_DUNE2000_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_NOX_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_NOX_UINT), - game_get_count_by_clienttag(CLIENTTAG_NOX_UINT), - clienttag_get_title(CLIENTTAG_NOX_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_NOXQUEST_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_NOXQUEST_UINT), - game_get_count_by_clienttag(CLIENTTAG_NOXQUEST_UINT), - clienttag_get_title(CLIENTTAG_NOXQUEST_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_RENEGADE_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_RENEGADE_UINT), - game_get_count_by_clienttag(CLIENTTAG_RENEGADE_UINT), - clienttag_get_title(CLIENTTAG_RENEGADE_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_YURISREV_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_YURISREV_UINT), - game_get_count_by_clienttag(CLIENTTAG_YURISREV_UINT), - clienttag_get_title(CLIENTTAG_YURISREV_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - case CLIENTTAG_EMPERORBD_UINT: - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(CLIENTTAG_EMPERORBD_UINT), - game_get_count_by_clienttag(CLIENTTAG_EMPERORBD_UINT), - clienttag_get_title(CLIENTTAG_EMPERORBD_UINT)); - message_send_text(c, message_type_info, c, msgtemp); - if (clienttag) break; - default: - if (clienttag == 0) break; - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", - conn_get_user_count_by_clienttag(conn_get_clienttag(c)), - game_get_count_by_clienttag(conn_get_clienttag(c)), - clienttag_get_title(conn_get_clienttag(c))); - message_send_text(c, message_type_info, c, msgtemp); } return 0; @@ -2002,16 +1866,17 @@ namespace pvpgn unsigned int i; char const * tname; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 1); - if (text[i] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /who "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + char const * cname = args[1].c_str(); // channel name + - if (!(channel = channellist_find_channel_by_name(&text[i], conn_get_country(c), realm_get_name(conn_get_realm(c))))) + if (!(channel = channellist_find_channel_by_name(cname, conn_get_country(c), realm_get_name(conn_get_realm(c))))) { message_send_text(c, message_type_error, c, "That channel does not exist."); message_send_text(c, message_type_error, c, "(If you are trying to search for a user, use the /whois command.)"); @@ -2023,7 +1888,7 @@ namespace pvpgn return 0; } - snprintf(msgtemp, sizeof(msgtemp), "Users in channel %.64s:", &text[i]); + snprintf(msgtemp, sizeof(msgtemp), "Users in channel %.64s:", cname); i = std::strlen(msgtemp); for (conn = channel_get_first(channel); conn; conn = channel_get_next()) { @@ -2043,18 +1908,16 @@ namespace pvpgn static int _handle_whois_command(t_connection * c, char const * text) { - unsigned int i; - - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 1); - if (text[i] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /whois "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + text = args[1].c_str(); // username - do_whois(c, &text[i]); + do_whois(c, text); return 0; } @@ -2076,19 +1939,18 @@ namespace pvpgn static int _handle_announce_command(t_connection * c, char const *text) { - unsigned int i; t_message * message; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 1); - if (text[i] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /announce "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + text = args[1].c_str(); // message - snprintf(msgtemp, sizeof(msgtemp), "Announcement from %.64s: %.128s", conn_get_username(c), &text[i]); + snprintf(msgtemp, sizeof(msgtemp), "Announcement from %.64s: %.128s", conn_get_username(c), text); if (!(message = message_create(message_type_broadcast, c, msgtemp))) message_send_text(c, message_type_info, c, "Could not broadcast message."); else @@ -2123,7 +1985,7 @@ namespace pvpgn { static char const * const info[] = { - " Copyright (C) 2002 - 2008 See source for details", + " Copyright (C) 2002 - 2014 See source for details", " ", " PvPGN is free software; you can redistribute it and/or", " modify it under the terms of the GNU General Public License", @@ -2159,42 +2021,33 @@ namespace pvpgn static int _handle_stats_command(t_connection * c, char const *text) { - char dest[MAX_USERNAME_LEN]; + char const * username; unsigned int i, j; t_account * account; char const * clienttag = NULL; t_clienttag clienttag_uint; char clienttag_str[5]; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get dest */ - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 2); - if (!dest[0]) { + // username + username = args[1].c_str(); + if (args[1].empty()) { account = conn_get_account(c); } - else if (!(account = accountlist_find_account(dest))) { + else if (!(account = accountlist_find_account(username))) { message_send_text(c, message_type_error, c, "Invalid user."); return 0; } - if (text[i] != '\0') - clienttag = &text[i]; + // clienttag + if (!args[2].empty() && args[2].length() == 4) + clienttag = args[2].c_str(); else if (!(clienttag = tag_uint_to_str(clienttag_str, conn_get_clienttag(c)))) { message_send_text(c, message_type_error, c, "Unable to determine client game."); return 0; } - if (std::strlen(clienttag) != 4) { - snprintf(msgtemp, sizeof(msgtemp), "You must supply a user name and a valid program ID. (Program ID \"%.32s\" is invalid.)", clienttag); - message_send_text(c, message_type_error, c, msgtemp); - message_send_text(c, message_type_error, c, "Example: /stats joe STAR"); - return 0; - } - clienttag_uint = tag_case_str_to_uint(clienttag); @@ -2399,13 +2252,14 @@ namespace pvpgn { t_channel * channel; - text = skip_command(text); + std::vector args = split_command(text, 1); - if (text[0] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /channel "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + text = args[1].c_str(); // channelname if (!conn_get_game(c)) { if (strcasecmp(text, "Arranged Teams") == 0) @@ -2450,8 +2304,8 @@ namespace pvpgn static int _handle_away_command(t_connection * c, char const *text) { - - text = skip_command(text); + std::vector args = split_command(text, 1); + text = args[1].c_str(); // message if (text[0] == '\0') /* toggle away mode */ { @@ -2477,8 +2331,8 @@ namespace pvpgn static int _handle_dnd_command(t_connection * c, char const *text) { - - text = skip_command(text); + std::vector args = split_command(text, 1); + text = args[1].c_str(); // message if (text[0] == '\0') /* toggle dnd mode */ { @@ -2506,18 +2360,19 @@ namespace pvpgn { t_account * account; - text = skip_command(text); + std::vector args = split_command(text, 1); + + if (args[1].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } + text = args[1].c_str(); // username /* D2 std::puts * before username */ if (text[0] == '*') text++; - if (text[0] == '\0') - { - message_send_text(c, message_type_info, c, "Usage: /squelch "); - return 0; - } - if (!(account = accountlist_find_account(text))) { message_send_text(c, message_type_error, c, "No such user."); @@ -2546,18 +2401,19 @@ namespace pvpgn t_account * account; t_connection * dest_c; - text = skip_command(text); + std::vector args = split_command(text, 1); + + if (args[1].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } + text = args[1].c_str(); // username /* D2 std::puts * before username */ if (text[0] == '*') text++; - if (text[0] == '\0') - { - message_send_text(c, message_type_info, c, "Usage: /unsquelch "); - return 0; - } - if (!(account = accountlist_find_account(text))) { message_send_text(c, message_type_info, c, "No such user."); @@ -2586,24 +2442,21 @@ namespace pvpgn static int _handle_kick_command(t_connection * c, char const *text) { - char dest[MAX_USERNAME_LEN]; + char const * username; unsigned int i, j; t_channel const * channel; t_connection * kuc; t_account * acc; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get dest */ - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 2); - if (dest[0] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /kick "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + username = args[1].c_str(); // username + text = args[2].c_str(); // reason if (!(channel = conn_get_channel(c))) { @@ -2621,7 +2474,7 @@ namespace pvpgn message_send_text(c, message_type_error, c, "You have to be at least a Channel Operator or tempOP to use this command."); return 0; } - if (!(kuc = connlist_find_connection_by_accountname(dest))) + if (!(kuc = connlist_find_connection_by_accountname(username))) { message_send_text(c, message_type_error, c, "That user is not logged in."); return 0; @@ -2655,8 +2508,8 @@ namespace pvpgn return -1; } - if (text[i] != '\0') - snprintf(msgtemp, sizeof(msgtemp), "%-.20s has been kicked by %-.20s (%.128s).", tname1, tname2, &text[i]); + if (text[0] != '\0') + snprintf(msgtemp, sizeof(msgtemp), "%-.20s has been kicked by %-.20s (%.128s).", tname1, tname2, text); else snprintf(msgtemp, sizeof(msgtemp), "%-.20s has been kicked by %-.20s.", tname1, tname2); channel_message_send(channel, message_type_info, c, msgtemp); @@ -2670,23 +2523,19 @@ namespace pvpgn static int _handle_ban_command(t_connection * c, char const *text) { - char dest[MAX_USERNAME_LEN]; - unsigned int i, j; + char const * username; t_channel * channel; t_connection * buc; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get dest */ - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 2); - if (dest[0] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "usage. /ban "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + username = args[1].c_str(); // username + text = args[2].c_str(); // reason if (!(channel = conn_get_channel(c))) { @@ -2704,7 +2553,7 @@ namespace pvpgn { t_account * account; - if (!(account = accountlist_find_account(dest))) + if (!(account = accountlist_find_account(username))) message_send_text(c, message_type_info, c, "That account doesn't currently exist, banning anyway."); else if (account_get_auth_admin(account, NULL) == 1 || account_get_auth_admin(account, channel_get_name(channel)) == 1) { @@ -2719,9 +2568,9 @@ namespace pvpgn } } - if (channel_ban_user(channel, dest) < 0) + if (channel_ban_user(channel, username) < 0) { - snprintf(msgtemp, sizeof(msgtemp), "Unable to ban %-.20s.", dest); + snprintf(msgtemp, sizeof(msgtemp), "Unable to ban %-.20s.", username); message_send_text(c, message_type_error, c, msgtemp); } else @@ -2729,13 +2578,13 @@ namespace pvpgn char const * tname; tname = conn_get_loggeduser(c); - if (text[i] != '\0') - snprintf(msgtemp, sizeof(msgtemp), "%-.20s has been banned by %-.20s (%.128s).", dest, tname ? tname : "unknown", &text[i]); + if (text[0] != '\0') + snprintf(msgtemp, sizeof(msgtemp), "%-.20s has been banned by %-.20s (%.128s).", username, tname ? tname : "unknown", text); else - snprintf(msgtemp, sizeof(msgtemp), "%-.20s has been banned by %-.20s.", dest, tname ? tname : "unknown"); + snprintf(msgtemp, sizeof(msgtemp), "%-.20s has been banned by %-.20s.", username, tname ? tname : "unknown"); channel_message_send(channel, message_type_info, c, msgtemp); } - if ((buc = connlist_find_connection_by_accountname(dest)) && + if ((buc = connlist_find_connection_by_accountname(username)) && conn_get_channel(buc) == channel) conn_set_channel(buc, CHANNEL_NAME_BANNED); @@ -2745,16 +2594,15 @@ namespace pvpgn static int _handle_unban_command(t_connection * c, char const *text) { t_channel * channel; - unsigned int i; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 1); - if (text[i] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /unban "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + text = args[1].c_str(); // username if (!(channel = conn_get_channel(c))) { @@ -2770,11 +2618,11 @@ namespace pvpgn return 0; } - if (channel_unban_user(channel, &text[i]) < 0) + if (channel_unban_user(channel, text) < 0) message_send_text(c, message_type_error, c, "That user is not banned."); else { - snprintf(msgtemp, sizeof(msgtemp), "%.64s is no longer banned from this channel.", &text[i]); + snprintf(msgtemp, sizeof(msgtemp), "%.64s is no longer banned from this channel.", text); message_send_text(c, message_type_info, c, msgtemp); } @@ -2783,7 +2631,6 @@ namespace pvpgn static int _handle_reply_command(t_connection * c, char const *text) { - unsigned int i; char const * dest; if (!(dest = conn_get_lastsender(c))) @@ -2792,42 +2639,42 @@ namespace pvpgn return 0; } - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 1); - if (text[i] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /reply "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } - do_whisper(c, dest, &text[i]); + text = args[1].c_str(); // message + + do_whisper(c, dest, text); return 0; } static int _handle_realmann_command(t_connection * c, char const *text) { - unsigned int i; t_realm * realm; t_realm * trealm; t_connection * tc; t_elem const * curr; t_message * message; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - if (!(realm = conn_get_realm(c))) { message_send_text(c, message_type_info, c, "You must join a realm first"); return 0; } - if (text[i] == '\0') + std::vector args = split_command(text, 1); + + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /realmann "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + text = args[1].c_str(); // message - snprintf(msgtemp, sizeof(msgtemp), "Announcement from %.32s@%.32s: %.128s", conn_get_username(c), realm_get_name(realm), &text[i]); + snprintf(msgtemp, sizeof(msgtemp), "Announcement from %.32s@%.32s: %.128s", conn_get_username(c), realm_get_name(realm), text); if (!(message = message_create(message_type_broadcast, c, msgtemp))) { message_send_text(c, message_type_info, c, "Could not broadcast message."); @@ -2850,18 +2697,18 @@ namespace pvpgn static int _handle_watch_command(t_connection * c, char const *text) { - unsigned int i; t_account * account; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 1); - if (text[i] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /watch "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } - if (!(account = accountlist_find_account(&text[i]))) + text = args[1].c_str(); // username + + if (!(account = accountlist_find_account(text))) { message_send_text(c, message_type_info, c, "That user does not exist."); return 0; @@ -2871,7 +2718,7 @@ namespace pvpgn message_send_text(c, message_type_error, c, "Add to watch list failed."); else { - snprintf(msgtemp, sizeof(msgtemp), "User %.64s added to your watch list.", &text[i]); + snprintf(msgtemp, sizeof(msgtemp), "User %.64s added to your watch list.", text); message_send_text(c, message_type_info, c, msgtemp); } @@ -2880,18 +2727,17 @@ namespace pvpgn static int _handle_unwatch_command(t_connection * c, char const *text) { - unsigned int i; t_account * account; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 1); - if (text[i] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /unwatch "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } - if (!(account = accountlist_find_account(&text[i]))) + text = args[1].c_str(); // username + if (!(account = accountlist_find_account(text))) { message_send_text(c, message_type_info, c, "That user does not exist."); return 0; @@ -2901,7 +2747,7 @@ namespace pvpgn message_send_text(c, message_type_error, c, "Removal from watch list failed."); else { - snprintf(msgtemp, sizeof(msgtemp), "User %.64s removed from your watch list.", &text[i]); + snprintf(msgtemp, sizeof(msgtemp), "User %.64s removed from your watch list.", text); message_send_text(c, message_type_info, c, msgtemp); } @@ -2911,17 +2757,18 @@ namespace pvpgn static int _handle_watchall_command(t_connection * c, char const *text) { t_clienttag clienttag = 0; - char clienttag_str[5]; + char const * clienttag_str; - text = skip_command(text); + std::vector args = split_command(text, 1); + clienttag_str = args[1].c_str(); // clienttag - if (text[0] != '\0') { - if (std::strlen(text) != 4) { - message_send_text(c, message_type_error, c, "You must supply a rank and a valid program ID."); - message_send_text(c, message_type_error, c, "Example: /watchall STAR"); - return 0; + if (strlen(clienttag_str) > 0) + { + if ( !(clienttag = tag_validate_client(args[1].c_str())) ) + { + describe_command(c, args[0].c_str()); + return -1; } - clienttag = tag_case_str_to_uint(text); } if (conn_add_watch(c, NULL, clienttag) < 0) /* FIXME: adds all events for now */ @@ -2929,7 +2776,7 @@ namespace pvpgn else if (clienttag) { char msgtemp[MAX_MESSAGE_LEN]; - snprintf(msgtemp, sizeof(msgtemp), "All %.128s users added to your watch list.", tag_uint_to_str(clienttag_str, clienttag)); + snprintf(msgtemp, sizeof(msgtemp), "All %.128s users added to your watch list.", tag_uint_to_str((char*)clienttag_str, clienttag)); message_send_text(c, message_type_info, c, msgtemp); } else @@ -2941,16 +2788,18 @@ namespace pvpgn static int _handle_unwatchall_command(t_connection * c, char const *text) { t_clienttag clienttag = 0; - char clienttag_str[5]; + char const * clienttag_str; - text = skip_command(text); + std::vector args = split_command(text, 1); + clienttag_str = args[1].c_str(); // clienttag - if (text[0] != '\0') { - if (std::strlen(text) != 4) { - message_send_text(c, message_type_error, c, "You must supply a rank and a valid program ID."); - message_send_text(c, message_type_error, c, "Example: /unwatchall STAR"); + if (strlen(clienttag_str) > 0) + { + if (!(clienttag = tag_validate_client(args[1].c_str()))) + { + describe_command(c, args[0].c_str()); + return -1; } - clienttag = tag_case_str_to_uint(text); } if (conn_del_watch(c, NULL, clienttag) < 0) /* FIXME: deletes all events for now */ @@ -2958,7 +2807,7 @@ namespace pvpgn else if (clienttag) { char msgtemp[MAX_MESSAGE_LEN]; - snprintf(msgtemp, sizeof(msgtemp), "All %.128s users removed from your watch list.", tag_uint_to_str(clienttag_str, clienttag)); + snprintf(msgtemp, sizeof(msgtemp), "All %.128s users removed from your watch list.", tag_uint_to_str((char*)clienttag_str, clienttag)); message_send_text(c, message_type_info, c, msgtemp); } else @@ -3071,27 +2920,29 @@ namespace pvpgn static int _handle_games_command(t_connection * c, char const *text) { - unsigned int i; - unsigned int j; char clienttag_str[5]; - char dest[6]; + char const * dest; + char const * difficulty; struct glist_cb_struct cbdata; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get dest */ - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 2); + + if (args[1].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } + dest = args[1].c_str(); // clienttag + difficulty = args[1].c_str(); // difficulty (only for diablo) cbdata.c = c; cbdata.lobby = false; - if (std::strcmp(&text[i], "norm") == 0) + if (difficulty == "norm") cbdata.diff = game_difficulty_normal; - else if (std::strcmp(&text[i], "night") == 0) + else if (difficulty == "night") cbdata.diff = game_difficulty_nightmare; - else if (std::strcmp(&text[i], "hell") == 0) + else if (difficulty == "hell") cbdata.diff = game_difficulty_hell; else cbdata.diff = game_difficulty_none; @@ -3101,12 +2952,12 @@ namespace pvpgn cbdata.tag = conn_get_clienttag(c); message_send_text(c, message_type_info, c, "Currently accessible games:"); } - else if (strcasecmp(&dest[0], "all") == 0) + else if (strcasecmp(dest, "all") == 0) { cbdata.tag = 0; message_send_text(c, message_type_info, c, "All current games:"); } - else if (strcasecmp(&dest[0], "lobby") == 0 || strcasecmp(&dest[0], "l") == 0) + else if (strcasecmp(dest, "lobby") == 0 || strcasecmp(dest, "l") == 0) { cbdata.tag = conn_get_clienttag(c); cbdata.lobby = true; @@ -3114,18 +2965,16 @@ namespace pvpgn } else { - cbdata.tag = tag_case_str_to_uint(&dest[0]); - - if (!tag_check_client(cbdata.tag)) + if (!(cbdata.tag = tag_validate_client(dest))) { - message_send_text(c, message_type_error, c, "No valid clienttag specified."); + describe_command(c, args[0].c_str()); return -1; } if (cbdata.diff == game_difficulty_none) snprintf(msgtemp, sizeof(msgtemp), "Current games of type %.64s", tag_uint_to_str(clienttag_str, cbdata.tag)); else - snprintf(msgtemp, sizeof(msgtemp), "Current games of type %.64s %.128s", tag_uint_to_str(clienttag_str, cbdata.tag), &text[i]); + snprintf(msgtemp, sizeof(msgtemp), "Current games of type %.64s %.128s", tag_uint_to_str(clienttag_str, cbdata.tag), difficulty); message_send_text(c, message_type_info, c, msgtemp); } @@ -3151,24 +3000,33 @@ namespace pvpgn char const * name; int first; + std::vector args = split_command(text, 1); - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); + if (args[1].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } + text = args[1].c_str(); // clienttag - if (text[i] == '\0') + if (text[0] == '\0') { clienttag = conn_get_clienttag(c); message_send_text(c, message_type_info, c, "Currently accessible channels:"); } - else if (std::strcmp(&text[i], "all") == 0) + else if (strcasecmp(text, "all") == 0) { clienttag = 0; message_send_text(c, message_type_info, c, "All current channels:"); } else { - clienttag = tag_case_str_to_uint(&text[i]); - snprintf(msgtemp, sizeof(msgtemp), "Current channels of type %.64s", &text[i]); + if (!(clienttag = tag_validate_client(text))) + { + describe_command(c, args[0].c_str()); + return -1; + } + snprintf(msgtemp, sizeof(msgtemp), "Current channels of type %.64s", text); message_send_text(c, message_type_info, c, msgtemp); } @@ -3222,34 +3080,32 @@ namespace pvpgn unsigned int i, j; t_account * temp; t_hash passhash; - char username[MAX_USERNAME_LEN]; - char pass[256]; - - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); - for (; text[i] == ' '; i++); - - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get username */ - if (j < sizeof(username)-1) username[j++] = text[i]; - username[j] = '\0'; + char const * username, *pass; - for (; text[i] == ' '; i++); /* skip spaces */ - for (j = 0; text[i] != '\0'; i++) /* get pass (spaces are allowed) */ - if (j < sizeof(pass)-1) pass[j++] = text[i]; - pass[j] = '\0'; + std::vector args = split_command(text, 2); - if (username[0] == '\0' || pass[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage: /addacct "); - return 0; + if (args[2].empty()) + { + describe_command(c, args[0].c_str()); + return -1; } + username = args[1].c_str(); // username if (account_check_name(username) < 0) { message_send_text(c, message_type_error, c, "Account name contains some invalid symbol!"); return 0; } - /* FIXME: truncate or err on too long password */ - for (i = 0; i < std::strlen(pass); i++) - if (std::isupper((int)pass[i])) pass[i] = std::tolower((int)pass[i]); + if (args[2].length() > MAX_USERPASS_LEN) + { + snprintf(msgtemp, sizeof(msgtemp), "Maximum password length allowed is %d", MAX_USERPASS_LEN); + message_send_text(c, message_type_error, c, msgtemp); + return 0; + } + for (i = 0; i < args[2].length(); i++) + if (std::isupper((int)args[2][i])) args[2][i] = std::tolower((int)args[2][i]); + pass = args[2].c_str(); // password + bnet_hash(&passhash, std::strlen(pass), pass); @@ -3279,38 +3135,26 @@ namespace pvpgn t_account * account; t_account * temp; t_hash passhash; - char arg1[256]; - char arg2[256]; char const * username; - char * pass; + std::string pass; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 2); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get username/pass */ - if (j < sizeof(arg1)-1) arg1[j++] = text[i]; - arg1[j] = '\0'; - - for (; text[i] == ' '; i++); /* skip spaces */ - for (j = 0; text[i] != '\0'; i++) /* get pass (spaces are allowed) */ - if (j < sizeof(arg2)-1) arg2[j++] = text[i]; - arg2[j] = '\0'; + if (args[1].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } - if (arg2[0] == '\0') + if (args[2].empty()) { username = conn_get_username(c); - pass = arg1; + pass = args[1]; } else { - username = arg1; - pass = arg2; - } - - if (pass[0] == '\0') - { - message_send_text(c, message_type_info, c, "Usage: /chpass [username] "); - return 0; + username = args[1].c_str(); + pass = args[2]; } temp = accountlist_find_account(username); @@ -3331,19 +3175,19 @@ namespace pvpgn return 0; } - if (std::strlen(pass) > MAX_USERPASS_LEN) + if (pass.length() > MAX_USERPASS_LEN) { snprintf(msgtemp, sizeof(msgtemp), "Maximum password length allowed is %d", MAX_USERPASS_LEN); message_send_text(c, message_type_error, c, msgtemp); return 0; } - for (i = 0; i < std::strlen(pass); i++) - if (std::isupper((int)pass[i])) pass[i] = std::tolower((int)pass[i]); + for (i = 0; i < pass.length(); i++) + if (std::isupper((int)pass[i])) pass[i] = std::tolower((int)pass[i]); - bnet_hash(&passhash, std::strlen(pass), pass); + bnet_hash(&passhash, pass.length(), pass.c_str()); - snprintf(msgtemp, sizeof(msgtemp), "Trying to change password for account \"%.64s\" to \"%.128s\"", username, pass); + snprintf(msgtemp, sizeof(msgtemp), "Trying to change password for account \"%.64s\" to \"%.128s\"", username, pass.c_str()); message_send_text(c, message_type_info, c, msgtemp); if (account_set_pass(temp, hash_get_str(passhash)) < 0) @@ -3387,11 +3231,11 @@ namespace pvpgn } message_send_text(c, message_type_info, c, "Current connections:"); - /* addon */ - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - if (text[i] == '\0') + std::vector args = split_command(text, 1); + text = args[1].c_str(); + + if (text[0] == '\0') { snprintf(msgtemp, sizeof(msgtemp), " -class -tag -----name------ -lat(ms)- ----channel---- --game--"); message_send_text(c, message_type_info, c, msgtemp); @@ -3426,7 +3270,7 @@ namespace pvpgn game_name = game_get_name(conn_get_game(conn)); else game_name = "none"; - if (text[i] == '\0') + if (text[0] == '\0') snprintf(msgtemp, sizeof(msgtemp), " %-6.6s %4.4s %-15.15s %9u %-16.16s %-8.8s", conn_class_get_str(conn_get_class(conn)), tag_uint_to_str(clienttag_str, conn_get_fake_clienttag(conn)), @@ -3469,8 +3313,7 @@ namespace pvpgn static int _handle_finger_command(t_connection * c, char const *text) { - char dest[MAX_USERNAME_LEN]; - unsigned int i, j; + char const * dest; t_account * account; t_connection * conn; char const * ip; @@ -3479,18 +3322,14 @@ namespace pvpgn std::time_t then; struct std::tm * tmthen; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get dest */ - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 1); - if (dest[0] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /finger "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + dest = args[1].c_str(); // username; if (!(account = accountlist_find_account(dest))) { @@ -3693,37 +3532,33 @@ namespace pvpgn static int _handle_kill_command(t_connection * c, char const *text) { - unsigned int i, j; t_connection * user; - char usrnick[MAX_USERNAME_LEN]; /* max length of nick + \0 */ /* FIXME: Is it somewhere defined? */ + char const * username, * min; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get nick */ - if (j < sizeof(usrnick)-1) usrnick[j++] = text[i]; - usrnick[j] = '\0'; - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 2); + username = args[1].c_str(); // username + min = args[2].c_str(); // minutes of ban - if (usrnick[0] == '\0' || (usrnick[0] == '#' && (usrnick[1] < '0' || usrnick[1] > '9'))) + if (username[0] == '\0' || (username[0] == '#' && (username[1] < '0' || username[1] > '9'))) { - message_send_text(c, message_type_info, c, "Usage: /kill {|#} []"); - return 0; + describe_command(c, args[0].c_str()); + return -1; } - if (usrnick[0] == '#') { - if (!(user = connlist_find_connection_by_socket(std::atoi(usrnick + 1)))) { + if (username[0] == '#') { + if (!(user = connlist_find_connection_by_socket(std::atoi(username + 1)))) { message_send_text(c, message_type_error, c, "That connection doesn't exist."); return 0; } } else { - if (!(user = connlist_find_connection_by_accountname(usrnick))) { + if (!(user = connlist_find_connection_by_accountname(username))) { message_send_text(c, message_type_error, c, "That user is not logged in?"); return 0; } } - if (text[i] != '\0' && ipbanlist_add(c, addr_num_to_ip_str(conn_get_addr(user)), ipbanlist_str_to_time_t(c, &text[i])) == 0) + if (min[0] != '\0' && ipbanlist_add(c, addr_num_to_ip_str(conn_get_addr(user)), ipbanlist_str_to_time_t(c, min)) == 0) { ipbanlist_save(prefs_get_ipbanfile()); message_send_text(user, message_type_info, user, "An admin has closed your connection and banned your IP address."); @@ -3739,22 +3574,20 @@ namespace pvpgn static int _handle_killsession_command(t_connection * c, char const *text) { - unsigned int i, j; t_connection * user; - char session[16]; + char const * session, *min; + - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get nick */ - if (j < sizeof(session)-1) session[j++] = text[i]; - session[j] = '\0'; - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 2); - if (session[0] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /killsession [min]"); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + session = args[1].c_str(); // session id + min = args[1].c_str(); // minutes of ban + if (!std::isxdigit((int)session[0])) { message_send_text(c, message_type_error, c, "That is not a valid session."); @@ -3765,7 +3598,7 @@ namespace pvpgn message_send_text(c, message_type_error, c, "That session does not exist."); return 0; } - if (text[i] != '\0' && ipbanlist_add(c, addr_num_to_ip_str(conn_get_addr(user)), ipbanlist_str_to_time_t(c, &text[i])) == 0) + if (min[0] != '\0' && ipbanlist_add(c, addr_num_to_ip_str(conn_get_addr(user)), ipbanlist_str_to_time_t(c, min)) == 0) { ipbanlist_save(prefs_get_ipbanfile()); message_send_text(user, message_type_info, user, "Connection closed by admin and banned your IP's."); @@ -3782,11 +3615,12 @@ namespace pvpgn t_game const * game; char clienttag_str[5]; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 1); + text = args[1].c_str(); - if (text[i] == '\0') + if (text[0] == '\0') { + // current user game if (!(game = conn_get_game(c))) { message_send_text(c, message_type_error, c, "You are not in a game."); @@ -3794,7 +3628,7 @@ namespace pvpgn } } else - if (!(game = gamelist_find_game_available(&text[i], conn_get_clienttag(c), game_type_all))) + if (!(game = gamelist_find_game_available(text, conn_get_clienttag(c), game_type_all))) { message_send_text(c, message_type_error, c, "That game does not exist."); return 0; @@ -3941,14 +3775,13 @@ namespace pvpgn t_entry *curr; t_hashtable *accountlist_head = accountlist(); - text = skip_command(text); - - if (text[0] == '\0') { - /* In need of a better description */ - message_send_text(c, message_type_info, c, "Usage: /find "); - message_send_text(c, message_type_info, c, " must be lower case."); + std::vector args = split_command(text, 1); + if (args[1].empty()) + { + describe_command(c, args[0].c_str()); return -1; } + text = args[1].c_str(); std::sprintf(msgtemp, " -- name -- similar to %s", text); message_send_text(c, message_type_info, c, msgtemp); @@ -3986,27 +3819,14 @@ namespace pvpgn return 0; } - /* - static int _handle_rank_all_accounts_command(t_connection * c, char const *text) - { - // rank all accounts here - accounts_rank_all(); - return 0; - } - */ - static int _handle_shutdown_command(t_connection * c, char const *text) { - char dest[32]; + char const * dest; unsigned int i, j; unsigned int delay; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get dest */ - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 1); + dest = args[1].c_str(); // delay if (dest[0] == '\0') delay = prefs_get_shutdown_delay(); @@ -4029,46 +3849,38 @@ namespace pvpgn static int _handle_ladderinfo_command(t_connection * c, char const *text) { - char dest[32]; + char const * rank_s, *tag_s; unsigned int rank; - unsigned int i, j; t_account * account; t_team * team; t_clienttag clienttag; const LadderReferencedObject* referencedObject; LadderList* ladderList; - text = skip_command(text); - for (i = 0, j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get dest */ - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - for (; text[i] == ' '; i++); - - if (dest[0] == '\0') + std::vector args = split_command(text, 2); + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /ladderinfo [clienttag]"); - return 0; + describe_command(c, args[0].c_str()); + return -1; } - if (str_to_uint(dest, &rank) < 0 || rank < 1) + rank_s = args[1].c_str(); // rank + tag_s = args[2].c_str(); // clienttag + + if (str_to_uint(rank_s, &rank) < 0 || rank < 1) { message_send_text(c, message_type_error, c, "Invalid rank."); return 0; } - if (text[i] != '\0') { - if (std::strlen(&text[i]) != 4) { - message_send_text(c, message_type_error, c, text); - message_send_text(c, message_type_error, c, "You must supply a rank and a valid program ID."); - message_send_text(c, message_type_error, c, "Example: /ladderinfo 1 STAR not"); + if (!(clienttag = tag_validate_client(tag_s))) + { + if (!(clienttag = conn_get_clienttag(c))) + { + message_send_text(c, message_type_error, c, "Unable to determine client game."); return 0; } - clienttag = tag_case_str_to_uint(&text[i]); - } - else if (!(clienttag = conn_get_clienttag(c))) - { - message_send_text(c, message_type_error, c, "Unable to determine client game."); - return 0; } + if (clienttag == CLIENTTAG_STARCRAFT_UINT) { ladderList = ladders.getLadderList(LadderKey(ladder_id_normal, clienttag, ladder_sort_highestrated, ladder_time_active)); @@ -4281,34 +4093,29 @@ namespace pvpgn static int _handle_timer_command(t_connection * c, char const *text) { - unsigned int i, j; unsigned int delta; - char deltastr[64]; t_timer_data data; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get comm */ - if (j < sizeof(deltastr)-1) deltastr[j++] = text[i]; - deltastr[j] = '\0'; - for (; text[i] == ' '; i++); - - if (deltastr[0] == '\0') + char const * delta_s, *msgtext_s; + std::vector args = split_command(text, 2); + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /timer "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + delta_s = args[1].c_str(); // timer delta + msgtext_s = args[2].c_str(); // message text display when timer elapsed - if (clockstr_to_seconds(deltastr, &delta) < 0) + if (clockstr_to_seconds(delta_s, &delta) < 0) { message_send_text(c, message_type_error, c, "Invalid duration."); return 0; } - if (text[i] == '\0') + if (msgtext_s[0] == '\0') data.p = xstrdup("Your timer has expired."); else - data.p = xstrdup(&text[i]); + data.p = xstrdup(msgtext_s); if (timerlist_add_timer(c, std::time(NULL) + (std::time_t)delta, user_timer_cb, data) < 0) { @@ -4327,24 +4134,18 @@ namespace pvpgn static int _handle_serverban_command(t_connection *c, char const *text) { - char dest[MAX_USERNAME_LEN]; + char const * username; t_connection * dest_c; - unsigned int i, j; - - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); // skip command - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) // get dest - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - for (; text[i] == ' '; i++); - if (dest[0] == '\0') + std::vector args = split_command(text, 1); + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /serverban "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + username = args[1].c_str(); // username - if (!(dest_c = connlist_find_connection_by_accountname(dest))) + if (!(dest_c = connlist_find_connection_by_accountname(username))) { message_send_text(c, message_type_error, c, "That user is not logged on."); return 0; @@ -4365,7 +4166,7 @@ namespace pvpgn static int _handle_netinfo_command(t_connection * c, char const *text) { - char dest[MAX_USERNAME_LEN]; + char const * username; unsigned int i, j; t_connection * conn; t_game const * game; @@ -4374,17 +4175,13 @@ namespace pvpgn unsigned int taddr; unsigned short tport; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); // skip command - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) // get dest - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 1); + username = args[1].c_str(); // username - if (dest[0] == '\0') - std::strcpy(dest, conn_get_username(c)); + if (username[0] == '\0') + username = conn_get_username(c); - if (!(conn = connlist_find_connection_by_accountname(dest))) + if (!(conn = connlist_find_connection_by_accountname(username))) { message_send_text(c, message_type_error, c, "That user is not logged on."); return 0; @@ -4454,13 +4251,13 @@ namespace pvpgn t_connection * user; t_account * account; - text = skip_command(text); - - if (text[0] == '\0') + std::vector args = split_command(text, 1); + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /lockacct "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + text = args[1].c_str(); // username if (!(account = accountlist_find_account(text))) { @@ -4480,13 +4277,14 @@ namespace pvpgn t_connection * user; t_account * account; - text = skip_command(text); - - if (text[0] == '\0') + std::vector args = split_command(text, 1); + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /unlockacct "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + text = args[1].c_str(); // username + if (!(account = accountlist_find_account(text))) { message_send_text(c, message_type_error, c, "Invalid user."); @@ -4507,13 +4305,13 @@ namespace pvpgn t_connection * user; t_account * account; - text = skip_command(text); - - if (text[0] == '\0') + std::vector args = split_command(text, 1); + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /muteacct "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + text = args[1].c_str(); // username if (!(account = accountlist_find_account(text))) { @@ -4533,13 +4331,14 @@ namespace pvpgn t_connection * user; t_account * account; - text = skip_command(text); - - if (text[0] == '\0') + std::vector args = split_command(text, 1); + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /unmuteacct "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + text = args[1].c_str(); // username + if (!(account = accountlist_find_account(text))) { message_send_text(c, message_type_error, c, "Invalid user."); @@ -4556,24 +4355,19 @@ namespace pvpgn static int _handle_flag_command(t_connection * c, char const *text) { - char dest[32]; + char const * flag_s; unsigned int i, j; unsigned int newflag; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get dest */ - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - for (; text[i] == ' '; i++); - - if (dest[0] == '\0') + std::vector args = split_command(text, 1); + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /flag "); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + flag_s = args[1].c_str(); // flag - newflag = std::strtoul(dest, NULL, 0); + newflag = std::strtoul(flag_s, NULL, 0); conn_set_flags(c, newflag); snprintf(msgtemp, sizeof(msgtemp), "Flags set to 0x%08x.", newflag); @@ -4583,70 +4377,60 @@ namespace pvpgn static int _handle_tag_command(t_connection * c, char const *text) { - char dest[8]; - unsigned int i, j; - unsigned int newtag; - - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get dest */ - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - for (; text[i] == ' '; i++); + char const * tag_s; + t_clienttag clienttag; - if (dest[0] == '\0') + std::vector args = split_command(text, 1); + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /tag "); - return 0; - } - if (std::strlen(dest) != 4) - { - message_send_text(c, message_type_error, c, "Client tag must be four characters long."); - return 0; + describe_command(c, args[0].c_str()); + return -1; } - newtag = tag_case_str_to_uint(dest); - if (tag_check_client(newtag)) + tag_s = args[1].c_str(); // flag + + if (clienttag = tag_validate_client(tag_s)) { unsigned int oldflags = conn_get_flags(c); - conn_set_clienttag(c, newtag); - if ((newtag == CLIENTTAG_WARCRAFT3_UINT) || (newtag == CLIENTTAG_WAR3XP_UINT)) + conn_set_clienttag(c, clienttag); + if ((clienttag == CLIENTTAG_WARCRAFT3_UINT) || (clienttag == CLIENTTAG_WAR3XP_UINT)) conn_update_w3_playerinfo(c); channel_rejoin(c); conn_set_flags(c, oldflags); channel_update_userflags(c); - snprintf(msgtemp, sizeof(msgtemp), "Client tag set to %.128s.", dest); + snprintf(msgtemp, sizeof(msgtemp), "Client tag set to %.128s.", tag_s); } else - snprintf(msgtemp, sizeof(msgtemp), "Invalid clienttag %.128s specified", dest); + snprintf(msgtemp, sizeof(msgtemp), "Invalid clienttag %.128s specified", tag_s); message_send_text(c, message_type_info, c, msgtemp); return 0; } static int _handle_ipscan_command(t_connection * c, char const * text) { - text = skip_command(text); + /* + Description of _handle_ipscan_command + --------------------------------------- + Finds all currently logged in users with the given ip address. + */ + t_account * account; t_connection * conn; char const * ip; - /* - Description of _handle_ipscan_command - --------------------------------------- - Finds all currently logged in users with the given ip address. - */ - - if (text[0] == '\0') { - message_send_text(c, message_type_error, c, "Usage: /ipscan "); - return 0; + std::vector args = split_command(text, 1); + if (args[1].empty()) + { + describe_command(c, args[0].c_str()); + return -1; } + text = args[1].c_str(); // ip or username + if (account = accountlist_find_account(text)) { conn = account_get_conn(account); if (conn) { // conn_get_addr returns int, so there can never be a NULL string construct ip = addr_num_to_ip_str(conn_get_addr(conn)); - snprintf(msgtemp, sizeof(msgtemp), "Scanning online users for IP %s!", ip); - message_send_text(c, message_type_error, c, msgtemp); } else { message_send_text(c, message_type_info, c, "Warning: That user is not online, using last known address."); @@ -4660,6 +4444,9 @@ namespace pvpgn ip = text; } + snprintf(msgtemp, sizeof(msgtemp), "Scanning online users for IP %s...", ip); + message_send_text(c, message_type_error, c, msgtemp); + t_elem const * curr; int count = 0; LIST_TRAVERSE_CONST(connlist(), curr) { @@ -4670,7 +4457,7 @@ namespace pvpgn } if (std::strcmp(ip, addr_num_to_ip_str(conn_get_addr(conn))) == 0) { - snprintf(msgtemp, sizeof(msgtemp), "%s", conn_get_loggeduser(conn)); + snprintf(msgtemp, sizeof(msgtemp), " %s", conn_get_loggeduser(conn)); message_send_text(c, message_type_info, c, msgtemp); count++; } @@ -4686,36 +4473,18 @@ namespace pvpgn static int _handle_set_command(t_connection * c, char const *text) { t_account * account; - char *accname; - char *key; - char *value; - char t[MAX_MESSAGE_LEN]; - unsigned int i, j; - char arg1[256]; - char arg2[256]; - char arg3[256]; - - std::strncpy(t, text, MAX_MESSAGE_LEN - 1); - for (i = 0; t[i] != ' ' && t[i] != '\0'; i++); /* skip command /set */ - - for (; t[i] == ' '; i++); /* skip spaces */ - for (j = 0; t[i] != ' ' && t[i] != '\0'; i++) /* get username */ - if (j < sizeof(arg1)-1) arg1[j++] = t[i]; - arg1[j] = '\0'; - - for (; t[i] == ' '; i++); /* skip spaces */ - for (j = 0; t[i] != ' ' && t[i] != '\0'; i++) /* get key */ - if (j < sizeof(arg2)-1) arg2[j++] = t[i]; - arg2[j] = '\0'; + char const * username, *key, *value; - for (; t[i] == ' '; i++); /* skip spaces */ - for (j = 0; t[i] != '\0'; i++) /* get value */ - if (j < sizeof(arg3)-1) arg3[j++] = t[i]; - arg3[j] = '\0'; + std::vector args = split_command(text, 3); + if (args[2].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } + username = args[1].c_str(); // username + key = args[2].c_str(); // key + value = args[3].c_str(); // value - accname = arg1; - key = arg2; - value = arg3; // disallow get/set value for password hash and username (hash can be cracked easily, account name should be permanent) if (strcasecmp(key, "bnet\\acct\\passhash1") == 0 || strcasecmp(key, "bnet\\acct\\username") == 0 || strcasecmp(key, "bnet\\username") == 0) @@ -4724,16 +4493,7 @@ namespace pvpgn return 0; } - if ((arg1[0] == '\0') || (arg2[0] == '\0')) - { - message_send_text(c, message_type_info, c, "Usage: /set [value]"); - message_send_text(c, message_type_info, c, " example: /set joe BNET\\auth\\botlogin true"); - message_send_text(c, message_type_info, c, " example: /set joe Record\\W3XP\\ffa_wins 123"); - message_send_text(c, message_type_info, c, " (set value = null to unset value)"); - return 0; - } - - if (!(account = accountlist_find_account(accname))) + if (!(account = accountlist_find_account(username))) { message_send_text(c, message_type_error, c, "Invalid user."); return 0; @@ -4860,10 +4620,10 @@ namespace pvpgn t_connection * user; t_game * game; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 1); + text = args[1].c_str(); // username - if (text[i] == '\0') + if (text[0] == '\0') { if ((game = conn_get_game(c))) { @@ -4879,8 +4639,8 @@ namespace pvpgn } snprintf(msgtemp, sizeof(msgtemp), "Your latency %9u", conn_get_latency(c)); } - else if ((user = connlist_find_connection_by_accountname(&text[i]))) - snprintf(msgtemp, sizeof(msgtemp), "%.64s latency %9u", &text[i], conn_get_latency(user)); + else if ((user = connlist_find_connection_by_accountname(text))) + snprintf(msgtemp, sizeof(msgtemp), "%.64s latency %9u", text, conn_get_latency(user)); else snprintf(msgtemp, sizeof(msgtemp), "Invalid user."); @@ -4888,66 +4648,26 @@ namespace pvpgn return 0; } - /* Redirected to handle_ipban_command in ipban.c [Omega] - static int _handle_ipban_command(t_connection * c, char const *text) - { - handle_ipban_command(c,text); - return 0; - } - */ - static int _handle_commandgroups_command(t_connection * c, char const * text) { t_account * account; - char * command; - char * username; + char const * command, *username; + unsigned int usergroups; // from user account unsigned int groups = 0; // converted from arg3 char tempgroups[9]; // converted from usergroups - char t[MAX_MESSAGE_LEN]; - unsigned int i, j; - char arg1[256]; - char arg2[256]; - char arg3[256]; - std::strncpy(t, text, MAX_MESSAGE_LEN - 1); - for (i = 0; t[i] != ' ' && t[i] != '\0'; i++); /* skip command /groups */ - - for (; t[i] == ' '; i++); /* skip spaces */ - for (j = 0; t[i] != ' ' && t[i] != '\0'; i++) /* get command */ - if (j < sizeof(arg1)-1) arg1[j++] = t[i]; - arg1[j] = '\0'; - - for (; t[i] == ' '; i++); /* skip spaces */ - for (j = 0; t[i] != ' ' && t[i] != '\0'; i++) /* get username */ - if (j < sizeof(arg2)-1) arg2[j++] = t[i]; - arg2[j] = '\0'; - - for (; t[i] == ' '; i++); /* skip spaces */ - for (j = 0; t[i] != '\0'; i++) /* get groups */ - if (j < sizeof(arg3)-1) arg3[j++] = t[i]; - arg3[j] = '\0'; - - command = arg1; - username = arg2; - - if (arg1[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage: /cg []"); - return 0; - } - - if (!std::strcmp(command, "help") || !std::strcmp(command, "h")) { - message_send_text(c, message_type_info, c, "Command Groups (Defines the Groups of Commands a User Can Use.)"); - message_send_text(c, message_type_info, c, "Type: /cg add - adds group(s) to user profile"); - message_send_text(c, message_type_info, c, "Type: /cg del - deletes group(s) from user profile"); - message_send_text(c, message_type_info, c, "Type: /cg list - shows current groups user can use"); - return 0; + std::vector args = split_command(text, 3); + // display help if [list] without [username], or not [list] without [groups] + if (((args[1] == "list" || args[1] == "l") && args[2].empty()) || !(args[1] == "list" || args[1] == "l") && args[3].empty()) + { + describe_command(c, args[0].c_str()); + return -1; } + command = args[1].c_str(); // command + username = args[2].c_str(); // username + //args[3]; // groups - if (arg2[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage: /cg []"); - return 0; - } if (!(account = accountlist_find_account(username))) { message_send_text(c, message_type_error, c, "Invalid user."); @@ -4971,22 +4691,17 @@ namespace pvpgn return 0; } - if (arg3[0] == '\0') { - message_send_text(c, message_type_info, c, "Usage: /cg []"); - return 0; - } - - for (i = 0; arg3[i] != '\0'; i++) { - if (arg3[i] == '1') groups |= 1; - else if (arg3[i] == '2') groups |= 2; - else if (arg3[i] == '3') groups |= 4; - else if (arg3[i] == '4') groups |= 8; - else if (arg3[i] == '5') groups |= 16; - else if (arg3[i] == '6') groups |= 32; - else if (arg3[i] == '7') groups |= 64; - else if (arg3[i] == '8') groups |= 128; + for (char& g : args[3]) { + if (g == '1') groups |= 1; + else if (g == '2') groups |= 2; + else if (g == '3') groups |= 4; + else if (g == '4') groups |= 8; + else if (g == '5') groups |= 16; + else if (g == '6') groups |= 32; + else if (g == '7') groups |= 64; + else if (g == '8') groups |= 128; else { - snprintf(msgtemp, sizeof(msgtemp), "Got bad group: %c", arg3[i]); + snprintf(msgtemp, sizeof(msgtemp), "Got bad group: %c", g); message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -4994,14 +4709,14 @@ namespace pvpgn if (!std::strcmp(command, "add") || !std::strcmp(command, "a")) { account_set_command_groups(account, usergroups | groups); - snprintf(msgtemp, sizeof(msgtemp), "Groups %.64s has been added to %.64s", arg3, username); + snprintf(msgtemp, sizeof(msgtemp), "Groups %.64s has been added to %.64s", args[3].c_str(), username); message_send_text(c, message_type_info, c, msgtemp); return 0; } if (!std::strcmp(command, "del") || !std::strcmp(command, "d")) { account_set_command_groups(account, usergroups & (255 - groups)); - snprintf(msgtemp, sizeof(msgtemp), "Groups %.64s has been deleted from %.64s", arg3, username); + snprintf(msgtemp, sizeof(msgtemp), "Groups %.64s has been deleted from %.64s", args[3].c_str(), username); message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -5018,8 +4733,8 @@ namespace pvpgn t_channel * channel; int do_save = NO_SAVE_TOPIC; - topic = skip_command(text); - + std::vector args = split_command(text, 1); + topic = args[1].c_str(); if (!(channel = conn_get_channel(c))) { message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); @@ -5231,45 +4946,29 @@ namespace pvpgn static int _handle_clearstats_command(t_connection *c, char const *text) { - char dest[MAX_USERNAME_LEN]; - unsigned int i, j, all; + char const * username, * tag; + unsigned int all; t_account * account; t_clienttag ctag = 0; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - - if (!text[i]) { - message_send_text(c, message_type_error, c, "Missing user, syntax error."); - message_send_text(c, message_type_error, c, "Usage example: /clearstats "); - message_send_text(c, message_type_error, c, " where can be any valid client or ALL for all clients"); - return 0; + std::vector args = split_command(text, 2); + if (args[2].empty()) + { + describe_command(c, args[0].c_str()); + return -1; } + username = args[1].c_str(); + tag = args[2].c_str(); // clienttag - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get dest */ - if (j < sizeof(dest)-1) dest[j++] = text[i]; - dest[j] = '\0'; - - account = accountlist_find_account(dest); + account = accountlist_find_account(username); if (!account) { message_send_text(c, message_type_error, c, "Invalid user."); return 0; } - for (; text[i] == ' '; i++); - if (!text[i]) { - message_send_text(c, message_type_error, c, "Missing clienttag, syntax error."); - message_send_text(c, message_type_error, c, "Usage example: /clearstats "); - message_send_text(c, message_type_error, c, " where can be any valid client or ALL for all clients"); - return 0; - } - - if (strcasecmp(text + i, "all")) { - if (std::strlen(text + i) != 4) { - message_send_text(c, message_type_error, c, "Invalid clienttag, syntax error."); - return 0; - } - ctag = tag_case_str_to_uint(text + i); + if (strcasecmp(tag, "all")) + { + ctag = tag_validate_client(tag); all = 0; } else all = 1; @@ -5308,79 +5007,78 @@ namespace pvpgn { t_account * user_account; t_connection * user_c; - char *accname; - char *code; - const char *usericon; - t_clienttag user_clienttag; - char t[MAX_MESSAGE_LEN]; - unsigned int i, j; - char arg1[256]; - char arg2[256]; - - std::strncpy(t, text, MAX_MESSAGE_LEN - 1); - for (i = 0; t[i] != ' ' && t[i] != '\0'; i++); /* skip command /icon */ - - for (; t[i] == ' '; i++); /* skip spaces */ - for (j = 0; t[i] != ' ' && t[i] != '\0'; i++) /* get username */ - if (j < sizeof(arg1)-1) arg1[j++] = t[i]; - arg1[j] = '\0'; - - for (; t[i] == ' '; i++); /* skip spaces */ - for (j = 0; t[i] != ' ' && t[i] != '\0'; i++) /* get code */ - if (j < sizeof(arg2)-1) arg2[j++] = t[i]; - arg2[j] = '\0'; + char const * username, *code, *usericon; + t_clienttag clienttag; - accname = arg1; - code = arg2; + std::vector args = split_command(text, 3); - if (accname == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage: /icon [CODE]"); - message_send_text(c, message_type_info, c, " for example: /icon joe W3D6"); - message_send_text(c, message_type_info, c, " (set [CODE] = null to enable default icon)"); - return 0; + describe_command(c, args[0].c_str()); + return -1; } + username = args[1].c_str(); // username - if (!(user_account = accountlist_find_account(accname))) + // find user account + if (!(user_account = accountlist_find_account(username))) { message_send_text(c, message_type_error, c, "Invalid user."); return 0; } + user_c = account_get_conn(user_account); - if (user_c = account_get_conn(user_account)) - user_clienttag = conn_get_clienttag(user_c); + // if clienttag is in parameters + if (clienttag = tag_validate_client(args[3].c_str())) + { + // if user offline then replace last clienttag with given + if (!user_c) + account_set_ll_clienttag(user_account, clienttag); + } else - user_clienttag = account_get_ll_clienttag(user_account); // if user offline then retrieve last clienttag + { + if (user_c) + clienttag = conn_get_clienttag(user_c); + else // if user offline then retrieve last clienttag + clienttag = account_get_ll_clienttag(user_account); + } + + // icon code + std::transform(args[2].begin(), args[2].end(), args[2].begin(), std::toupper); // to upper + code = args[2].c_str(); // output current usericon code - if (code == '\0' || strlen(arg2) != 4) + if (strlen(code) != 4) { - if (usericon = account_get_user_icon(user_account, user_clienttag)) + if (usericon = account_get_user_icon(user_account, clienttag)) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s has custom icon \"%.4s\"", account_get_name(user_account), strreverse(xstrdup(usericon))); + snprintf(msgtemp, sizeof(msgtemp), "%.64s has custom icon \"%.4s\" of %.128s", account_get_name(user_account), strreverse(xstrdup(usericon)), clienttag_get_title(clienttag)); message_send_text(c, message_type_error, c, msgtemp); } else { - snprintf(msgtemp, sizeof(msgtemp), "Custom icon for %.64s currently not set", account_get_name(user_account)); + snprintf(msgtemp, sizeof(msgtemp), "Custom icon for %.64s currently not set of %.128s", account_get_name(user_account), clienttag_get_title(clienttag)); message_send_text(c, message_type_error, c, msgtemp); } return 0; } - for (int i = 0; i < strlen(code); i++) - code[i] = toupper(code[i]); - - snprintf(msgtemp, sizeof(msgtemp), "Set icon \"%.4s\" to %.64s", code, account_get_name(user_account)); - message_send_text(c, message_type_error, c, msgtemp); // unset value if (strcasecmp(code, "null") == 0) + { + snprintf(msgtemp, sizeof(msgtemp), "Set default icon to %.64s of %.128s", account_get_name(user_account), clienttag_get_title(clienttag)); usericon = NULL; + } else - usericon = strreverse(code); + { + snprintf(msgtemp, sizeof(msgtemp), "Set icon \"%.4s\" to %.64s of %.128s", code, account_get_name(user_account), clienttag_get_title(clienttag)); + usericon = strreverse((char*)code); + } + + message_send_text(c, message_type_error, c, msgtemp); + // set reversed - account_set_user_icon(user_account, user_clienttag, usericon); + account_set_user_icon(user_account, clienttag, usericon); // if user online then force him to rejoin channel if (user_c) diff --git a/src/bnetd/helpfile.cpp b/src/bnetd/helpfile.cpp index 02051a617..48de29c6d 100644 --- a/src/bnetd/helpfile.cpp +++ b/src/bnetd/helpfile.cpp @@ -26,6 +26,7 @@ #include "common/eventlog.h" #include "common/util.h" #include "common/xalloc.h" +#include "common/xstring.h" #include "message.h" #include "command_groups.h" @@ -42,7 +43,6 @@ namespace pvpgn static std::FILE* hfd = NULL; /* helpfile descriptor */ static int list_commands(t_connection *); - static int describe_command(t_connection *, char const *); extern int helpfile_init(char const *filename) @@ -76,7 +76,7 @@ namespace pvpgn extern int handle_help_command(t_connection * c, char const * text) { unsigned int i, j; - char comm[MAX_COMMAND_LEN]; + char cmd[MAX_COMMAND_LEN]; if (hfd == NULL) { /* an error ocured opening readonly the help file, helpfile_unload was called, or helpfile_init hasn't been called */ @@ -84,25 +84,23 @@ namespace pvpgn return 0; } - std::rewind(hfd); for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ for (; text[i] == ' '; i++); if (text[i] == '/') /* skip / in front of command (if present) */ i++; for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get comm */ - if (j < sizeof(comm)-1) comm[j++] = text[i]; - comm[j] = '\0'; + if (j < sizeof(cmd)-1) cmd[j++] = text[i]; + cmd[j] = '\0'; /* just read the whole file and dump only the commands */ - if (comm[0] == '\0') + if (cmd[0] == '\0') { list_commands(c); return 0; } - if (describe_command(c, comm) == 0) return 0; - /* no description was found for this command. inform the user */ - message_send_text(c, message_type_error, c, " no help available for that command"); + describe_command(c, cmd); + return 0; } @@ -113,6 +111,7 @@ namespace pvpgn int i; message_send_text(c, message_type_info, c, "Chat commands:"); + std::rewind(hfd); while ((line = file_get_line(hfd)) != NULL) { for (i = 0; line[i] == ' ' && line[i] != '\0'; i++); /* skip spaces in front of %command */ @@ -162,12 +161,13 @@ namespace pvpgn } - static int describe_command(t_connection * c, char const * comm) + extern int describe_command(t_connection * c, char const * cmd) { char * line; int i; /* ok. the client requested help for a specific command */ + std::rewind(hfd); while ((line = file_get_line(hfd)) != NULL) { for (i = 0; line[i] == ' ' && line[i] != '\0'; i++); /* skip spaces in front of %command */ @@ -183,7 +183,7 @@ namespace pvpgn for (i = 1; p[i] != ' ' && p[i] != '\0' && p[i] != '#'; i++); /* skip command */ if (p[i] == ' ') al = 1; /* we have something after the command.. must remember that */ p[i] = '\0'; /* end the string at the end of the command */ - if (strcasecmp(comm, p + 1) == 0) /* is this the command the user asked for help ? */ + if (strcasecmp(cmd, p + 1) == 0) /* is this the command the user asked for help ? */ { while ((line = file_get_line(hfd)) != NULL) { /* write everything until we get another % or EOF */ @@ -192,12 +192,20 @@ namespace pvpgn { break; /* we reached another command */ } - if (line[0] != '#') + if (line[0] != '#' && line[i] != '\0') { /* is this a whole line comment ? */ /* truncate the line when a comment starts */ for (; line[i] != '\0' && line[i] != '#'; i++); if (line[i] == '#') line[i] = '\0'; - message_send_text(c, message_type_info, c, line); + + // replace tabs with 3 spaces + line = (char*)str_replace(line, "\t", " "); + // if text starts with slash then make it colored + int j = 0; for (; line[j] == ' ' || line[j] == '\t'; j++); + if (line[j] == '/') + message_send_text(c, message_type_error, c, line); + else + message_send_text(c, message_type_info, c, line); } } return 0; @@ -216,6 +224,8 @@ namespace pvpgn } file_get_line(NULL); // clear file_get_line buffer + /* no description was found for this command. inform the user */ + message_send_text(c, message_type_error, c, "No help available for that command"); return -1; } diff --git a/src/bnetd/helpfile.h b/src/bnetd/helpfile.h index 55a716022..aeb1e0541 100644 --- a/src/bnetd/helpfile.h +++ b/src/bnetd/helpfile.h @@ -36,7 +36,7 @@ namespace pvpgn extern int helpfile_init(char const * filename); extern int helpfile_unload(void); extern int handle_help_command(t_connection *, char const *); - + extern int describe_command(t_connection * c, char const * cmd); } } diff --git a/src/common/tag.cpp b/src/common/tag.cpp index 5e092961f..e32bed797 100644 --- a/src/common/tag.cpp +++ b/src/common/tag.cpp @@ -635,4 +635,22 @@ namespace pvpgn } } + /* Convert clienttag to uppercase and check it in valid client list + * Return NULL of tag not found + */ + extern t_clienttag tag_validate_client(char const * client) + { + t_clienttag clienttag; + if (!client || strlen(client) != 4) + return NULL; + + // toupper + clienttag = tag_case_str_to_uint(client); + + if (!tag_check_client(clienttag)) + return NULL; + + return clienttag; + } + } diff --git a/src/common/tag.h b/src/common/tag.h index 3ef9644d4..dd300bd7b 100644 --- a/src/common/tag.h +++ b/src/common/tag.h @@ -212,6 +212,7 @@ namespace pvpgn extern t_clienttag tag_sku_to_uint(int sku); extern t_clienttag tag_channeltype_to_uint(int channeltype); extern t_tag tag_wol_locale_to_uint(int locale); + extern t_clienttag tag_validate_client(char const * client); } #endif diff --git a/src/common/xstring.cpp b/src/common/xstring.cpp index aac40fc60..23e936341 100644 --- a/src/common/xstring.cpp +++ b/src/common/xstring.cpp @@ -272,47 +272,47 @@ namespace pvpgn // You must free the result if result is non-NULL. extern const char *str_replace(char *orig, char *rep, char *with) { - char *result; // the return string - char *ins; // the next insert point - char *tmp; // varies - int len_rep; // length of rep - int len_with; // length of with - int len_front; // distance between rep and end of last rep - int count; // number of replacements + char *result; // the return string + char *ins; // the next insert point + char *tmp; // varies + int len_rep; // length of rep + int len_with; // length of with + int len_front; // distance between rep and end of last rep + int count; // number of replacements - if (!orig) - return NULL; - if (!rep) - rep = ""; - len_rep = strlen(rep); - if (!with) - with = ""; - len_with = strlen(with); + if (!orig) + return NULL; + if (!rep) + rep = ""; + len_rep = strlen(rep); + if (!with) + with = ""; + len_with = strlen(with); - ins = orig; - for (count = 0; tmp = strstr(ins, rep); ++count) { - ins = tmp + len_rep; - } + ins = orig; + for (count = 0; tmp = strstr(ins, rep); ++count) { + ins = tmp + len_rep; + } - // first time through the loop, all the variable are set correctly - // from here on, - // tmp points to the end of the result string - // ins points to the next occurrence of rep in orig - // orig points to the remainder of orig after "end of rep" - tmp = result = (char*)malloc(strlen(orig) + (len_with - len_rep) * count + 1); + // first time through the loop, all the variable are set correctly + // from here on, + // tmp points to the end of the result string + // ins points to the next occurrence of rep in orig + // orig points to the remainder of orig after "end of rep" + tmp = result = (char*)malloc(strlen(orig) + (len_with - len_rep) * count + 1); - if (!result) - return NULL; + if (!result) + return NULL; - while (count--) { - ins = strstr(orig, rep); - len_front = ins - orig; - tmp = strncpy(tmp, orig, len_front) + len_front; - tmp = strcpy(tmp, with) + len_with; - orig += len_front + len_rep; // move to next "end of rep" - } - strcpy(tmp, orig); - return result; + while (count--) { + ins = strstr(orig, rep); + len_front = ins - orig; + tmp = strncpy(tmp, orig, len_front) + len_front; + tmp = strcpy(tmp, with) + len_with; + orig += len_front + len_rep; // move to next "end of rep" } + strcpy(tmp, orig); + return result; + } } From 50e85312fa607f019f53b932af0dc0dec4657443 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 27 Apr 2014 11:11:04 +0400 Subject: [PATCH 013/144] Continue of previous commit. * add help description for /mail and /ipban https://github.com/HarpyWar/pvpgn/issues/5 * refactoring: move /icon command to icons.cpp, move split_command() to common --- src/bnetd/command.cpp | 142 ++--------------------------------------- src/bnetd/icons.cpp | 97 ++++++++++++++++++++++++++++ src/bnetd/icons.h | 2 + src/bnetd/ipban.cpp | 57 +++++------------ src/bnetd/ipban.h | 3 +- src/bnetd/mail.cpp | 100 ++++++++++------------------- src/bnetd/mail.h | 3 +- src/common/xstring.cpp | 50 +++++++++++++++ src/common/xstring.h | 6 +- 9 files changed, 211 insertions(+), 249 deletions(-) diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index a823e7db9..c9b5ebef5 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include "compat/strcasecmp.h" @@ -361,7 +360,6 @@ namespace pvpgn static int _handle_moderate_command(t_connection * c, char const * text); static int _handle_clearstats_command(t_connection * c, char const * text); static int _handle_tos_command(t_connection * c, char const * text); - static int _handle_icon_command(t_connection * c, char const * text); static const t_command_table_row standard_command_table[] = { @@ -482,59 +480,12 @@ namespace pvpgn { "/topic", _handle_topic_command }, { "/moderate", _handle_moderate_command }, { "/clearstats", _handle_clearstats_command }, - { "/icon", _handle_icon_command }, + { "/icon", handle_icon_command }, { NULL, NULL } }; - /* - * Split text by spaces and return array of arguments. - * First text argument is a command name (index = 0) - * Last text argument always reads to end - */ - std::vector split_command(char const * text, int args_count) - { - int count = 1 + args_count; - std::vector result(count); - - std::string s(text); - std::istringstream iss(s); - - int i = 0; - std::string tmp = std::string(); // to end - do - { - std::string sub; - iss >> sub; - - if (sub.empty()) - continue; - - // remove slash from the command - if (i == 0) - sub.erase(0,1); - - if (i < args_count) - { - result[i] = sub; - i++; - } - else - { - if (!tmp.empty()) - tmp += " "; - tmp += sub; - } - - } while (iss); - - // push remaining text at the end - if (tmp.length() > 0) - result[count-1] = tmp; - - return result; - } extern int handle_command(t_connection * c, char const * text) { @@ -2554,7 +2505,10 @@ namespace pvpgn t_account * account; if (!(account = accountlist_find_account(username))) - message_send_text(c, message_type_info, c, "That account doesn't currently exist, banning anyway."); + { + message_send_text(c, message_type_info, c, "That account doesn't currently exist."); + return -1; + } else if (account_get_auth_admin(account, NULL) == 1 || account_get_auth_admin(account, channel_get_name(channel)) == 1) { message_send_text(c, message_type_error, c, "You cannot ban administrators."); @@ -5002,91 +4956,5 @@ namespace pvpgn return 0; } - /* Set usericon */ - static int _handle_icon_command(t_connection * c, char const *text) - { - t_account * user_account; - t_connection * user_c; - char const * username, *code, *usericon; - t_clienttag clienttag; - - std::vector args = split_command(text, 3); - - if (args[1].empty()) - { - describe_command(c, args[0].c_str()); - return -1; - } - username = args[1].c_str(); // username - - // find user account - if (!(user_account = accountlist_find_account(username))) - { - message_send_text(c, message_type_error, c, "Invalid user."); - return 0; - } - user_c = account_get_conn(user_account); - - // if clienttag is in parameters - if (clienttag = tag_validate_client(args[3].c_str())) - { - // if user offline then replace last clienttag with given - if (!user_c) - account_set_ll_clienttag(user_account, clienttag); - } - else - { - if (user_c) - clienttag = conn_get_clienttag(user_c); - else // if user offline then retrieve last clienttag - clienttag = account_get_ll_clienttag(user_account); - } - - // icon code - std::transform(args[2].begin(), args[2].end(), args[2].begin(), std::toupper); // to upper - code = args[2].c_str(); - - // output current usericon code - if (strlen(code) != 4) - { - if (usericon = account_get_user_icon(user_account, clienttag)) - { - snprintf(msgtemp, sizeof(msgtemp), "%.64s has custom icon \"%.4s\" of %.128s", account_get_name(user_account), strreverse(xstrdup(usericon)), clienttag_get_title(clienttag)); - message_send_text(c, message_type_error, c, msgtemp); - } - else - { - snprintf(msgtemp, sizeof(msgtemp), "Custom icon for %.64s currently not set of %.128s", account_get_name(user_account), clienttag_get_title(clienttag)); - message_send_text(c, message_type_error, c, msgtemp); - } - return 0; - } - - // unset value - if (strcasecmp(code, "null") == 0) - { - snprintf(msgtemp, sizeof(msgtemp), "Set default icon to %.64s of %.128s", account_get_name(user_account), clienttag_get_title(clienttag)); - usericon = NULL; - } - else - { - snprintf(msgtemp, sizeof(msgtemp), "Set icon \"%.4s\" to %.64s of %.128s", code, account_get_name(user_account), clienttag_get_title(clienttag)); - usericon = strreverse((char*)code); - } - - message_send_text(c, message_type_error, c, msgtemp); - - - // set reversed - account_set_user_icon(user_account, clienttag, usericon); - - // if user online then force him to rejoin channel - if (user_c) - { - conn_update_w3_playerinfo(user_c); - channel_rejoin(user_c); - } - } - } } diff --git a/src/bnetd/icons.cpp b/src/bnetd/icons.cpp index 3d79d18d9..7f6d25efa 100644 --- a/src/bnetd/icons.cpp +++ b/src/bnetd/icons.cpp @@ -15,11 +15,14 @@ */ #include "common/setup_before.h" +#include +#include #include #include #include #include #include +#include #include "compat/strcasecmp.h" #include "compat/snprintf.h" @@ -38,6 +41,9 @@ #include "icons.h" #include "account_wrap.h" #include "common/setup_after.h" +#include "message.h" +#include "helpfile.h" +#include "channel.h" namespace pvpgn { @@ -56,6 +62,97 @@ namespace pvpgn static char * _find_attr_key(char * clienttag); + + /* Set usericon (command) */ + extern int handle_icon_command(t_connection * c, char const *text) + { + t_account * user_account; + t_connection * user_c; + char const * username, *code, *usericon; + t_clienttag clienttag; + char msgtemp[MAX_MESSAGE_LEN]; + + std::vector args = split_command(text, 3); + + if (args[1].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } + username = args[1].c_str(); // username + + // find user account + if (!(user_account = accountlist_find_account(username))) + { + message_send_text(c, message_type_error, c, "Invalid user."); + return 0; + } + user_c = account_get_conn(user_account); + + // if clienttag is in parameters + if (clienttag = tag_validate_client(args[3].c_str())) + { + // if user offline then replace last clienttag with given + if (!user_c) + account_set_ll_clienttag(user_account, clienttag); + } + else + { + if (user_c) + clienttag = conn_get_clienttag(user_c); + else // if user offline then retrieve last clienttag + clienttag = account_get_ll_clienttag(user_account); + } + + // icon code + std::transform(args[2].begin(), args[2].end(), args[2].begin(), std::toupper); // to upper + code = args[2].c_str(); + + // output current usericon code + if (strlen(code) != 4) + { + if (usericon = account_get_user_icon(user_account, clienttag)) + { + snprintf(msgtemp, sizeof(msgtemp), "%.64s has custom icon \"%.4s\" of %.128s", account_get_name(user_account), strreverse(xstrdup(usericon)), clienttag_get_title(clienttag)); + message_send_text(c, message_type_error, c, msgtemp); + } + else + { + snprintf(msgtemp, sizeof(msgtemp), "Custom icon for %.64s currently not set of %.128s", account_get_name(user_account), clienttag_get_title(clienttag)); + message_send_text(c, message_type_error, c, msgtemp); + } + return 0; + } + + // unset value + if (strcasecmp(code, "null") == 0) + { + snprintf(msgtemp, sizeof(msgtemp), "Set default icon to %.64s of %.128s", account_get_name(user_account), clienttag_get_title(clienttag)); + usericon = NULL; + } + else + { + snprintf(msgtemp, sizeof(msgtemp), "Set icon \"%.4s\" to %.64s of %.128s", code, account_get_name(user_account), clienttag_get_title(clienttag)); + usericon = strreverse((char*)code); + } + + message_send_text(c, message_type_error, c, msgtemp); + + + // set reversed + account_set_user_icon(user_account, clienttag, usericon); + + // if user online then force him to rejoin channel + if (user_c) + { + conn_update_w3_playerinfo(user_c); + channel_rejoin(user_c); + } + } + + + + extern int prefs_get_custom_icons() { return enable_custom_icons; diff --git a/src/bnetd/icons.h b/src/bnetd/icons.h index 2812b03b3..b40e31a48 100644 --- a/src/bnetd/icons.h +++ b/src/bnetd/icons.h @@ -63,6 +63,8 @@ namespace pvpgn namespace bnetd { + extern int handle_icon_command(t_connection * c, char const *text); + extern int prefs_get_custom_icons(); extern t_icon_info * get_custom_icon(t_account * account, t_clienttag clienttag); extern const char * get_custom_stats_text(t_account * account, t_clienttag clienttag); diff --git a/src/bnetd/ipban.cpp b/src/bnetd/ipban.cpp index 6c7d2527e..80ef4b8f8 100644 --- a/src/bnetd/ipban.cpp +++ b/src/bnetd/ipban.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include "compat/strsep.h" #include "compat/strcasecmp.h" @@ -34,12 +35,14 @@ #include "common/eventlog.h" #include "common/xalloc.h" #include "common/field_sizes.h" +#include "common/xstring.h" #include "message.h" #include "server.h" #include "prefs.h" #include "connection.h" #include "common/setup_after.h" +#include "helpfile.h" namespace pvpgn { @@ -498,27 +501,22 @@ namespace pvpgn extern int handle_ipban_command(t_connection * c, char const * text) { - char subcommand[MAX_FUNC_LEN]; - char ipstr[MAX_IP_STR]; - unsigned int i, j; + char const *subcommand, *ipstr, *time; - for (i = 0; text[i] != ' ' && text[i] != '\0'; i++); /* skip command */ - for (; text[i] == ' '; i++); - - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get subcommand */ - if (j < sizeof(subcommand)-1) subcommand[j++] = text[i]; - subcommand[j] = '\0'; - for (; text[i] == ' '; i++); - - for (j = 0; text[i] != ' ' && text[i] != '\0'; i++) /* get ip address */ - if (j < sizeof(ipstr)-1) ipstr[j++] = text[i]; - ipstr[j] = '\0'; - for (; text[i] == ' '; i++); + std::vector args = split_command(text, 3); + if (args[1].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } + subcommand = args[1].c_str(); // subcommand + ipstr = args[2].c_str(); // ip address + time = args[3].c_str(); // username switch (identify_ipban_function(subcommand)) { case IPBAN_FUNC_ADD: - ipbanlist_add(c, ipstr, ipbanlist_str_to_time_t(c, &text[i])); + ipbanlist_add(c, ipstr, ipbanlist_str_to_time_t(c, time)); ipbanlist_save(prefs_get_ipbanfile()); break; case IPBAN_FUNC_DEL: @@ -530,14 +528,9 @@ namespace pvpgn break; case IPBAN_FUNC_CHECK: ipban_func_check(c, ipstr); - break; - case IPBAN_FUNC_HELP: - message_send_text(c, message_type_info, c, "The ipban command supports the following patterns."); - ipban_usage(c); - break; + break; default: - message_send_text(c, message_type_info, c, "The command is incorect. Use one of the following patterns."); - ipban_usage(c); + describe_command(c, args[0].c_str()); } return 0; @@ -554,8 +547,6 @@ namespace pvpgn return IPBAN_FUNC_LIST; if (strcasecmp(funcstr, "check") == 0 || strcasecmp(funcstr, "c") == 0) return IPBAN_FUNC_CHECK; - if (strcasecmp(funcstr, "help") == 0 || strcasecmp(funcstr, "h") == 0) - return IPBAN_FUNC_HELP; return IPBAN_FUNC_UNKNOWN; } @@ -1036,22 +1027,6 @@ namespace pvpgn } - static void ipban_usage(t_connection * c) - { - message_send_text(c, message_type_info, c, "to print this information:"); - message_send_text(c, message_type_info, c, " /ipban h[elp]"); - message_send_text(c, message_type_info, c, "to print all baned IPs"); - message_send_text(c, message_type_info, c, " /ipban [l[ist]]"); - message_send_text(c, message_type_info, c, "to erase ban:"); - message_send_text(c, message_type_info, c, " /ipban d[el] "); - message_send_text(c, message_type_info, c, " (IP have to be entry accepted in bnban)"); - message_send_text(c, message_type_info, c, "to add ban:"); - message_send_text(c, message_type_info, c, " /ipban a[dd] IP"); - message_send_text(c, message_type_info, c, " (IP have to be entry accepted in bnban)"); - message_send_text(c, message_type_info, c, "to check is specified IP banned:"); - message_send_text(c, message_type_info, c, " /ipban c[heck] IP"); - } - } } diff --git a/src/bnetd/ipban.h b/src/bnetd/ipban.h index f5c11e449..9656285bc 100644 --- a/src/bnetd/ipban.h +++ b/src/bnetd/ipban.h @@ -31,8 +31,7 @@ #define IPBAN_FUNC_DEL 2 #define IPBAN_FUNC_LIST 3 #define IPBAN_FUNC_CHECK 4 -#define IPBAN_FUNC_HELP 5 -#define IPBAN_FUNC_UNKNOWN 6 +#define IPBAN_FUNC_UNKNOWN 5 namespace pvpgn diff --git a/src/bnetd/mail.cpp b/src/bnetd/mail.cpp index 1059793e4..9e2f700e6 100644 --- a/src/bnetd/mail.cpp +++ b/src/bnetd/mail.cpp @@ -27,17 +27,20 @@ #include #include #include +#include #include "compat/strcasecmp.h" #include "compat/mkdir.h" #include "compat/statmacros.h" #include "common/eventlog.h" #include "common/xalloc.h" +#include "common/xstring.h" #include "account.h" #include "message.h" #include "prefs.h" #include "connection.h" #include "common/setup_after.h" +#include "helpfile.h" namespace pvpgn @@ -48,9 +51,9 @@ namespace pvpgn static int identify_mail_function(const std::string&); static void mail_usage(t_connection*); - static void mail_func_send(t_connection*, std::istream&); - static void mail_func_read(t_connection*, std::istream&); - static void mail_func_delete(t_connection*, std::istream&); + static void mail_func_send(t_connection*, char const *, char const *); + static void mail_func_read(t_connection*, std::string); + static void mail_func_delete(t_connection*, std::string); static unsigned get_mail_quota(t_account *); /* Mail API */ @@ -254,30 +257,38 @@ namespace pvpgn std::istringstream istr(text); std::string token; - /* stkip "/mail" */ - istr >> token; + char const *subcommand; - /* get the mail function */ - token.clear(); - istr >> token; + std::vector args = split_command(text, 3); + if (args[1].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } + subcommand = args[1].c_str(); // subcommand - switch (identify_mail_function(token.c_str())) { + switch (identify_mail_function(subcommand)) { case MAIL_FUNC_SEND: - mail_func_send(c, istr); + if (args[3].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } + mail_func_send(c, args[2].c_str(), args[3].c_str()); break; case MAIL_FUNC_READ: - mail_func_read(c, istr); + mail_func_read(c, args[2]); break; case MAIL_FUNC_DELETE: - mail_func_delete(c, istr); - break; - case MAIL_FUNC_HELP: - message_send_text(c, message_type_info, c, "The mail command supports the following patterns."); - mail_usage(c); + if (args[2].empty()) + { + describe_command(c, args[0].c_str()); + return -1; + } + mail_func_delete(c, args[2]); break; default: - message_send_text(c, message_type_error, c, "The command its incorrect. Use one of the following patterns."); - mail_usage(c); + describe_command(c, args[0].c_str()); } return 0; @@ -291,8 +302,6 @@ namespace pvpgn return MAIL_FUNC_SEND; if (!strcasecmp(funcstr.c_str(), "delete") || !strcasecmp(funcstr.c_str(), "del")) return MAIL_FUNC_DELETE; - if (!strcasecmp(funcstr.c_str(), "help") || !strcasecmp(funcstr.c_str(), "h")) - return MAIL_FUNC_HELP; return MAIL_FUNC_UNKNOWN; } @@ -312,31 +321,14 @@ namespace pvpgn return quota; } - static void mail_func_send(t_connection * c, std::istream& istr) + static void mail_func_send(t_connection * c, char const * receiver, char const * message) { if (!c) { ERROR0("got NULL connection"); return; } - std::string dest; - istr >> dest; - if (dest.empty()) { - message_send_text(c, message_type_error, c, "You must specify the receiver"); - message_send_text(c, message_type_error, c, "Syntax: /mail send "); - return; - } - - std::string message; - std::getline(istr, message); - std::string::size_type pos(message.find_first_not_of(" \t")); - if (pos == std::string::npos) { - message_send_text(c, message_type_error, c, "Your message is empty!"); - message_send_text(c, message_type_error, c, "Syntax: /mail send "); - return; - } - - t_account * recv = accountlist_find_account(dest.c_str()); + t_account * recv = accountlist_find_account(receiver); if (!recv) { message_send_text(c, message_type_error, c, "Receiver UNKNOWN!"); return; @@ -349,7 +341,7 @@ namespace pvpgn } try { - mbox.deliver(conn_get_username(c), message.substr(pos)); + mbox.deliver(conn_get_username(c), message); message_send_text(c, message_type_info, c, "Your mail has been sent successfully."); } catch (const Mailbox::DeliverError&) { @@ -363,16 +355,13 @@ namespace pvpgn return false; } - static void mail_func_read(t_connection * c, std::istream& istr) + static void mail_func_read(t_connection * c, std::string token) { if (!c) { ERROR0("got NULL connection"); return; } - std::string token; - istr >> token; - t_account * user = conn_get_account(c); Mailbox mbox(account_get_uid(user)); @@ -427,16 +416,13 @@ namespace pvpgn } } - static void mail_func_delete(t_connection * c, std::istream& istr) + static void mail_func_delete(t_connection * c, std::string token) { if (!c) { ERROR0("got NULL connection"); return; } - std::string token; - istr >> token; - if (token.empty()) { message_send_text(c, message_type_error, c, "Please specify which message to delete. Use the following syntax: /mail delete {|all} ."); return; @@ -460,24 +446,6 @@ namespace pvpgn } } - static void mail_usage(t_connection * c) - { - message_send_text(c, message_type_info, c, "to print this information:"); - message_send_text(c, message_type_info, c, " /mail help"); - message_send_text(c, message_type_info, c, "to print an index of you messages:"); - message_send_text(c, message_type_info, c, " /mail [read]"); - message_send_text(c, message_type_info, c, "to send a message:"); - message_send_text(c, message_type_info, c, " /mail send "); - message_send_text(c, message_type_info, c, "to read a message:"); - message_send_text(c, message_type_info, c, " /mail read "); - message_send_text(c, message_type_info, c, "to delete a message:"); - message_send_text(c, message_type_info, c, " /mail delete {|all}"); - message_send_text(c, message_type_info, c, "Commands may be abbreviated as follows:"); - message_send_text(c, message_type_info, c, " help: h"); - message_send_text(c, message_type_info, c, " read: r"); - message_send_text(c, message_type_info, c, " send: s"); - message_send_text(c, message_type_info, c, " delete: del"); - } extern unsigned check_mail(t_connection const * c) { diff --git a/src/bnetd/mail.h b/src/bnetd/mail.h index 303b227b0..4024a573b 100644 --- a/src/bnetd/mail.h +++ b/src/bnetd/mail.h @@ -28,8 +28,7 @@ #define MAIL_FUNC_SEND 1 #define MAIL_FUNC_READ 2 #define MAIL_FUNC_DELETE 3 -#define MAIL_FUNC_HELP 4 -#define MAIL_FUNC_UNKNOWN 5 +#define MAIL_FUNC_UNKNOWN 4 #include diff --git a/src/common/xstring.cpp b/src/common/xstring.cpp index 23e936341..973949469 100644 --- a/src/common/xstring.cpp +++ b/src/common/xstring.cpp @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include "compat/strdup.h" #include "common/xalloc.h" @@ -315,4 +317,52 @@ namespace pvpgn return result; } + + /* + * Split text by spaces and return array of arguments. + * First text argument is a command name (index = 0) + * Last text argument always reads to end + */ + extern std::vector split_command(char const * text, int args_count) + { + int count = 1 + args_count; + std::vector result(count); + + std::string s(text); + std::istringstream iss(s); + + int i = 0; + std::string tmp = std::string(); // to end + do + { + std::string sub; + iss >> sub; + + if (sub.empty()) + continue; + + // remove slash from the command + if (i == 0) + sub.erase(0, 1); + + if (i < args_count) + { + result[i] = sub; + i++; + } + else + { + if (!tmp.empty()) + tmp += " "; + tmp += sub; + } + + } while (iss); + + // push remaining text at the end + if (tmp.length() > 0) + result[count - 1] = tmp; + + return result; + } } diff --git a/src/common/xstring.h b/src/common/xstring.h index d3d2be448..9173d1c55 100644 --- a/src/common/xstring.h +++ b/src/common/xstring.h @@ -18,6 +18,10 @@ #ifndef INCLUDED_XSTRING_H #define INCLUDED_XSTRING_H + +#include +#include + namespace pvpgn { @@ -29,7 +33,7 @@ namespace pvpgn extern char * arraytostr(char * * array, char const * delim, int count); extern char * str_strip_affix(char * str, char const * affix); extern const char *str_replace(char *orig, char *rep, char *with); - + extern std::vector split_command(char const * text, int args_count); } From 8638b1733a93ee9b24c4fdc1bc76278ae28b57a3 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 27 Apr 2014 11:14:45 +0400 Subject: [PATCH 014/144] Improvements for commands: /lock [hours] [reason] /mute [hours] [reason] https://github.com/HarpyWar/pvpgn/issues/3 --- src/bnetd/account_wrap.cpp | 82 +++++++++++++++++++++++++++++---- src/bnetd/account_wrap.h | 14 +++++- src/bnetd/channel.cpp | 31 ++++++++++++- src/bnetd/command.cpp | 92 +++++++++++++++++++++++++++++++++----- src/bnetd/handle_bnet.cpp | 38 ++++++++++++++-- 5 files changed, 232 insertions(+), 25 deletions(-) diff --git a/src/bnetd/account_wrap.cpp b/src/bnetd/account_wrap.cpp index 74c7098ba..160cae402 100644 --- a/src/bnetd/account_wrap.cpp +++ b/src/bnetd/account_wrap.cpp @@ -361,28 +361,94 @@ namespace pvpgn extern int account_get_auth_lock(t_account * account) { - return account_get_boolattr(account, "BNET\\auth\\lockk"); + // check for unlock + if (unsigned int locktime = account_get_auth_locktime(account)) + { + if ((locktime - std::time(NULL)) < 0) + { + account_set_auth_lock(account, 0); + account_set_auth_locktime(account, 0); + account_set_auth_lockreason(account, ""); + account_set_auth_lockby(account, ""); + } + } + return account_get_boolattr(account, "BNET\\auth\\lock"); + } + extern unsigned int account_get_auth_locktime(t_account * account) + { + return account_get_numattr(account, "BNET\\auth\\locktime"); + } + extern char const * account_get_auth_lockreason(t_account * account) + { + return account_get_strattr(account, "BNET\\auth\\lockreason"); + } + extern char const * account_get_auth_lockby(t_account * account) + { + return account_get_strattr(account, "BNET\\auth\\lockby"); } - extern int account_set_auth_lock(t_account * account, int val) { - return account_set_boolattr(account, "BNET\\auth\\lockk", val); + return account_set_boolattr(account, "BNET\\auth\\lock", val); } - - - extern int account_set_auth_mute(t_account * account, int val) + extern int account_set_auth_locktime(t_account * account, unsigned int val) { - return account_set_boolattr(account, "BNET\\auth\\mute", val); + return account_set_numattr(account, "BNET\\auth\\locktime", val); + } + extern int account_set_auth_lockreason(t_account * account, char const * val) + { + return account_set_strattr(account, "BNET\\auth\\lockreason", val); + } + extern int account_set_auth_lockby(t_account * account, char const * val) + { + return account_set_strattr(account, "BNET\\auth\\lockby", val); } extern int account_get_auth_mute(t_account * account) { + // check for unmute + if (unsigned int locktime = account_get_auth_mutetime(account)) + { + if ((locktime - std::time(NULL)) < 0) + { + account_set_auth_mute(account, 0); + account_set_auth_mutetime(account, 0); + account_set_auth_mutereason(account, ""); + account_set_auth_muteby(account, ""); + } + } return account_get_boolattr(account, "BNET\\auth\\mute"); } + extern unsigned int account_get_auth_mutetime(t_account * account) + { + return account_get_numattr(account, "BNET\\auth\\mutetime"); + } + extern char const * account_get_auth_mutereason(t_account * account) + { + return account_get_strattr(account, "BNET\\auth\\mutereason"); + } + extern char const * account_get_auth_muteby(t_account * account) + { + return account_get_strattr(account, "BNET\\auth\\muteby"); + } - + extern int account_set_auth_mute(t_account * account, int val) + { + return account_set_boolattr(account, "BNET\\auth\\mute", val); + } + extern int account_set_auth_mutetime(t_account * account, unsigned int val) + { + return account_set_numattr(account, "BNET\\auth\\mutetime", val); + } + extern int account_set_auth_mutereason(t_account * account, char const * val) + { + return account_set_strattr(account, "BNET\\auth\\mutereason", val); + } + extern int account_set_auth_muteby(t_account * account, char const * val) + { + return account_set_strattr(account, "BNET\\auth\\muteby", val); + } /****************************************************************/ diff --git a/src/bnetd/account_wrap.h b/src/bnetd/account_wrap.h index 32c8a47a3..0445efe4c 100644 --- a/src/bnetd/account_wrap.h +++ b/src/bnetd/account_wrap.h @@ -78,9 +78,21 @@ namespace pvpgn extern int account_get_auth_createladdergame(t_account * account); extern int account_get_auth_joinladdergame(t_account * account); extern int account_get_auth_lock(t_account * account); + extern unsigned int account_get_auth_locktime(t_account * account); + extern char const * account_get_auth_lockreason(t_account * account); + extern char const * account_get_auth_lockby(t_account * account); extern int account_set_auth_lock(t_account * account, int val); - extern int account_set_auth_mute(t_account * account, int val); + extern int account_set_auth_locktime(t_account * account, unsigned int val); + extern int account_set_auth_lockreason(t_account * account, char const * val); + extern int account_set_auth_lockby(t_account * account, char const * val); extern int account_get_auth_mute(t_account * account); + extern unsigned int account_get_auth_mutetime(t_account * account); + extern char const * account_get_auth_mutereason(t_account * account); + extern char const * account_get_auth_muteby(t_account * account); + extern int account_set_auth_mute(t_account * account, int val); + extern int account_set_auth_mutetime(t_account * account, unsigned int val); + extern int account_set_auth_mutereason(t_account * account, char const * val); + extern int account_set_auth_muteby(t_account * account, char const * val); /* profile */ extern char const * account_get_sex(t_account * account); /* the profile attributes are updated directly in bnetd.c */ diff --git a/src/bnetd/channel.cpp b/src/bnetd/channel.cpp index d4338a6c8..79c8c647d 100644 --- a/src/bnetd/channel.cpp +++ b/src/bnetd/channel.cpp @@ -27,6 +27,7 @@ #include "compat/strdup.h" #include "compat/strcasecmp.h" +#include "compat/snprintf.h" #include "common/eventlog.h" #include "common/list.h" #include "common/util.h" @@ -669,9 +670,37 @@ namespace pvpgn if (type != message_type_join && type != message_type_part) return; + // if user muted if (account_get_auth_mute(acc) == 1) { - message_send_text(me, message_type_error, me, "Your account has been muted, you can't talk on the channel."); + char msgtemp[MAX_MESSAGE_LEN], msgtemp2[MAX_MESSAGE_LEN]; + + snprintf(msgtemp, sizeof(msgtemp), "You can't talk on the channel. Your account has been muted"); + + // append author of ban + char const * author = account_get_auth_muteby(acc); + if (author && author[0] != '\0') + { + snprintf(msgtemp2, sizeof(msgtemp2), " by %s", author); + std::strcat(msgtemp, msgtemp2); + } + + // append remaining time + if (unsigned int locktime = account_get_auth_mutetime(acc)) + snprintf(msgtemp2, sizeof(msgtemp2), " for %.48s", seconds_to_timestr(locktime - std::time(NULL))); + else + snprintf(msgtemp2, sizeof(msgtemp2), " permanently"); + std::strcat(msgtemp, msgtemp2); + + // append reason + char const * reason = account_get_auth_mutereason(acc); + if (reason && reason[0] != '\0') + { + snprintf(msgtemp2, sizeof(msgtemp2), " with a reason \"%s\"", reason); + std::strcat(msgtemp, msgtemp2); + } + + message_send_text(me, message_type_error, me, msgtemp); return; } diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index c9b5ebef5..4a9b105f0 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -4204,25 +4204,59 @@ namespace pvpgn { t_connection * user; t_account * account; + char const * username, *reason = "", *hours = "24"; // default time 24 hours + unsigned int sectime; + char msgtemp3[MAX_MESSAGE_LEN]; - std::vector args = split_command(text, 1); + std::vector args = split_command(text, 3); if (args[1].empty()) { describe_command(c, args[0].c_str()); return -1; } - text = args[1].c_str(); // username + username = args[1].c_str(); // username + if (!args[2].empty()) + hours = args[2].c_str(); // hours + if (!args[3].empty()) + reason = args[3].c_str(); // reason - if (!(account = accountlist_find_account(text))) + if (!(account = accountlist_find_account(username))) { message_send_text(c, message_type_error, c, "Invalid user."); return 0; } - if ((user = connlist_find_connection_by_accountname(text))) - message_send_text(user, message_type_info, user, "Your account has just been locked by an admin."); account_set_auth_lock(account, 1); - message_send_text(c, message_type_error, c, "That user's account is now locked."); + sectime = (atoi(hours) == 0) ? 0 : (atoi(hours) * 60 * 60) + now; // get unlock time in the future + account_set_auth_locktime(account, sectime); + account_set_auth_lockreason(account, reason); + account_set_auth_lockby(account, conn_get_username(c)); + + + // append remaining time + if (sectime == 0) + snprintf(msgtemp3, sizeof(msgtemp3), " permanently"); + else + snprintf(msgtemp3, sizeof(msgtemp3), " for %.48s", seconds_to_timestr(sectime - now)); + + // append reason + if (reason[0] != '\0') + { + snprintf(msgtemp2, sizeof(msgtemp2), " with a reason \"%s\"", reason); + std::strcat(msgtemp3, msgtemp2); + } + + // send message to author + snprintf(msgtemp, sizeof(msgtemp), "Account %s is now locked%s", account_get_name(account), msgtemp3); + message_send_text(c, message_type_error, c, msgtemp); + + // send message to locked user + if ((user = connlist_find_connection_by_accountname(username))) + { + snprintf(msgtemp, sizeof(msgtemp), "Your account has just been locked by %s%s", conn_get_username(c), msgtemp3); + message_send_text(user, message_type_info, user, msgtemp); + } + return 0; } @@ -4258,25 +4292,59 @@ namespace pvpgn { t_connection * user; t_account * account; + char const * username, *reason = "", *hours = "1"; // default time 1 hour + unsigned int sectime; + char msgtemp3[MAX_MESSAGE_LEN]; - std::vector args = split_command(text, 1); + std::vector args = split_command(text, 3); if (args[1].empty()) { describe_command(c, args[0].c_str()); return -1; } - text = args[1].c_str(); // username + username = args[1].c_str(); // username + if (!args[2].empty()) + hours = args[2].c_str(); // hours + if (!args[3].empty()) + reason = args[3].c_str(); // reason - if (!(account = accountlist_find_account(text))) + if (!(account = accountlist_find_account(username))) { message_send_text(c, message_type_error, c, "Invalid user."); return 0; } - if ((user = connlist_find_connection_by_accountname(text))) - message_send_text(user, message_type_info, user, "Your account has just been muted by an admin."); account_set_auth_mute(account, 1); - message_send_text(c, message_type_error, c, "That user's account is now muted."); + // get unlock time in the future + sectime = (atoi(hours) == 0) ? 0 : (atoi(hours) * 60 * 60) + now; + account_set_auth_mutetime(account, sectime); + account_set_auth_mutereason(account, reason); + account_set_auth_muteby(account, conn_get_username(c)); + + // append remaining time + if (sectime == 0) + snprintf(msgtemp3, sizeof(msgtemp3), " permanently"); + else + snprintf(msgtemp3, sizeof(msgtemp3), " for %.48s", seconds_to_timestr(sectime - now)); + + // append reason + if (reason[0] != '\0') + { + snprintf(msgtemp2, sizeof(msgtemp2), " with a reason \"%s\"", reason); + std::strcat(msgtemp3, msgtemp2); + } + + // send message to author + snprintf(msgtemp, sizeof(msgtemp), "Account %s is now muted%s", account_get_name(account), msgtemp3); + message_send_text(c, message_type_error, c, msgtemp); + + // send message to muted user + if ((user = connlist_find_connection_by_accountname(username))) + { + snprintf(msgtemp, sizeof(msgtemp), "Your account has just been muted by %s%s", conn_get_username(c), msgtemp3); + message_send_text(user, message_type_info, user, msgtemp); + } + return 0; } diff --git a/src/bnetd/handle_bnet.cpp b/src/bnetd/handle_bnet.cpp index 4f2de7e23..66ac9e6c7 100644 --- a/src/bnetd/handle_bnet.cpp +++ b/src/bnetd/handle_bnet.cpp @@ -1621,7 +1621,11 @@ namespace pvpgn char supports_locked_reply = 0; t_clienttag clienttag = conn_get_clienttag(c); - if (clienttag == CLIENTTAG_DIABLO2XP_UINT || clienttag == CLIENTTAG_DIABLO2DV_UINT){ + if (clienttag == CLIENTTAG_STARCRAFT_UINT || clienttag == CLIENTTAG_BROODWARS_UINT || clienttag == CLIENTTAG_SHAREWARE_UINT || + clienttag == CLIENTTAG_DIABLORTL_UINT || clienttag == CLIENTTAG_DIABLOSHR_UINT || clienttag == CLIENTTAG_WARCIIBNE_UINT || + clienttag == CLIENTTAG_DIABLO2DV_UINT || clienttag == CLIENTTAG_STARJAPAN_UINT || clienttag == CLIENTTAG_DIABLO2ST_UINT || + clienttag == CLIENTTAG_DIABLO2XP_UINT || clienttag == CLIENTTAG_WARCRAFT3_UINT || clienttag == CLIENTTAG_WAR3XP_UINT ) + { if (conn_get_versionid(c) >= 0x0000000b) supports_locked_reply = 1; } @@ -1679,9 +1683,37 @@ namespace pvpgn } else if (account_get_auth_lock(account) == 1) { /* default to false */ eventlog(eventlog_level_info, __FUNCTION__, "[%d] login for \"%s\" refused (this account is locked)", conn_get_socket(c), username); - if (supports_locked_reply) { + if (supports_locked_reply) + { + char msgtemp[MAX_MESSAGE_LEN], msgtemp2[MAX_MESSAGE_LEN]; + snprintf(msgtemp, sizeof(msgtemp), "This account has been locked"); + + // append author of ban + if (char const * author = account_get_auth_lockby(account)) + if (author && author[0] != '\0') + { + snprintf(msgtemp2, sizeof(msgtemp2), " by %s", author); + std::strcat(msgtemp, msgtemp2); + } + + // append remaining time + if (unsigned int locktime = account_get_auth_locktime(account)) + snprintf(msgtemp2, sizeof(msgtemp2), " for %.48s", seconds_to_timestr(locktime - now)); + else + snprintf(msgtemp2, sizeof(msgtemp2), " permanently"); + std::strcat(msgtemp, msgtemp2); + + // append reason + char const * reason = account_get_auth_lockreason(account); + if (reason && reason[0] != '\0') + { + snprintf(msgtemp2, sizeof(msgtemp2), " with a reason \"%s\"", reason); + std::strcat(msgtemp, msgtemp2); + } + + bn_int_set(&rpacket->u.server_loginreply1.message, SERVER_LOGINREPLY2_MESSAGE_LOCKED); - packet_append_string(rpacket, "This account has been locked."); + packet_append_string(rpacket, msgtemp); } else { bn_int_set(&rpacket->u.server_loginreply1.message, SERVER_LOGINREPLY2_MESSAGE_BADPASS); From 36deb1179bca931bd6585c2b6dbf7d8ade08bc8e Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 29 Apr 2014 12:48:27 +0400 Subject: [PATCH 015/144] /icon enhancements: * removed clienttag from the command syntax * simple syntax for normal user: /icon [code] * complex syntax for operator/admin: /icon set|add|del|list [username] [code] * add aliases for icon codes in icons.conf (users can use alias name instead of code) * refactoring customicons function names https://github.com/HarpyWar/pvpgn/issues/10 --- conf/bnhelp.conf.in | 49 +-- conf/command_groups.conf.in | 2 +- conf/icons.conf.in | 21 +- src/bnetd/account_wrap.cpp | 29 ++ src/bnetd/account_wrap.h | 2 + src/bnetd/command.cpp | 2 +- src/bnetd/connection.cpp | 4 +- src/bnetd/handle_anongame.cpp | 2 +- src/bnetd/icons.cpp | 567 +++++++++++++++++++++++++++++----- src/bnetd/icons.h | 7 +- 10 files changed, 581 insertions(+), 104 deletions(-) diff --git a/conf/bnhelp.conf.in b/conf/bnhelp.conf.in index 1d4c86c8c..65bce826c 100644 --- a/conf/bnhelp.conf.in +++ b/conf/bnhelp.conf.in @@ -8,7 +8,7 @@ # You can enter comments by starting a line with #. Comments extend to the # # end of the line. # # Tabs replaces with 3 spaces. # -# Empty lines are ignored. # +# Empty lines are ignored. # # # ############################################################################## @@ -223,7 +223,7 @@ %kill -------------------------------------------------------- -/kill {|#} [] +/kill {|#} [min] Disconnects from the server and bans the player's IP address for [min] minutes. Example: /kill nomad 5 @@ -325,10 +325,11 @@ %lock lockacct -------------------------------------------------------- -/lock (alias: /lockacct) +/lock [hours] [reason] (alias: /lockacct) Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. - Example: /lock nomad + Example: /lock nomad 0 bye noob! %unlock unlockacct -------------------------------------------------------- @@ -339,10 +340,11 @@ %mute muteacct -------------------------------------------------------- -/mute (alias: /muteacct) +/mute [hours] [reason] (alias: /muteacct) Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. - Example: /mute nomad + Example: /mute nomad 6 stop spam! %unmute unmuteacct -------------------------------------------------------- @@ -374,11 +376,11 @@ -------------------------------------------------------- /mail [options] -------------------------------------------------------- - /mail send + /mail [s]end Sends mail to with . - /mail read [index] + /mail [r]ead [index] Reads mail [index] - /mail delete {all|} + /mail [del]ete {all|} Deletes mail or [all] mail. %flag @@ -410,8 +412,6 @@ Deletes IP address or /ipban a[dd] [time] Bans IP address for [time] minutes. [time] = 0 - permanent ban - /ipban h[elp] - Displays help for this command. %set -------------------------------------------------------- @@ -576,15 +576,18 @@ Commands for clan chieftain: %icon -------------------------------------------------------- -/icon [code] [gametag] - Set custom usericon. If [gametag] is empty then last user clienttag is used. - Set [code] = null to enable default icon. - - Example: /icon nomad W3D6 - Example: /icon nomad EYES SEXP - - - - - - +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon [a]dd + Add icon into user stash + /icon [d]el + Remove icon from user stash + /icon [s]et + Set custom icon to user without adding it in user stash + /icon [l]ist + Display icons in user's stash + /icon [l]ist + Display availaible icons in server stash that can be assigned to users diff --git a/conf/command_groups.conf.in b/conf/command_groups.conf.in index 8c962172d..902b4ff97 100644 --- a/conf/command_groups.conf.in +++ b/conf/command_groups.conf.in @@ -72,6 +72,7 @@ 1 /bitsinfo 1 /latency /ping /p 1 /topic +1 /icon # ///////////////////////////// # ///// Operator commands ///// @@ -168,7 +169,6 @@ 7 /set 7 /commandgroups /cg 7 /clearstats -7 /icon 8 /shutdown /rehash /find /save diff --git a/conf/icons.conf.in b/conf/icons.conf.in index 2c5ff9891..ef5e825b8 100644 --- a/conf/icons.conf.in +++ b/conf/icons.conf.in @@ -15,6 +15,11 @@ # band variables with figure brackets {{var}} # # use {{variable->rank}} to display an icon rank for a custom variable # # # +# [iconstash] list of available icons that admins can set to user with /icon # +# icon_alias | icon_code # +# /icon can be set by alias or code, and it's not necessary to add alias # +# in the table. icon_alias or icon_code can not equal "default" # +# # ############################################################################## @@ -23,13 +28,12 @@ #----------------------------------------------------------------------------# # Enable icon sets below -custom_icons = false +custom_icons = true ############################################################################## # Warcraft 3 icon set # -# Use MPQ editor to edit icons-WAR3.bni (just change extension bni->mpq) # #----------------------------------------------------------------------------# [W3XP] @@ -64,12 +68,16 @@ Team games: [{{team_level->rank}}] {{team_xp}} xp ({{team_wins}} - {{team_losses FFA games: [{{ffa_level->rank}}] {{ffa_xp}} xp ({{ffa_wins}} - {{ffa_losses}}) [/stats] +[iconstash] +smile BOMB +starcraft SEXP +warcraft WAR3 +diablo DRTL +[/iconstash] ############################################################################## # Starcraft icon set # -# Use Bni Icon Builder to edit icons.bni (icons_STAR.bni is not used) # -# https://github.com/HarpyWar/bni-icon-builder # #----------------------------------------------------------------------------# [SEXP] @@ -104,3 +112,8 @@ Ladder games: [{{rating1->rank}}] {{rating1}} pts ({{wins1}}/{{losses1}}/{{disco Normal games: [{{rating0->rank}}] {{rating0}} pts ({{wins0}}/{{losses0}}/{{disconnects0}}) [/stats] +[iconstash] +demon EYES +warcraft WAR3 +diablo DRTL +[/iconstash] diff --git a/src/bnetd/account_wrap.cpp b/src/bnetd/account_wrap.cpp index 160cae402..46bb0fa67 100644 --- a/src/bnetd/account_wrap.cpp +++ b/src/bnetd/account_wrap.cpp @@ -2369,6 +2369,35 @@ namespace pvpgn return -1; } + + /* value = icons delimeted by space */ + extern int account_set_user_iconstash(t_account * account, t_clienttag clienttag, char const * value) + { + char key[256]; + char clienttag_str[5]; + + std::sprintf(key, "Record\\%s\\iconstash", tag_uint_to_str(clienttag_str, clienttag)); + if (value) + return account_set_strattr(account, key, value); + else + return account_set_strattr(account, key, "NULL"); + } + + extern char const * account_get_user_iconstash(t_account * account, t_clienttag clienttag) + { + char key[256]; + char const * retval; + char clienttag_str[5]; + + std::sprintf(key, "Record\\%s\\iconstash", tag_uint_to_str(clienttag_str, clienttag)); + retval = account_get_strattr(account, key); + + if ((retval) && ((std::strcmp(retval, "NULL") != 0))) + return retval; + else + return NULL; + } + //BlacKDicK 04/20/2003 extern int account_set_user_icon(t_account * account, t_clienttag clienttag, char const * usericon) { diff --git a/src/bnetd/account_wrap.h b/src/bnetd/account_wrap.h index 0445efe4c..63d7671e0 100644 --- a/src/bnetd/account_wrap.h +++ b/src/bnetd/account_wrap.h @@ -236,6 +236,8 @@ namespace pvpgn extern int account_get_profile_calcs(t_account * account, int xp, unsigned int level); extern unsigned int account_get_icon_profile(t_account * account, t_clienttag clienttag); + extern int account_set_user_iconstash(t_account * account, t_clienttag clienttag, char const * value); + extern char const * account_get_user_iconstash(t_account * account, t_clienttag clienttag); extern int account_set_user_icon(t_account * account, t_clienttag clienttag, char const * usericon); extern char const * account_get_user_icon(t_account * account, t_clienttag clienttag); extern unsigned int account_icon_to_profile_icon(char const * icon, t_account * account, t_clienttag ctag); diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 4a9b105f0..adc68b4e1 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -2008,7 +2008,7 @@ namespace pvpgn const char *text; // if text is not empty - if (text = get_custom_stats_text(account, clienttag_uint)) + if (text = customicons_get_stats_text(account, clienttag_uint)) { // split by lines char* output_array = strtok((char*)text, "\n"); diff --git a/src/bnetd/connection.cpp b/src/bnetd/connection.cpp index ed473854c..8667db0f6 100644 --- a/src/bnetd/connection.cpp +++ b/src/bnetd/connection.cpp @@ -2557,7 +2557,7 @@ namespace pvpgn t_icon_info * icon; // do not override userselectedicon if it's not null - if (!usericon && (icon = get_custom_icon(account, clienttag))) + if (!usericon && (icon = customicons_get_icon_by_account(account, clienttag))) strcpy(revtag, icon->icon_code); // FIXME: it replaces tag with icon on a client side for all clients (HarpyWar) @@ -3751,7 +3751,7 @@ namespace pvpgn t_icon_info * icon; // do not override userselectedicon if it's not null - if (!usericon && (icon = get_custom_icon(account, clienttag))) + if (!usericon && (icon = customicons_get_icon_by_account(account, clienttag))) usericon = xstrdup(icon->icon_code); acctlevel = 0; diff --git a/src/bnetd/handle_anongame.cpp b/src/bnetd/handle_anongame.cpp index 803db194b..95a0f1754 100644 --- a/src/bnetd/handle_anongame.cpp +++ b/src/bnetd/handle_anongame.cpp @@ -498,7 +498,7 @@ namespace pvpgn { // get current custom icon t_icon_info * icon; - if (icon = get_custom_icon(acc, clienttag)) + if (icon = customicons_get_icon_by_account(acc, clienttag)) std::memcpy(&rpacket->u.server_findanongame_iconreply.curricon, icon->icon_code, 4); } else if ((uicon = account_get_user_icon(acc, clienttag))) diff --git a/src/bnetd/icons.cpp b/src/bnetd/icons.cpp index 7f6d25efa..79bd91d37 100644 --- a/src/bnetd/icons.cpp +++ b/src/bnetd/icons.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "compat/strcasecmp.h" @@ -66,91 +67,485 @@ namespace pvpgn /* Set usericon (command) */ extern int handle_icon_command(t_connection * c, char const *text) { - t_account * user_account; + t_account * account; t_connection * user_c; - char const * username, *code, *usericon; + char const * channel_name; + char const * subcommand, *username, *iconname; + char const *usericon, *iconalias, *iconcode; t_clienttag clienttag; - char msgtemp[MAX_MESSAGE_LEN]; + char clienttag_str[5]; + std::string output_icons = ""; + int count = 1; // 1 icon in stash ("default" icon) + bool is_selected = false; - std::vector args = split_command(text, 3); + char msgtemp[MAX_MESSAGE_LEN]; - if (args[1].empty()) - { - describe_command(c, args[0].c_str()); + if (!(conn_get_channel(c))) { + message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); return -1; } - username = args[1].c_str(); // username - - // find user account - if (!(user_account = accountlist_find_account(username))) - { - message_send_text(c, message_type_error, c, "Invalid user."); - return 0; + else { + channel_name = channel_get_name(conn_get_channel(c)); } - user_c = account_get_conn(user_account); - // if clienttag is in parameters - if (clienttag = tag_validate_client(args[3].c_str())) - { - // if user offline then replace last clienttag with given - if (!user_c) - account_set_ll_clienttag(user_account, clienttag); - } - else + // get current clienttag + clienttag = conn_get_clienttag(c); + if (!clienttag || clienttag == CLIENTTAG_BNCHATBOT_UINT) { - if (user_c) - clienttag = conn_get_clienttag(user_c); - else // if user offline then retrieve last clienttag - clienttag = account_get_ll_clienttag(user_account); + message_send_text(c, message_type_error, c, "This command can only be used from the game."); + return -1; } - // icon code - std::transform(args[2].begin(), args[2].end(), args[2].begin(), std::toupper); // to upper - code = args[2].c_str(); - // output current usericon code - if (strlen(code) != 4) + // split command args + std::vector args = split_command(text, 3); + + if (!(account_is_operator_or_admin(conn_get_account(c), channel_name))) { - if (usericon = account_get_user_icon(user_account, clienttag)) + /* Simple command syntax for users */ + + iconname = args[1].c_str(); // icon code + + account = conn_get_account(c); + + // get current user icon + if (usericon = account_get_user_icon(account, clienttag)) + usericon = strrev(xstrdup(usericon)); + + bool is_found = false; + // get user stash + if (char const * iconstash = account_get_user_iconstash(account, clienttag)) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s has custom icon \"%.4s\" of %.128s", account_get_name(user_account), strreverse(xstrdup(usericon)), clienttag_get_title(clienttag)); - message_send_text(c, message_type_error, c, msgtemp); + std::string s(iconstash); + std::istringstream iss(s); + do + { + std::string _icon; + iss >> _icon; + if (_icon.empty()) continue; + + // output icon_alias instead of icon_code + if (iconalias = customicons_stash_find(clienttag, _icon.c_str(), true)) + _icon = std::string(iconalias); + + if (!(iconcode = customicons_stash_find(clienttag, _icon.c_str()))) + iconcode = iconalias = _icon.c_str(); // icon was added earlier to user and then removed from server stash + + + // set selected icon in brackets + if (usericon && strcasecmp(usericon, iconcode) == 0) + { + _icon = "[" + _icon + "]"; + is_selected = true; + } + + if (!output_icons.empty()) + output_icons += ", "; + output_icons += _icon; + + // if iconname parameter passed then find it in user stash + if (iconname[0] != '\0') + { + if (strcasecmp(iconname, iconalias) == 0 || strcasecmp(iconname, iconcode) == 0) + is_found = true; + } + + count++; + } while (iss); } - else + + if (iconname[0] != '\0') { - snprintf(msgtemp, sizeof(msgtemp), "Custom icon for %.64s currently not set of %.128s", account_get_name(user_account), clienttag_get_title(clienttag)); - message_send_text(c, message_type_error, c, msgtemp); + // unset value + if (strcasecmp(iconname, "default") == 0) + { + snprintf(msgtemp, sizeof(msgtemp), "Set default icon.", clienttag_get_title(clienttag)); + usericon = NULL; + } + // set usericon (reversed) + else + { + // if icon not found in server stash + if (!(iconcode = customicons_stash_find(clienttag, iconname))) + { + // set icon code from args + std::transform(args[1].begin(), args[1].end(), args[1].begin(), std::toupper); // to upper + iconcode = args[1].c_str(); + } + if (!is_found || strlen(iconcode) != 4) + { + message_send_text(c, message_type_error, c, "Bad icon."); + return -1; + } + snprintf(msgtemp, sizeof(msgtemp), "Set new icon is succeed.", account_get_name(account)); + usericon = strreverse((char*)iconcode); + } + account_set_user_icon(account, clienttag, usericon); + message_send_text(c, message_type_info, c, msgtemp); + + // if user online then force him to rejoin channel + if (c) + { + conn_update_w3_playerinfo(c); + channel_rejoin(c); + } + return 0; } + + // display icon list in user stash + snprintf(msgtemp, sizeof(msgtemp), "You have %u icons in stash:", count); + message_send_text(c, message_type_info, c, msgtemp); + + output_icons = ((is_selected || usericon) ? "default" : "[default]") + std::string((count > 1) ? ", " : "") + output_icons; + + snprintf(msgtemp, sizeof(msgtemp), " %s", output_icons.c_str()); + message_send_text(c, message_type_info, c, msgtemp); + return 0; } - // unset value - if (strcasecmp(code, "null") == 0) + /* Complex command syntax for operator and admins */ + + if (args[1].empty()) { - snprintf(msgtemp, sizeof(msgtemp), "Set default icon to %.64s of %.128s", account_get_name(user_account), clienttag_get_title(clienttag)); - usericon = NULL; + describe_command(c, args[0].c_str()); + return -1; } - else + subcommand = args[1].c_str(); // sub command + username = args[2].c_str(); // username + iconname = args[3].c_str(); // icon alias or code + + // display icons from the server stash + // subcommand = list + if (subcommand[0] == 'l' && username[0] == '\0') { - snprintf(msgtemp, sizeof(msgtemp), "Set icon \"%.4s\" to %.64s of %.128s", code, account_get_name(user_account), clienttag_get_title(clienttag)); - usericon = strreverse((char*)code); + message_send_text(c, message_type_info, c, "Available icons in server stash:"); + std::string output_icons = customicons_stash_get_list(clienttag, true); + snprintf(msgtemp, sizeof(msgtemp), " %s", output_icons.c_str()); + message_send_text(c, message_type_info, c, msgtemp); + return 0; } - message_send_text(c, message_type_error, c, msgtemp); + // find user account + if (!(account = accountlist_find_account(username))) + { + message_send_text(c, message_type_error, c, "Invalid user."); + return 0; + } + user_c = account_get_conn(account); - // set reversed - account_set_user_icon(user_account, clienttag, usericon); - // if user online then force him to rejoin channel - if (user_c) + switch (std::tolower(subcommand[0])) { - conn_update_w3_playerinfo(user_c); - channel_rejoin(user_c); + // set + case 's': + if (iconname[0] == '\0') + { + describe_command(c, args[0].c_str()); + return -1; + } + + // unset value + if (strcasecmp(iconname, "default") == 0) + { + snprintf(msgtemp, sizeof(msgtemp), "Set default icon for %.64s", account_get_name(account)); + usericon = NULL; + } + // set usericon (reversed) + else + { + // find icon in server stash + if (!(iconcode = customicons_stash_find(clienttag, iconname))) + { + message_send_text(c, message_type_error, c, "That icon doesn't exist in server stash."); + return -1; + } + snprintf(msgtemp, sizeof(msgtemp), "Set new icon is succeed for %.64s", account_get_name(account)); + usericon = strreverse((char*)iconcode); + } + account_set_user_icon(account, clienttag, usericon); + message_send_text(c, message_type_info, c, msgtemp); + + // if user online then force him to rejoin channel + if (user_c) + { + conn_update_w3_playerinfo(user_c); + channel_rejoin(user_c); + } + + return 0; + break; + + // list + case 'l': + // get current user icon + if (usericon = account_get_user_icon(account, clienttag)) + usericon = strrev(xstrdup(usericon)); + + // get user stash + if (char const * iconstash = account_get_user_iconstash(account, clienttag)) + { + std::string s(iconstash); + std::istringstream iss(s); + do + { + std::string _icon; + iss >> _icon; + if (_icon.empty()) continue; + + if (!(iconcode = customicons_stash_find(clienttag, _icon.c_str()))) + iconcode = _icon.c_str(); // icon was added earlier to user and then removed from server stash + + // output icon_alias instead of icon_code + if (iconalias = customicons_stash_find(clienttag, _icon.c_str(), true)) + _icon = std::string(iconalias); // output key instead of code + + // set selected icon in brackets + if (usericon && strcasecmp(usericon, iconcode) == 0) + { + _icon = "[" + _icon + "]"; + is_selected = true; + } + + if (!output_icons.empty()) + output_icons += ", "; + + output_icons += _icon; + + count++; + } while (iss); + } + + // display icon list in user stash + snprintf(msgtemp, sizeof(msgtemp), "%.64s has %u icons in stash:", account_get_name(account), count); + message_send_text(c, message_type_info, c, msgtemp); + + output_icons = ((is_selected || usericon) ? "default" : "[default]") + std::string((count > 1) ? ", " : "") + output_icons; + + snprintf(msgtemp, sizeof(msgtemp), " %s", output_icons.c_str()); + message_send_text(c, message_type_info, c, msgtemp); + + + return 0; + break; + + // add + case 'a': + if (iconname[0] == '\0') + { + describe_command(c, args[0].c_str()); + return -1; + } + // find icon in server stash + if (!(iconcode = customicons_stash_find(clienttag, iconname))) + { + message_send_text(c, message_type_error, c, "That icon doesn't exist in server stash."); + return -1; + } + + // find icon in user stash + if (char const * iconstash = account_get_user_iconstash(account, clienttag)) + { + std::string s(iconstash); + std::istringstream iss(s); + do + { + std::string _icon; + iss >> _icon; + if (_icon.empty()) continue; + + if (!output_icons.empty()) + output_icons += " "; + output_icons += _icon; + + if (strcasecmp(_icon.c_str(), iconcode) == 0) + { + message_send_text(c, message_type_error, c, "User already has that icon in stash."); + return 0; + } + } while (iss); + } + // append new icon + if (!output_icons.empty()) + output_icons += " "; + output_icons += std::string(iconcode); + + // save stash + account_set_user_iconstash(account, clienttag, output_icons.c_str()); + + snprintf(msgtemp, sizeof(msgtemp), "Add new icon to %.64s's stash.", account_get_name(account)); + message_send_text(c, message_type_info, c, msgtemp); + + return 0; + break; + + // del + case 'd': + if (iconname[0] == '\0') + { + describe_command(c, args[0].c_str()); + return -1; + } + bool is_found = false; + if (char const * iconstash = account_get_user_iconstash(account, clienttag)) + { + // get current user icon + if (usericon = account_get_user_icon(account, clienttag)) + usericon = strrev(xstrdup(usericon)); + + std::string s(iconstash); + std::istringstream iss(s); + do + { + std::string _icon; + iss >> _icon; + if (_icon.empty()) continue; + + iconalias = customicons_stash_find(clienttag, _icon.c_str(), true); + if (!(iconcode = customicons_stash_find(clienttag, _icon.c_str()))) + iconcode = iconalias = _icon.c_str(); // icon was added earlier to user and then removed from server stash + + // exclude deleted icon (allow to delete icon by code or alias) + if (strcasecmp(iconname, iconalias) == 0 || strcasecmp(iconname, iconcode) == 0) + { + // also unset current user icon if it equals with given + if (usericon && strcasecmp(usericon, iconcode) == 0) + account_set_user_icon(account, clienttag, NULL); + + is_found = true; + continue; + } + + if (!output_icons.empty()) + output_icons += " "; + output_icons += _icon; + } while (iss); + } + if (!is_found) + { + message_send_text(c, message_type_error, c, "That icon doesn't exist in user stash."); + return -1; + } + // save stash + account_set_user_iconstash(account, clienttag, output_icons.c_str()); + + snprintf(msgtemp, sizeof(msgtemp), "Delete icon from %.64s's stash.", account_get_name(account)); + message_send_text(c, message_type_info, c, msgtemp); + + return 0; + break; + } + + return 0; + } + + + + /* Search usericon in available list by icon code or alias, for given clienttag + * return icon code if found, and NULL if not found + * if (return_alias == true) then aias is returned + */ + extern char const * customicons_stash_find(t_clienttag clienttag, char const * code, bool return_alias) + { + t_elem * curr; + t_elem * curr_var; + t_icon_var_info * var; + t_iconset_info * iconset; + t_icon_var_info * item; + + if (!code || !clienttag) + return NULL; + + char clienttag_str[5]; + tag_uint_to_str(clienttag_str, clienttag); + + if (icon_head) { + LIST_TRAVERSE(icon_head, curr) + { + if (!(iconset = (t_iconset_info*)elem_get_data(curr))) { + eventlog(eventlog_level_error, __FUNCTION__, "icon list contains NULL item"); + continue; + } + + // find a needed tag + if (std::strcmp(iconset->clienttag, clienttag_str) != 0) + continue; + + LIST_TRAVERSE(iconset->iconstash, curr_var) + { + if (!(var = (t_icon_var_info*)elem_get_data(curr_var))) + { + eventlog(eventlog_level_error, __FUNCTION__, "vars list contains NULL item"); + continue; + } + + if (strcasecmp(var->key, code) == 0 || strcasecmp(var->value, code) == 0) + { + char const * val = (return_alias) + ? xstrdup(var->key) + : xstrdup(var->value); + return val; + } + } + } } + return NULL; } + /* Return comma delimeted icons from stash + */ + extern std::string customicons_stash_get_list(t_clienttag clienttag, bool return_alias) + { + t_elem * curr; + t_elem * curr_var; + t_icon_var_info * var; + t_iconset_info * iconset; + t_icon_var_info * item; + + std::string output = ""; + + if (!clienttag) + return output; + + char clienttag_str[5]; + tag_uint_to_str(clienttag_str, clienttag); + + if (icon_head) { + LIST_TRAVERSE(icon_head, curr) + { + if (!(iconset = (t_iconset_info*)elem_get_data(curr))) { + eventlog(eventlog_level_error, __FUNCTION__, "icon list contains NULL item"); + continue; + } + + // find a needed tag + if (std::strcmp(iconset->clienttag, clienttag_str) != 0) + continue; + + LIST_TRAVERSE(iconset->iconstash, curr_var) + { + if (!(var = (t_icon_var_info*)elem_get_data(curr_var))) + { + eventlog(eventlog_level_error, __FUNCTION__, "vars list contains NULL item"); + continue; + } + + + char const * val = (return_alias) + ? xstrdup(var->key) + : xstrdup(var->value); + + if (!output.empty()) + output += ", "; + output += std::string(val); + } + break; + } + } + return output; + } extern int prefs_get_custom_icons() @@ -160,7 +555,7 @@ namespace pvpgn /* Format stats text, with attributes from a storage, and output text to a user */ - extern const char * get_custom_stats_text(t_account * account, t_clienttag clienttag) + extern const char * customicons_get_stats_text(t_account * account, t_clienttag clienttag) { const char *value; const char *text; @@ -224,7 +619,7 @@ namespace pvpgn /* find icon code by rating for the clienttag */ - extern t_icon_info * get_custom_icon(t_account * account, t_clienttag clienttag) + extern t_icon_info * customicons_get_icon_by_account(t_account * account, t_clienttag clienttag) { char * attr_key; int rating; @@ -287,7 +682,7 @@ namespace pvpgn t_icon_var_info * option; icon_head = list_create(); - + unsigned int fpos = 0; if (!filename) { eventlog(eventlog_level_error, __FUNCTION__, "got NULL filename"); @@ -316,28 +711,24 @@ namespace pvpgn enable_custom_icons = 0; } + /* 2) parse clienttags */ - if (std::strcmp(buff, "[W3XP]") == 0 || - std::strcmp(buff, "[WAR3]") == 0 || - std::strcmp(buff, "[STAR]") == 0 || - std::strcmp(buff, "[SEXP]") == 0 || - std::strcmp(buff, "[JSTR]") == 0 || - std::strcmp(buff, "[SSHR]") == 0 || - std::strcmp(buff, "[W2BN]") == 0 || - std::strcmp(buff, "[DRTL]") == 0 || - std::strcmp(buff, "[DSHR]") == 0) + if (std::strcmp(buff, "[W3XP]") == 0 || std::strcmp(buff, "[WAR3]") == 0 || std::strcmp(buff, "[STAR]") == 0 || + std::strcmp(buff, "[SEXP]") == 0 || std::strcmp(buff, "[JSTR]") == 0 || std::strcmp(buff, "[SSHR]") == 0 || + std::strcmp(buff, "[W2BN]") == 0 || std::strcmp(buff, "[DRTL]") == 0 || std::strcmp(buff, "[DSHR]") == 0) { if (skip_comments(buff) > 0) { continue; } - value = std::strtok(buff, " []"); + value = std::strtok(buff, " []"); // extract clienttag // new iconset for a clienttag t_iconset_info * icon_set = (t_iconset_info*)xmalloc(sizeof(t_iconset_info)); icon_set->clienttag = xstrdup(value); icon_set->attr_key = NULL; icon_set->icon_info = list_create(); + icon_set->iconstash = list_create(); icon_set->vars = list_create(); icon_set->stats = NULL; @@ -345,9 +736,12 @@ namespace pvpgn /* 3) parse inner options under a clienttag */ for (; (buff = file_get_line(fp)); line++) { - if (end_of_iconset) + if (std::strcmp(buff, "[W3XP]") == 0 || std::strcmp(buff, "[WAR3]") == 0 || std::strcmp(buff, "[STAR]") == 0 || + std::strcmp(buff, "[SEXP]") == 0 || std::strcmp(buff, "[JSTR]") == 0 || std::strcmp(buff, "[SSHR]") == 0 || + std::strcmp(buff, "[W2BN]") == 0 || std::strcmp(buff, "[DRTL]") == 0 || std::strcmp(buff, "[DSHR]") == 0) { - end_of_iconset = false; + // return position in stream + fseek(fp, fpos, SEEK_SET); break; } if (skip_comments(buff) > 0) @@ -363,6 +757,8 @@ namespace pvpgn // add to variables list_append_data(icon_set->vars, option); + + continue; } /* 3) parse icons section */ @@ -416,13 +812,45 @@ namespace pvpgn if (std::strcmp(buff, "[/stats]") == 0) { // put whole text of stats after read icon_set->stats = xstrdup(tmp.c_str()); - end_of_iconset = true; break; } - tmp = tmp + buff + "\n"; } } + + + /* 4) parse usericons section */ + if (std::strcmp(buff, "[iconstash]") == 0) + { + char *key, *value; + counter = 0; + for (; (buff = file_get_line(fp)); line++) + { + if (skip_comments(buff) > 0) + { + continue; + } + // end if usericons + if (std::strcmp(buff, "[/iconstash]") == 0) { + break; + } + + pos = 0; + if (!(key = next_token(buff, &pos))) + continue; + if (!(value = next_token(buff, &pos))) + value = key; + counter++; + + t_icon_var_info * icon_item = (t_icon_var_info*)xmalloc(sizeof(t_icon_var_info)); + icon_item->key = xstrdup(key); + icon_item->value = xstrdup(value); + list_append_data(icon_set->iconstash, icon_item); + } + } + + // remember file position + fpos = ftell(fp); } if (!icon_set->attr_key) @@ -436,7 +864,6 @@ namespace pvpgn } } - return 0; } diff --git a/src/bnetd/icons.h b/src/bnetd/icons.h index b40e31a48..5e225b1ed 100644 --- a/src/bnetd/icons.h +++ b/src/bnetd/icons.h @@ -34,6 +34,7 @@ namespace pvpgn char * clienttag; char * attr_key; t_list * icon_info; // list of t_icon_info + t_list * iconstash; // list of t_icon_var_info t_list * vars; // list of t_icon_var_info const char * stats; @@ -64,10 +65,12 @@ namespace pvpgn namespace bnetd { extern int handle_icon_command(t_connection * c, char const *text); + extern char const * customicons_stash_find(t_clienttag clienttag, char const * code, bool return_alias = false); + extern std::string customicons_stash_get_list(t_clienttag clienttag, bool return_alias = false); extern int prefs_get_custom_icons(); - extern t_icon_info * get_custom_icon(t_account * account, t_clienttag clienttag); - extern const char * get_custom_stats_text(t_account * account, t_clienttag clienttag); + extern t_icon_info * customicons_get_icon_by_account(t_account * account, t_clienttag clienttag); + extern const char * customicons_get_stats_text(t_account * account, t_clienttag clienttag); extern int customicons_load(char const * filename); From a792b156668cba741fcf09f9e0b42148e4ad5b7d Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Wed, 30 Apr 2014 12:47:16 +0400 Subject: [PATCH 016/144] dirent.h for directory iteration (windows implementation of unix functions) --- src/bnetd/luainterface.cpp | 11 +- src/bnetd/luainterface.h | 7 ++ src/common/util.cpp | 88 +------------- src/common/util.h | 1 - src/compat/pdir.cpp | 70 +++++++++++ src/compat/pdir.h | 5 + src/win32/CMakeLists.txt | 2 +- src/win32/dirent.h | 231 +++++++++++++++++++++++++++++++++++++ 8 files changed, 323 insertions(+), 92 deletions(-) create mode 100644 src/win32/dirent.h diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 79adaf9b9..3a5e40b3c 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -16,6 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define GAME_INTERNAL_ACCESS +#define CHANNEL_INTERNAL_ACCESS +#define CLAN_INTERNAL_ACCESS #include "common/setup_before.h" #include "command.h" @@ -29,6 +31,7 @@ #include "compat/strcasecmp.h" #include "compat/snprintf.h" +#include "compat/pdir.h" #include "common/tag.h" #include "common/util.h" #include "common/version.h" @@ -71,7 +74,6 @@ #include "clan.h" #include "common/setup_after.h" #include "common/flags.h" -#include "common/util.h" #include "attrlayer.h" @@ -90,6 +92,9 @@ namespace pvpgn std::map get_account_object(t_account *account); std::map get_account_object(const char *username); std::map get_game_object(t_game * game); + // TODO: + //std::map get_channel_object(t_channel * channel); + //std::map get_clan_object(t_clan * clan); template @@ -129,7 +134,7 @@ namespace pvpgn { vm.initialize(); - std::vector files = dir_getfiles(std::string(scriptdir), ".lua", true); + std::vector files = dir_getfiles(scriptdir, ".lua", true); // load all files from the script directory for (int i = 0; i < files.size(); ++i) @@ -137,7 +142,7 @@ namespace pvpgn vm.load_file(files[i].c_str()); snprintf(_msgtemp, sizeof(_msgtemp), "%s", files[i].c_str()); - eventlog(eventlog_level_info, __FUNCTION__, _msgtemp); + eventlog(eventlog_level_trace, __FUNCTION__, _msgtemp); } _register_functions(); diff --git a/src/bnetd/luainterface.h b/src/bnetd/luainterface.h index 3ce2899b3..f71ae0a0e 100644 --- a/src/bnetd/luainterface.h +++ b/src/bnetd/luainterface.h @@ -53,6 +53,12 @@ namespace pvpgn luaevent_user_leftgame, luaevent_user_joinchannel, luaevent_user_leftchannel, + luaevent_user_joinclan, + luaevent_user_leftclan, + + luaevent_clan_create, + luaevent_clan_changestatus, + luaevent_clan_destroy, luaevent_user_message, // user-to-channel luaevent_user_whisper, // user-to-user @@ -68,6 +74,7 @@ namespace pvpgn extern int lua_handle_command(t_connection * c, char const * text); extern void lua_handle_game(t_game * game, t_luaevent_type luaevent); // game events extern void lua_handle_user(t_connection * c, t_game * game, t_luaevent_type luaevent); // + // TODO: //extern void lua_handle_user(t_connection * c, t_connection * c_dst, const char * text, t_luaevent_type luaevent); //extern void lua_handle_user(t_connection * c, t_channel * channel, const char * text, t_luaevent_type luaevent); //extern void lua_handle_user(t_connection * c, t_channel * channel, t_luaevent_type luaevent); diff --git a/src/common/util.cpp b/src/common/util.cpp index 0cfdff6d2..92561a201 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -689,92 +689,6 @@ namespace pvpgn for (; *str; str++) *str = std::tolower(*str); } - /* Returns a list of files in a directory (except the ones that begin with a dot) */ - extern std::vector dir_getfiles(const std::string &directory, const char* ext, bool recursive) - { - std::vector files; - const char* _ext; - -#ifdef WIN32 - HANDLE dir; - WIN32_FIND_DATA file_data; - - if ((dir = FindFirstFile((directory + "/*").c_str(), &file_data)) == INVALID_HANDLE_VALUE) - return files; /* No files found */ - - do { - const std::string file_name = file_data.cFileName; - const std::string full_file_name = directory + "/" + file_name; - const bool is_directory = (file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0; - - if (file_name[0] == '.') - continue; - - if (is_directory) - { - // iterate subdirectories - if (recursive) - { - std::vector subfiles = dir_getfiles(full_file_name, ext, recursive); - - for (int i = 0; i < subfiles.size(); ++i) - files.push_back(subfiles[i]); - } - continue; - } - - // filter by extension - _ext = strrchr(file_name.c_str(), '.'); - if ( strcmp(ext, "*") != 0) - if (!_ext || strcasecmp(_ext, ext) != 0) - continue; - - files.push_back(full_file_name); - } while (FindNextFile(dir, &file_data)); - - FindClose(dir); -#else - DIR *dir; - class dirent *ent; - class stat st; - - dir = opendir(directory); - while ((ent = readdir(dir)) != NULL) { - const std::string file_name = ent->d_name; - const std::string full_file_name = directory + "/" + file_name; - - if (file_name[0] == '.') - continue; - - if (stat(full_file_name.c_str(), &st) == -1) - continue; - - const bool is_directory = (st.st_mode & S_IFDIR) != 0; - - if (is_directory) - { - // iterate subdirectories - if (recursive) - { - std::vector subfiles = dir_getfiles(full_file_name, ext, recursive); - - for (int i = 0; i < subfiles.size(); ++i) - files.push_back(subfiles[i]); - } - continue; - } - - // filter by extension - _ext = strrchr(file_name.c_str(), '.'); - if (strcmp(ext, "*") != 0) - if (!_ext || strcasecmp(_ext, ext) != 0) - continue; - - files.push_back(full_file_name); - } - closedir(dir); -#endif - return files; - } + } diff --git a/src/common/util.h b/src/common/util.h index f1b56c4dc..0d8ad9578 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -53,7 +53,6 @@ namespace pvpgn extern char * buildpath(char const *root, const char *suffix); extern int timestr_to_time(char const * timestr, std::time_t* ptime); extern void strlower(char* str); - extern std::vector dir_getfiles(const std::string &directory, const char* ext, bool recursive); static inline char * str_skip_space(char *str) { diff --git a/src/compat/pdir.cpp b/src/compat/pdir.cpp index c5996d51e..4a5218e30 100644 --- a/src/compat/pdir.cpp +++ b/src/compat/pdir.cpp @@ -23,7 +23,13 @@ #include "common/eventlog.h" #include "common/setup_after.h" +#include "compat/strcasecmp.h" +#ifdef WIN32 +#include "win32/dirent.h" +#else +#include +#endif namespace pvpgn { @@ -143,4 +149,68 @@ namespace pvpgn #endif } + bool is_directory(const char* pzPath); + + + + /* Returns a list of files in a directory (except the ones that begin with a dot) */ + extern std::vector dir_getfiles(const char * directory, const char* ext, bool recursive) + { + std::vector files; + const char* _ext; + + DIR *dir; + class dirent *ent; + + dir = opendir(directory); + while ((ent = readdir(dir)) != NULL) { + const std::string file_name = ent->d_name; + const std::string full_file_name = std::string(directory) + "/" + file_name; + + if (file_name[0] == '.') + continue; + + if (is_directory(full_file_name.c_str())) + { + // iterate subdirectories + if (recursive) + { + std::vector subfiles = dir_getfiles(full_file_name.c_str(), ext, recursive); + + for (int i = 0; i < subfiles.size(); ++i) + files.push_back(subfiles[i]); + } + continue; + } + + // filter by extension + _ext = strrchr(file_name.c_str(), '.'); + if (strcmp(ext, "*") != 0) + if (!_ext || strcasecmp(_ext, ext) != 0) + continue; + + files.push_back(full_file_name); + } + closedir(dir); + + return files; + } + + bool is_directory(const char* pzPath) + { + if (pzPath == NULL) return false; + + DIR *pDir; + bool bExists = false; + + pDir = opendir(pzPath); + + if (pDir != NULL) + { + bExists = true; + (void)closedir(pDir); + } + + return bExists; + } } diff --git a/src/compat/pdir.h b/src/compat/pdir.h index 19f13ee71..1a4c85591 100644 --- a/src/compat/pdir.h +++ b/src/compat/pdir.h @@ -39,6 +39,8 @@ # include /* for _findfirst(), _findnext(), etc */ #endif +#include + namespace pvpgn { @@ -75,8 +77,11 @@ namespace pvpgn Directory(const Directory&); Directory& operator=(const Directory&); void close(); + }; + extern std::vector dir_getfiles(const char * directory, const char* ext, bool recursive); + } #endif diff --git a/src/win32/CMakeLists.txt b/src/win32/CMakeLists.txt index d2b515d44..ea1f9fe36 100644 --- a/src/win32/CMakeLists.txt +++ b/src/win32/CMakeLists.txt @@ -1,5 +1,5 @@ set(WIN32_SOURCES - service.cpp service.h console_output.h console_output.cpp + service.cpp service.h console_output.h console_output.cpp dirent.h ) add_library(win32 ${WIN32_SOURCES}) diff --git a/src/win32/dirent.h b/src/win32/dirent.h new file mode 100644 index 000000000..fc772a4b9 --- /dev/null +++ b/src/win32/dirent.h @@ -0,0 +1,231 @@ +/***************************************************************************** +* dirent.h - dirent API for Microsoft Visual Studio +* +* Copyright (C) 2006 Toni Ronkko +* +* Permission is hereby granted, free of charge, to any person obtaining +* a copy of this software and associated documentation files (the +* ``Software''), to deal in the Software without restriction, including +* without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to +* permit persons to whom the Software is furnished to do so, subject to +* the following conditions: +* +* The above copyright notice and this permission notice shall be included +* in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS +* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +* IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +* Dec 15, 2009, John Cunningham +* Added rewinddir member function +* +* Jan 18, 2008, Toni Ronkko +* Using FindFirstFileA and WIN32_FIND_DATAA to avoid converting string +* between multi-byte and unicode representations. This makes the +* code simpler and also allows the code to be compiled under MingW. Thanks +* to Azriel Fasten for the suggestion. +* +* Mar 4, 2007, Toni Ronkko +* Bug fix: due to the strncpy_s() function this file only compiled in +* Visual Studio 2005. Using the new string functions only when the +* compiler version allows. +* +* Nov 2, 2006, Toni Ronkko +* Major update: removed support for Watcom C, MS-DOS and Turbo C to +* simplify the file, updated the code to compile cleanly on Visual +* Studio 2005 with both unicode and multi-byte character strings, +* removed rewinddir() as it had a bug. +* +* Aug 20, 2006, Toni Ronkko +* Removed all remarks about MSVC 1.0, which is antiqued now. Simplified +* comments by removing SGML tags. +* +* May 14 2002, Toni Ronkko +* Embedded the function definitions directly to the header so that no +* source modules need to be included in the Visual Studio project. Removed +* all the dependencies to other projects so that this very header can be +* used independently. +* +* May 28 1998, Toni Ronkko +* First version. +*****************************************************************************/ +#ifndef DIRENT_H +#define DIRENT_H + +#include +#include +#include + + +typedef struct dirent +{ + char d_name[MAX_PATH + 1]; /* current dir entry (multi-byte char string) */ + WIN32_FIND_DATAA data; /* file attributes */ +} dirent; + + +typedef struct DIR +{ + dirent current; /* Current directory entry */ + int cached; /* Indicates un-processed entry in memory */ + HANDLE search_handle; /* File search handle */ + char patt[MAX_PATH + 3]; /* search pattern (3 = pattern + "\\*\0") */ +} DIR; + + +/* Forward declarations */ +static DIR *opendir(const char *dirname); +static struct dirent *readdir(DIR *dirp); +static int closedir(DIR *dirp); +static void rewinddir(DIR* dirp); + + +/* Use the new safe string functions introduced in Visual Studio 2005 */ +#if defined(_MSC_VER) && _MSC_VER >= 1400 +# define STRNCPY(dest,src,size) strncpy_s((dest),(size),(src),_TRUNCATE) +#else +# define STRNCPY(dest,src,size) strncpy((dest),(src),(size)) +#endif + + +/***************************************************************************** +* Open directory stream DIRNAME for read and return a pointer to the +* internal working area that is used to retrieve individual directory +* entries. +*/ +static DIR *opendir(const char *dirname) +{ + DIR *dirp; + assert(dirname != NULL); + assert(strlen(dirname) < MAX_PATH); + + /* construct new DIR structure */ + dirp = (DIR*)malloc(sizeof (struct DIR)); + if (dirp != NULL) { + char *p; + + /* take directory name... */ + STRNCPY(dirp->patt, dirname, sizeof(dirp->patt)); + dirp->patt[MAX_PATH] = '\0'; + + /* ... and append search pattern to it */ + p = strchr(dirp->patt, '\0'); + if (dirp->patt < p && *(p - 1) != '\\' && *(p - 1) != ':') { + *p++ = '\\'; + } + *p++ = '*'; + *p = '\0'; + + /* open stream and retrieve first file */ + dirp->search_handle = FindFirstFileA(dirp->patt, &dirp->current.data); + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* invalid search pattern? */ + free(dirp); + return NULL; + } + + /* there is an un-processed directory entry in memory now */ + dirp->cached = 1; + } + + return dirp; +} + + +/***************************************************************************** +* Read a directory entry, and return a pointer to a dirent structure +* containing the name of the entry in d_name field. Individual directory +* entries returned by this very function include regular files, +* sub-directories, pseudo-directories "." and "..", but also volume labels, +* hidden files and system files may be returned. +*/ +static struct dirent *readdir(DIR *dirp) +{ + assert(dirp != NULL); + + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* directory stream was opened/rewound incorrectly or ended normally */ + return NULL; + } + + /* get next directory entry */ + if (dirp->cached != 0) { + /* a valid directory entry already in memory */ + dirp->cached = 0; + } + else { + /* read next directory entry from disk */ + if (FindNextFileA(dirp->search_handle, &dirp->current.data) == FALSE) { + /* the very last file has been processed or an error occured */ + FindClose(dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + return NULL; + } + } + + /* copy as a multibyte character string */ + STRNCPY(dirp->current.d_name, + dirp->current.data.cFileName, + sizeof(dirp->current.d_name)); + dirp->current.d_name[MAX_PATH] = '\0'; + + return &dirp->current; +} + + +/***************************************************************************** +* Close directory stream opened by opendir() function. Close of the +* directory stream invalidates the DIR structure as well as any previously +* read directory entry. +*/ +static int closedir(DIR *dirp) +{ + assert(dirp != NULL); + + /* release search handle */ + if (dirp->search_handle != INVALID_HANDLE_VALUE) { + FindClose(dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + } + + /* release directory handle */ + free(dirp); + return 0; +} + + +/***************************************************************************** +* Resets the position of the directory stream to which dirp refers to the +* beginning of the directory. It also causes the directory stream to refer +* to the current state of the corresponding directory, as a call to opendir() +* would have done. If dirp does not refer to a directory stream, the effect +* is undefined. +*/ +static void rewinddir(DIR* dirp) +{ + /* release search handle */ + if (dirp->search_handle != INVALID_HANDLE_VALUE) { + FindClose(dirp->search_handle); + dirp->search_handle = INVALID_HANDLE_VALUE; + } + + /* open new search handle and retrieve first file */ + dirp->search_handle = FindFirstFileA(dirp->patt, &dirp->current.data); + if (dirp->search_handle == INVALID_HANDLE_VALUE) { + /* invalid search pattern? */ + free(dirp); + return; + } + + /* there is an un-processed directory entry in memory now */ + dirp->cached = 1; +} + + +#endif /*DIRENT_H*/ \ No newline at end of file From 5287c5c266f0f55a3fbc3c9238cd247128d375b6 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 2 May 2014 22:23:13 +0400 Subject: [PATCH 017/144] New Lua events: - handle_channel_message - handle_channel_userjoin - handle_channel_userleft - handle_user_whisper - handle_user_login - handle_user_disconnect New Lua functions: - account_get_friends - account_get_teams - clan_get_members --- src/bnetd/channel.cpp | 20 +- src/bnetd/command.cpp | 6 + src/bnetd/connection.cpp | 6 +- src/bnetd/game.cpp | 10 +- src/bnetd/handle_bnet.cpp | 8 +- src/bnetd/luainterface.cpp | 413 ++++++++++++++++++++++++++++++++++--- src/bnetd/luainterface.h | 28 ++- src/compat/pdir.cpp | 3 + 8 files changed, 445 insertions(+), 49 deletions(-) diff --git a/src/bnetd/channel.cpp b/src/bnetd/channel.cpp index d4338a6c8..ef6c1bda8 100644 --- a/src/bnetd/channel.cpp +++ b/src/bnetd/channel.cpp @@ -42,6 +42,8 @@ #include "irc.h" #include "common/setup_after.h" +#include "luainterface.h" + namespace pvpgn { @@ -488,11 +490,15 @@ namespace pvpgn if (channel->log) message_send_text(connection, message_type_info, connection, prefs_get_log_notice()); +#ifdef WITH_LUA + lua_handle_channel(channel, connection, NULL, message_type_null, luaevent_channel_userjoin); +#endif + return 0; } - extern int channel_del_connection(t_channel * channel, t_connection * connection, t_message_type mess, char const * text) + extern int channel_del_connection(t_channel * channel, t_connection * connection, t_message_type type, char const * text) { t_channelmember * curr; t_channelmember * temp; @@ -509,7 +515,7 @@ namespace pvpgn return -1; } - channel_message_send(channel, mess, connection, text); + channel_message_send(channel, type, connection, text); channel_message_log(channel, connection, 0, "PARTED"); curr = channel->memberlist; @@ -548,6 +554,10 @@ namespace pvpgn channel_destroy(channel, &curr2); } +#ifdef WITH_LUA + lua_handle_channel(channel, connection, text, type, luaevent_channel_userleft); +#endif + return 0; } @@ -747,6 +757,10 @@ namespace pvpgn if (!heard && (type == message_type_talk || type == message_type_emote)) message_send_text(me, message_type_info, me, "No one hears you."); } + +#ifdef WITH_LUA + lua_handle_channel((t_channel*)channel, me, text, type, luaevent_channel_message); +#endif } extern int channel_ban_user(t_channel * channel, char const * user) @@ -839,7 +853,7 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "got NULL user"); return -1; } - + if (!(channel->flags & channel_flags_allowbots) && conn_get_class(user) == conn_class_bot) return 1; diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index d2abc79a4..28acdb004 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -132,6 +132,12 @@ namespace pvpgn return; } + +#ifdef WITH_LUA + if (lua_handle_user(user_c, dest_c, text, luaevent_user_whisper) == 1) + return; +#endif + if (conn_get_dndstr(dest_c)) { snprintf(msgtemp, sizeof(msgtemp), "%.64s is unavailable (%.128s)", conn_get_username(dest_c), conn_get_dndstr(dest_c)); diff --git a/src/bnetd/connection.cpp b/src/bnetd/connection.cpp index 305d4a170..fa4df0da8 100644 --- a/src/bnetd/connection.cpp +++ b/src/bnetd/connection.cpp @@ -740,6 +740,10 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "cannot sync account (sync_on_logoff)"); } +#ifdef WITH_LUA + lua_handle_user(c, NULL, NULL, luaevent_user_disconnect); +#endif + if (account_get_conn(c->protocol.account) == c) /* make sure you don't set this when allready on new conn (relogin with same account) */ account_set_conn(c->protocol.account, NULL); c->protocol.account = NULL; /* the account code will free the memory later */ @@ -2209,7 +2213,7 @@ namespace pvpgn #ifdef WITH_LUA // handle game create when it's owner joins the game if (c == game_get_owner(c->protocol.game)) - lua_handle_game(c->protocol.game, luaevent_game_create); + lua_handle_game(c->protocol.game, NULL, luaevent_game_create); #endif if (game_is_ladder(c->protocol.game)) { diff --git a/src/bnetd/game.cpp b/src/bnetd/game.cpp index f5eb2960a..440e53b0a 100644 --- a/src/bnetd/game.cpp +++ b/src/bnetd/game.cpp @@ -476,7 +476,7 @@ namespace pvpgn } #ifdef WITH_LUA - lua_handle_game(game, luaevent_game_destroy); + lua_handle_game(game, NULL, luaevent_game_destroy); #endif elist_del(&game->glist_link); @@ -744,7 +744,7 @@ namespace pvpgn } #ifdef WITH_LUA - lua_handle_game(game, luaevent_game_end); + lua_handle_game(game, NULL, luaevent_game_end); #endif if (game->clienttag == CLIENTTAG_WARCRAFT3_UINT || game->clienttag == CLIENTTAG_WAR3XP_UINT) @@ -1111,7 +1111,7 @@ namespace pvpgn std::fprintf(fp, "\nThis game lasted %lu minutes (elapsed).\n", ((unsigned long int)std::difftime(now, game->start_time)) / 60); #ifdef WITH_LUA - lua_handle_game(game, luaevent_game_report); + lua_handle_game(game, NULL, luaevent_game_report); #endif if (std::fclose(fp) < 0) @@ -1454,7 +1454,7 @@ namespace pvpgn game->status = status; #ifdef WITH_LUA - lua_handle_game(game, luaevent_game_changestatus); + lua_handle_game(game, NULL, luaevent_game_changestatus); #endif } @@ -1750,7 +1750,7 @@ namespace pvpgn game_choose_host(game); #ifdef WITH_LUA - lua_handle_user(c, game, luaevent_user_leftgame); + lua_handle_game(game, c, luaevent_game_userleft); #endif return 0; } diff --git a/src/bnetd/handle_bnet.cpp b/src/bnetd/handle_bnet.cpp index bfa0f7503..65f3c0bcc 100644 --- a/src/bnetd/handle_bnet.cpp +++ b/src/bnetd/handle_bnet.cpp @@ -1738,6 +1738,12 @@ namespace pvpgn } } if (success && account) { + +#ifdef WITH_LUA + if (lua_handle_user(c, NULL, NULL, luaevent_user_login) == 1) + return 0; +#endif + #ifdef WIN32_GUI guiOnUpdateUserList(); #endif @@ -3796,7 +3802,7 @@ namespace pvpgn eventlog(eventlog_level_info, __FUNCTION__, "[%d] \"%s\" joined game \"%s\"", conn_get_socket(c), conn_get_username(c), gamename); #ifdef WITH_LUA - lua_handle_user(c, game, luaevent_user_joingame); + lua_handle_game(game, c, luaevent_game_userjoin); #endif return 0; diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 3a5e40b3c..0a2fde558 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -15,12 +15,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "common/setup_before.h" +#define ACCOUNT_INTERNAL_ACCESS #define GAME_INTERNAL_ACCESS #define CHANNEL_INTERNAL_ACCESS #define CLAN_INTERNAL_ACCESS +#define TEAM_INTERNAL_ACCESS -#include "common/setup_before.h" #include "command.h" +#include "team.h" #include #include @@ -54,7 +57,6 @@ #include "message.h" #include "channel.h" #include "game.h" -#include "team.h" #include "account.h" #include "account_wrap.h" #include "server.h" @@ -72,7 +74,6 @@ #include "topic.h" #include "friends.h" #include "clan.h" -#include "common/setup_after.h" #include "common/flags.h" #include "attrlayer.h" @@ -80,6 +81,10 @@ #include "luawrapper.h" #include "luainterface.h" + +#include "common/setup_after.h" + + namespace pvpgn { @@ -92,9 +97,11 @@ namespace pvpgn std::map get_account_object(t_account *account); std::map get_account_object(const char *username); std::map get_game_object(t_game * game); - // TODO: - //std::map get_channel_object(t_channel * channel); - //std::map get_clan_object(t_clan * clan); + std::map get_channel_object(t_channel * channel); + std::map get_clan_object(t_clan * clan); + std::map get_clanmember_object(t_clanmember * member); + std::map get_team_object(t_team * team); + std::map get_friend_object(t_friend * f); template @@ -106,6 +113,9 @@ namespace pvpgn int __account_get(lua_State* L); int __account_get_attr(lua_State* L); int __account_set_attr(lua_State* L); + int __account_get_friends(lua_State* L); + int __account_get_teams(lua_State* L); + int __clan_get_members(lua_State* L); char _msgtemp[MAX_MESSAGE_LEN]; char _msgtemp2[MAX_MESSAGE_LEN]; @@ -176,6 +186,9 @@ namespace pvpgn vm.reg("account_get", __account_get); vm.reg("account_get_attr", __account_get_attr); vm.reg("account_set_attr", __account_set_attr); + vm.reg("account_get_friends", __account_get_friends); + vm.reg("account_get_teams", __account_get_teams); + vm.reg("clan_get_members", __clan_get_members); } @@ -193,9 +206,8 @@ namespace pvpgn return 0; std::map o_account = get_account_object(account); - // invoke lua method - lua::transaction(vm) << lua::lookup("handle_command") << o_account << text << lua::invoke >> result << lua::end; - + lua::transaction(vm) << lua::lookup("handle_command") << o_account << text << lua::invoke >> result << lua::end; // invoke lua function + } catch (const std::exception& e) { @@ -208,8 +220,11 @@ namespace pvpgn return result; } - extern void lua_handle_game(t_game * game, t_luaevent_type luaevent) + + + extern void lua_handle_game(t_game * game, t_connection * c, t_luaevent_type luaevent) { + t_account * account; const char * func_name; switch (luaevent) { @@ -228,13 +243,34 @@ namespace pvpgn case luaevent_game_changestatus: func_name = "handle_game_changestatus"; break; + case luaevent_game_userjoin: + func_name = "handle_game_userjoin"; + break; + case luaevent_game_userleft: + func_name = "handle_game_userleft"; + break; + default: + return; } - try { std::map o_game = get_game_object(game); - // invoke lua method - lua::transaction(vm) << lua::lookup(func_name) << o_game << lua::invoke << lua::end; + + // handle_game_userjoin & handle_game_userleft + if (c) + { + if (!(account = conn_get_account(c))) + return; + + std::map o_account = get_account_object(account); + lua::transaction(vm) << lua::lookup(func_name) << o_game << o_account << lua::invoke << lua::end; // invoke lua function + } + // other functions + else + { + lua::transaction(vm) << lua::lookup(func_name) << o_game << lua::invoke << lua::end; // invoke lua function + } + } catch (const std::exception& e) { @@ -246,19 +282,24 @@ namespace pvpgn } } - extern void lua_handle_user(t_connection * c, t_game * game, t_luaevent_type luaevent) + + extern void lua_handle_channel(t_channel * channel, t_connection * c, char const * message_text, t_message_type message_type, t_luaevent_type luaevent) { t_account * account; const char * func_name; switch (luaevent) { - case luaevent_user_joingame: - func_name = "handle_user_joingame"; + case luaevent_channel_message: + func_name = "handle_channel_message"; break; - - case luaevent_user_leftgame: - func_name = "handle_user_leftgame"; + case luaevent_channel_userjoin: + func_name = "handle_channel_userjoin"; + break; + case luaevent_channel_userleft: + func_name = "handle_channel_userleft"; break; + default: + return; } try { @@ -266,9 +307,14 @@ namespace pvpgn return; std::map o_account = get_account_object(account); - std::map o_game = get_game_object(game); + std::map o_channel = get_channel_object(channel); - lua::transaction(vm) << lua::lookup("handle_user_leftgame") << o_account << o_game << lua::invoke << lua::end; + // handle_channel_userleft & handle_channel_message + if (message_text) + lua::transaction(vm) << lua::lookup(func_name) << o_channel << o_account << message_text << message_type << lua::invoke << lua::end; // invoke lua function + // other functions + else + lua::transaction(vm) << lua::lookup(func_name) << o_channel << o_account << lua::invoke << lua::end; // invoke lua function } catch (const std::exception& e) { @@ -280,6 +326,57 @@ namespace pvpgn } } + + extern int lua_handle_user(t_connection * c, t_connection * c_dst, char const * message_text, t_luaevent_type luaevent) + { + t_account * account, *account_dst; + const char * func_name; + int result = 0; + switch (luaevent) + { + case luaevent_user_whisper: + func_name = "handle_user_whisper"; + break; + case luaevent_user_login: + func_name = "handle_user_login"; + break; + case luaevent_user_disconnect: + func_name = "handle_user_disconnect"; + break; + default: + return 0; + } + try + { + if (!(account = conn_get_account(c))) + return 0; + + std::map o_account = get_account_object(account); + + // handle_server_whisper + if (c_dst && message_text) + { + if (!(account_dst = conn_get_account(c_dst))) + return 0; + std::map o_account_dst = get_account_object(account_dst); + + lua::transaction(vm) << lua::lookup(func_name) << o_account << o_account_dst << message_text << lua::invoke >> result << lua::end; // invoke lua function + } + // other functions + else + lua::transaction(vm) << lua::lookup(func_name) << o_account << lua::invoke << lua::end; // invoke lua function + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return result; + } + #endif /* --- Lua Functions (called from scripts) */ @@ -484,7 +581,6 @@ namespace pvpgn break; } } - st.push(result); } catch (const std::exception& e) @@ -495,10 +591,133 @@ namespace pvpgn { eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); } + return 1; + } + + + + /* Get account friend list */ + int __account_get_friends(lua_State* L) + { + const char *username; + std::vector> friends; + try + { + lua::stack st(L); + // get args + st.at(1, username); + + if (t_account * account = accountlist_find_account(username)) + if (account->friends) + { + t_elem const * curr; + t_friend * f; + LIST_TRAVERSE_CONST(account->friends, curr) + { + if (!(f = (t_friend*)elem_get_data(curr))) + { + eventlog(eventlog_level_error, __FUNCTION__, "found NULL entry in list"); + continue; + } + friends.push_back(get_friend_object(f)); + } + } + st.push(friends); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } return 1; } + + /* Get account team list */ + int __account_get_teams(lua_State* L) + { + const char *username; + std::vector> teams; + + try + { + lua::stack st(L); + // get args + st.at(1, username); + + if (t_account * account = accountlist_find_account(username)) + if (account->teams) + { + t_elem const * curr; + t_team * t; + LIST_TRAVERSE_CONST(account->teams, curr) + { + if (!(t = (t_team*)elem_get_data(curr))) + { + eventlog(eventlog_level_error, __FUNCTION__, "found NULL entry in list"); + continue; + } + teams.push_back(get_team_object(t)); + } + } + st.push(teams); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + + /* Get clan member list */ + int __clan_get_members(lua_State* L) + { + int clan_id; + std::vector> members; + + try + { + lua::stack st(L); + // get args + st.at(1, clan_id); + + if (t_clan * clan = clanlist_find_clan_by_clanid(clan_id)) + if (clan->members) + { + t_elem const * curr; + LIST_TRAVERSE_CONST(clan->members, curr) + { + t_clanmember * m; + if (!(m = (t_clanmember*)elem_get_data(curr))) + { + eventlog(eventlog_level_error, __FUNCTION__, "got NULL elem in list"); + continue; + } + members.push_back(get_clanmember_object(m)); + } + } + st.push(members); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + + // TODO: remove it /* Just a test function */ int _sum(lua_State* L) @@ -520,7 +739,7 @@ namespace pvpgn std::map get_account_object(const char * username) { std::map o_account; - + if (t_account * account = accountlist_find_account(username)) return get_account_object(account); else @@ -554,6 +773,12 @@ namespace pvpgn o_account["channel_id"] = std::to_string(channel_get_channelid(channel)); } + if (account->clanmember) + o_account["clan_id"] = account->clanmember->clan->clanid; + + // - friends can be get from lua_account_get_friends + // - teams can be get from lua_account_get_teams + return o_account; } @@ -631,7 +856,149 @@ namespace pvpgn return o_game; } + std::map get_channel_object(t_channel * channel) + { + std::map o_channel; + + if (!channel) + return o_channel; + + o_channel["id"] = std::to_string(channel->id); + o_channel["name"] = channel->name; + if (channel->shortname) + o_channel["shortname"] = channel->shortname; + if (channel->country) + o_channel["country"] = channel->country; + o_channel["flags"] = std::to_string(channel->flags); + o_channel["maxmembers"] = std::to_string(channel->maxmembers); + o_channel["currmembers"] = std::to_string(channel->currmembers); + + o_channel["clienttag"] = clienttag_uint_to_str(channel->clienttag); + if (channel->realmname) + o_channel["realmname"] = channel->realmname; + if (channel->logname) + o_channel["logname"] = channel->logname; + + + // Westwood Online Extensions + o_channel["minmembers"] = std::to_string(channel->minmembers); + o_channel["gameType"] = std::to_string(channel->gameType); + if (channel->gameExtension) + o_channel["gameExtension"] = channel->gameExtension; + + + std::vector members; + if (channel->memberlist) + { + t_channelmember *m = channel->memberlist; + while (m) + { + if (t_account *account = conn_get_account(m->connection)) + members.push_back(account_get_name(account)); + m = m->next; + } + } + o_channel["memberlist"] = join(members.begin(), members.end(), std::string(",")); + + std::vector bans; + if (channel->banlist) + { + t_elem const * curr; + LIST_TRAVERSE_CONST(channel->banlist, curr) + { + char * b; + if (!(b = (char*)elem_get_data(curr))) + { + eventlog(eventlog_level_error, __FUNCTION__, "found NULL name in banlist"); + continue; + } + members.push_back(b); + } + } + o_channel["banlist"] = join(bans.begin(), bans.end(), std::string(",")); + + return o_channel; + } + + + std::map get_clan_object(t_clan * clan) + { + std::map o_clan; + + if (!clan) + return o_clan; + + o_clan["id"] = std::to_string(clan->clanid); + o_clan["tag"] = clantag_to_str(clan->tag); + o_clan["clanname"] = clan->clanname; + o_clan["created"] = std::to_string(clan->created); + o_clan["creation_time"] = std::to_string(clan->creation_time); + o_clan["clan_motd"] = clan->clan_motd; + o_clan["channel_type"] = std::to_string(clan->channel_type); // 0--public 1--private + + // - clanmembers can be get from lua_clan_get_members + return o_clan; + } + + std::map get_clanmember_object(t_clanmember * member) + { + std::map o_member; + + if (!member) + return o_member; + + o_member["username"] = account_get_name(member->memberacc); + o_member["status"] = member->status; + o_member["clan_id"] = std::to_string(member->clan->clanid); + o_member["join_time"] = std::to_string(member->join_time); + o_member["fullmember"] = std::to_string(member->fullmember);// 0 -- clanmember is only invited, 1 -- clanmember is fullmember + + return o_member; + } + + std::map get_team_object(t_team * team) + { + std::map o_team; + + if (!team) + return o_team; + + o_team["id"] = std::to_string(team->teamid); + o_team["size"] = std::to_string(team->size); + + o_team["clienttag"] = clienttag_uint_to_str(team->clienttag); + o_team["lastgame"] = std::to_string(team->lastgame); + o_team["wins"] = std::to_string(team->wins); + o_team["losses"] = std::to_string(team->losses); + o_team["xp"] = std::to_string(team->xp); + o_team["level"] = std::to_string(team->level); + o_team["rank"] = std::to_string(team->rank); + + // usernames + std::vector members; + if (team->members) + { + for (int i = 0; i < MAX_TEAMSIZE; i++) + members.push_back(account_get_name(team->members[i])); + } + o_team["members"] = join(members.begin(), members.end(), std::string(",")); + + return o_team; + } + + std::map get_friend_object(t_friend * f) + { + std::map o_friend; + + if (!f) + return o_friend; + + o_friend["username"] = account_get_name(f->friendacc); + o_friend["mutual"] = std::to_string(f->mutual); // -1 - unloaded(used to remove deleted elems when reload); 0 - not mutual ; 1 - is mutual + + return o_friend; + } /* Join two vector objects to string by delimeter */ diff --git a/src/bnetd/luainterface.h b/src/bnetd/luainterface.h index f71ae0a0e..2dd0240b6 100644 --- a/src/bnetd/luainterface.h +++ b/src/bnetd/luainterface.h @@ -45,22 +45,16 @@ namespace pvpgn luaevent_game_end, luaevent_game_destroy, luaevent_game_changestatus, + luaevent_game_userjoin, + luaevent_game_userleft, - luaevent_channel_create, - luaevent_channel_destroy, + luaevent_channel_message, // user-to-channel + luaevent_channel_userjoin, + luaevent_channel_userleft, - luaevent_user_joingame, - luaevent_user_leftgame, - luaevent_user_joinchannel, - luaevent_user_leftchannel, - luaevent_user_joinclan, - luaevent_user_leftclan, + luaevent_clan_userjoin, + luaevent_clan_userleft, - luaevent_clan_create, - luaevent_clan_changestatus, - luaevent_clan_destroy, - - luaevent_user_message, // user-to-channel luaevent_user_whisper, // user-to-user luaevent_user_login, luaevent_user_disconnect @@ -72,9 +66,11 @@ namespace pvpgn extern void lua_unload(); extern int lua_handle_command(t_connection * c, char const * text); - extern void lua_handle_game(t_game * game, t_luaevent_type luaevent); // game events - extern void lua_handle_user(t_connection * c, t_game * game, t_luaevent_type luaevent); // - // TODO: + extern void lua_handle_game(t_game * game, t_connection * c, t_luaevent_type luaevent); + extern void lua_handle_channel(t_channel * channel, t_connection * c, char const * message_text, t_message_type message_type, t_luaevent_type luaevent); + extern int lua_handle_user(t_connection * c, t_connection * c_dst, char const * message_text, t_luaevent_type luaevent); + + // TODO: //extern void lua_handle_user(t_connection * c, t_connection * c_dst, const char * text, t_luaevent_type luaevent); //extern void lua_handle_user(t_connection * c, t_channel * channel, const char * text, t_luaevent_type luaevent); //extern void lua_handle_user(t_connection * c, t_channel * channel, t_luaevent_type luaevent); diff --git a/src/compat/pdir.cpp b/src/compat/pdir.cpp index 4a5218e30..eccf9353a 100644 --- a/src/compat/pdir.cpp +++ b/src/compat/pdir.cpp @@ -163,6 +163,9 @@ namespace pvpgn class dirent *ent; dir = opendir(directory); + if (!dir) + return files; + while ((ent = readdir(dir)) != NULL) { const std::string file_name = ent->d_name; const std::string full_file_name = std::string(directory) + "/" + file_name; From dd30674d0e1ab2886c92eccae3f064a148161475 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 3 May 2014 19:15:36 +0400 Subject: [PATCH 018/144] New Lua functions: - game_get_by_id - channel_get_by_id - server_get_users - server_get_games - server_get_channels --- src/bnetd/game.cpp | 4 + src/bnetd/game.h | 1 + src/bnetd/luainterface.cpp | 211 ++++++++++++++++++++++++++++++++++--- src/bnetd/luainterface.h | 11 +- 4 files changed, 204 insertions(+), 23 deletions(-) diff --git a/src/bnetd/game.cpp b/src/bnetd/game.cpp index 440e53b0a..371914fd3 100644 --- a/src/bnetd/game.cpp +++ b/src/bnetd/game.cpp @@ -2124,6 +2124,10 @@ namespace pvpgn return 0; } + extern t_elist * gamelist(void) + { + return &gamelist_head; + } extern int gamelist_get_length(void) { diff --git a/src/bnetd/game.h b/src/bnetd/game.h index 908dd2a73..b07f11ebc 100644 --- a/src/bnetd/game.h +++ b/src/bnetd/game.h @@ -319,6 +319,7 @@ namespace pvpgn extern t_game_option game_get_option(t_game const * game); extern int gamelist_create(void); extern int gamelist_destroy(void); + extern t_elist * gamelist(void); extern int gamelist_get_length(void); extern t_game * gamelist_find_game(char const * name, t_clienttag ctag, t_game_type type); extern t_game * gamelist_find_game_available(char const * name, t_clienttag ctag, t_game_type type); diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 0a2fde558..027cb52da 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -94,9 +94,11 @@ namespace pvpgn void _register_functions(); - std::map get_account_object(t_account *account); std::map get_account_object(const char *username); + std::map get_account_object(t_account *account); + std::map get_game_object(unsigned int gameid); std::map get_game_object(t_game * game); + std::map get_channel_object(unsigned int channelid); std::map get_channel_object(t_channel * channel); std::map get_clan_object(t_clan * clan); std::map get_clanmember_object(t_clanmember * member); @@ -110,12 +112,18 @@ namespace pvpgn int _sum(lua_State* L); int __message_send_text(lua_State* L); int __eventlog(lua_State* L); - int __account_get(lua_State* L); + int __account_get_by_name(lua_State* L); int __account_get_attr(lua_State* L); int __account_set_attr(lua_State* L); int __account_get_friends(lua_State* L); int __account_get_teams(lua_State* L); int __clan_get_members(lua_State* L); + int __game_get_by_id(lua_State* L); + int __channel_get_by_id(lua_State* L); + + int __server_get_users(lua_State* L); + int __server_get_games(lua_State* L); + int __server_get_channels(lua_State* L); char _msgtemp[MAX_MESSAGE_LEN]; char _msgtemp2[MAX_MESSAGE_LEN]; @@ -183,12 +191,18 @@ namespace pvpgn vm.reg("sum", _sum); vm.reg("message_send_text", __message_send_text); vm.reg("eventlog", __eventlog); - vm.reg("account_get", __account_get); + vm.reg("account_get_by_name", __account_get_by_name); vm.reg("account_get_attr", __account_get_attr); vm.reg("account_set_attr", __account_set_attr); vm.reg("account_get_friends", __account_get_friends); vm.reg("account_get_teams", __account_get_teams); vm.reg("clan_get_members", __clan_get_members); + vm.reg("game_get_by_id", __game_get_by_id); + vm.reg("channel_get_by_id", __channel_get_by_id); + + vm.reg("server_get_users", __server_get_users); + vm.reg("server_get_games", __server_get_games); + vm.reg("server_get_channels", __server_get_channels); } @@ -451,8 +465,8 @@ namespace pvpgn return 0; } - /* Get account table object */ - int __account_get(lua_State* L) + /* Get one account table object */ + int __account_get_by_name(lua_State* L) { const char *username; std::map o_account; @@ -596,7 +610,7 @@ namespace pvpgn - /* Get account friend list */ + /* Get friend list of account */ int __account_get_friends(lua_State* L) { const char *username; @@ -637,7 +651,7 @@ namespace pvpgn } - /* Get account team list */ + /* Get team list of account */ int __account_get_teams(lua_State* L) { const char *username; @@ -680,16 +694,16 @@ namespace pvpgn /* Get clan member list */ int __clan_get_members(lua_State* L) { - int clan_id; + unsigned int clanid; std::vector> members; try { lua::stack st(L); // get args - st.at(1, clan_id); + st.at(1, clanid); - if (t_clan * clan = clanlist_find_clan_by_clanid(clan_id)) + if (t_clan * clan = clanlist_find_clan_by_clanid(clanid)) if (clan->members) { t_elem const * curr; @@ -717,6 +731,163 @@ namespace pvpgn return 1; } + /* Get one game table object */ + int __game_get_by_id(lua_State* L) + { + unsigned int gameid; + std::map o_game; + try + { + lua::stack st(L); + // get args + st.at(1, gameid); + o_game = get_game_object(gameid); + + st.push(o_game); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + + return 1; + } + + /* Get one channel table object */ + int __channel_get_by_id(lua_State* L) + { + unsigned int channelid; + std::map o_channel; + try + { + lua::stack st(L); + // get args + st.at(1, channelid); + o_channel = get_channel_object(channelid); + + st.push(o_channel); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + + return 1; + } + + + /* Get usernames online. If allusers = true then return all server users */ + int __server_get_users(lua_State* L) + { + bool all = false; + const char *username; + std::map users; + t_connection * conn; + t_account * account; + + try + { + lua::stack st(L); + // get args + st.at(1, all); + + if (all) + { + t_entry * curr; + HASHTABLE_TRAVERSE(accountlist(), curr) + { + if (account = (t_account*)entry_get_data(curr)) + users[account_get_uid(account)] = account_get_name(account); + } + } + else + { + t_elem const * curr; + LIST_TRAVERSE_CONST(connlist(), curr) + { + if (conn = (t_connection*)elem_get_data(curr)) + users[conn_get_userid(conn)] = conn_get_username(conn); + } + } + st.push(users); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + /* Get game list table (id => name) */ + int __server_get_games(lua_State* L) + { + std::map games; + t_game * game; + + try + { + lua::stack st(L); + + t_elist * curr; + elist_for_each(curr, gamelist()) + { + if (game = elist_entry(curr, t_game, glist_link)) + games[game_get_id(game)] = game_get_name(game); + } + st.push(games); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + + /* Get channel list (id => name) */ + int __server_get_channels(lua_State* L) + { + std::map channels; + t_channel * channel; + + try + { + lua::stack st(L); + + t_elem * curr; + LIST_TRAVERSE(channellist(), curr) + { + if (channel = (t_channel*)elem_get_data(curr)) + channels[channel_get_channelid(channel)] = channel_get_name(channel); + } + st.push(channels); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + + // TODO: remove it /* Just a test function */ @@ -741,9 +912,8 @@ namespace pvpgn std::map o_account; if (t_account * account = accountlist_find_account(username)) - return get_account_object(account); - else - return o_account; + o_account = get_account_object(account); + return o_account; } std::map get_account_object(t_account * account) { @@ -782,7 +952,14 @@ namespace pvpgn return o_account; } + std::map get_game_object(unsigned int gameid) + { + std::map o_game; + if (t_game * game = gamelist_find_game_byid(gameid)) + o_game = get_game_object(game); + return o_game; + } std::map get_game_object(t_game * game) { std::map o_game; @@ -856,6 +1033,14 @@ namespace pvpgn return o_game; } + std::map get_channel_object(unsigned int channelid) + { + std::map o_channel; + + if (t_channel * channel = channellist_find_channel_bychannelid(channelid)) + o_channel = get_channel_object(channel); + return o_channel; + } std::map get_channel_object(t_channel * channel) { std::map o_channel; diff --git a/src/bnetd/luainterface.h b/src/bnetd/luainterface.h index 2dd0240b6..003d84df1 100644 --- a/src/bnetd/luainterface.h +++ b/src/bnetd/luainterface.h @@ -47,14 +47,11 @@ namespace pvpgn luaevent_game_changestatus, luaevent_game_userjoin, luaevent_game_userleft, - + luaevent_channel_message, // user-to-channel luaevent_channel_userjoin, luaevent_channel_userleft, - luaevent_clan_userjoin, - luaevent_clan_userleft, - luaevent_user_whisper, // user-to-user luaevent_user_login, luaevent_user_disconnect @@ -70,12 +67,6 @@ namespace pvpgn extern void lua_handle_channel(t_channel * channel, t_connection * c, char const * message_text, t_message_type message_type, t_luaevent_type luaevent); extern int lua_handle_user(t_connection * c, t_connection * c_dst, char const * message_text, t_luaevent_type luaevent); - // TODO: - //extern void lua_handle_user(t_connection * c, t_connection * c_dst, const char * text, t_luaevent_type luaevent); - //extern void lua_handle_user(t_connection * c, t_channel * channel, const char * text, t_luaevent_type luaevent); - //extern void lua_handle_user(t_connection * c, t_channel * channel, t_luaevent_type luaevent); - //extern void lua_handle_user(t_connection * c, t_luaevent_type luaevent); - } } From acb87fa22525df21c416466ae07f3fd12a80f0a1 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 4 May 2014 00:57:05 +0400 Subject: [PATCH 019/144] - add "config" table for Lua scripts with all the options from bnetd.conf - all Lua functions are in "api" lib - extract Lua functions, and objects into different cpp files --- src/bnetd/luafunctions.cpp | 561 +++++++++++++++++++ src/bnetd/luafunctions.h | 52 ++ src/bnetd/luainterface.cpp | 1059 ++++++------------------------------ src/bnetd/luainterface.h | 12 +- src/bnetd/luaobjects.cpp | 363 ++++++++++++ src/bnetd/luaobjects.h | 54 ++ 6 files changed, 1198 insertions(+), 903 deletions(-) create mode 100644 src/bnetd/luafunctions.cpp create mode 100644 src/bnetd/luafunctions.h create mode 100644 src/bnetd/luaobjects.cpp create mode 100644 src/bnetd/luaobjects.h diff --git a/src/bnetd/luafunctions.cpp b/src/bnetd/luafunctions.cpp new file mode 100644 index 000000000..21ec59e06 --- /dev/null +++ b/src/bnetd/luafunctions.cpp @@ -0,0 +1,561 @@ +/* +* Copyright (C) 2014 HarpyWar (harpywar@gmail.com) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +#include "common/setup_before.h" +#define GAME_INTERNAL_ACCESS + +#include +#include +#include +#include + + +#include "compat/strcasecmp.h" +#include "compat/snprintf.h" +#include "common/tag.h" +#include "common/util.h" +#include "common/eventlog.h" +#include "common/list.h" +#include "common/hashtable.h" + +#include "connection.h" +#include "message.h" +#include "channel.h" +#include "game.h" +#include "account.h" +#include "account_wrap.h" +#include "timer.h" +#include "ipban.h" +#include "command_groups.h" +#include "friends.h" +#include "clan.h" +#include "attrlayer.h" + +#include "luawrapper.h" +#include "luaobjects.h" + +#include "common/setup_after.h" + + +namespace pvpgn +{ + + namespace bnetd + { + + typedef enum { + attr_type_str, + attr_type_num, + attr_type_bool, + attr_type_raw + } t_attr_type; + + + /* Send message text to user */ + extern int __message_send_text(lua_State* L) + { + const char *text; + const char *username_src, *username_dst; + int message_type; + t_connection *c_src = NULL, *c_dst = NULL; + + try + { + lua::stack st(L); + // get args + st.at(1, username_dst); + st.at(2, message_type); + st.at(3, username_src); + st.at(4, text); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + + // get user connections + if (t_account * account = accountlist_find_account(username_dst)) + c_dst = account_get_conn(account); + + if (username_src) + if (t_account * account = accountlist_find_account(username_src)) + c_src = account_get_conn(account); + + // send message + // (source can be NULL, but destination cant) + if (c_dst) + message_send_text(c_dst, (t_message_type)message_type, c_src, text); + + return 0; + } + + /* Log text into logfile */ + extern int __eventlog(lua_State* L) + { + int loglevel; + const char *text, *function; + + try + { + lua::stack st(L); + // get args + st.at(1, loglevel); + st.at(2, function); + st.at(3, text); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + eventlog(t_eventlog_level(loglevel), function, text); + + return 0; + } + + /* Get one account table object */ + extern int __account_get_by_name(lua_State* L) + { + const char *username; + std::map o_account; + + try + { + lua::stack st(L); + // get args + st.at(1, username); + o_account = get_account_object(username); + + st.push(o_account); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + + return 1; + } + + /* Get account attribute value */ + extern int __account_get_attr(lua_State* L) + { + const char *username, *attrkey; + int attrtype; + std::string attrvalue; + std::map o_account; + + try + { + lua::stack st(L); + // get args + st.at(1, username); + st.at(2, attrkey); + st.at(3, attrtype); + + if (t_account *account = accountlist_find_account(username)) + { + switch ((t_attr_type)attrtype) + { + case attr_type_str: + attrvalue = account_get_strattr(account, attrkey); + break; + case attr_type_num: + attrvalue = std::to_string(account_get_numattr(account, attrkey)); + break; + case attr_type_bool: + attrvalue = account_get_boolattr(account, attrkey) == 0 ? "false" : "true"; + break; + case attr_type_raw: + attrvalue = account_get_rawattr(account, attrkey); + break; + } + } + + st.push(attrvalue); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + + return 1; + } + + /* Set account attribute value + * (Return 0 if attribute is not set, and 1 if set) + */ + extern int __account_set_attr(lua_State* L) + { + const char *username, *attrkey; + int attrtype; + std::map o_account; + int result = 0; + + try + { + lua::stack st(L); + // get args + st.at(1, username); + st.at(2, attrkey); + st.at(3, attrtype); + + if (t_account *account = accountlist_find_account(username)) + { + switch ((t_attr_type)attrtype) + { + case attr_type_str: + const char * strvalue; + st.at(4, strvalue); + + if (account_set_strattr(account, attrkey, strvalue) >= 0) + result = 1; + break; + case attr_type_num: + int numvalue; + st.at(4, numvalue); + + if (account_set_numattr(account, attrkey, numvalue) >= 0) + result = 1; + break; + case attr_type_bool: + bool boolvalue; + st.at(4, boolvalue); + + if (account_set_boolattr(account, attrkey, boolvalue ? 1 : 0) >= 0) + result = 1; + break; + case attr_type_raw: + const char * rawvalue; + int length; + st.at(4, rawvalue); + st.at(5, length); + + if (account_set_rawattr(account, attrkey, rawvalue, length) >= 0) + result = 1; + break; + } + } + st.push(result); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + + + + /* Get friend list of account */ + extern int __account_get_friends(lua_State* L) + { + const char *username; + std::vector> friends; + + try + { + lua::stack st(L); + // get args + st.at(1, username); + + if (t_account * account = accountlist_find_account(username)) + if (t_list *friendlist = account_get_friends(account)) + { + t_elem const * curr; + t_friend * f; + LIST_TRAVERSE_CONST(friendlist, curr) + { + if (!(f = (t_friend*)elem_get_data(curr))) + { + eventlog(eventlog_level_error, __FUNCTION__, "found NULL entry in list"); + continue; + } + friends.push_back(get_friend_object(f)); + } + } + st.push(friends); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + + + /* Get team list of account */ + extern int __account_get_teams(lua_State* L) + { + const char *username; + std::vector> teams; + + try + { + lua::stack st(L); + // get args + st.at(1, username); + + if (t_account * account = accountlist_find_account(username)) + if (t_list *teamlist = account_get_teams(account)) + { + t_elem const * curr; + t_team * t; + LIST_TRAVERSE_CONST(teamlist, curr) + { + if (!(t = (t_team*)elem_get_data(curr))) + { + eventlog(eventlog_level_error, __FUNCTION__, "found NULL entry in list"); + continue; + } + teams.push_back(get_team_object(t)); + } + } + st.push(teams); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + + /* Get clan member list */ + extern int __clan_get_members(lua_State* L) + { + unsigned int clanid; + std::vector> members; + + try + { + lua::stack st(L); + // get args + st.at(1, clanid); + + if (t_clan * clan = clanlist_find_clan_by_clanid(clanid)) + if (t_list * clanmembers = clan_get_members(clan)) + { + t_elem const * curr; + LIST_TRAVERSE_CONST(clanmembers, curr) + { + t_clanmember * m; + if (!(m = (t_clanmember*)elem_get_data(curr))) + { + eventlog(eventlog_level_error, __FUNCTION__, "got NULL elem in list"); + continue; + } + members.push_back(get_clanmember_object(m)); + } + } + st.push(members); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + + /* Get one game table object */ + extern int __game_get_by_id(lua_State* L) + { + unsigned int gameid; + std::map o_game; + try + { + lua::stack st(L); + // get args + st.at(1, gameid); + o_game = get_game_object(gameid); + + st.push(o_game); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + + return 1; + } + + /* Get one channel table object */ + extern int __channel_get_by_id(lua_State* L) + { + unsigned int channelid; + std::map o_channel; + try + { + lua::stack st(L); + // get args + st.at(1, channelid); + o_channel = get_channel_object(channelid); + + st.push(o_channel); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + + return 1; + } + + + /* Get usernames online. If allusers = true then return all server users */ + extern int __server_get_users(lua_State* L) + { + bool all = false; + const char *username; + std::map users; + t_connection * conn; + t_account * account; + + try + { + lua::stack st(L); + // get args + st.at(1, all); + + if (all) + { + t_entry * curr; + HASHTABLE_TRAVERSE(accountlist(), curr) + { + if (account = (t_account*)entry_get_data(curr)) + users[account_get_uid(account)] = account_get_name(account); + } + } + else + { + t_elem const * curr; + LIST_TRAVERSE_CONST(connlist(), curr) + { + if (conn = (t_connection*)elem_get_data(curr)) + users[conn_get_userid(conn)] = conn_get_username(conn); + } + } + st.push(users); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + /* Get game list table (id => name) */ + extern int __server_get_games(lua_State* L) + { + std::map games; + t_game * game; + + try + { + lua::stack st(L); + + t_elist * curr; + elist_for_each(curr, gamelist()) + { + if (game = elist_entry(curr, t_game, glist_link)) + games[game_get_id(game)] = game_get_name(game); + } + st.push(games); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + + /* Get channel list (id => name) */ + extern int __server_get_channels(lua_State* L) + { + std::map channels; + t_channel * channel; + + try + { + lua::stack st(L); + + t_elem * curr; + LIST_TRAVERSE(channellist(), curr) + { + if (channel = (t_channel*)elem_get_data(curr)) + channels[channel_get_channelid(channel)] = channel_get_name(channel); + } + st.push(channels); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + + + } +} \ No newline at end of file diff --git a/src/bnetd/luafunctions.h b/src/bnetd/luafunctions.h new file mode 100644 index 000000000..e2684927a --- /dev/null +++ b/src/bnetd/luafunctions.h @@ -0,0 +1,52 @@ +/* +* Copyright (C) 2014 HarpyWar (harpywar@gmail.com) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +/*****/ +#ifndef JUST_NEED_TYPES +#ifndef INCLUDED_LUAFUNCTION_PROTOS +#define INCLUDED_LUAFUNCTION_PROTOS + +#define JUST_NEED_TYPES +#include "luawrapper.h" +#undef JUST_NEED_TYPES + +namespace pvpgn +{ + + namespace bnetd + { + + extern int __message_send_text(lua_State* L); + extern int __eventlog(lua_State* L); + extern int __account_get_by_name(lua_State* L); + extern int __account_get_attr(lua_State* L); + extern int __account_set_attr(lua_State* L); + extern int __account_get_friends(lua_State* L); + extern int __account_get_teams(lua_State* L); + extern int __clan_get_members(lua_State* L); + extern int __game_get_by_id(lua_State* L); + extern int __channel_get_by_id(lua_State* L); + + extern int __server_get_users(lua_State* L); + extern int __server_get_games(lua_State* L); + extern int __server_get_channels(lua_State* L); + } + +} + +#endif +#endif diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 027cb52da..4cdc748ac 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -16,13 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "common/setup_before.h" -#define ACCOUNT_INTERNAL_ACCESS -#define GAME_INTERNAL_ACCESS -#define CHANNEL_INTERNAL_ACCESS -#define CLAN_INTERNAL_ACCESS -#define TEAM_INTERNAL_ACCESS -#include "command.h" #include "team.h" #include @@ -31,27 +25,12 @@ #include - #include "compat/strcasecmp.h" #include "compat/snprintf.h" #include "compat/pdir.h" #include "common/tag.h" #include "common/util.h" -#include "common/version.h" #include "common/eventlog.h" -#include "common/bnettime.h" -#include "common/addr.h" -#include "common/packet.h" -#include "common/bnethash.h" -#include "common/list.h" -#include "common/proginfo.h" -#include "common/queue.h" -#include "common/bn_type.h" -#include "common/xalloc.h" -#include "common/xstr.h" -#include "common/trans.h" -#include "common/lstr.h" -#include "common/hashtable.h" #include "connection.h" #include "message.h" @@ -59,27 +38,18 @@ #include "game.h" #include "account.h" #include "account_wrap.h" -#include "server.h" -#include "prefs.h" -#include "ladder.h" #include "timer.h" -#include "helpfile.h" -#include "mail.h" -#include "runprog.h" -#include "alias_command.h" -#include "realm.h" #include "ipban.h" #include "command_groups.h" -#include "news.h" -#include "topic.h" #include "friends.h" #include "clan.h" -#include "common/flags.h" +#include "prefs.h" -#include "attrlayer.h" #include "luawrapper.h" #include "luainterface.h" +#include "luafunctions.h" +#include "luaobjects.h" #include "common/setup_after.h" @@ -92,49 +62,11 @@ namespace pvpgn { lua::vm vm; - void _register_functions(); - - std::map get_account_object(const char *username); - std::map get_account_object(t_account *account); - std::map get_game_object(unsigned int gameid); - std::map get_game_object(t_game * game); - std::map get_channel_object(unsigned int channelid); - std::map get_channel_object(t_channel * channel); - std::map get_clan_object(t_clan * clan); - std::map get_clanmember_object(t_clanmember * member); - std::map get_team_object(t_team * team); - std::map get_friend_object(t_friend * f); - - - template - T join(const A &begin, const A &end, const T &t); - - int _sum(lua_State* L); - int __message_send_text(lua_State* L); - int __eventlog(lua_State* L); - int __account_get_by_name(lua_State* L); - int __account_get_attr(lua_State* L); - int __account_set_attr(lua_State* L); - int __account_get_friends(lua_State* L); - int __account_get_teams(lua_State* L); - int __clan_get_members(lua_State* L); - int __game_get_by_id(lua_State* L); - int __channel_get_by_id(lua_State* L); - - int __server_get_users(lua_State* L); - int __server_get_games(lua_State* L); - int __server_get_channels(lua_State* L); - char _msgtemp[MAX_MESSAGE_LEN]; char _msgtemp2[MAX_MESSAGE_LEN]; - typedef enum { - attr_type_str, - attr_type_num, - attr_type_bool, - attr_type_raw - } t_attr_type; + void _register_functions(); /* Unload all the lua scripts */ @@ -182,31 +114,175 @@ namespace pvpgn /* Register C++ functions to be able use them from lua scripts */ void _register_functions() { + // register package 'api' with functions + static const luaL_Reg api[] = + { + { "message_send_text", __message_send_text }, + { "eventlog", __eventlog }, + { "account_get_by_name", __account_get_by_name }, + { "account_get_attr", __account_get_attr }, + { "account_set_attr", __account_set_attr }, + { "account_get_friends", __account_get_friends }, + { "account_get_teams", __account_get_teams }, + { "clan_get_members", __clan_get_members }, + { "game_get_by_id", __game_get_by_id }, + { "channel_get_by_id", __channel_get_by_id }, + + { "server_get_users", __server_get_users }, + { "server_get_games", __server_get_games }, + { "server_get_channels", __server_get_channels }, + { 0, 0 } + }; + vm.reg("api", api); + + // register standalone functions + //vm.reg("sum", _sum); // (test function) + + + // global variables lua::table g(vm); g.update("PVPGN_SOFTWARE", PVPGN_SOFTWARE); g.update("PVPGN_VERSION", PVPGN_VERSION); - // register CFunction - vm.reg("sum", _sum); - vm.reg("message_send_text", __message_send_text); - vm.reg("eventlog", __eventlog); - vm.reg("account_get_by_name", __account_get_by_name); - vm.reg("account_get_attr", __account_get_attr); - vm.reg("account_set_attr", __account_set_attr); - vm.reg("account_get_friends", __account_get_friends); - vm.reg("account_get_teams", __account_get_teams); - vm.reg("clan_get_members", __clan_get_members); - vm.reg("game_get_by_id", __game_get_by_id); - vm.reg("channel_get_by_id", __channel_get_by_id); - - vm.reg("server_get_users", __server_get_users); - vm.reg("server_get_games", __server_get_games); - vm.reg("server_get_channels", __server_get_channels); + // config variables from bnetd.conf + lua::transaction bind(vm); + bind.lookup("config"); + { + lua::table bnetd = bind.table(); + g.update("filedir", prefs_get_filedir()); + g.update("scriptdir", prefs_get_scriptdir()); + g.update("reportdir", prefs_get_reportdir()); + g.update("chanlogdir", prefs_get_chanlogdir()); + g.update("motdfile", prefs_get_motdfile()); + g.update("motdw3file", prefs_get_motdw3file()); + g.update("issuefile", prefs_get_issuefile()); + g.update("channelfile", prefs_get_channelfile()); + g.update("newsfile", prefs_get_newsfile()); + g.update("adfile", prefs_get_adfile()); + g.update("topicfile", prefs_get_topicfile()); + g.update("ipbanfile", prefs_get_ipbanfile()); + g.update("helpfile", prefs_get_helpfile()); + g.update("mpqfile", prefs_get_mpqfile()); + g.update("logfile", prefs_get_logfile()); + g.update("realmfile", prefs_get_realmfile()); + g.update("maildir", prefs_get_maildir()); + g.update("versioncheck_file", prefs_get_versioncheck_file()); + g.update("mapsfile", prefs_get_mapsfile()); + g.update("xplevelfile", prefs_get_xplevel_file()); + g.update("xpcalcfile", prefs_get_xpcalc_file()); + g.update("ladderdir", prefs_get_ladderdir()); + g.update("command_groups_file", prefs_get_command_groups_file()); + g.update("tournament_file", prefs_get_tournament_file()); + g.update("statusdir", prefs_get_outputdir()); + g.update("aliasfile", prefs_get_aliasfile()); + g.update("anongame_infos_file", prefs_get_anongame_infos_file()); + g.update("DBlayoutfile", prefs_get_DBlayoutfile()); + g.update("supportfile", prefs_get_supportfile()); + g.update("transfile", prefs_get_transfile()); + g.update("customicons_file", prefs_get_customicons_file()); + g.update("loglevels", prefs_get_loglevels()); + g.update("d2cs_version", prefs_get_d2cs_version()); + g.update("allow_d2cs_setname", prefs_allow_d2cs_setname()); + g.update("iconfile", prefs_get_iconfile()); + g.update("war3_iconfile", prefs_get_war3_iconfile()); + g.update("star_iconfile", prefs_get_star_iconfile()); + g.update("tosfile", prefs_get_tosfile()); + g.update("allowed_clients", prefs_get_allowed_clients()); + g.update("skip_versioncheck", prefs_get_skip_versioncheck()); + g.update("allow_bad_version", prefs_get_allow_bad_version()); + g.update("allow_unknown_version", prefs_get_allow_unknown_version()); + g.update("version_exeinfo_match", prefs_get_version_exeinfo_match()); + g.update("version_exeinfo_maxdiff", prefs_get_version_exeinfo_maxdiff()); + g.update("usersync", prefs_get_user_sync_timer()); + g.update("userflush", prefs_get_user_flush_timer()); + g.update("userstep", prefs_get_user_step()); + g.update("latency", prefs_get_latency()); + g.update("nullmsg", prefs_get_nullmsg()); + g.update("shutdown_delay", prefs_get_shutdown_delay()); + g.update("shutdown_decr", prefs_get_shutdown_decr()); + g.update("ipban_check_int", prefs_get_ipban_check_int()); + g.update("new_accounts", prefs_get_allow_new_accounts()); + g.update("max_accounts", prefs_get_max_accounts()); + g.update("kick_old_login", prefs_get_kick_old_login()); + g.update("ask_new_channel", prefs_get_ask_new_channel()); + g.update("report_all_games", prefs_get_report_all_games()); + g.update("report_diablo_games", prefs_get_report_diablo_games()); + g.update("hide_pass_games", prefs_get_hide_pass_games()); + g.update("hide_started_games", prefs_get_hide_started_games()); + g.update("hide_temp_channels", prefs_get_hide_temp_channels()); + g.update("extra_commands", prefs_get_extra_commands()); + g.update("disc_is_loss", prefs_get_discisloss()); + g.update("ladder_games", prefs_get_ladder_games()); + g.update("ladder_prefix", prefs_get_ladder_prefix()); + g.update("enable_conn_all", prefs_get_enable_conn_all()); + g.update("hide_addr", prefs_get_hide_addr()); + g.update("chanlog", prefs_get_chanlog()); + g.update("quota", prefs_get_quota()); + g.update("quota_lines", prefs_get_quota_lines()); + g.update("quota_time", prefs_get_quota_time()); + g.update("quota_wrapline", prefs_get_quota_wrapline()); + g.update("quota_maxline", prefs_get_quota_maxline()); + g.update("quota_dobae", prefs_get_quota_dobae()); + g.update("mail_support", prefs_get_mail_support()); + g.update("mail_quota", prefs_get_mail_quota()); + g.update("log_notice", prefs_get_log_notice()); + g.update("passfail_count", prefs_get_passfail_count()); + g.update("passfail_bantime", prefs_get_passfail_bantime()); + g.update("maxusers_per_channel", prefs_get_maxusers_per_channel()); + g.update("savebyname", prefs_get_savebyname()); + g.update("sync_on_logoff", prefs_get_sync_on_logoff()); + g.update("hashtable_size", prefs_get_hashtable_size()); + g.update("account_allowed_symbols", prefs_get_account_allowed_symbols()); + g.update("account_force_username", prefs_get_account_force_username()); + g.update("max_friends", prefs_get_max_friends()); + g.update("track", prefs_get_track()); + g.update("trackaddrs", prefs_get_trackserv_addrs()); + g.update("location", prefs_get_location()); + g.update("description", prefs_get_description()); + g.update("url", prefs_get_url()); + g.update("contact_name", prefs_get_contact_name()); + g.update("contact_email", prefs_get_contact_email()); + g.update("servername", prefs_get_servername()); + g.update("max_connections", prefs_get_max_connections()); + g.update("max_concurrent_logins", prefs_get_max_concurrent_logins()); + g.update("use_keepalive", prefs_get_use_keepalive()); + g.update("max_conns_per_IP", prefs_get_max_conns_per_IP()); + g.update("servaddrs", prefs_get_bnetdserv_addrs()); + g.update("udptest_port", prefs_get_udptest_port()); + g.update("w3routeaddr", prefs_get_w3route_addr()); + g.update("initkill_timer", prefs_get_initkill_timer()); + g.update("wolv1addrs", prefs_get_wolv1_addrs()); + g.update("wolv2addrs", prefs_get_wolv2_addrs()); + g.update("wgameresaddrs", prefs_get_wgameres_addrs()); + g.update("apiregaddrs", prefs_get_apireg_addrs()); + g.update("woltimezone", prefs_get_wol_timezone()); + g.update("wollongitude", prefs_get_wol_longitude()); + g.update("wollatitude", prefs_get_wol_latitude()); + g.update("wol_autoupdate_serverhost", prefs_get_wol_autoupdate_serverhost()); + g.update("wol_autoupdate_username", prefs_get_wol_autoupdate_username()); + g.update("wol_autoupdate_password", prefs_get_wol_autoupdate_password()); + g.update("ircaddrs", prefs_get_irc_addrs()); + g.update("irc_network_name", prefs_get_irc_network_name()); + g.update("hostname", prefs_get_hostname()); + g.update("irc_latency", prefs_get_irc_latency()); + g.update("telnetaddrs", prefs_get_telnet_addrs()); + g.update("war3_ladder_update_secs", prefs_get_war3_ladder_update_secs()); + g.update("XML_output_ladder", prefs_get_XML_output_ladder()); + g.update("output_update_secs", prefs_get_output_update_secs()); + g.update("XML_status_output", prefs_get_XML_status_output()); + g.update("clan_newer_time", prefs_get_clan_newer_time()); + g.update("clan_max_members", prefs_get_clan_max_members()); + g.update("clan_channel_default_private", prefs_get_clan_channel_default_private()); + g.update("clan_min_invites", prefs_get_clan_min_invites()); + } } + + + /* Lua Events (called from scripts) */ #ifndef _LUA_EVENTS_ @@ -393,813 +469,6 @@ namespace pvpgn #endif - /* --- Lua Functions (called from scripts) */ -#ifndef _LUA_FUNCTIONS_ - - /* Send message text to user */ - int __message_send_text(lua_State* L) - { - const char *text; - const char *username_src, *username_dst; - int message_type; - t_connection *c_src = NULL, *c_dst = NULL; - - try - { - lua::stack st(L); - // get args - st.at(1, username_dst); - st.at(2, message_type); - st.at(3, username_src); - st.at(4, text); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - - // get user connections - if (t_account * account = accountlist_find_account(username_dst)) - c_dst = account_get_conn(account); - - if (username_src) - if (t_account * account = accountlist_find_account(username_src)) - c_src = account_get_conn(account); - - // send message - // (source can be NULL, but destination cant) - if (c_dst) - message_send_text(c_dst, (t_message_type)message_type, c_src, text); - - return 0; - } - - /* Log text into logfile */ - int __eventlog(lua_State* L) - { - int loglevel; - const char *text, *function; - - try - { - lua::stack st(L); - // get args - st.at(1, loglevel); - st.at(2, function); - st.at(3, text); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - eventlog(t_eventlog_level(loglevel), function, text); - - return 0; - } - - /* Get one account table object */ - int __account_get_by_name(lua_State* L) - { - const char *username; - std::map o_account; - - try - { - lua::stack st(L); - // get args - st.at(1, username); - o_account = get_account_object(username); - - st.push(o_account); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - - return 1; - } - - /* Get account attribute value */ - int __account_get_attr(lua_State* L) - { - const char *username, *attrkey; - int attrtype; - std::string attrvalue; - std::map o_account; - - try - { - lua::stack st(L); - // get args - st.at(1, username); - st.at(2, attrkey); - st.at(3, attrtype); - - if (t_account *account = accountlist_find_account(username)) - { - switch ((t_attr_type)attrtype) - { - case attr_type_str: - attrvalue = account_get_strattr(account, attrkey); - break; - case attr_type_num: - attrvalue = std::to_string(account_get_numattr(account, attrkey)); - break; - case attr_type_bool: - attrvalue = account_get_boolattr(account, attrkey) == 0 ? "false" : "true"; - break; - case attr_type_raw: - attrvalue = account_get_rawattr(account, attrkey); - break; - } - } - - st.push(attrvalue); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - - return 1; - } - /* Set account attribute value - * (Return 0 if attribute is not set, and 1 if set) - */ - int __account_set_attr(lua_State* L) - { - const char *username, *attrkey; - int attrtype; - std::map o_account; - int result = 0; - - try - { - lua::stack st(L); - // get args - st.at(1, username); - st.at(2, attrkey); - st.at(3, attrtype); - - if (t_account *account = accountlist_find_account(username)) - { - switch ((t_attr_type)attrtype) - { - case attr_type_str: - const char * strvalue; - st.at(4, strvalue); - - if (account_set_strattr(account, attrkey, strvalue) >= 0) - result = 1; - break; - case attr_type_num: - int numvalue; - st.at(4, numvalue); - - if (account_set_numattr(account, attrkey, numvalue) >= 0) - result = 1; - break; - case attr_type_bool: - bool boolvalue; - st.at(4, boolvalue); - - if (account_set_boolattr(account, attrkey, boolvalue ? 1 : 0) >= 0) - result = 1; - break; - case attr_type_raw: - const char * rawvalue; - int length; - st.at(4, rawvalue); - st.at(5, length); - - if (account_set_rawattr(account, attrkey, rawvalue, length) >= 0) - result = 1; - break; - } - } - st.push(result); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - return 1; - } - - - - /* Get friend list of account */ - int __account_get_friends(lua_State* L) - { - const char *username; - std::vector> friends; - - try - { - lua::stack st(L); - // get args - st.at(1, username); - - if (t_account * account = accountlist_find_account(username)) - if (account->friends) - { - t_elem const * curr; - t_friend * f; - LIST_TRAVERSE_CONST(account->friends, curr) - { - if (!(f = (t_friend*)elem_get_data(curr))) - { - eventlog(eventlog_level_error, __FUNCTION__, "found NULL entry in list"); - continue; - } - friends.push_back(get_friend_object(f)); - } - } - st.push(friends); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - return 1; - } - - - /* Get team list of account */ - int __account_get_teams(lua_State* L) - { - const char *username; - std::vector> teams; - - try - { - lua::stack st(L); - // get args - st.at(1, username); - - if (t_account * account = accountlist_find_account(username)) - if (account->teams) - { - t_elem const * curr; - t_team * t; - LIST_TRAVERSE_CONST(account->teams, curr) - { - if (!(t = (t_team*)elem_get_data(curr))) - { - eventlog(eventlog_level_error, __FUNCTION__, "found NULL entry in list"); - continue; - } - teams.push_back(get_team_object(t)); - } - } - st.push(teams); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - return 1; - } - - /* Get clan member list */ - int __clan_get_members(lua_State* L) - { - unsigned int clanid; - std::vector> members; - - try - { - lua::stack st(L); - // get args - st.at(1, clanid); - - if (t_clan * clan = clanlist_find_clan_by_clanid(clanid)) - if (clan->members) - { - t_elem const * curr; - LIST_TRAVERSE_CONST(clan->members, curr) - { - t_clanmember * m; - if (!(m = (t_clanmember*)elem_get_data(curr))) - { - eventlog(eventlog_level_error, __FUNCTION__, "got NULL elem in list"); - continue; - } - members.push_back(get_clanmember_object(m)); - } - } - st.push(members); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - return 1; - } - - /* Get one game table object */ - int __game_get_by_id(lua_State* L) - { - unsigned int gameid; - std::map o_game; - try - { - lua::stack st(L); - // get args - st.at(1, gameid); - o_game = get_game_object(gameid); - - st.push(o_game); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - - return 1; - } - - /* Get one channel table object */ - int __channel_get_by_id(lua_State* L) - { - unsigned int channelid; - std::map o_channel; - try - { - lua::stack st(L); - // get args - st.at(1, channelid); - o_channel = get_channel_object(channelid); - - st.push(o_channel); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - - return 1; - } - - - /* Get usernames online. If allusers = true then return all server users */ - int __server_get_users(lua_State* L) - { - bool all = false; - const char *username; - std::map users; - t_connection * conn; - t_account * account; - - try - { - lua::stack st(L); - // get args - st.at(1, all); - - if (all) - { - t_entry * curr; - HASHTABLE_TRAVERSE(accountlist(), curr) - { - if (account = (t_account*)entry_get_data(curr)) - users[account_get_uid(account)] = account_get_name(account); - } - } - else - { - t_elem const * curr; - LIST_TRAVERSE_CONST(connlist(), curr) - { - if (conn = (t_connection*)elem_get_data(curr)) - users[conn_get_userid(conn)] = conn_get_username(conn); - } - } - st.push(users); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - return 1; - } - /* Get game list table (id => name) */ - int __server_get_games(lua_State* L) - { - std::map games; - t_game * game; - - try - { - lua::stack st(L); - - t_elist * curr; - elist_for_each(curr, gamelist()) - { - if (game = elist_entry(curr, t_game, glist_link)) - games[game_get_id(game)] = game_get_name(game); - } - st.push(games); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - return 1; - } - - /* Get channel list (id => name) */ - int __server_get_channels(lua_State* L) - { - std::map channels; - t_channel * channel; - - try - { - lua::stack st(L); - - t_elem * curr; - LIST_TRAVERSE(channellist(), curr) - { - if (channel = (t_channel*)elem_get_data(curr)) - channels[channel_get_channelid(channel)] = channel_get_name(channel); - } - st.push(channels); - } - catch (const std::exception& e) - { - eventlog(eventlog_level_error, __FUNCTION__, e.what()); - } - catch (...) - { - eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); - } - return 1; - } - - - - // TODO: remove it - /* Just a test function */ - int _sum(lua_State* L) - { - lua::stack st(L); - - double a = 0, b = 0; - - st.at(1, a); // begin from 1 - st.at(2, b); - - st.push(a + b); - - return 1; // number of return values (st.push) - } - -#endif - - std::map get_account_object(const char * username) - { - std::map o_account; - - if (t_account * account = accountlist_find_account(username)) - o_account = get_account_object(account); - return o_account; - } - std::map get_account_object(t_account * account) - { - std::map o_account; - - if (!account) - return o_account; - - o_account["id"] = std::to_string(account_get_uid(account)); - o_account["name"] = account_get_name(account); - o_account["email"] = account_get_email(account); - o_account["commandgroups"] = std::to_string(account_get_command_groups(account)); - o_account["locked"] = account_get_auth_lock(account) ? "true" : "false"; - o_account["muted"] = account_get_auth_mute(account) ? "true" : "false"; - - // if user online - if (t_connection * c = account_get_conn(account)) - { - o_account["country"] = conn_get_country(c); - o_account["clientver"] = conn_get_clientver(c); - o_account["latency"] = std::to_string(conn_get_latency(c)); - if (t_clienttag clienttag = conn_get_clienttag(c)) - o_account["clienttag"] = clienttag_uint_to_str(clienttag); - if (t_game *game = conn_get_game(c)) - o_account["game_id"] = std::to_string(game_get_id(game)); - if (t_channel *channel = conn_get_channel(c)) - o_account["channel_id"] = std::to_string(channel_get_channelid(channel)); - } - - if (account->clanmember) - o_account["clan_id"] = account->clanmember->clan->clanid; - - // - friends can be get from lua_account_get_friends - // - teams can be get from lua_account_get_teams - - return o_account; - } - - std::map get_game_object(unsigned int gameid) - { - std::map o_game; - - if (t_game * game = gamelist_find_game_byid(gameid)) - o_game = get_game_object(game); - return o_game; - } - std::map get_game_object(t_game * game) - { - std::map o_game; - - if (!game) - return o_game; - - o_game["id"] = std::to_string(game->id); - o_game["name"] = game->name; - o_game["pass"] = game->pass; - o_game["info"] = game->info; - o_game["type"] = std::to_string(game->type); - o_game["flag"] = std::to_string(game->flag); - - o_game["address"] = addr_num_to_ip_str(game->addr); - o_game["port"] = std::to_string(game->port); - o_game["status"] = std::to_string(game->status); - o_game["currentplayers"] = std::to_string(game->ref); - o_game["totalplayers"] = std::to_string(game->count); - o_game["maxplayers"] = std::to_string(game->maxplayers); - o_game["mapname"] = game->mapname; - o_game["option"] = std::to_string(game->option); - o_game["maptype"] = std::to_string(game->maptype); - o_game["tileset"] = std::to_string(game->tileset); - o_game["speed"] = std::to_string(game->speed); - o_game["mapsize_x"] = std::to_string(game->mapsize_x); - o_game["mapsize_y"] = std::to_string(game->mapsize_y); - if (t_connection *c = game->owner) - { - if (t_account *account = conn_get_account(c)) - o_game["owner"] = account_get_name(account); - } - - std::vector players; - for (int i = 0; i < game->ref; i++) - { - if (t_account *account = game->players[i]) - players.push_back(account_get_name(account)); - } - o_game["players"] = join(players.begin(), players.end(), std::string(",")); - - - o_game["bad"] = std::to_string(game->bad); // if 1, then the results will be ignored - - std::vector results; - if (game->results) - { - for (int i = 0; i < game->count; i++) - results.push_back(std::to_string(game->results[i])); - } - o_game["results"] = join(results.begin(), results.end(), std::string(",")); - // UNDONE: add report_heads and report_bodies: they are XML strings - - o_game["create_time"] = std::to_string(game->create_time); - o_game["start_time"] = std::to_string(game->start_time); - o_game["lastaccess_time"] = std::to_string(game->lastaccess_time); - - o_game["difficulty"] = std::to_string(game->difficulty); - o_game["version"] = vernum_to_verstr(game->version); - o_game["startver"] = std::to_string(game->startver); - - if (t_clienttag clienttag = game->clienttag) - o_game["clienttag"] = clienttag_uint_to_str(clienttag); - - - if (game->description) - o_game["description"] = game->description; - if (game->realmname) - o_game["realmname"] = game->realmname; - - return o_game; - } - - std::map get_channel_object(unsigned int channelid) - { - std::map o_channel; - - if (t_channel * channel = channellist_find_channel_bychannelid(channelid)) - o_channel = get_channel_object(channel); - return o_channel; - } - std::map get_channel_object(t_channel * channel) - { - std::map o_channel; - - if (!channel) - return o_channel; - - o_channel["id"] = std::to_string(channel->id); - o_channel["name"] = channel->name; - if (channel->shortname) - o_channel["shortname"] = channel->shortname; - if (channel->country) - o_channel["country"] = channel->country; - o_channel["flags"] = std::to_string(channel->flags); - o_channel["maxmembers"] = std::to_string(channel->maxmembers); - o_channel["currmembers"] = std::to_string(channel->currmembers); - - o_channel["clienttag"] = clienttag_uint_to_str(channel->clienttag); - if (channel->realmname) - o_channel["realmname"] = channel->realmname; - if (channel->logname) - o_channel["logname"] = channel->logname; - - - // Westwood Online Extensions - o_channel["minmembers"] = std::to_string(channel->minmembers); - o_channel["gameType"] = std::to_string(channel->gameType); - if (channel->gameExtension) - o_channel["gameExtension"] = channel->gameExtension; - - - std::vector members; - if (channel->memberlist) - { - t_channelmember *m = channel->memberlist; - while (m) - { - if (t_account *account = conn_get_account(m->connection)) - members.push_back(account_get_name(account)); - m = m->next; - } - } - o_channel["memberlist"] = join(members.begin(), members.end(), std::string(",")); - - std::vector bans; - if (channel->banlist) - { - t_elem const * curr; - LIST_TRAVERSE_CONST(channel->banlist, curr) - { - char * b; - if (!(b = (char*)elem_get_data(curr))) - { - eventlog(eventlog_level_error, __FUNCTION__, "found NULL name in banlist"); - continue; - } - members.push_back(b); - } - } - o_channel["banlist"] = join(bans.begin(), bans.end(), std::string(",")); - - return o_channel; - } - - - std::map get_clan_object(t_clan * clan) - { - std::map o_clan; - - if (!clan) - return o_clan; - - o_clan["id"] = std::to_string(clan->clanid); - o_clan["tag"] = clantag_to_str(clan->tag); - o_clan["clanname"] = clan->clanname; - o_clan["created"] = std::to_string(clan->created); - o_clan["creation_time"] = std::to_string(clan->creation_time); - o_clan["clan_motd"] = clan->clan_motd; - o_clan["channel_type"] = std::to_string(clan->channel_type); // 0--public 1--private - - // - clanmembers can be get from lua_clan_get_members - - return o_clan; - } - - std::map get_clanmember_object(t_clanmember * member) - { - std::map o_member; - - if (!member) - return o_member; - - o_member["username"] = account_get_name(member->memberacc); - o_member["status"] = member->status; - o_member["clan_id"] = std::to_string(member->clan->clanid); - o_member["join_time"] = std::to_string(member->join_time); - o_member["fullmember"] = std::to_string(member->fullmember);// 0 -- clanmember is only invited, 1 -- clanmember is fullmember - - return o_member; - } - - std::map get_team_object(t_team * team) - { - std::map o_team; - - if (!team) - return o_team; - - o_team["id"] = std::to_string(team->teamid); - o_team["size"] = std::to_string(team->size); - - o_team["clienttag"] = clienttag_uint_to_str(team->clienttag); - o_team["lastgame"] = std::to_string(team->lastgame); - o_team["wins"] = std::to_string(team->wins); - o_team["losses"] = std::to_string(team->losses); - o_team["xp"] = std::to_string(team->xp); - o_team["level"] = std::to_string(team->level); - o_team["rank"] = std::to_string(team->rank); - - // usernames - std::vector members; - if (team->members) - { - for (int i = 0; i < MAX_TEAMSIZE; i++) - members.push_back(account_get_name(team->members[i])); - } - o_team["members"] = join(members.begin(), members.end(), std::string(",")); - - return o_team; - } - - std::map get_friend_object(t_friend * f) - { - std::map o_friend; - - if (!f) - return o_friend; - - o_friend["username"] = account_get_name(f->friendacc); - o_friend["mutual"] = std::to_string(f->mutual); // -1 - unloaded(used to remove deleted elems when reload); 0 - not mutual ; 1 - is mutual - - return o_friend; - } - - - /* Join two vector objects to string by delimeter */ - template - T join(const A &begin, const A &end, const T &t) - { - T result; - for (A it = begin; - it != end; - it++) - { - if (!result.empty()) - result.append(t); - result.append(*it); - } - return result; - } } } \ No newline at end of file diff --git a/src/bnetd/luainterface.h b/src/bnetd/luainterface.h index 003d84df1..4e0feaec5 100644 --- a/src/bnetd/luainterface.h +++ b/src/bnetd/luainterface.h @@ -17,21 +17,17 @@ */ /*****/ #ifndef JUST_NEED_TYPES -#ifndef INCLUDED_LUA_PROTOS -#define INCLUDED_LUA_PROTOS - - -// FIXME: include one time on pvpgn load -#include "luawrapper.h" -#include +#ifndef INCLUDED_LUAINTERFACE_PROTOS +#define INCLUDED_LUAINTERFACE_PROTOS #ifdef WIN32 #pragma comment(lib, "lua5.1.lib") #endif - #define JUST_NEED_TYPES #include "connection.h" +#include "luawrapper.h" +#include #undef JUST_NEED_TYPES namespace pvpgn diff --git a/src/bnetd/luaobjects.cpp b/src/bnetd/luaobjects.cpp new file mode 100644 index 000000000..121291dca --- /dev/null +++ b/src/bnetd/luaobjects.cpp @@ -0,0 +1,363 @@ +/* +* Copyright (C) 2014 HarpyWar (harpywar@gmail.com) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +#include "common/setup_before.h" +#define ACCOUNT_INTERNAL_ACCESS +#define GAME_INTERNAL_ACCESS +#define CHANNEL_INTERNAL_ACCESS +#define CLAN_INTERNAL_ACCESS +#define TEAM_INTERNAL_ACCESS + +#include "team.h" + +#include +#include +#include +#include + +#include "compat/strcasecmp.h" +#include "compat/snprintf.h" +#include "common/tag.h" +#include "common/util.h" +#include "common/eventlog.h" +#include "common/list.h" +#include "common/flags.h" +#include "common/proginfo.h" +#include "common/addr.h" + +#include "connection.h" +#include "message.h" +#include "channel.h" +#include "game.h" +#include "account.h" +#include "account_wrap.h" +#include "timer.h" +#include "ipban.h" +#include "command_groups.h" +#include "friends.h" +#include "clan.h" + +#include "luaobjects.h" + +#include "common/setup_after.h" + + +namespace pvpgn +{ + + namespace bnetd + { + template + T join(const A &begin, const A &end, const T &t); + + + extern std::map get_account_object(const char * username) + { + std::map o_account; + + if (t_account * account = accountlist_find_account(username)) + o_account = get_account_object(account); + return o_account; + } + extern std::map get_account_object(t_account * account) + { + std::map o_account; + + if (!account) + return o_account; + + o_account["id"] = std::to_string(account_get_uid(account)); + o_account["name"] = account_get_name(account); + o_account["email"] = account_get_email(account); + o_account["commandgroups"] = std::to_string(account_get_command_groups(account)); + o_account["locked"] = account_get_auth_lock(account) ? "true" : "false"; + o_account["muted"] = account_get_auth_mute(account) ? "true" : "false"; + + // if user online + if (t_connection * c = account_get_conn(account)) + { + o_account["country"] = conn_get_country(c); + o_account["clientver"] = conn_get_clientver(c); + o_account["latency"] = std::to_string(conn_get_latency(c)); + if (t_clienttag clienttag = conn_get_clienttag(c)) + o_account["clienttag"] = clienttag_uint_to_str(clienttag); + if (t_game *game = conn_get_game(c)) + o_account["game_id"] = std::to_string(game_get_id(game)); + if (t_channel *channel = conn_get_channel(c)) + o_account["channel_id"] = std::to_string(channel_get_channelid(channel)); + } + + if (account->clanmember) + o_account["clan_id"] = account->clanmember->clan->clanid; + + // - friends can be get from lua_account_get_friends + // - teams can be get from lua_account_get_teams + + return o_account; + } + + extern std::map get_game_object(unsigned int gameid) + { + std::map o_game; + + if (t_game * game = gamelist_find_game_byid(gameid)) + o_game = get_game_object(game); + return o_game; + } + extern std::map get_game_object(t_game * game) + { + std::map o_game; + + if (!game) + return o_game; + + o_game["id"] = std::to_string(game->id); + o_game["name"] = game->name; + o_game["pass"] = game->pass; + o_game["info"] = game->info; + o_game["type"] = std::to_string(game->type); + o_game["flag"] = std::to_string(game->flag); + + o_game["address"] = addr_num_to_ip_str(game->addr); + o_game["port"] = std::to_string(game->port); + o_game["status"] = std::to_string(game->status); + o_game["currentplayers"] = std::to_string(game->ref); + o_game["totalplayers"] = std::to_string(game->count); + o_game["maxplayers"] = std::to_string(game->maxplayers); + o_game["mapname"] = game->mapname; + o_game["option"] = std::to_string(game->option); + o_game["maptype"] = std::to_string(game->maptype); + o_game["tileset"] = std::to_string(game->tileset); + o_game["speed"] = std::to_string(game->speed); + o_game["mapsize_x"] = std::to_string(game->mapsize_x); + o_game["mapsize_y"] = std::to_string(game->mapsize_y); + if (t_connection *c = game->owner) + { + if (t_account *account = conn_get_account(c)) + o_game["owner"] = account_get_name(account); + } + + std::vector players; + for (int i = 0; i < game->ref; i++) + { + if (t_account *account = game->players[i]) + players.push_back(account_get_name(account)); + } + o_game["players"] = join(players.begin(), players.end(), std::string(",")); + + + o_game["bad"] = std::to_string(game->bad); // if 1, then the results will be ignored + + std::vector results; + if (game->results) + { + for (int i = 0; i < game->count; i++) + results.push_back(std::to_string(game->results[i])); + } + o_game["results"] = join(results.begin(), results.end(), std::string(",")); + // UNDONE: add report_heads and report_bodies: they are XML strings + + o_game["create_time"] = std::to_string(game->create_time); + o_game["start_time"] = std::to_string(game->start_time); + o_game["lastaccess_time"] = std::to_string(game->lastaccess_time); + + o_game["difficulty"] = std::to_string(game->difficulty); + o_game["version"] = vernum_to_verstr(game->version); + o_game["startver"] = std::to_string(game->startver); + + if (t_clienttag clienttag = game->clienttag) + o_game["clienttag"] = clienttag_uint_to_str(clienttag); + + + if (game->description) + o_game["description"] = game->description; + if (game->realmname) + o_game["realmname"] = game->realmname; + + return o_game; + } + + extern std::map get_channel_object(unsigned int channelid) + { + std::map o_channel; + + if (t_channel * channel = channellist_find_channel_bychannelid(channelid)) + o_channel = get_channel_object(channel); + return o_channel; + } + extern std::map get_channel_object(t_channel * channel) + { + std::map o_channel; + + if (!channel) + return o_channel; + + o_channel["id"] = std::to_string(channel->id); + o_channel["name"] = channel->name; + if (channel->shortname) + o_channel["shortname"] = channel->shortname; + if (channel->country) + o_channel["country"] = channel->country; + o_channel["flags"] = std::to_string(channel->flags); + o_channel["maxmembers"] = std::to_string(channel->maxmembers); + o_channel["currmembers"] = std::to_string(channel->currmembers); + + o_channel["clienttag"] = clienttag_uint_to_str(channel->clienttag); + if (channel->realmname) + o_channel["realmname"] = channel->realmname; + if (channel->logname) + o_channel["logname"] = channel->logname; + + + // Westwood Online Extensions + o_channel["minmembers"] = std::to_string(channel->minmembers); + o_channel["gameType"] = std::to_string(channel->gameType); + if (channel->gameExtension) + o_channel["gameExtension"] = channel->gameExtension; + + + std::vector members; + if (channel->memberlist) + { + t_channelmember *m = channel->memberlist; + while (m) + { + if (t_account *account = conn_get_account(m->connection)) + members.push_back(account_get_name(account)); + m = m->next; + } + } + o_channel["memberlist"] = join(members.begin(), members.end(), std::string(",")); + + std::vector bans; + if (channel->banlist) + { + t_elem const * curr; + LIST_TRAVERSE_CONST(channel->banlist, curr) + { + char * b; + if (!(b = (char*)elem_get_data(curr))) + { + eventlog(eventlog_level_error, __FUNCTION__, "found NULL name in banlist"); + continue; + } + members.push_back(b); + } + } + o_channel["banlist"] = join(bans.begin(), bans.end(), std::string(",")); + + return o_channel; + } + + + extern std::map get_clan_object(t_clan * clan) + { + std::map o_clan; + + if (!clan) + return o_clan; + + o_clan["id"] = std::to_string(clan->clanid); + o_clan["tag"] = clantag_to_str(clan->tag); + o_clan["clanname"] = clan->clanname; + o_clan["created"] = std::to_string(clan->created); + o_clan["creation_time"] = std::to_string(clan->creation_time); + o_clan["clan_motd"] = clan->clan_motd; + o_clan["channel_type"] = std::to_string(clan->channel_type); // 0--public 1--private + + // - clanmembers can be get from lua_clan_get_members + + return o_clan; + } + + extern std::map get_clanmember_object(t_clanmember * member) + { + std::map o_member; + + if (!member) + return o_member; + + o_member["username"] = account_get_name(member->memberacc); + o_member["status"] = member->status; + o_member["clan_id"] = std::to_string(member->clan->clanid); + o_member["join_time"] = std::to_string(member->join_time); + o_member["fullmember"] = std::to_string(member->fullmember);// 0 -- clanmember is only invited, 1 -- clanmember is fullmember + + return o_member; + } + + extern std::map get_team_object(t_team * team) + { + std::map o_team; + + if (!team) + return o_team; + + o_team["id"] = std::to_string(team->teamid); + o_team["size"] = std::to_string(team->size); + + o_team["clienttag"] = clienttag_uint_to_str(team->clienttag); + o_team["lastgame"] = std::to_string(team->lastgame); + o_team["wins"] = std::to_string(team->wins); + o_team["losses"] = std::to_string(team->losses); + o_team["xp"] = std::to_string(team->xp); + o_team["level"] = std::to_string(team->level); + o_team["rank"] = std::to_string(team->rank); + + // usernames + std::vector members; + if (team->members) + { + for (int i = 0; i < MAX_TEAMSIZE; i++) + members.push_back(account_get_name(team->members[i])); + } + o_team["members"] = join(members.begin(), members.end(), std::string(",")); + + return o_team; + } + + extern std::map get_friend_object(t_friend * f) + { + std::map o_friend; + + if (!f) + return o_friend; + + o_friend["username"] = account_get_name(f->friendacc); + o_friend["mutual"] = std::to_string(f->mutual); // -1 - unloaded(used to remove deleted elems when reload); 0 - not mutual ; 1 - is mutual + + return o_friend; + } + + + /* Join two vector objects to string by delimeter */ + template + T join(const A &begin, const A &end, const T &t) + { + T result; + for (A it = begin; + it != end; + it++) + { + if (!result.empty()) + result.append(t); + result.append(*it); + } + return result; + } + } +} \ No newline at end of file diff --git a/src/bnetd/luaobjects.h b/src/bnetd/luaobjects.h new file mode 100644 index 000000000..c9460e88e --- /dev/null +++ b/src/bnetd/luaobjects.h @@ -0,0 +1,54 @@ +/* +* Copyright (C) 2014 HarpyWar (harpywar@gmail.com) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +/*****/ +#ifndef JUST_NEED_TYPES +#ifndef INCLUDED_LUAOBJECTS_PROTOS +#define INCLUDED_LUAOBJECTS_PROTOS + + + +#define JUST_NEED_TYPES +#include "connection.h" +#include +#include +#include +#include +#undef JUST_NEED_TYPES + +namespace pvpgn +{ + + namespace bnetd + { + + extern std::map get_account_object(const char *username); + extern std::map get_account_object(t_account *account); + extern std::map get_game_object(unsigned int gameid); + extern std::map get_game_object(t_game * game); + extern std::map get_channel_object(unsigned int channelid); + extern std::map get_channel_object(t_channel * channel); + extern std::map get_clan_object(t_clan * clan); + extern std::map get_clanmember_object(t_clanmember * member); + extern std::map get_team_object(t_team * team); + extern std::map get_friend_object(t_friend * f); + } + +} + +#endif +#endif From 6a43773b433d84c7bacdb66aa67174a0095f47dd Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Mon, 5 May 2014 18:43:11 +0400 Subject: [PATCH 020/144] - Lua new event: handle_server_loop - Fix timers check delay - "online" field for account object --- src/bnetd/luafunctions.cpp | 5 ++++- src/bnetd/luafunctions.h | 4 ++++ src/bnetd/luainterface.cpp | 27 +++++++++++++++++++++++++++ src/bnetd/luainterface.h | 5 ++++- src/bnetd/luaobjects.cpp | 5 +++++ src/bnetd/server.cpp | 14 ++++++++------ 6 files changed, 52 insertions(+), 8 deletions(-) diff --git a/src/bnetd/luafunctions.cpp b/src/bnetd/luafunctions.cpp index 21ec59e06..8eab7a3d0 100644 --- a/src/bnetd/luafunctions.cpp +++ b/src/bnetd/luafunctions.cpp @@ -426,6 +426,10 @@ namespace pvpgn return 1; } + + + + /* Get one channel table object */ extern int __channel_get_by_id(lua_State* L) { @@ -452,7 +456,6 @@ namespace pvpgn return 1; } - /* Get usernames online. If allusers = true then return all server users */ extern int __server_get_users(lua_State* L) { diff --git a/src/bnetd/luafunctions.h b/src/bnetd/luafunctions.h index e2684927a..ca936e818 100644 --- a/src/bnetd/luafunctions.h +++ b/src/bnetd/luafunctions.h @@ -32,13 +32,17 @@ namespace pvpgn extern int __message_send_text(lua_State* L); extern int __eventlog(lua_State* L); + extern int __account_get_by_name(lua_State* L); extern int __account_get_attr(lua_State* L); extern int __account_set_attr(lua_State* L); extern int __account_get_friends(lua_State* L); extern int __account_get_teams(lua_State* L); + extern int __clan_get_members(lua_State* L); + extern int __game_get_by_id(lua_State* L); + extern int __channel_get_by_id(lua_State* L); extern int __server_get_users(lua_State* L); diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 4cdc748ac..103600f17 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -126,6 +126,7 @@ namespace pvpgn { "account_get_teams", __account_get_teams }, { "clan_get_members", __clan_get_members }, { "game_get_by_id", __game_get_by_id }, + { "channel_get_by_id", __channel_get_by_id }, { "server_get_users", __server_get_users }, @@ -145,6 +146,7 @@ namespace pvpgn g.update("PVPGN_SOFTWARE", PVPGN_SOFTWARE); g.update("PVPGN_VERSION", PVPGN_VERSION); + // config variables from bnetd.conf lua::transaction bind(vm); bind.lookup("config"); @@ -467,6 +469,31 @@ namespace pvpgn return result; } + + extern void lua_handle_server(unsigned int time, t_luaevent_type luaevent) + { + const char * func_name; + switch (luaevent) + { + case luaevent_server_mainloop: + func_name = "handle_server_mainloop"; // one time per second + break; + default: + return; + } + try + { + lua::transaction(vm) << lua::lookup(func_name) << time << lua::invoke << lua::end; // invoke lua function + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + } #endif diff --git a/src/bnetd/luainterface.h b/src/bnetd/luainterface.h index 4e0feaec5..5db347568 100644 --- a/src/bnetd/luainterface.h +++ b/src/bnetd/luainterface.h @@ -50,7 +50,9 @@ namespace pvpgn luaevent_user_whisper, // user-to-user luaevent_user_login, - luaevent_user_disconnect + luaevent_user_disconnect, + + luaevent_server_mainloop } t_luaevent_type; @@ -62,6 +64,7 @@ namespace pvpgn extern void lua_handle_game(t_game * game, t_connection * c, t_luaevent_type luaevent); extern void lua_handle_channel(t_channel * channel, t_connection * c, char const * message_text, t_message_type message_type, t_luaevent_type luaevent); extern int lua_handle_user(t_connection * c, t_connection * c_dst, char const * message_text, t_luaevent_type luaevent); + extern void lua_handle_server(unsigned int time, t_luaevent_type luaevent); } diff --git a/src/bnetd/luaobjects.cpp b/src/bnetd/luaobjects.cpp index 121291dca..b59eef1ca 100644 --- a/src/bnetd/luaobjects.cpp +++ b/src/bnetd/luaobjects.cpp @@ -87,9 +87,13 @@ namespace pvpgn o_account["locked"] = account_get_auth_lock(account) ? "true" : "false"; o_account["muted"] = account_get_auth_mute(account) ? "true" : "false"; + o_account["online"] = "false"; + // if user online if (t_connection * c = account_get_conn(account)) { + o_account["online"] = "true"; + o_account["country"] = conn_get_country(c); o_account["clientver"] = conn_get_clientver(c); o_account["latency"] = std::to_string(conn_get_latency(c)); @@ -101,6 +105,7 @@ namespace pvpgn o_account["channel_id"] = std::to_string(channel_get_channelid(channel)); } + if (account->clanmember) o_account["clan_id"] = account->clanmember->clan->clanid; diff --git a/src/bnetd/server.cpp b/src/bnetd/server.cpp index 614f4c457..2d4500c26 100644 --- a/src/bnetd/server.cpp +++ b/src/bnetd/server.cpp @@ -1238,7 +1238,7 @@ namespace pvpgn std::time_t next_savetime, track_time; std::time_t war3_ladder_updatetime; std::time_t output_updatetime; - unsigned int count; + unsigned int prev_time = 0; starttime = std::time(NULL); track_time = starttime - prefs_get_track(); @@ -1246,8 +1246,6 @@ namespace pvpgn war3_ladder_updatetime = starttime - prefs_get_war3_ladder_update_secs(); output_updatetime = starttime - prefs_get_output_update_secs(); - count = 0; - for (;;) { #ifdef WIN32 @@ -1489,11 +1487,14 @@ namespace pvpgn do_restart = 0; } - count += BNETD_POLL_INTERVAL; - if (count >= 1000) /* only check timers once a second */ + /* only check timers once a second */ + if (now > prev_time) { + prev_time = now; timerlist_check_timers(now); - count = 0; +#ifdef WITH_LUA + lua_handle_server(now, luaevent_server_mainloop); +#endif } /* no need to populate the fdwatch structures as they are populated on the fly @@ -1518,6 +1519,7 @@ namespace pvpgn /* reap dead connections */ connlist_reap(); + } } From e17fa8949747d9a0ff27ab829c19da203cdc51f6 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Mon, 5 May 2014 23:21:40 +0400 Subject: [PATCH 021/144] - "main" entry point for Lua scripts, when all the scripts are loaded and user can make initialiation there - load Lua scripts alphabetically and recursively: first directories and then files --- src/bnetd/luainterface.cpp | 260 +++++++++++++++++++------------------ src/bnetd/luainterface.h | 1 + src/compat/pdir.cpp | 11 +- 3 files changed, 142 insertions(+), 130 deletions(-) diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 103600f17..76f1ce868 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -82,6 +82,7 @@ namespace pvpgn try { + // init lua virtual machine vm.initialize(); std::vector files = dir_getfiles(scriptdir, ".lua", true); @@ -108,6 +109,9 @@ namespace pvpgn { eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); } + + // handle start event + lua_handle_server(0, luaevent_server_start); } @@ -146,137 +150,136 @@ namespace pvpgn g.update("PVPGN_SOFTWARE", PVPGN_SOFTWARE); g.update("PVPGN_VERSION", PVPGN_VERSION); - // config variables from bnetd.conf lua::transaction bind(vm); bind.lookup("config"); { - lua::table bnetd = bind.table(); - g.update("filedir", prefs_get_filedir()); - g.update("scriptdir", prefs_get_scriptdir()); - g.update("reportdir", prefs_get_reportdir()); - g.update("chanlogdir", prefs_get_chanlogdir()); - g.update("motdfile", prefs_get_motdfile()); - g.update("motdw3file", prefs_get_motdw3file()); - g.update("issuefile", prefs_get_issuefile()); - g.update("channelfile", prefs_get_channelfile()); - g.update("newsfile", prefs_get_newsfile()); - g.update("adfile", prefs_get_adfile()); - g.update("topicfile", prefs_get_topicfile()); - g.update("ipbanfile", prefs_get_ipbanfile()); - g.update("helpfile", prefs_get_helpfile()); - g.update("mpqfile", prefs_get_mpqfile()); - g.update("logfile", prefs_get_logfile()); - g.update("realmfile", prefs_get_realmfile()); - g.update("maildir", prefs_get_maildir()); - g.update("versioncheck_file", prefs_get_versioncheck_file()); - g.update("mapsfile", prefs_get_mapsfile()); - g.update("xplevelfile", prefs_get_xplevel_file()); - g.update("xpcalcfile", prefs_get_xpcalc_file()); - g.update("ladderdir", prefs_get_ladderdir()); - g.update("command_groups_file", prefs_get_command_groups_file()); - g.update("tournament_file", prefs_get_tournament_file()); - g.update("statusdir", prefs_get_outputdir()); - g.update("aliasfile", prefs_get_aliasfile()); - g.update("anongame_infos_file", prefs_get_anongame_infos_file()); - g.update("DBlayoutfile", prefs_get_DBlayoutfile()); - g.update("supportfile", prefs_get_supportfile()); - g.update("transfile", prefs_get_transfile()); - g.update("customicons_file", prefs_get_customicons_file()); - g.update("loglevels", prefs_get_loglevels()); - g.update("d2cs_version", prefs_get_d2cs_version()); - g.update("allow_d2cs_setname", prefs_allow_d2cs_setname()); - g.update("iconfile", prefs_get_iconfile()); - g.update("war3_iconfile", prefs_get_war3_iconfile()); - g.update("star_iconfile", prefs_get_star_iconfile()); - g.update("tosfile", prefs_get_tosfile()); - g.update("allowed_clients", prefs_get_allowed_clients()); - g.update("skip_versioncheck", prefs_get_skip_versioncheck()); - g.update("allow_bad_version", prefs_get_allow_bad_version()); - g.update("allow_unknown_version", prefs_get_allow_unknown_version()); - g.update("version_exeinfo_match", prefs_get_version_exeinfo_match()); - g.update("version_exeinfo_maxdiff", prefs_get_version_exeinfo_maxdiff()); - g.update("usersync", prefs_get_user_sync_timer()); - g.update("userflush", prefs_get_user_flush_timer()); - g.update("userstep", prefs_get_user_step()); - g.update("latency", prefs_get_latency()); - g.update("nullmsg", prefs_get_nullmsg()); - g.update("shutdown_delay", prefs_get_shutdown_delay()); - g.update("shutdown_decr", prefs_get_shutdown_decr()); - g.update("ipban_check_int", prefs_get_ipban_check_int()); - g.update("new_accounts", prefs_get_allow_new_accounts()); - g.update("max_accounts", prefs_get_max_accounts()); - g.update("kick_old_login", prefs_get_kick_old_login()); - g.update("ask_new_channel", prefs_get_ask_new_channel()); - g.update("report_all_games", prefs_get_report_all_games()); - g.update("report_diablo_games", prefs_get_report_diablo_games()); - g.update("hide_pass_games", prefs_get_hide_pass_games()); - g.update("hide_started_games", prefs_get_hide_started_games()); - g.update("hide_temp_channels", prefs_get_hide_temp_channels()); - g.update("extra_commands", prefs_get_extra_commands()); - g.update("disc_is_loss", prefs_get_discisloss()); - g.update("ladder_games", prefs_get_ladder_games()); - g.update("ladder_prefix", prefs_get_ladder_prefix()); - g.update("enable_conn_all", prefs_get_enable_conn_all()); - g.update("hide_addr", prefs_get_hide_addr()); - g.update("chanlog", prefs_get_chanlog()); - g.update("quota", prefs_get_quota()); - g.update("quota_lines", prefs_get_quota_lines()); - g.update("quota_time", prefs_get_quota_time()); - g.update("quota_wrapline", prefs_get_quota_wrapline()); - g.update("quota_maxline", prefs_get_quota_maxline()); - g.update("quota_dobae", prefs_get_quota_dobae()); - g.update("mail_support", prefs_get_mail_support()); - g.update("mail_quota", prefs_get_mail_quota()); - g.update("log_notice", prefs_get_log_notice()); - g.update("passfail_count", prefs_get_passfail_count()); - g.update("passfail_bantime", prefs_get_passfail_bantime()); - g.update("maxusers_per_channel", prefs_get_maxusers_per_channel()); - g.update("savebyname", prefs_get_savebyname()); - g.update("sync_on_logoff", prefs_get_sync_on_logoff()); - g.update("hashtable_size", prefs_get_hashtable_size()); - g.update("account_allowed_symbols", prefs_get_account_allowed_symbols()); - g.update("account_force_username", prefs_get_account_force_username()); - g.update("max_friends", prefs_get_max_friends()); - g.update("track", prefs_get_track()); - g.update("trackaddrs", prefs_get_trackserv_addrs()); - g.update("location", prefs_get_location()); - g.update("description", prefs_get_description()); - g.update("url", prefs_get_url()); - g.update("contact_name", prefs_get_contact_name()); - g.update("contact_email", prefs_get_contact_email()); - g.update("servername", prefs_get_servername()); - g.update("max_connections", prefs_get_max_connections()); - g.update("max_concurrent_logins", prefs_get_max_concurrent_logins()); - g.update("use_keepalive", prefs_get_use_keepalive()); - g.update("max_conns_per_IP", prefs_get_max_conns_per_IP()); - g.update("servaddrs", prefs_get_bnetdserv_addrs()); - g.update("udptest_port", prefs_get_udptest_port()); - g.update("w3routeaddr", prefs_get_w3route_addr()); - g.update("initkill_timer", prefs_get_initkill_timer()); - g.update("wolv1addrs", prefs_get_wolv1_addrs()); - g.update("wolv2addrs", prefs_get_wolv2_addrs()); - g.update("wgameresaddrs", prefs_get_wgameres_addrs()); - g.update("apiregaddrs", prefs_get_apireg_addrs()); - g.update("woltimezone", prefs_get_wol_timezone()); - g.update("wollongitude", prefs_get_wol_longitude()); - g.update("wollatitude", prefs_get_wol_latitude()); - g.update("wol_autoupdate_serverhost", prefs_get_wol_autoupdate_serverhost()); - g.update("wol_autoupdate_username", prefs_get_wol_autoupdate_username()); - g.update("wol_autoupdate_password", prefs_get_wol_autoupdate_password()); - g.update("ircaddrs", prefs_get_irc_addrs()); - g.update("irc_network_name", prefs_get_irc_network_name()); - g.update("hostname", prefs_get_hostname()); - g.update("irc_latency", prefs_get_irc_latency()); - g.update("telnetaddrs", prefs_get_telnet_addrs()); - g.update("war3_ladder_update_secs", prefs_get_war3_ladder_update_secs()); - g.update("XML_output_ladder", prefs_get_XML_output_ladder()); - g.update("output_update_secs", prefs_get_output_update_secs()); - g.update("XML_status_output", prefs_get_XML_status_output()); - g.update("clan_newer_time", prefs_get_clan_newer_time()); - g.update("clan_max_members", prefs_get_clan_max_members()); - g.update("clan_channel_default_private", prefs_get_clan_channel_default_private()); - g.update("clan_min_invites", prefs_get_clan_min_invites()); + lua::table config = bind.table(); + config.update("filedir", prefs_get_filedir()); + config.update("scriptdir", prefs_get_scriptdir()); + config.update("reportdir", prefs_get_reportdir()); + config.update("chanlogdir", prefs_get_chanlogdir()); + config.update("motdfile", prefs_get_motdfile()); + config.update("motdw3file", prefs_get_motdw3file()); + config.update("issuefile", prefs_get_issuefile()); + config.update("channelfile", prefs_get_channelfile()); + config.update("newsfile", prefs_get_newsfile()); + config.update("adfile", prefs_get_adfile()); + config.update("topicfile", prefs_get_topicfile()); + config.update("ipbanfile", prefs_get_ipbanfile()); + config.update("helpfile", prefs_get_helpfile()); + config.update("mpqfile", prefs_get_mpqfile()); + config.update("logfile", prefs_get_logfile()); + config.update("realmfile", prefs_get_realmfile()); + config.update("maildir", prefs_get_maildir()); + config.update("versioncheck_file", prefs_get_versioncheck_file()); + config.update("mapsfile", prefs_get_mapsfile()); + config.update("xplevelfile", prefs_get_xplevel_file()); + config.update("xpcalcfile", prefs_get_xpcalc_file()); + config.update("ladderdir", prefs_get_ladderdir()); + config.update("command_groups_file", prefs_get_command_groups_file()); + config.update("tournament_file", prefs_get_tournament_file()); + config.update("statusdir", prefs_get_outputdir()); + config.update("aliasfile", prefs_get_aliasfile()); + config.update("anongame_infos_file", prefs_get_anongame_infos_file()); + config.update("DBlayoutfile", prefs_get_DBlayoutfile()); + config.update("supportfile", prefs_get_supportfile()); + config.update("transfile", prefs_get_transfile()); + config.update("customicons_file", prefs_get_customicons_file()); + config.update("loglevels", prefs_get_loglevels()); + config.update("d2cs_version", prefs_get_d2cs_version()); + config.update("allow_d2cs_setname", prefs_allow_d2cs_setname()); + config.update("iconfile", prefs_get_iconfile()); + config.update("war3_iconfile", prefs_get_war3_iconfile()); + config.update("star_iconfile", prefs_get_star_iconfile()); + config.update("tosfile", prefs_get_tosfile()); + config.update("allowed_clients", prefs_get_allowed_clients()); + config.update("skip_versioncheck", prefs_get_skip_versioncheck()); + config.update("allow_bad_version", prefs_get_allow_bad_version()); + config.update("allow_unknown_version", prefs_get_allow_unknown_version()); + config.update("version_exeinfo_match", prefs_get_version_exeinfo_match()); + config.update("version_exeinfo_maxdiff", prefs_get_version_exeinfo_maxdiff()); + config.update("usersync", prefs_get_user_sync_timer()); + config.update("userflush", prefs_get_user_flush_timer()); + config.update("userstep", prefs_get_user_step()); + config.update("latency", prefs_get_latency()); + config.update("nullmsg", prefs_get_nullmsg()); + config.update("shutdown_delay", prefs_get_shutdown_delay()); + config.update("shutdown_decr", prefs_get_shutdown_decr()); + config.update("ipban_check_int", prefs_get_ipban_check_int()); + config.update("new_accounts", prefs_get_allow_new_accounts()); + config.update("max_accounts", prefs_get_max_accounts()); + config.update("kick_old_login", prefs_get_kick_old_login()); + config.update("ask_new_channel", prefs_get_ask_new_channel()); + config.update("report_all_games", prefs_get_report_all_games()); + config.update("report_diablo_games", prefs_get_report_diablo_games()); + config.update("hide_pass_games", prefs_get_hide_pass_games()); + config.update("hide_started_games", prefs_get_hide_started_games()); + config.update("hide_temp_channels", prefs_get_hide_temp_channels()); + config.update("extra_commands", prefs_get_extra_commands()); + config.update("disc_is_loss", prefs_get_discisloss()); + config.update("ladder_games", prefs_get_ladder_games()); + config.update("ladder_prefix", prefs_get_ladder_prefix()); + config.update("enable_conn_all", prefs_get_enable_conn_all()); + config.update("hide_addr", prefs_get_hide_addr()); + config.update("chanlog", prefs_get_chanlog()); + config.update("quota", prefs_get_quota()); + config.update("quota_lines", prefs_get_quota_lines()); + config.update("quota_time", prefs_get_quota_time()); + config.update("quota_wrapline", prefs_get_quota_wrapline()); + config.update("quota_maxline", prefs_get_quota_maxline()); + config.update("quota_dobae", prefs_get_quota_dobae()); + config.update("mail_support", prefs_get_mail_support()); + config.update("mail_quota", prefs_get_mail_quota()); + config.update("log_notice", prefs_get_log_notice()); + config.update("passfail_count", prefs_get_passfail_count()); + config.update("passfail_bantime", prefs_get_passfail_bantime()); + config.update("maxusers_per_channel", prefs_get_maxusers_per_channel()); + config.update("savebyname", prefs_get_savebyname()); + config.update("sync_on_logoff", prefs_get_sync_on_logoff()); + config.update("hashtable_size", prefs_get_hashtable_size()); + config.update("account_allowed_symbols", prefs_get_account_allowed_symbols()); + config.update("account_force_username", prefs_get_account_force_username()); + config.update("max_friends", prefs_get_max_friends()); + config.update("track", prefs_get_track()); + config.update("trackaddrs", prefs_get_trackserv_addrs()); + config.update("location", prefs_get_location()); + config.update("description", prefs_get_description()); + config.update("url", prefs_get_url()); + config.update("contact_name", prefs_get_contact_name()); + config.update("contact_email", prefs_get_contact_email()); + config.update("servername", prefs_get_servername()); + config.update("max_connections", prefs_get_max_connections()); + config.update("max_concurrent_logins", prefs_get_max_concurrent_logins()); + config.update("use_keepalive", prefs_get_use_keepalive()); + config.update("max_conns_per_IP", prefs_get_max_conns_per_IP()); + config.update("servaddrs", prefs_get_bnetdserv_addrs()); + config.update("udptest_port", prefs_get_udptest_port()); + config.update("w3routeaddr", prefs_get_w3route_addr()); + config.update("initkill_timer", prefs_get_initkill_timer()); + config.update("wolv1addrs", prefs_get_wolv1_addrs()); + config.update("wolv2addrs", prefs_get_wolv2_addrs()); + config.update("wgameresaddrs", prefs_get_wgameres_addrs()); + config.update("apiregaddrs", prefs_get_apireg_addrs()); + config.update("woltimezone", prefs_get_wol_timezone()); + config.update("wollongitude", prefs_get_wol_longitude()); + config.update("wollatitude", prefs_get_wol_latitude()); + config.update("wol_autoupdate_serverhost", prefs_get_wol_autoupdate_serverhost()); + config.update("wol_autoupdate_username", prefs_get_wol_autoupdate_username()); + config.update("wol_autoupdate_password", prefs_get_wol_autoupdate_password()); + config.update("ircaddrs", prefs_get_irc_addrs()); + config.update("irc_network_name", prefs_get_irc_network_name()); + config.update("hostname", prefs_get_hostname()); + config.update("irc_latency", prefs_get_irc_latency()); + config.update("telnetaddrs", prefs_get_telnet_addrs()); + config.update("war3_ladder_update_secs", prefs_get_war3_ladder_update_secs()); + config.update("XML_output_ladder", prefs_get_XML_output_ladder()); + config.update("output_update_secs", prefs_get_output_update_secs()); + config.update("XML_status_output", prefs_get_XML_status_output()); + config.update("clan_newer_time", prefs_get_clan_newer_time()); + config.update("clan_max_members", prefs_get_clan_max_members()); + config.update("clan_channel_default_private", prefs_get_clan_channel_default_private()); + config.update("clan_min_invites", prefs_get_clan_min_invites()); } } @@ -475,6 +478,9 @@ namespace pvpgn const char * func_name; switch (luaevent) { + case luaevent_server_start: + func_name = "main"; + break; case luaevent_server_mainloop: func_name = "handle_server_mainloop"; // one time per second break; diff --git a/src/bnetd/luainterface.h b/src/bnetd/luainterface.h index 5db347568..d9348c3df 100644 --- a/src/bnetd/luainterface.h +++ b/src/bnetd/luainterface.h @@ -52,6 +52,7 @@ namespace pvpgn luaevent_user_login, luaevent_user_disconnect, + luaevent_server_start, luaevent_server_mainloop } t_luaevent_type; diff --git a/src/compat/pdir.cpp b/src/compat/pdir.cpp index eccf9353a..04b7e082b 100644 --- a/src/compat/pdir.cpp +++ b/src/compat/pdir.cpp @@ -156,7 +156,7 @@ namespace pvpgn /* Returns a list of files in a directory (except the ones that begin with a dot) */ extern std::vector dir_getfiles(const char * directory, const char* ext, bool recursive) { - std::vector files; + std::vector files, dfiles; const char* _ext; DIR *dir; @@ -166,7 +166,8 @@ namespace pvpgn if (!dir) return files; - while ((ent = readdir(dir)) != NULL) { + while ((ent = readdir(dir)) != NULL) + { const std::string file_name = ent->d_name; const std::string full_file_name = std::string(directory) + "/" + file_name; @@ -181,7 +182,7 @@ namespace pvpgn std::vector subfiles = dir_getfiles(full_file_name.c_str(), ext, recursive); for (int i = 0; i < subfiles.size(); ++i) - files.push_back(subfiles[i]); + dfiles.push_back(subfiles[i]); } continue; } @@ -196,6 +197,10 @@ namespace pvpgn } closedir(dir); + // merge files and files from directories, so we will receive directories at begin, files at the end + // (otherwise files and directories are read alphabetically - as is) + files.insert(files.begin(), dfiles.begin(), dfiles.end()); + return files; } From 6883be9a1163f1af244b8428c90720628554e031 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 6 May 2014 23:17:03 +0400 Subject: [PATCH 022/144] Remove reduntant extra_commands --- conf/bnetd.conf.in | 3 --- conf/bnetd.conf.win32 | 3 --- src/bnetd/command.cpp | 32 +------------------------------- src/bnetd/luainterface.cpp | 1 - src/bnetd/prefs.cpp | 27 --------------------------- src/bnetd/prefs.h | 1 - 6 files changed, 1 insertion(+), 66 deletions(-) diff --git a/conf/bnetd.conf.in b/conf/bnetd.conf.in index 4c8885e4b..6bda2b71e 100644 --- a/conf/bnetd.conf.in +++ b/conf/bnetd.conf.in @@ -319,9 +319,6 @@ hide_started_games = true # Should non-permanent channels hidden on the channel list? hide_temp_channels = true -# Should the extended /-commands be avaliable? (of course!) -extra_commands = true - # Should any and all disconnects to be counted as losses? # (Turning this on will override the user's choice in ladder games!) disc_is_loss = false diff --git a/conf/bnetd.conf.win32 b/conf/bnetd.conf.win32 index c8201b28d..3623b80d6 100644 --- a/conf/bnetd.conf.win32 +++ b/conf/bnetd.conf.win32 @@ -296,9 +296,6 @@ hide_started_games = true # Should non-permanent channels hidden on the channel list? hide_temp_channels = true -# Should the extended /-commands be avaliable? (of course!) -extra_commands = true - # Should any and all disconnects to be counted as losses? # (Turning this on will override the user's choice in ladder games!) disc_is_loss = false diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 28acdb004..89f473fbd 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -419,12 +419,7 @@ namespace pvpgn { "/ban", _handle_ban_command }, { "/unban", _handle_unban_command }, { "/tos", _handle_tos_command }, - { NULL, NULL } - - }; - static const t_command_table_row extended_command_table[] = - { { "/ann", _handle_announce_command }, { "/r", _handle_reply_command }, { "/reply", _handle_reply_command }, @@ -519,33 +514,8 @@ namespace pvpgn if (lua_handle_command(c, text) > 0) return 0; #endif - for (p = standard_command_table; p->command_string != NULL; p++) - { - if (strstart(text, p->command_string) == 0) - { - if (!(command_get_group(p->command_string))) - { - message_send_text(c, message_type_error, c, "This command has been deactivated"); - return 0; - } - if (!((command_get_group(p->command_string) & account_get_command_groups(conn_get_account(c))))) - { - message_send_text(c, message_type_error, c, "This command is reserved for admins."); - return 0; - } - if (p->command_handler != NULL) return ((p->command_handler)(c, text)); - } - } - - if (prefs_get_extra_commands() == 0) - { - message_send_text(c, message_type_error, c, "Unknown command."); - eventlog(eventlog_level_debug, __FUNCTION__, "got unknown standard command \"%s\"", text); - return 0; - } - - for (p = extended_command_table; p->command_string != NULL; p++) + for (p = standard_command_table; p->command_string != NULL; p++) { if (strstart(text, p->command_string) == 0) { diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 76f1ce868..8fa9fe790 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -216,7 +216,6 @@ namespace pvpgn config.update("hide_pass_games", prefs_get_hide_pass_games()); config.update("hide_started_games", prefs_get_hide_started_games()); config.update("hide_temp_channels", prefs_get_hide_temp_channels()); - config.update("extra_commands", prefs_get_extra_commands()); config.update("disc_is_loss", prefs_get_discisloss()); config.update("ladder_games", prefs_get_ladder_games()); config.update("ladder_prefix", prefs_get_ladder_prefix()); diff --git a/src/bnetd/prefs.cpp b/src/bnetd/prefs.cpp index 07d2cf2eb..2ed518931 100644 --- a/src/bnetd/prefs.cpp +++ b/src/bnetd/prefs.cpp @@ -77,7 +77,6 @@ namespace pvpgn unsigned int hide_temp_channels; unsigned int hide_addr; unsigned int enable_conn_all; - unsigned int extra_commands; char const * reportdir; unsigned int report_all_games; unsigned int report_diablo_games; @@ -330,10 +329,6 @@ namespace pvpgn static const char *conf_get_enable_conn_all(void); static int conf_setdef_enable_conn_all(void); - static int conf_set_extra_commands(const char *valstr); - static const char *conf_get_extra_commands(void); - static int conf_setdef_extra_commands(void); - static int conf_set_reportdir(const char *valstr); static const char *conf_get_reportdir(void); static int conf_setdef_reportdir(void); @@ -762,7 +757,6 @@ namespace pvpgn { "hide_temp_channels", conf_set_hide_temp_channels, conf_get_hide_temp_channels, conf_setdef_hide_temp_channels }, { "hide_addr", conf_set_hide_addr, conf_get_hide_addr, conf_setdef_hide_addr }, { "enable_conn_all", conf_set_enable_conn_all, conf_get_enable_conn_all, conf_setdef_enable_conn_all }, - { "extra_commands", conf_set_extra_commands, conf_get_extra_commands, conf_setdef_extra_commands }, { "reportdir", conf_set_reportdir, conf_get_reportdir, conf_setdef_reportdir }, { "report_all_games", conf_set_report_all_games, conf_get_report_all_games, conf_setdef_report_all_games }, { "report_diablo_games", conf_set_report_diablo_games, conf_get_report_diablo_games, conf_setdef_report_diablo_games }, @@ -1639,27 +1633,6 @@ namespace pvpgn } - extern unsigned int prefs_get_extra_commands(void) - { - return prefs_runtime_config.extra_commands; - } - - static int conf_set_extra_commands(const char *valstr) - { - return conf_set_bool(&prefs_runtime_config.extra_commands, valstr, 0); - } - - static int conf_setdef_extra_commands(void) - { - return conf_set_bool(&prefs_runtime_config.extra_commands, NULL, 0); - } - - static const char* conf_get_extra_commands(void) - { - return conf_get_bool(prefs_runtime_config.extra_commands); - } - - extern char const * prefs_get_reportdir(void) { return prefs_runtime_config.reportdir; diff --git a/src/bnetd/prefs.h b/src/bnetd/prefs.h index 8afd08457..a6efa5419 100644 --- a/src/bnetd/prefs.h +++ b/src/bnetd/prefs.h @@ -70,7 +70,6 @@ namespace pvpgn extern unsigned int prefs_get_hide_temp_channels(void); extern unsigned int prefs_get_hide_addr(void); extern unsigned int prefs_get_enable_conn_all(void); - extern unsigned int prefs_get_extra_commands(void); extern unsigned int prefs_get_udptest_port(void); extern char const * prefs_get_reportdir(void); extern unsigned int prefs_get_report_all_games(void); From 688b9f09b850a4293dd235b567ba0b5be72770bc Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Thu, 3 Apr 2014 10:55:17 +0400 Subject: [PATCH 023/144] * Add feature to use normal d2s character in newbie.save as a template for a new Diablo 2 characters. Different template for each character class. --- conf/d2cs.conf.in | 10 +++- conf/d2cs.conf.win32 | 10 +++- src/d2cs/d2charfile.cpp | 82 +++++++++++++++++++++++++-- src/d2cs/d2charfile.h | 13 +++-- src/d2cs/prefs.cpp | 123 ++++++++++++++++++++++++++++++++++++---- src/d2cs/prefs.h | 8 ++- 6 files changed, 224 insertions(+), 22 deletions(-) diff --git a/conf/d2cs.conf.in b/conf/d2cs.conf.in index 8a0a1bce8..f1ef0001c 100644 --- a/conf/d2cs.conf.in +++ b/conf/d2cs.conf.in @@ -108,11 +108,19 @@ charinfodir = "${LOCALSTATEDIR}/charinfo" bak_charsavedir = "${LOCALSTATEDIR}/bak/charsave" bak_charinfodir = "${LOCALSTATEDIR}/bak/charinfo" ladderdir = "${LOCALSTATEDIR}/ladders" -newbiefile = "${LOCALSTATEDIR}/files/newbie.save" transfile = "${SYSCONFDIR}/address_translation.conf" d2gsconffile = "${SYSCONFDIR}/d2server.ini" #pidfile = "${LOCALSTATEDIR}/d2cs.pid" +# d2s template for a new created characters +newbiefile_amazon = "${LOCALSTATEDIR}/files/newbie.save" +newbiefile_sorceress = "${LOCALSTATEDIR}/files/newbie.save" +newbiefile_necromancer = "${LOCALSTATEDIR}/files/newbie.save" +newbiefile_paladin = "${LOCALSTATEDIR}/files/newbie.save" +newbiefile_barbarian = "${LOCALSTATEDIR}/files/newbie.save" +newbiefile_druid = "${LOCALSTATEDIR}/files/newbie.save" +newbiefile_assasin = "${LOCALSTATEDIR}/files/newbie.save" + # # ################################################################################# diff --git a/conf/d2cs.conf.win32 b/conf/d2cs.conf.win32 index 3801ddd16..8ffeb6b33 100644 --- a/conf/d2cs.conf.win32 +++ b/conf/d2cs.conf.win32 @@ -108,10 +108,18 @@ charinfodir = var\charinfo bak_charsavedir = var\bak\charsave bak_charinfodir = var\bak\charinfo ladderdir = var\ladders -newbiefile = files\newbie.save transfile = conf\address_translation.conf d2gsconffile = conf\d2server.ini #pidfile = var\d2cs.pid + +# d2s template for a new created characters +newbiefile_amazon = files\newbie.save +newbiefile_sorceress = files\newbie.save +newbiefile_necromancer = files\newbie.save +newbiefile_paladin = files\newbie.save +newbiefile_barbarian = files\newbie.save +newbiefile_druid = files\newbie.save +newbiefile_assasin = files\newbie.save # # ################################################################################# diff --git a/src/d2cs/d2charfile.cpp b/src/d2cs/d2charfile.cpp index f4f4a9fc3..51bb0d853 100644 --- a/src/d2cs/d2charfile.cpp +++ b/src/d2cs/d2charfile.cpp @@ -39,8 +39,19 @@ namespace pvpgn namespace d2cs { + typedef enum + { + character_class_amazon, + character_class_sorceress, + character_class_necromancer, + character_class_paladin, + character_class_barbarian, + character_class_druid, + character_class_assassin + } t_character_class; static int d2charsave_init(void * buffer, char const * charname, unsigned char chclass, unsigned short status); + static int d2charsave_init_from_d2s(unsigned char * buffer, char const * charname, unsigned char chclass, unsigned short status, unsigned int size); static int d2charinfo_init(t_d2charinfo_file * chardata, char const * account, char const * charname, unsigned char chclass, unsigned short status); @@ -54,6 +65,32 @@ namespace pvpgn return 0; } + /* create new character from newbie.save that is normal d2s character file */ + static int d2charsave_init_from_d2s(unsigned char * buffer, char const * charname, unsigned char chclass, unsigned short status, unsigned int size) + { + unsigned int checksum; + + ASSERT(buffer, -1); + ASSERT(charname, -1); + + // class + bn_byte_set((bn_byte *)((char *)buffer + D2CHARSAVE_CLASS_OFFSET_109), chclass); + + // status (ladder, hardcore, expansion, etc) + bn_short_set((bn_short *)((char *)buffer + D2CHARSAVE_STATUS_OFFSET_109), status); + + // charname + std::strncpy((char *)buffer + D2CHARSAVE_CHARNAME_OFFSET_109, new char[MAX_CHARNAME_LEN], MAX_CHARNAME_LEN); // clear first + std::strncpy((char *)buffer + D2CHARSAVE_CHARNAME_OFFSET_109, charname, MAX_CHARNAME_LEN); + + // checksum + checksum = d2charsave_checksum((unsigned char *)buffer, size, D2CHARSAVE_CHECKSUM_OFFSET); + bn_int_set((bn_int *)(buffer + D2CHARSAVE_CHECKSUM_OFFSET), 0); // clear first + bn_int_set((bn_int *)(buffer + D2CHARSAVE_CHECKSUM_OFFSET), checksum); + + return 0; + } + static int d2charinfo_init(t_d2charinfo_file * chardata, char const * account, char const * charname, unsigned char chclass, unsigned short status) @@ -109,12 +146,16 @@ namespace pvpgn { t_d2charinfo_file chardata; char * savefile, *infofile; - char buffer[1024]; + const char * newbiefile; + unsigned char buffer[MAX_SAVEFILE_SIZE]; unsigned int size; + unsigned int version; int ladder_time, now; std::FILE * fp; + int status_init = status; + ASSERT(account, -1); ASSERT(charname, -1); if (chclass > D2CHAR_MAX_CLASS) chclass = 0; @@ -151,13 +192,40 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "got bad account name \"%s\"", account); return -1; } + + /* get character template file depending of it's class */ + switch ((t_character_class)chclass) + { + case character_class_amazon: + newbiefile = prefs_get_charsave_newbie_amazon(); + break; + case character_class_sorceress: + newbiefile = prefs_get_charsave_newbie_sorceress(); + break; + case character_class_necromancer: + newbiefile = prefs_get_charsave_newbie_necromancer(); + break; + case character_class_paladin: + newbiefile = prefs_get_charsave_newbie_paladin(); + break; + case character_class_barbarian: + newbiefile = prefs_get_charsave_newbie_barbarian(); + break; + case character_class_druid: + newbiefile = prefs_get_charsave_newbie_druid(); + break; + case character_class_assassin: + newbiefile = prefs_get_charsave_newbie_assasin(); + break; + } + size = sizeof(buffer); - if (file_read(prefs_get_charsave_newbie(), buffer, &size) < 0) { + if (file_read(newbiefile, buffer, &size) < 0) { eventlog(eventlog_level_error, __FUNCTION__, "error loading newbie save file"); return -1; } if (size >= sizeof(buffer)) { - eventlog(eventlog_level_error, __FUNCTION__, "newbie save file \"%s\" is corrupt (length %lu, expected <%lu)", prefs_get_charsave_newbie(), (unsigned long)size, (unsigned long)sizeof(buffer)); + eventlog(eventlog_level_error, __FUNCTION__, "newbie save file \"%s\" is corrupt (length %lu, expected <%lu)", newbiefile, (unsigned long)size, (unsigned long)sizeof(buffer)); return -1; } @@ -178,7 +246,13 @@ namespace pvpgn if ((ladder_time > 0) && (now < ladder_time)) charstatus_set_ladder(status, 0); - d2charsave_init(buffer, charname, chclass, status); + /* create from newbie.save or normal d2s template? */ + version = bn_int_get(buffer + D2CHARSAVE_VERSION_OFFSET); + if (version >= 0x0000005C) + d2charsave_init_from_d2s(buffer, charname, chclass, status_init, size); + else + d2charsave_init(buffer, charname, chclass, status); + d2charinfo_init(&chardata, account, charname, chclass, status); if (file_write(infofile, &chardata, sizeof(chardata)) < 0) { diff --git a/src/d2cs/d2charfile.h b/src/d2cs/d2charfile.h index aa860ad0a..1ba5baeeb 100644 --- a/src/d2cs/d2charfile.h +++ b/src/d2cs/d2charfile.h @@ -22,14 +22,17 @@ #define D2CHARSAVE_VERSION_OFFSET 0x04 #define D2CHARSAVE_CHECKSUM_OFFSET 0x0C -/* used in both save init and convert */ -#define D2CHARSAVE_STATUS_OFFSET 0x18 /* newbie.save offset or old version */ -#define D2CHARSAVE_STATUS_OFFSET_109 0x24 /* 1.09 or later version (1.10) */ - -/* only used for save init to newbie.save file */ +/* newbie.save offset or old version */ +#define D2CHARSAVE_STATUS_OFFSET 0x18 #define D2CHARSAVE_CLASS_OFFSET 0x22 #define D2CHARSAVE_CHARNAME_OFFSET 0x08 +/* 1.09 or later version (1.10) */ +#define D2CHARSAVE_CLASS_OFFSET_109 0x28 +#define D2CHARSAVE_STATUS_OFFSET_109 0x24 +#define D2CHARSAVE_CHARNAME_OFFSET_109 0x14 + + /* unused */ #define D2CHARSAVE_LEVEL_OFFSET 0x24 diff --git a/src/d2cs/prefs.cpp b/src/d2cs/prefs.cpp index c55edc291..d7fa12c83 100644 --- a/src/d2cs/prefs.cpp +++ b/src/d2cs/prefs.cpp @@ -44,7 +44,13 @@ static struct char const * bak_charsavedir; char const * bak_charinfodir; char const * ladderdir; - char const * newbiefile; + char const * newbiefile_amazon; + char const * newbiefile_sorceress; + char const * newbiefile_necromancer; + char const * newbiefile_paladin; + char const * newbiefile_barbarian; + char const * newbiefile_druid; + char const * newbiefile_assasin; char const * motd; char const * realmname; char const * d2gs_password; @@ -123,8 +129,20 @@ static int conf_setdef_ladder_start_time(void); static int conf_set_ladder_refresh_interval(const char* valstr); static int conf_setdef_ladder_refresh_interval(void); -static int conf_set_newbiefile(const char* valstr); -static int conf_setdef_newbiefile(void); +static int conf_set_newbiefile_amazon(const char* valstr); +static int conf_setdef_newbiefile_amazon(void); +static int conf_set_newbiefile_sorceress(const char* valstr); +static int conf_setdef_newbiefile_sorceress(void); +static int conf_set_newbiefile_necromancer(const char* valstr); +static int conf_setdef_newbiefile_necromancer(void); +static int conf_set_newbiefile_paladin(const char* valstr); +static int conf_setdef_newbiefile_paladin(void); +static int conf_set_newbiefile_barbarian(const char* valstr); +static int conf_setdef_newbiefile_barbarian(void); +static int conf_set_newbiefile_druid(const char* valstr); +static int conf_setdef_newbiefile_druid(void); +static int conf_set_newbiefile_assasin(const char* valstr); +static int conf_setdef_newbiefile_assasin(void); static int conf_set_transfile(const char* valstr); static int conf_setdef_transfile(void); @@ -253,7 +271,13 @@ static t_conf_entry prefs_conf_table[]={ { "ladderdir", conf_set_ladderdir, NULL, conf_setdef_ladderdir}, { "ladder_start_time", conf_set_ladder_start_time, NULL, conf_setdef_ladder_start_time}, { "ladder_refresh_interval",conf_set_ladder_refresh_interval,NULL, conf_setdef_ladder_refresh_interval}, - { "newbiefile", conf_set_newbiefile, NULL, conf_setdef_newbiefile}, + { "newbiefile_amazon", conf_set_newbiefile_amazon, NULL, conf_setdef_newbiefile_amazon }, + { "newbiefile_sorceress", conf_set_newbiefile_sorceress, NULL, conf_setdef_newbiefile_sorceress }, + { "newbiefile_necromancer", conf_set_newbiefile_necromancer, NULL, conf_setdef_newbiefile_necromancer }, + { "newbiefile_paladin", conf_set_newbiefile_paladin, NULL, conf_setdef_newbiefile_paladin }, + { "newbiefile_barbarian", conf_set_newbiefile_barbarian, NULL, conf_setdef_newbiefile_barbarian }, + { "newbiefile_druid", conf_set_newbiefile_druid, NULL, conf_setdef_newbiefile_druid }, + { "newbiefile_assasin", conf_set_newbiefile_assasin, NULL, conf_setdef_newbiefile_assasin }, { "transfile", conf_set_transfile, NULL, conf_setdef_transfile}, { "pidfile", conf_set_pidfile, NULL, conf_setdef_pidfile}, { "motd", conf_set_motd, NULL, conf_setdef_motd}, @@ -414,20 +438,99 @@ static int conf_setdef_backcharinfodir(void) } -extern char const * prefs_get_charsave_newbie(void) +/* newbiefile */ + +extern char const * prefs_get_charsave_newbie_amazon(void) +{ + return prefs_conf.newbiefile_amazon; +} +static int conf_set_newbiefile_amazon(const char* valstr) +{ + return conf_set_str(&prefs_conf.newbiefile_amazon, valstr, NULL); +} +static int conf_setdef_newbiefile_amazon(void) +{ + return conf_set_str(&prefs_conf.newbiefile_amazon, NULL, D2CS_CHARSAVE_NEWBIE); +} + +extern char const * prefs_get_charsave_newbie_sorceress(void) +{ + return prefs_conf.newbiefile_sorceress; +} +static int conf_set_newbiefile_sorceress(const char* valstr) +{ + return conf_set_str(&prefs_conf.newbiefile_sorceress, valstr, NULL); +} +static int conf_setdef_newbiefile_sorceress(void) +{ + return conf_set_str(&prefs_conf.newbiefile_sorceress, NULL, D2CS_CHARSAVE_NEWBIE); +} + +extern char const * prefs_get_charsave_newbie_necromancer(void) +{ + return prefs_conf.newbiefile_necromancer; +} +static int conf_set_newbiefile_necromancer(const char* valstr) +{ + return conf_set_str(&prefs_conf.newbiefile_necromancer, valstr, NULL); +} +static int conf_setdef_newbiefile_necromancer(void) +{ + return conf_set_str(&prefs_conf.newbiefile_necromancer, NULL, D2CS_CHARSAVE_NEWBIE); +} + +extern char const * prefs_get_charsave_newbie_paladin(void) +{ + return prefs_conf.newbiefile_paladin; +} +static int conf_set_newbiefile_paladin(const char* valstr) { - return prefs_conf.newbiefile; + return conf_set_str(&prefs_conf.newbiefile_paladin, valstr, NULL); +} +static int conf_setdef_newbiefile_paladin(void) +{ + return conf_set_str(&prefs_conf.newbiefile_paladin, NULL, D2CS_CHARSAVE_NEWBIE); } -static int conf_set_newbiefile(const char* valstr) +extern char const * prefs_get_charsave_newbie_barbarian(void) { - return conf_set_str(&prefs_conf.newbiefile,valstr,NULL); + return prefs_conf.newbiefile_barbarian; +} +static int conf_set_newbiefile_barbarian(const char* valstr) +{ + return conf_set_str(&prefs_conf.newbiefile_barbarian, valstr, NULL); +} +static int conf_setdef_newbiefile_barbarian(void) +{ + return conf_set_str(&prefs_conf.newbiefile_barbarian, NULL, D2CS_CHARSAVE_NEWBIE); } -static int conf_setdef_newbiefile(void) +extern char const * prefs_get_charsave_newbie_druid(void) +{ + return prefs_conf.newbiefile_druid; +} +static int conf_set_newbiefile_druid(const char* valstr) { - return conf_set_str(&prefs_conf.newbiefile,NULL,D2CS_CHARSAVE_NEWBIE); + return conf_set_str(&prefs_conf.newbiefile_druid, valstr, NULL); } +static int conf_setdef_newbiefile_druid(void) +{ + return conf_set_str(&prefs_conf.newbiefile_druid, NULL, D2CS_CHARSAVE_NEWBIE); +} + +extern char const * prefs_get_charsave_newbie_assasin(void) +{ + return prefs_conf.newbiefile_assasin; +} +static int conf_set_newbiefile_assasin(const char* valstr) +{ + return conf_set_str(&prefs_conf.newbiefile_assasin, valstr, NULL); +} +static int conf_setdef_newbiefile_assasin(void) +{ + return conf_set_str(&prefs_conf.newbiefile_assasin, NULL, D2CS_CHARSAVE_NEWBIE); +} + extern char const * prefs_get_motd(void) diff --git a/src/d2cs/prefs.h b/src/d2cs/prefs.h index 047b8e182..d8c9d8aba 100644 --- a/src/d2cs/prefs.h +++ b/src/d2cs/prefs.h @@ -36,7 +36,13 @@ namespace pvpgn extern char const * prefs_get_charinfo_dir(void); extern char const * prefs_get_bak_charsave_dir(void); extern char const * prefs_get_bak_charinfo_dir(void); - extern char const * prefs_get_charsave_newbie(void); + extern char const * prefs_get_charsave_newbie_amazon(void); + extern char const * prefs_get_charsave_newbie_sorceress(void); + extern char const * prefs_get_charsave_newbie_necromancer(void); + extern char const * prefs_get_charsave_newbie_paladin(void); + extern char const * prefs_get_charsave_newbie_barbarian(void); + extern char const * prefs_get_charsave_newbie_druid(void); + extern char const * prefs_get_charsave_newbie_assasin(void); extern char const * prefs_get_motd(void); extern char const * prefs_get_realmname(void); extern char const * prefs_get_d2gs_list(void); From 4d3e0706172bdeb602d56731c8afa313a5ca2996 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 17 May 2014 19:38:48 +0400 Subject: [PATCH 024/144] New Lua functions: - command_get_group - icon_get_rank --- src/bnetd/icons.cpp | 7 ++--- src/bnetd/icons.h | 1 + src/bnetd/luafunctions.cpp | 60 +++++++++++++++++++++++++++++++++++--- src/bnetd/luafunctions.h | 4 +++ src/bnetd/luainterface.cpp | 4 +++ 5 files changed, 68 insertions(+), 8 deletions(-) diff --git a/src/bnetd/icons.cpp b/src/bnetd/icons.cpp index 73901e048..3c97a80d8 100644 --- a/src/bnetd/icons.cpp +++ b/src/bnetd/icons.cpp @@ -54,7 +54,6 @@ namespace pvpgn static int skip_comments(char *buff); static t_icon_var_info * _read_option(char *str, unsigned lineno); - static t_icon_info * _find_custom_icon(int rating, char * clienttag); static char * _find_attr_key(char * clienttag); @@ -115,7 +114,7 @@ namespace pvpgn text = str_replace((char*)text, tmp, (char*)value); // also replace {var}->rank - if (icon = _find_custom_icon(atoi(value), clienttag_str)) + if (icon = customicons_get_icon_by_rating(atoi(value), clienttag_str)) { snprintf(tmp, sizeof(tmp), "{{%s->rank}}", var->key); text = str_replace((char*)text, tmp, icon->rank); @@ -149,7 +148,7 @@ namespace pvpgn rating = account_get_numattr(account, attr_key); - icon = _find_custom_icon(rating, clienttag_str); + icon = customicons_get_icon_by_rating(rating, clienttag_str); return icon; } @@ -444,7 +443,7 @@ namespace pvpgn /* Get custom icon by rating for clienttag */ - static t_icon_info * _find_custom_icon(int rating, char * clienttag) + extern t_icon_info * customicons_get_icon_by_rating(int rating, char * clienttag) { t_elem * curr; t_elem * curr_icon; diff --git a/src/bnetd/icons.h b/src/bnetd/icons.h index 9afadddd8..fd950f607 100644 --- a/src/bnetd/icons.h +++ b/src/bnetd/icons.h @@ -68,6 +68,7 @@ namespace pvpgn extern int prefs_get_custom_icons(); extern t_icon_info * get_custom_icon(t_account * account, t_clienttag clienttag); extern const char * get_custom_stats_text(t_account * account, t_clienttag clienttag); + extern t_icon_info * customicons_get_icon_by_rating(int rating, char * clienttag); extern int customicons_load(char const * filename); diff --git a/src/bnetd/luafunctions.cpp b/src/bnetd/luafunctions.cpp index 8eab7a3d0..c5aabdcaa 100644 --- a/src/bnetd/luafunctions.cpp +++ b/src/bnetd/luafunctions.cpp @@ -44,6 +44,7 @@ #include "friends.h" #include "clan.h" #include "attrlayer.h" +#include "icons.h" #include "luawrapper.h" #include "luaobjects.h" @@ -456,10 +457,10 @@ namespace pvpgn return 1; } - /* Get usernames online. If allusers = true then return all server users */ + /* Get usernames online. If allaccounts = true then return all server users */ extern int __server_get_users(lua_State* L) { - bool all = false; + bool allaccounts = false; const char *username; std::map users; t_connection * conn; @@ -469,9 +470,9 @@ namespace pvpgn { lua::stack st(L); // get args - st.at(1, all); + st.at(1, allaccounts); - if (all) + if (allaccounts) { t_entry * curr; HASHTABLE_TRAVERSE(accountlist(), curr) @@ -560,5 +561,56 @@ namespace pvpgn } + + + /* Get command groups for a command string */ + extern int __command_get_group(lua_State* L) + { + char const * command; + try + { + lua::stack st(L); + // get args + st.at(1, command); + int group = command_get_group(command); + + st.push(group); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + + /* Get customicon rank by rating */ + extern int __icon_get_rank(lua_State* L) + { + int rating; + char * clienttag; + try + { + lua::stack st(L); + // get args + st.at(1, rating); + st.at(2, clienttag); + if (t_icon_info * icon = customicons_get_icon_by_rating(rating, clienttag)) + st.push(icon->rank); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } + } } \ No newline at end of file diff --git a/src/bnetd/luafunctions.h b/src/bnetd/luafunctions.h index ca936e818..73db33887 100644 --- a/src/bnetd/luafunctions.h +++ b/src/bnetd/luafunctions.h @@ -48,6 +48,10 @@ namespace pvpgn extern int __server_get_users(lua_State* L); extern int __server_get_games(lua_State* L); extern int __server_get_channels(lua_State* L); + + extern int __command_get_group(lua_State* L); + extern int __icon_get_rank(lua_State* L); + } } diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 8fa9fe790..41fa08ecf 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -136,6 +136,10 @@ namespace pvpgn { "server_get_users", __server_get_users }, { "server_get_games", __server_get_games }, { "server_get_channels", __server_get_channels }, + + { "command_get_group", __command_get_group }, + { "icon_get_rank", __icon_get_rank }, + { 0, 0 } }; vm.reg("api", api); From 1be1f823efc5392a4af9d36a7e2436990a8fc47d Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 23 May 2014 22:19:43 +0400 Subject: [PATCH 025/144] Add Lua to cmake. Fix compile errors on Linux --- CMakeLists.txt | 4 +- ConfigureChecks.cmake | 4 ++ cmake/Modules/FindLua.cmake | 72 +++++++++++++++++++++++ conf/bnetd.conf.in | 2 +- conf/bnetd.conf.win32 | 2 +- lua/CMakeLists.txt | 4 ++ src/CMakeLists.txt | 4 ++ src/bnetd/CMakeLists.txt | 6 +- src/bnetd/Makefile.am | 4 +- src/bnetd/channel.cpp | 11 ++-- src/bnetd/icons.cpp | 3 + src/bnetd/luafunctions.cpp | 19 +++--- src/bnetd/luafunctions.h | 2 + src/bnetd/luainterface.cpp | 22 ++++--- src/bnetd/luainterface.h | 6 +- src/bnetd/luaobjects.cpp | 112 +++++++++++++++++++----------------- src/bnetd/luaobjects.h | 2 + src/bnetd/luawrapper.cpp | 3 +- src/bnetd/luawrapper.h | 6 +- src/bnetd/server.cpp | 2 +- src/common/setup_before.h | 9 ++- src/common/xstring.cpp | 73 ++++++++++++----------- src/common/xstring.h | 18 ++++-- 23 files changed, 256 insertions(+), 134 deletions(-) create mode 100644 cmake/Modules/FindLua.cmake create mode 100644 lua/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f2258b82..a970e4a0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,8 @@ if(WIN32) option(WITH_WIN32_GUI "enable GUI building (default on)" ON) endif(WIN32) +option(WITH_LUA "enable Lua support" OFF) + #storage backends flags option(WITH_MYSQL "include MySQL user accounts support" OFF) option(WITH_SQLITE3 "include SQLite3 user accounts support" OFF) @@ -28,5 +30,5 @@ option(WITH_PGSQL "include PostgreSQL user accounts support" OFF) option(WITH_ODBC "include ODBC user accounts support" OFF) include(ConfigureChecks.cmake) -subdirs(src conf man files) +subdirs(src conf man files lua) ENABLE_TESTING() diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 34bf2eb92..8777b4bdb 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -36,6 +36,10 @@ check_library_exists(socket socket "" HAVE_LIBSOCKET) check_library_exists(resolv inet_aton "" HAVE_LIBRESOLV) check_library_exists(bind __inet_aton "" HAVE_LIBBIND) +if(WITH_LUA) + find_package(Lua REQUIRED) +endif(WITH_LUA) + # storage module checks if(WITH_ODBC) find_package(ODBC REQUIRED) diff --git a/cmake/Modules/FindLua.cmake b/cmake/Modules/FindLua.cmake new file mode 100644 index 000000000..74301cd30 --- /dev/null +++ b/cmake/Modules/FindLua.cmake @@ -0,0 +1,72 @@ +# Copyright (c) 2013 Martin Felis <martin@fysx.org> +# License: Public Domain (Unlicense: http://unlicense.org/) +# Modified by Edvin "Lego3" Linge for the CorsixTH project. +# +# Try to find Lua or LuaJIT depending on the variable WITH_LUAJIT. +# Sets the following variables: +# LUA_FOUND +# LUA_INCLUDE_DIR +# LUA_LIBRARY +# +# Use it in a CMakeLists.txt script as: +# +# OPTION (WITH_LUAJIT "Use LuaJIT instead of default Lua" OFF) +# UNSET(LUA_FOUND CACHE) +# UNSET(LUA_INCLUDE_DIR CACHE) +# UNSET(LUA_LIBRARY CACHE) +# FIND_PACKAGE (Lua REQUIRED) + +SET (LUA_FOUND FALSE) +SET (LUA_LIBRARIES) + +SET (LUA_INTERPRETER_TYPE "Lua5.1") +SET (LUA_LIBRARY_NAME lua5.1 lua51 lua lua-5.1) +SET (LUA_INCLUDE_DIRS include/lua5.1 include/lua51 include/lua include/lua-5.1 include) + + +FIND_PATH (LUA_INCLUDE_DIR lua.h + HINTS + ENV LUA_DIR + PATH_SUFFIXES ${LUA_INCLUDE_DIRS} + PATHS + /opt/local + /usr/local + /usr + /opt + /sw + ~/Library/Frameworks + /Library/Frameworks +) +FIND_LIBRARY (LUA_LIBRARY NAMES ${LUA_LIBRARY_NAME} + HINTS + ENV LUA_DIR + PATH_SUFFIXES lib + PATHS + /usr + /usr/local + /opt/local + /opt + /sw + ~/Library/Frameworks + /Library/Frameworks +) + +IF (LUA_INCLUDE_DIR AND LUA_LIBRARY) + SET (LUA_FOUND TRUE) + SET (LUA_LIBRARIES ${LUA_LIBRARY}) +ENDIF (LUA_INCLUDE_DIR AND LUA_LIBRARY) + +IF (LUA_FOUND) + IF (NOT Lua_FIND_QUIETLY) + MESSAGE(STATUS "Found ${LUA_INTERPRETER_TYPE} library: ${LUA_LIBRARY}") + ENDIF (NOT Lua_FIND_QUIETLY) +ELSE (LUA_FOUND) + IF (Lua_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find ${LUA_INTERPRETER_TYPE}") + ENDIF (Lua_FIND_REQUIRED) +ENDIF (LUA_FOUND) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua DEFAULT_MSG LUA_LIBRARY LUA_INCLUDE_DIR) + +MARK_AS_ADVANCED ( LUA_INCLUDE_DIR LUA_LIBRARY) \ No newline at end of file diff --git a/conf/bnetd.conf.in b/conf/bnetd.conf.in index 6bda2b71e..78a568fc3 100644 --- a/conf/bnetd.conf.in +++ b/conf/bnetd.conf.in @@ -79,7 +79,7 @@ storage_path = "file:mode=plain;dir=${LOCALSTATEDIR}/users;clan=${LOCALSTATEDIR} #----------------------------------------------------------------------------# filedir = "${LOCALSTATEDIR}/files" -scriptdir = "${LOCALSTATEDIR}/script" +scriptdir = "${LOCALSTATEDIR}/lua" reportdir = "${LOCALSTATEDIR}/reports" chanlogdir = "${LOCALSTATEDIR}/chanlogs" motdfile = "${SYSCONFDIR}/bnmotd.txt" diff --git a/conf/bnetd.conf.win32 b/conf/bnetd.conf.win32 index 3623b80d6..3b3bb3d74 100644 --- a/conf/bnetd.conf.win32 +++ b/conf/bnetd.conf.win32 @@ -59,7 +59,7 @@ storage_path = file:mode=plain;dir=var\users;clan=var\clans;team=var\teams;defau #----------------------------------------------------------------------------# filedir = files -scriptdir = script +scriptdir = lua reportdir = var\reports chanlogdir = var\chanlogs motdfile = conf\bnmotd.txt diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt new file mode 100644 index 000000000..6466e70b5 --- /dev/null +++ b/lua/CMakeLists.txt @@ -0,0 +1,4 @@ +# TODO: add lua files here + +install(FILES + DESTINATION ${LOCALSTATEDIR}/lua) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bc8c3f6c4..1e59e195f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,6 +19,10 @@ if(WITH_FLAG_ANSIPEDANTIC) add_definitions("-pedantic -ansi") endif(WITH_FLAG_ANSIPEDANTIC) +if(LUA_FOUND) + add_definitions("-DWITH_LUA") +endif(LUA_FOUND) + if(MYSQL_FOUND) add_definitions("-DWITH_SQL_MYSQL") endif(MYSQL_FOUND) diff --git a/src/bnetd/CMakeLists.txt b/src/bnetd/CMakeLists.txt index 1ac66ec91..05ba46453 100644 --- a/src/bnetd/CMakeLists.txt +++ b/src/bnetd/CMakeLists.txt @@ -1,5 +1,5 @@ # add aditional includes corresponding to the additional libraries bellow -include_directories(${ZLIB_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} +include_directories(${ZLIB_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR} ${LUA_INCLUDE_DIR} ${SQLITE3_INCLUDE_DIR} ${PGSQL_INCLUDE_DIR} ${ODBC_INCLUDE_DIR} ) @@ -34,6 +34,8 @@ set(BNETD_SOURCES tournament.cpp tournament.h icons.cpp icons.h tracker.cpp tracker.h udptest_send.cpp udptest_send.h versioncheck.cpp versioncheck.h watch.cpp watch.h anongame_wol.cpp anongame_wol.h handle_wserv.cpp handle_wserv.h + luafunctions.cpp luafunctions.h luainterface.cpp luainterface.h + luaobjects.cpp luaobjects.h luawrapper.cpp luawrapper.h ../win32/winmain.cpp ../win32/winmain.h ) @@ -50,5 +52,5 @@ else(WITH_WIN32_GUI) endif(WITH_WIN32_GUI) target_link_libraries(bnetd common compat win32 tinycdb ${NETWORK_LIBRARIES} - ${ZLIB_LIBRARIES} ${MYSQL_LIBRARIES} ${SQLITE3_LIBRARIES} ${PGSQL_LIBRARIES} ${ODBC_LIBRARIES}) + ${ZLIB_LIBRARIES} ${MYSQL_LIBRARIES} ${SQLITE3_LIBRARIES} ${PGSQL_LIBRARIES} ${ODBC_LIBRARIES} ${LUA_LIBRARIES}) install(TARGETS bnetd DESTINATION ${SBINDIR}) diff --git a/src/bnetd/Makefile.am b/src/bnetd/Makefile.am index c49817d79..299d53ebd 100644 --- a/src/bnetd/Makefile.am +++ b/src/bnetd/Makefile.am @@ -15,7 +15,7 @@ bnetd_SOURCES = account.cpp account_wrap.cpp adbanner.cpp alias_command.cpp anon storage_file.cpp storage_sql.cpp support.cpp team.cpp tick.cpp timer.cpp topic.cpp \ tournament.cpp tracker.cpp udptest_send.cpp versioncheck.cpp watch.cpp \ storage_sql2.cpp sql_common.cpp handle_wol.cpp handle_irc_common.cpp handle_apireg.cpp \ - handle_wserv.cpp + handle_wserv.cpp luafunctions.cpp luainterface.cpp luaobjects.cpp luawrapper.cpp bnetd_LDADD = $(top_builddir)/src/common/libcommon.a \ $(top_builddir)/src/compat/libcompat.a \ @@ -35,4 +35,4 @@ noinst_HEADERS = account.h account_wrap.h adbanner.h alias_command.h \ storage_file.h storage.h storage_sql.h support.h team.h tick.h \ timer.h topic.h tournament.h udptest_send.h versioncheck.h watch.h \ tracker.h storage_sql2.h sql_common.h handle_wol.h handle_irc_common.h handle_apireg.h \ - handle_wserv.h + handle_wserv.h luafunctions.h luainterface.h luaobjects.h luawrapper.h diff --git a/src/bnetd/channel.cpp b/src/bnetd/channel.cpp index ef6c1bda8..f146feadb 100644 --- a/src/bnetd/channel.cpp +++ b/src/bnetd/channel.cpp @@ -549,15 +549,15 @@ namespace pvpgn conn_set_tmpOP_channel(connection, NULL); } +#ifdef WITH_LUA + lua_handle_channel(channel, connection, text, type, luaevent_channel_userleft); +#endif + if (!channel->memberlist && !(channel->flags & channel_flags_permanent)) /* if channel is empty, delete it unless it's a permanent channel */ { channel_destroy(channel, &curr2); } -#ifdef WITH_LUA - lua_handle_channel(channel, connection, text, type, luaevent_channel_userleft); -#endif - return 0; } @@ -759,7 +759,8 @@ namespace pvpgn } #ifdef WITH_LUA - lua_handle_channel((t_channel*)channel, me, text, type, luaevent_channel_message); + if (type != message_type_part) + lua_handle_channel((t_channel*)channel, me, text, type, luaevent_channel_message); #endif } diff --git a/src/bnetd/icons.cpp b/src/bnetd/icons.cpp index 3c97a80d8..79da7bfea 100644 --- a/src/bnetd/icons.cpp +++ b/src/bnetd/icons.cpp @@ -450,6 +450,9 @@ namespace pvpgn t_iconset_info * iconset; t_icon_info * icon; + if (!clienttag) + return NULL; + if (icon_head) { LIST_TRAVERSE(icon_head, curr) { diff --git a/src/bnetd/luafunctions.cpp b/src/bnetd/luafunctions.cpp index c5aabdcaa..f96fb4cf1 100644 --- a/src/bnetd/luafunctions.cpp +++ b/src/bnetd/luafunctions.cpp @@ -15,6 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef WITH_LUA #include "common/setup_before.h" #define GAME_INTERNAL_ACCESS @@ -22,7 +23,7 @@ #include #include #include - +#include #include "compat/strcasecmp.h" #include "compat/snprintf.h" @@ -31,6 +32,7 @@ #include "common/eventlog.h" #include "common/list.h" #include "common/hashtable.h" +#include "common/xstring.h" #include "connection.h" #include "message.h" @@ -186,7 +188,7 @@ namespace pvpgn attrvalue = account_get_strattr(account, attrkey); break; case attr_type_num: - attrvalue = std::to_string(account_get_numattr(account, attrkey)); + attrvalue = std_to_string(account_get_numattr(account, attrkey)); break; case attr_type_bool: attrvalue = account_get_boolattr(account, attrkey) == 0 ? "false" : "true"; @@ -284,7 +286,7 @@ namespace pvpgn extern int __account_get_friends(lua_State* L) { const char *username; - std::vector> friends; + std::vector > friends; try { @@ -325,7 +327,7 @@ namespace pvpgn extern int __account_get_teams(lua_State* L) { const char *username; - std::vector> teams; + std::vector > teams; try { @@ -365,7 +367,7 @@ namespace pvpgn extern int __clan_get_members(lua_State* L) { unsigned int clanid; - std::vector> members; + std::vector > members; try { @@ -591,14 +593,14 @@ namespace pvpgn extern int __icon_get_rank(lua_State* L) { int rating; - char * clienttag; + char const * clienttag; try { lua::stack st(L); // get args st.at(1, rating); st.at(2, clienttag); - if (t_icon_info * icon = customicons_get_icon_by_rating(rating, clienttag)) + if (t_icon_info * icon = customicons_get_icon_by_rating(rating, (char*)clienttag)) st.push(icon->rank); } catch (const std::exception& e) @@ -613,4 +615,5 @@ namespace pvpgn } } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/bnetd/luafunctions.h b/src/bnetd/luafunctions.h index 73db33887..285dd1a99 100644 --- a/src/bnetd/luafunctions.h +++ b/src/bnetd/luafunctions.h @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*****/ +#ifdef WITH_LUA #ifndef JUST_NEED_TYPES #ifndef INCLUDED_LUAFUNCTION_PROTOS #define INCLUDED_LUAFUNCTION_PROTOS @@ -58,3 +59,4 @@ namespace pvpgn #endif #endif +#endif \ No newline at end of file diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 41fa08ecf..63ea62510 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -15,6 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef WITH_LUA #include "common/setup_before.h" #include "team.h" @@ -111,7 +112,7 @@ namespace pvpgn } // handle start event - lua_handle_server(0, luaevent_server_start); + lua_handle_server(luaevent_server_start); } @@ -381,8 +382,9 @@ namespace pvpgn } - extern void lua_handle_channel(t_channel * channel, t_connection * c, char const * message_text, t_message_type message_type, t_luaevent_type luaevent) + extern int lua_handle_channel(t_channel * channel, t_connection * c, char const * message_text, t_message_type message_type, t_luaevent_type luaevent) { + int result = 0; t_account * account; const char * func_name; switch (luaevent) @@ -397,19 +399,19 @@ namespace pvpgn func_name = "handle_channel_userleft"; break; default: - return; + return 0; } try { if (!(account = conn_get_account(c))) - return; + return 0; std::map o_account = get_account_object(account); std::map o_channel = get_channel_object(channel); // handle_channel_userleft & handle_channel_message if (message_text) - lua::transaction(vm) << lua::lookup(func_name) << o_channel << o_account << message_text << message_type << lua::invoke << lua::end; // invoke lua function + lua::transaction(vm) << lua::lookup(func_name) << o_channel << o_account << message_text << message_type << lua::invoke >> result << lua::end; // invoke lua function // other functions else lua::transaction(vm) << lua::lookup(func_name) << o_channel << o_account << lua::invoke << lua::end; // invoke lua function @@ -422,6 +424,7 @@ namespace pvpgn { eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); } + return result; } @@ -476,13 +479,13 @@ namespace pvpgn } - extern void lua_handle_server(unsigned int time, t_luaevent_type luaevent) + extern void lua_handle_server(t_luaevent_type luaevent) { const char * func_name; switch (luaevent) { case luaevent_server_start: - func_name = "main"; + func_name = "main"; // when all lua scripts are loaded break; case luaevent_server_mainloop: func_name = "handle_server_mainloop"; // one time per second @@ -492,7 +495,7 @@ namespace pvpgn } try { - lua::transaction(vm) << lua::lookup(func_name) << time << lua::invoke << lua::end; // invoke lua function + lua::transaction(vm) << lua::lookup(func_name) << lua::invoke << lua::end; // invoke lua function } catch (const std::exception& e) { @@ -507,4 +510,5 @@ namespace pvpgn } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/bnetd/luainterface.h b/src/bnetd/luainterface.h index d9348c3df..cbb6d50e2 100644 --- a/src/bnetd/luainterface.h +++ b/src/bnetd/luainterface.h @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*****/ +#ifdef WITH_LUA #ifndef JUST_NEED_TYPES #ifndef INCLUDED_LUAINTERFACE_PROTOS #define INCLUDED_LUAINTERFACE_PROTOS @@ -63,9 +64,9 @@ namespace pvpgn extern int lua_handle_command(t_connection * c, char const * text); extern void lua_handle_game(t_game * game, t_connection * c, t_luaevent_type luaevent); - extern void lua_handle_channel(t_channel * channel, t_connection * c, char const * message_text, t_message_type message_type, t_luaevent_type luaevent); + extern int lua_handle_channel(t_channel * channel, t_connection * c, char const * message_text, t_message_type message_type, t_luaevent_type luaevent); extern int lua_handle_user(t_connection * c, t_connection * c_dst, char const * message_text, t_luaevent_type luaevent); - extern void lua_handle_server(unsigned int time, t_luaevent_type luaevent); + extern void lua_handle_server(t_luaevent_type luaevent); } @@ -73,3 +74,4 @@ namespace pvpgn #endif #endif +#endif \ No newline at end of file diff --git a/src/bnetd/luaobjects.cpp b/src/bnetd/luaobjects.cpp index b59eef1ca..d073eca2c 100644 --- a/src/bnetd/luaobjects.cpp +++ b/src/bnetd/luaobjects.cpp @@ -15,6 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef WITH_LUA #include "common/setup_before.h" #define ACCOUNT_INTERNAL_ACCESS #define GAME_INTERNAL_ACCESS @@ -28,6 +29,7 @@ #include #include #include +#include #include "compat/strcasecmp.h" #include "compat/snprintf.h" @@ -38,6 +40,7 @@ #include "common/flags.h" #include "common/proginfo.h" #include "common/addr.h" +#include "common/xstring.h" #include "connection.h" #include "message.h" @@ -58,17 +61,18 @@ namespace pvpgn { - namespace bnetd { template T join(const A &begin, const A &end, const T &t); - extern std::map get_account_object(const char * username) { std::map o_account; + if (username[0] == '\0') + return o_account; + if (t_account * account = accountlist_find_account(username)) o_account = get_account_object(account); return o_account; @@ -80,14 +84,15 @@ namespace pvpgn if (!account) return o_account; - o_account["id"] = std::to_string(account_get_uid(account)); + o_account["id"] = std_to_string(account_get_uid(account)); o_account["name"] = account_get_name(account); - o_account["email"] = account_get_email(account); - o_account["commandgroups"] = std::to_string(account_get_command_groups(account)); + if (const char * email = account_get_email(account)) // email can be empty + o_account["email"] = email; + o_account["commandgroups"] = std_to_string(account_get_command_groups(account)); o_account["locked"] = account_get_auth_lock(account) ? "true" : "false"; o_account["muted"] = account_get_auth_mute(account) ? "true" : "false"; - o_account["online"] = "false"; + o_account["online"] = "false"; // set init as offline // if user online if (t_connection * c = account_get_conn(account)) @@ -96,13 +101,13 @@ namespace pvpgn o_account["country"] = conn_get_country(c); o_account["clientver"] = conn_get_clientver(c); - o_account["latency"] = std::to_string(conn_get_latency(c)); + o_account["latency"] = std_to_string(conn_get_latency(c)); if (t_clienttag clienttag = conn_get_clienttag(c)) o_account["clienttag"] = clienttag_uint_to_str(clienttag); if (t_game *game = conn_get_game(c)) - o_account["game_id"] = std::to_string(game_get_id(game)); + o_account["game_id"] = std_to_string(game_get_id(game)); if (t_channel *channel = conn_get_channel(c)) - o_account["channel_id"] = std::to_string(channel_get_channelid(channel)); + o_account["channel_id"] = std_to_string(channel_get_channelid(channel)); } @@ -130,26 +135,26 @@ namespace pvpgn if (!game) return o_game; - o_game["id"] = std::to_string(game->id); + o_game["id"] = std_to_string(game->id); o_game["name"] = game->name; o_game["pass"] = game->pass; o_game["info"] = game->info; - o_game["type"] = std::to_string(game->type); - o_game["flag"] = std::to_string(game->flag); + o_game["type"] = std_to_string(game->type); + o_game["flag"] = std_to_string(game->flag); o_game["address"] = addr_num_to_ip_str(game->addr); - o_game["port"] = std::to_string(game->port); - o_game["status"] = std::to_string(game->status); - o_game["currentplayers"] = std::to_string(game->ref); - o_game["totalplayers"] = std::to_string(game->count); - o_game["maxplayers"] = std::to_string(game->maxplayers); + o_game["port"] = std_to_string(game->port); + o_game["status"] = std_to_string(game->status); + o_game["currentplayers"] = std_to_string(game->ref); + o_game["totalplayers"] = std_to_string(game->count); + o_game["maxplayers"] = std_to_string(game->maxplayers); o_game["mapname"] = game->mapname; - o_game["option"] = std::to_string(game->option); - o_game["maptype"] = std::to_string(game->maptype); - o_game["tileset"] = std::to_string(game->tileset); - o_game["speed"] = std::to_string(game->speed); - o_game["mapsize_x"] = std::to_string(game->mapsize_x); - o_game["mapsize_y"] = std::to_string(game->mapsize_y); + o_game["option"] = std_to_string(game->option); + o_game["maptype"] = std_to_string(game->maptype); + o_game["tileset"] = std_to_string(game->tileset); + o_game["speed"] = std_to_string(game->speed); + o_game["mapsize_x"] = std_to_string(game->mapsize_x); + o_game["mapsize_y"] = std_to_string(game->mapsize_y); if (t_connection *c = game->owner) { if (t_account *account = conn_get_account(c)) @@ -165,24 +170,24 @@ namespace pvpgn o_game["players"] = join(players.begin(), players.end(), std::string(",")); - o_game["bad"] = std::to_string(game->bad); // if 1, then the results will be ignored + o_game["bad"] = std_to_string(game->bad); // if 1, then the results will be ignored std::vector results; if (game->results) { for (int i = 0; i < game->count; i++) - results.push_back(std::to_string(game->results[i])); + results.push_back(std_to_string(game->results[i])); } o_game["results"] = join(results.begin(), results.end(), std::string(",")); // UNDONE: add report_heads and report_bodies: they are XML strings - o_game["create_time"] = std::to_string(game->create_time); - o_game["start_time"] = std::to_string(game->start_time); - o_game["lastaccess_time"] = std::to_string(game->lastaccess_time); + o_game["create_time"] = std_to_string(game->create_time); + o_game["start_time"] = std_to_string(game->start_time); + o_game["lastaccess_time"] = std_to_string(game->lastaccess_time); - o_game["difficulty"] = std::to_string(game->difficulty); + o_game["difficulty"] = std_to_string(game->difficulty); o_game["version"] = vernum_to_verstr(game->version); - o_game["startver"] = std::to_string(game->startver); + o_game["startver"] = std_to_string(game->startver); if (t_clienttag clienttag = game->clienttag) o_game["clienttag"] = clienttag_uint_to_str(clienttag); @@ -211,15 +216,15 @@ namespace pvpgn if (!channel) return o_channel; - o_channel["id"] = std::to_string(channel->id); + o_channel["id"] = std_to_string(channel->id); o_channel["name"] = channel->name; if (channel->shortname) o_channel["shortname"] = channel->shortname; if (channel->country) o_channel["country"] = channel->country; - o_channel["flags"] = std::to_string(channel->flags); - o_channel["maxmembers"] = std::to_string(channel->maxmembers); - o_channel["currmembers"] = std::to_string(channel->currmembers); + o_channel["flags"] = std_to_string(channel->flags); + o_channel["maxmembers"] = std_to_string(channel->maxmembers); + o_channel["currmembers"] = std_to_string(channel->currmembers); o_channel["clienttag"] = clienttag_uint_to_str(channel->clienttag); if (channel->realmname) @@ -229,8 +234,8 @@ namespace pvpgn // Westwood Online Extensions - o_channel["minmembers"] = std::to_string(channel->minmembers); - o_channel["gameType"] = std::to_string(channel->gameType); + o_channel["minmembers"] = std_to_string(channel->minmembers); + o_channel["gameType"] = std_to_string(channel->gameType); if (channel->gameExtension) o_channel["gameExtension"] = channel->gameExtension; @@ -276,13 +281,13 @@ namespace pvpgn if (!clan) return o_clan; - o_clan["id"] = std::to_string(clan->clanid); + o_clan["id"] = std_to_string(clan->clanid); o_clan["tag"] = clantag_to_str(clan->tag); o_clan["clanname"] = clan->clanname; - o_clan["created"] = std::to_string(clan->created); - o_clan["creation_time"] = std::to_string(clan->creation_time); + o_clan["created"] = std_to_string(clan->created); + o_clan["creation_time"] = std_to_string(clan->creation_time); o_clan["clan_motd"] = clan->clan_motd; - o_clan["channel_type"] = std::to_string(clan->channel_type); // 0--public 1--private + o_clan["channel_type"] = std_to_string(clan->channel_type); // 0--public 1--private // - clanmembers can be get from lua_clan_get_members @@ -298,9 +303,9 @@ namespace pvpgn o_member["username"] = account_get_name(member->memberacc); o_member["status"] = member->status; - o_member["clan_id"] = std::to_string(member->clan->clanid); - o_member["join_time"] = std::to_string(member->join_time); - o_member["fullmember"] = std::to_string(member->fullmember);// 0 -- clanmember is only invited, 1 -- clanmember is fullmember + o_member["clan_id"] = std_to_string(member->clan->clanid); + o_member["join_time"] = std_to_string(member->join_time); + o_member["fullmember"] = std_to_string(member->fullmember);// 0 -- clanmember is only invited, 1 -- clanmember is fullmember return o_member; } @@ -312,16 +317,16 @@ namespace pvpgn if (!team) return o_team; - o_team["id"] = std::to_string(team->teamid); - o_team["size"] = std::to_string(team->size); + o_team["id"] = std_to_string(team->teamid); + o_team["size"] = std_to_string(team->size); o_team["clienttag"] = clienttag_uint_to_str(team->clienttag); - o_team["lastgame"] = std::to_string(team->lastgame); - o_team["wins"] = std::to_string(team->wins); - o_team["losses"] = std::to_string(team->losses); - o_team["xp"] = std::to_string(team->xp); - o_team["level"] = std::to_string(team->level); - o_team["rank"] = std::to_string(team->rank); + o_team["lastgame"] = std_to_string(team->lastgame); + o_team["wins"] = std_to_string(team->wins); + o_team["losses"] = std_to_string(team->losses); + o_team["xp"] = std_to_string(team->xp); + o_team["level"] = std_to_string(team->level); + o_team["rank"] = std_to_string(team->rank); // usernames std::vector members; @@ -343,7 +348,7 @@ namespace pvpgn return o_friend; o_friend["username"] = account_get_name(f->friendacc); - o_friend["mutual"] = std::to_string(f->mutual); // -1 - unloaded(used to remove deleted elems when reload); 0 - not mutual ; 1 - is mutual + o_friend["mutual"] = std_to_string(f->mutual); // -1 - unloaded(used to remove deleted elems when reload); 0 - not mutual ; 1 - is mutual return o_friend; } @@ -365,4 +370,5 @@ namespace pvpgn return result; } } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/bnetd/luaobjects.h b/src/bnetd/luaobjects.h index c9460e88e..309afb4b6 100644 --- a/src/bnetd/luaobjects.h +++ b/src/bnetd/luaobjects.h @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*****/ +#ifdef WITH_LUA #ifndef JUST_NEED_TYPES #ifndef INCLUDED_LUAOBJECTS_PROTOS #define INCLUDED_LUAOBJECTS_PROTOS @@ -52,3 +53,4 @@ namespace pvpgn #endif #endif +#endif \ No newline at end of file diff --git a/src/bnetd/luawrapper.cpp b/src/bnetd/luawrapper.cpp index 16882148c..363320972 100644 --- a/src/bnetd/luawrapper.cpp +++ b/src/bnetd/luawrapper.cpp @@ -3,7 +3,7 @@ * Copyright (C) Anton Burdinuk */ - +#ifdef WITH_LUA #include "luawrapper.h" namespace lua @@ -136,3 +136,4 @@ void lua::bind::m_invoke(void) throw(std::exception) } } } +#endif \ No newline at end of file diff --git a/src/bnetd/luawrapper.h b/src/bnetd/luawrapper.h index 55749754f..837f25519 100644 --- a/src/bnetd/luawrapper.h +++ b/src/bnetd/luawrapper.h @@ -3,7 +3,7 @@ * https://code.google.com/p/luasp/ */ - +#ifdef WITH_LUA #ifndef __LUAWRAPPER_H #define __LUAWRAPPER_H @@ -15,6 +15,7 @@ extern "C" } #include +#include #include #include #include @@ -105,7 +106,7 @@ namespace lua void push_boolean(int v) throw() { lua_pushboolean(st, v); } void push(double v) throw() { lua_pushnumber(st, v); } void push(const std::string& v) throw() { lua_pushlstring(st, v.c_str(), v.length()); } - void push(const char* v) throw() { lua_pushlstring(st, v, strlen(v)); } + void push(const char* v) throw() { lua_pushlstring(st, v, std::strlen(v) ); } // push to stack std::map template @@ -351,3 +352,4 @@ namespace lua #endif +#endif \ No newline at end of file diff --git a/src/bnetd/server.cpp b/src/bnetd/server.cpp index 2d4500c26..31ef3de0e 100644 --- a/src/bnetd/server.cpp +++ b/src/bnetd/server.cpp @@ -1493,7 +1493,7 @@ namespace pvpgn prev_time = now; timerlist_check_timers(now); #ifdef WITH_LUA - lua_handle_server(now, luaevent_server_mainloop); + lua_handle_server(luaevent_server_mainloop); #endif } diff --git a/src/common/setup_before.h b/src/common/setup_before.h index 8401049a9..35d0e4a85 100644 --- a/src/common/setup_before.h +++ b/src/common/setup_before.h @@ -389,13 +389,12 @@ const int BNETD_MAX_SOCKVAL = 8192; # define HAVE_EPOLL 1 #endif +#if defined(WITH_LUA) +#define WITH_LUA 1 +#endif + #if defined(WITH_SQL_MYSQL) || defined(WITH_SQL_PGSQL) || defined(WITH_SQL_SQLITE3) || defined(WITH_SQL_ODBC) #define WITH_SQL 1 #endif -// FIXME: change it -//#if defined(WITH_LUA) -#define WITH_LUA 1 -//#endif - #endif diff --git a/src/common/xstring.cpp b/src/common/xstring.cpp index aac40fc60..cdd102f88 100644 --- a/src/common/xstring.cpp +++ b/src/common/xstring.cpp @@ -29,7 +29,6 @@ namespace pvpgn { - extern char * strtolower(char * str) { unsigned int i; @@ -272,47 +271,47 @@ namespace pvpgn // You must free the result if result is non-NULL. extern const char *str_replace(char *orig, char *rep, char *with) { - char *result; // the return string - char *ins; // the next insert point - char *tmp; // varies - int len_rep; // length of rep - int len_with; // length of with - int len_front; // distance between rep and end of last rep - int count; // number of replacements + char *result; // the return string + char *ins; // the next insert point + char *tmp; // varies + int len_rep; // length of rep + int len_with; // length of with + int len_front; // distance between rep and end of last rep + int count; // number of replacements - if (!orig) - return NULL; - if (!rep) - rep = ""; - len_rep = strlen(rep); - if (!with) - with = ""; - len_with = strlen(with); + if (!orig) + return NULL; + if (!rep) + rep = ""; + len_rep = strlen(rep); + if (!with) + with = ""; + len_with = strlen(with); - ins = orig; - for (count = 0; tmp = strstr(ins, rep); ++count) { - ins = tmp + len_rep; - } + ins = orig; + for (count = 0; tmp = strstr(ins, rep); ++count) { + ins = tmp + len_rep; + } - // first time through the loop, all the variable are set correctly - // from here on, - // tmp points to the end of the result string - // ins points to the next occurrence of rep in orig - // orig points to the remainder of orig after "end of rep" - tmp = result = (char*)malloc(strlen(orig) + (len_with - len_rep) * count + 1); + // first time through the loop, all the variable are set correctly + // from here on, + // tmp points to the end of the result string + // ins points to the next occurrence of rep in orig + // orig points to the remainder of orig after "end of rep" + tmp = result = (char*)malloc(strlen(orig) + (len_with - len_rep) * count + 1); - if (!result) - return NULL; + if (!result) + return NULL; - while (count--) { - ins = strstr(orig, rep); - len_front = ins - orig; - tmp = strncpy(tmp, orig, len_front) + len_front; - tmp = strcpy(tmp, with) + len_with; - orig += len_front + len_rep; // move to next "end of rep" - } - strcpy(tmp, orig); - return result; + while (count--) { + ins = strstr(orig, rep); + len_front = ins - orig; + tmp = strncpy(tmp, orig, len_front) + len_front; + tmp = strcpy(tmp, with) + len_with; + orig += len_front + len_rep; // move to next "end of rep" } + strcpy(tmp, orig); + return result; + } } diff --git a/src/common/xstring.h b/src/common/xstring.h index d3d2be448..8f0ab117a 100644 --- a/src/common/xstring.h +++ b/src/common/xstring.h @@ -18,9 +18,11 @@ #ifndef INCLUDED_XSTRING_H #define INCLUDED_XSTRING_H +#include +#include + namespace pvpgn { - extern char * strtolower(char * str); extern char * hexstrdup(unsigned char const * src); extern unsigned int hexstrtoraw(unsigned char const * src, char * data, unsigned int datalen); @@ -30,7 +32,15 @@ namespace pvpgn extern char * str_strip_affix(char * str, char const * affix); extern const char *str_replace(char *orig, char *rep, char *with); - + /* + Fix for std::string for some unix compilers + http://stackoverflow.com/a/20861692/701779 + */ + template < typename T > std::string std_to_string(const T& n) + { + std::ostringstream stm; + stm << n; + return stm.str(); + } } - -#endif +#endif \ No newline at end of file From eb9e5fcd01d7253fcde4d48c0e0ca1328454ed7d Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 23 May 2014 23:27:20 +0400 Subject: [PATCH 026/144] Fix compile errors from the previous commit. Return code -1 = error. But display help message is info message, so return 0 instead of -1. --- conf/bnhelp.conf.in | 5 +- src/bnetd/channel.cpp | 6 +- src/bnetd/command.cpp | 163 +++++++++++++++++++++--------------------- 3 files changed, 87 insertions(+), 87 deletions(-) diff --git a/conf/bnhelp.conf.in b/conf/bnhelp.conf.in index 65bce826c..580f5e667 100644 --- a/conf/bnhelp.conf.in +++ b/conf/bnhelp.conf.in @@ -441,8 +441,9 @@ %rehash -------------------------------------------------------- -/rehash - Forces the server to reload bnetd.conf +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua %clan -------------------------------------------------------- diff --git a/src/bnetd/channel.cpp b/src/bnetd/channel.cpp index 1a93e860e..39cc8ba40 100644 --- a/src/bnetd/channel.cpp +++ b/src/bnetd/channel.cpp @@ -43,9 +43,9 @@ #include "irc.h" #include "common/setup_after.h" -+#ifdef WITH_LUA -+#include "luainterface.h" -+#endif +#ifdef WITH_LUA +#include "luainterface.h" +#endif namespace pvpgn { diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index e72d6e3a4..a63867b64 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -569,7 +569,7 @@ namespace pvpgn { if (args[2].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } char const *msg = args[2].c_str(); // message @@ -608,7 +608,7 @@ namespace pvpgn if (args[2].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } const char * msg = args[2].c_str(); // message @@ -623,7 +623,7 @@ namespace pvpgn if (args[2].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } const char * username = args[2].c_str(); @@ -669,7 +669,7 @@ namespace pvpgn if (args[1] != "invite" && args[1] != "inv") { describe_command(c, args[0].c_str()); - return -1; + return 0; } if (args[2] == "get") { @@ -721,7 +721,7 @@ namespace pvpgn if (args[3].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } clantag = args[2].c_str(); // clan tag clanname = args[3].c_str(); // clan name @@ -756,7 +756,7 @@ namespace pvpgn } describe_command(c, args[0].c_str()); - return -1; + return 0; } static int command_set_flags(t_connection * c) @@ -776,7 +776,7 @@ namespace pvpgn if (args[1].empty() || (args[1][0] != '+' && args[1][0] != '-')) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); @@ -835,7 +835,7 @@ namespace pvpgn if (args[1].empty() || (args[1][0] != '+' && args[1][0] != '-')) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); @@ -903,7 +903,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username @@ -952,7 +952,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username @@ -1001,7 +1001,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username @@ -1066,7 +1066,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username @@ -1151,7 +1151,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username @@ -1219,7 +1219,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username @@ -1289,7 +1289,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username @@ -1487,7 +1487,7 @@ namespace pvpgn if (args[2].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } msg = args[2].c_str(); // message @@ -1520,7 +1520,7 @@ namespace pvpgn if (args[2].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[2].c_str(); // username @@ -1560,7 +1560,7 @@ namespace pvpgn if (args[2].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[2].c_str(); // username @@ -1603,7 +1603,7 @@ namespace pvpgn if (args[2].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[2].c_str(); // username @@ -1737,7 +1737,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // message @@ -1755,7 +1755,7 @@ namespace pvpgn if (args[2].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username text = args[2].c_str(); // message @@ -1807,7 +1807,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } char const * cname = args[1].c_str(); // channel name @@ -1849,7 +1849,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // username @@ -1882,7 +1882,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // message @@ -2193,7 +2193,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // channelname @@ -2301,7 +2301,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // username @@ -2342,7 +2342,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // username @@ -2389,7 +2389,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username text = args[2].c_str(); // reason @@ -2468,7 +2468,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username text = args[2].c_str(); // reason @@ -2539,7 +2539,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // username @@ -2583,7 +2583,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // message @@ -2609,7 +2609,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // message @@ -2643,7 +2643,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // username @@ -2673,7 +2673,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // username if (!(account = accountlist_find_account(text))) @@ -2706,7 +2706,7 @@ namespace pvpgn if ( !(clienttag = tag_validate_client(args[1].c_str())) ) { describe_command(c, args[0].c_str()); - return -1; + return 0; } } @@ -2737,7 +2737,7 @@ namespace pvpgn if (!(clienttag = tag_validate_client(args[1].c_str()))) { describe_command(c, args[0].c_str()); - return -1; + return 0; } } @@ -2869,7 +2869,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } dest = args[1].c_str(); // clienttag difficulty = args[1].c_str(); // difficulty (only for diablo) @@ -2907,7 +2907,7 @@ namespace pvpgn if (!(cbdata.tag = tag_validate_client(dest))) { describe_command(c, args[0].c_str()); - return -1; + return 0; } if (cbdata.diff == game_difficulty_none) @@ -2944,7 +2944,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // clienttag @@ -2963,7 +2963,7 @@ namespace pvpgn if (!(clienttag = tag_validate_client(text))) { describe_command(c, args[0].c_str()); - return -1; + return 0; } snprintf(msgtemp, sizeof(msgtemp), "Current channels of type %.64s", text); message_send_text(c, message_type_info, c, msgtemp); @@ -3026,7 +3026,7 @@ namespace pvpgn if (args[2].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username @@ -3082,7 +3082,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } if (args[2].empty()) @@ -3266,7 +3266,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } dest = args[1].c_str(); // username; @@ -3481,7 +3481,7 @@ namespace pvpgn if (username[0] == '\0' || (username[0] == '#' && (username[1] < '0' || username[1] > '9'))) { describe_command(c, args[0].c_str()); - return -1; + return 0; } if (username[0] == '#') { @@ -3522,7 +3522,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } session = args[1].c_str(); // session id min = args[1].c_str(); // minutes of ban @@ -3701,51 +3701,50 @@ namespace pvpgn { int mode = restart_mode_all; // all by default - text = skip_command(text); + std::vector args = split_command(text, 1); - if (text[0] == '\0') + if (args[1].empty()) { - message_send_text(c, message_type_info, c, "Usage:"); - message_send_text(c, message_type_info, c, "/rehash "); - message_send_text(c, message_type_info, c, " = all | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua"); + describe_command(c, args[0].c_str()); return 0; } + std::string mode_str = args[1]; - if (!strcasecmp(text, "all")) + if (mode_str == "all") mode = restart_mode_channels; - else if (!strcasecmp(text, "channels")) + else if (mode_str == "channels") mode = restart_mode_channels; - else if (!strcasecmp(text, "realms")) + else if (mode_str == "realms") mode = restart_mode_realms; - else if (!strcasecmp(text, "autoupdate")) + else if (mode_str == "autoupdate") mode = restart_mode_autoupdate; - else if (!strcasecmp(text, "news")) + else if (mode_str == "news") mode = restart_mode_news; - else if (!strcasecmp(text, "versioncheck")) + else if (mode_str == "versioncheck") mode = restart_mode_versioncheck; - else if (!strcasecmp(text, "ipbans")) + else if (mode_str == "ipbans") mode = restart_mode_ipbans; - else if (!strcasecmp(text, "helpfile")) + else if (mode_str == "helpfile") mode = restart_mode_helpfile; - else if (!strcasecmp(text, "banners")) + else if (mode_str == "banners") mode = restart_mode_banners; - else if (!strcasecmp(text, "tracker")) + else if (mode_str == "tracker") mode = restart_mode_tracker; - else if (!strcasecmp(text, "commandgroups")) + else if (mode_str == "commandgroups") mode = restart_mode_commandgroups; - else if (!strcasecmp(text, "aliasfile")) + else if (mode_str == "aliasfile") mode = restart_mode_aliasfile; - else if (!strcasecmp(text, "transfile")) + else if (mode_str == "transfile") mode = restart_mode_transfile; - else if (!strcasecmp(text, "tournament")) + else if (mode_str == "tournament") mode = restart_mode_tournament; - else if (!strcasecmp(text, "icons")) + else if (mode_str == "icons") mode = restart_mode_icons; - else if (!strcasecmp(text, "anongame")) + else if (mode_str == "anongame") mode = restart_mode_anongame; - else if (!strcasecmp(text, "topiclist")) + else if (mode_str == "topiclist") mode = restart_mode_topiclist; - else if (!strcasecmp(text, "lua")) + else if (mode_str == "lua") mode = restart_mode_lua; else { @@ -3772,7 +3771,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); @@ -3854,7 +3853,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } rank_s = args[1].c_str(); // rank tag_s = args[2].c_str(); // clienttag @@ -4094,7 +4093,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } delta_s = args[1].c_str(); // timer delta msgtext_s = args[2].c_str(); // message text display when timer elapsed @@ -4134,7 +4133,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username @@ -4251,7 +4250,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username if (!args[2].empty()) @@ -4308,7 +4307,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // username @@ -4339,7 +4338,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username if (!args[2].empty()) @@ -4396,7 +4395,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // username @@ -4424,7 +4423,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } flag_s = args[1].c_str(); // flag @@ -4445,7 +4444,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } tag_s = args[1].c_str(); // flag @@ -4482,7 +4481,7 @@ namespace pvpgn if (args[1].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } text = args[1].c_str(); // ip or username @@ -4540,7 +4539,7 @@ namespace pvpgn if (args[2].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); // username key = args[2].c_str(); // key @@ -4723,7 +4722,7 @@ namespace pvpgn if (((args[1] == "list" || args[1] == "l") && args[2].empty()) || !(args[1] == "list" || args[1] == "l") && args[3].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } command = args[1].c_str(); // command username = args[2].c_str(); // username @@ -5016,7 +5015,7 @@ namespace pvpgn if (args[2].empty()) { describe_command(c, args[0].c_str()); - return -1; + return 0; } username = args[1].c_str(); tag = args[2].c_str(); // clienttag From 9c0afe54cb387e20b038dd79639d35949e9174d5 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 23 May 2014 23:28:33 +0400 Subject: [PATCH 027/144] Enable trackers by default https://github.com/HarpyWar/pvpgn/issues/18 --- conf/bnetd.conf.in | 2 +- conf/bnetd.conf.win32 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/bnetd.conf.in b/conf/bnetd.conf.in index 4c7923824..f797ccb48 100644 --- a/conf/bnetd.conf.in +++ b/conf/bnetd.conf.in @@ -444,7 +444,7 @@ track = 60 # Use a comma delimited list of hostnames with optional UDP port numbers # after colons. (port 6114 is the default for the newer tracking protocol) #trackaddrs = "track.pvpgn.org,localhost:9999" -#trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net" +trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net" # Change these to match your system, for example: location = "unknown" diff --git a/conf/bnetd.conf.win32 b/conf/bnetd.conf.win32 index 1f127fcf6..b5ede90ce 100644 --- a/conf/bnetd.conf.win32 +++ b/conf/bnetd.conf.win32 @@ -421,7 +421,7 @@ track = 60 # Use a comma delimited list of hostnames with optional UDP port numbers # after colons. (port 6114 is the default for the newer tracking protocol) #trackaddrs = "track.pvpgn.org,localhost:9999" -#trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net" +trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net" # Change these to match your system, for example: location = "unknown" From af2baccdb8a2b624627caa94eac5595ac8f76e07 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 24 May 2014 20:54:51 +0400 Subject: [PATCH 028/144] Actually message length is 255 (not 254), and limitation in Blizzard game clients is the same. --- src/common/packet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/packet.cpp b/src/common/packet.cpp index e5c65cd16..ffd83cc55 100644 --- a/src/common/packet.cpp +++ b/src/common/packet.cpp @@ -1389,9 +1389,9 @@ namespace pvpgn } for (pos = offset; packet->u.data[pos] != '\0'; pos++) - if (pos >= size || pos - offset >= maxlen) + if (pos >= size || pos - offset > maxlen) return NULL; - if (pos >= size || pos - offset >= maxlen) /* NUL must be inside too */ + if (pos >= size || pos - offset > maxlen) /* NUL must be inside too */ return NULL; return packet->u.data + offset; } From d4428c1971c87f51a75992a931db65ed4235424b Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 24 May 2014 20:55:52 +0400 Subject: [PATCH 029/144] /alert command with `messagebox_show` function https://github.com/HarpyWar/pvpgn/issues/15 --- conf/bnhelp.conf.in | 7 +++++ conf/command_groups.conf.in | 1 + src/bnetd/command.cpp | 54 +++++++++++++++++++++++++++++++++++++ src/bnetd/message.cpp | 22 +++++++++++++++ src/bnetd/message.h | 2 ++ src/common/bnet_protocol.h | 16 ++++++++++- src/common/packet.cpp | 2 ++ src/common/packet.h | 2 ++ src/common/xstring.cpp | 14 ++++++++++ src/common/xstring.h | 1 + 10 files changed, 120 insertions(+), 1 deletion(-) diff --git a/conf/bnhelp.conf.in b/conf/bnhelp.conf.in index 580f5e667..3ca1dc3f1 100644 --- a/conf/bnhelp.conf.in +++ b/conf/bnhelp.conf.in @@ -211,6 +211,13 @@ Example: /realmann Hello everyone! +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + %news -------------------------------------------------------- /news diff --git a/conf/command_groups.conf.in b/conf/command_groups.conf.in index 902b4ff97..711a36a43 100644 --- a/conf/command_groups.conf.in +++ b/conf/command_groups.conf.in @@ -150,6 +150,7 @@ 2 /realmann 2 /ann /announce +2 /alert 3 /serverban /ipban 3 /ipscan diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index a63867b64..77e28e3bd 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -371,6 +371,7 @@ namespace pvpgn static int _handle_moderate_command(t_connection * c, char const * text); static int _handle_clearstats_command(t_connection * c, char const * text); static int _handle_tos_command(t_connection * c, char const * text); + static int _handle_alert_command(t_connection * c, char const * text); static const t_command_table_row standard_command_table[] = { @@ -487,6 +488,7 @@ namespace pvpgn { "/moderate", _handle_moderate_command }, { "/clearstats", _handle_clearstats_command }, { "/icon", handle_icon_command }, + { "/alert", _handle_alert_command }, { NULL, NULL } @@ -5062,5 +5064,57 @@ namespace pvpgn return 0; } + /* Send message to all clients (similar to announce, but in messagebox) */ + static int _handle_alert_command(t_connection * c, char const * text) + { + char const * channel_name; + const char * topic; + t_clienttag clienttag; + t_clienttag clienttag_dest; + + clienttag = conn_get_clienttag(c); + // disallow clients that doesn't support SID_MESSAGEBOX + if (clienttag != CLIENTTAG_STARCRAFT_UINT && clienttag != CLIENTTAG_BROODWARS_UINT && clienttag != CLIENTTAG_STARJAPAN_UINT && clienttag != CLIENTTAG_SHAREWARE_UINT && + clienttag != CLIENTTAG_DIABLORTL_UINT && clienttag != CLIENTTAG_DIABLOSHR_UINT && + clienttag != CLIENTTAG_WARCIIBNE_UINT && clienttag != CLIENTTAG_BNCHATBOT_UINT) + { + message_send_text(c, message_type_error, c, "Your game client doesn't support MessageBox."); + return -1; + } + + std::vector args = split_command(text, 1); + if (args[1].empty()) + { + describe_command(c, args[0].c_str()); + return 0; + } + + // reduntant line - it adds a caption to message box + std::string goodtext = args[1] + "\n\n***************************\nBy " + conn_get_username(c); + + // caption + snprintf(msgtemp, sizeof(msgtemp), "Information from %.64s", prefs_get_servername()); + + t_connection * conn; + t_elem const * curr; + // send to online users + LIST_TRAVERSE_CONST(connlist(), curr) + { + if (conn = (t_connection*)elem_get_data(curr)) + { + clienttag_dest = conn_get_clienttag(conn); + + if (clienttag_dest != CLIENTTAG_STARCRAFT_UINT && clienttag_dest != CLIENTTAG_BROODWARS_UINT && clienttag_dest != CLIENTTAG_STARJAPAN_UINT && clienttag_dest != CLIENTTAG_SHAREWARE_UINT && + clienttag_dest != CLIENTTAG_DIABLORTL_UINT && clienttag_dest != CLIENTTAG_DIABLOSHR_UINT && + clienttag_dest != CLIENTTAG_WARCIIBNE_UINT && clienttag_dest != CLIENTTAG_BNCHATBOT_UINT) { + continue; + } + messagebox_show(conn, goodtext.c_str(), msgtemp); + } + } + + return 0; + } + } } diff --git a/src/bnetd/message.cpp b/src/bnetd/message.cpp index 5cf0bc850..bfc53d512 100644 --- a/src/bnetd/message.cpp +++ b/src/bnetd/message.cpp @@ -22,6 +22,7 @@ #include #include +#include #include "compat/gethostname.h" #include "common/xalloc.h" @@ -33,6 +34,7 @@ #include "common/bn_type.h" #include "common/list.h" #include "common/util.h" +#include "common/xstring.h" #include "account.h" #include "account_wrap.h" @@ -1712,6 +1714,26 @@ namespace pvpgn return 0; } + /* Show message box on a client side (https://github.com/HarpyWar/pvpgn/issues/15) */ + extern int messagebox_show(t_connection * dst, char const * text, char const * caption, int type) + { + t_packet *rpacket; + + std::string newtext = str_replace_nl(text); + + if ((rpacket = packet_create(packet_class_bnet))) + { + packet_set_size(rpacket, sizeof(t_server_messagebox)); + packet_set_type(rpacket, SERVER_MESSAGEBOX); + bn_int_set(&rpacket->u.server_messagebox.style, type); + packet_append_string(rpacket, newtext.c_str()); + packet_append_string(rpacket, caption); + conn_push_outqueue(dst, rpacket); + packet_del_ref(rpacket); + } + return 0; + } + } } diff --git a/src/bnetd/message.h b/src/bnetd/message.h index 5a5cd51fc..8ebcfb2e7 100644 --- a/src/bnetd/message.h +++ b/src/bnetd/message.h @@ -121,6 +121,7 @@ namespace pvpgn #include #define JUST_NEED_TYPES #include "connection.h" +#include "common/bnet_protocol.h" #undef JUST_NEED_TYPES namespace pvpgn @@ -140,6 +141,7 @@ namespace pvpgn extern int message_send_text(t_connection * dst, t_message_type type, t_connection * src, char const * text); extern int message_send_formatted(t_connection * dst, char const * text); extern int message_send_file(t_connection * dst, std::FILE * fd); + extern int messagebox_show(t_connection * dst, char const * text, char const * caption = "", int type = SERVER_MESSAGEBOX_OK); } diff --git a/src/common/bnet_protocol.h b/src/common/bnet_protocol.h index d86935494..8e275cb74 100644 --- a/src/common/bnet_protocol.h +++ b/src/common/bnet_protocol.h @@ -4052,7 +4052,21 @@ namespace pvpgn */ } PACKED_ATTR() t_server_clanmemberupdate; + + +#define SERVER_MESSAGEBOX 0x19ff + typedef struct + { + t_bnet_header h; + bn_int style; + /* Text */ + /* Caption */ + } PACKED_ATTR() t_server_messagebox; +#define SERVER_MESSAGEBOX_OK 0x00000000 +#define SERVER_MESSAGEBOX_OKCANCEL 0x00000001 +#define SERVER_MESSAGEBOX_YESNO 0x00000004 + + } #endif - diff --git a/src/common/packet.cpp b/src/common/packet.cpp index ffd83cc55..33fec355f 100644 --- a/src/common/packet.cpp +++ b/src/common/packet.cpp @@ -746,6 +746,8 @@ namespace pvpgn return "SERVER_CLANMEMBER_REMOVED_NOTIFY"; case SERVER_CLANMEMBERUPDATE: return "SERVER_CLANMEMBERUPDATE"; + case SERVER_MESSAGEBOX: + return "SERVER_MESSAGEBOX"; } return "unknown"; diff --git a/src/common/packet.h b/src/common/packet.h index d61e02871..e3c21b318 100644 --- a/src/common/packet.h +++ b/src/common/packet.h @@ -365,6 +365,8 @@ namespace pvpgn t_server_claninforeply server_claninforeply; t_client_findanongame_profile_clan client_findanongame_profile_clan; t_server_findanongame_profile_clan server_findanongame_profile_clan; + + t_server_messagebox server_messagebox; } u; } t_packet; diff --git a/src/common/xstring.cpp b/src/common/xstring.cpp index 973949469..992a7a8a3 100644 --- a/src/common/xstring.cpp +++ b/src/common/xstring.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include "compat/strdup.h" #include "common/xalloc.h" @@ -365,4 +366,17 @@ namespace pvpgn return result; } + + /* Replace "\n" in string to a new line character '\n' */ + extern std::string str_replace_nl(char const * text) + { + std::string s(text); + size_t pos = 0; + while ((pos = s.find("\\n", pos)) != std::string::npos) { + s.replace(pos, 2, "\n"); + } + return s; + } + + } diff --git a/src/common/xstring.h b/src/common/xstring.h index 78af358b8..6c7821081 100644 --- a/src/common/xstring.h +++ b/src/common/xstring.h @@ -34,6 +34,7 @@ namespace pvpgn extern char * str_strip_affix(char * str, char const * affix); extern const char *str_replace(char *orig, char *rep, char *with); extern std::vector split_command(char const * text, int args_count); + extern std::string str_replace_nl(char const * text); /* Fix for std::string for some unix compilers From 4d862593b48323deb3b12ff6c8eaed9cfd141380 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 24 May 2014 23:24:12 +0400 Subject: [PATCH 030/144] New Lua functions: describe_command, messagebox_show --- src/bnetd/luafunctions.cpp | 59 ++++++++++++++++++++++++++++++++++++++ src/bnetd/luafunctions.h | 3 +- src/bnetd/luainterface.cpp | 2 ++ 3 files changed, 63 insertions(+), 1 deletion(-) diff --git a/src/bnetd/luafunctions.cpp b/src/bnetd/luafunctions.cpp index f96fb4cf1..b05949aba 100644 --- a/src/bnetd/luafunctions.cpp +++ b/src/bnetd/luafunctions.cpp @@ -47,6 +47,7 @@ #include "clan.h" #include "attrlayer.h" #include "icons.h" +#include "helpfile.h" #include "luawrapper.h" #include "luaobjects.h" @@ -614,6 +615,64 @@ namespace pvpgn return 1; } + /* Display help for a command */ + extern int __describe_command(lua_State* L) + { + char const *username, *cmdname; + try + { + lua::stack st(L); + // get args + st.at(1, username); + st.at(2, cmdname); + + if (t_account * account = accountlist_find_account(username)) + { + if (t_connection * c = account_get_conn(account)) + describe_command(c, cmdname); + } + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 0; + } + + /* Show messagebox */ + extern int __messagebox_show(lua_State* L) + { + char const *username, *text, *caption; + int messagebox_type; + try + { + lua::stack st(L); + // get args + st.at(1, username); + st.at(2, text); + st.at(3, caption); + st.at(4, messagebox_type); + + if (t_account * account = accountlist_find_account(username)) + { + if (t_connection * c = account_get_conn(account)) + messagebox_show(c, text, caption, messagebox_type); + } + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 0; + } } } #endif \ No newline at end of file diff --git a/src/bnetd/luafunctions.h b/src/bnetd/luafunctions.h index 285dd1a99..eab410122 100644 --- a/src/bnetd/luafunctions.h +++ b/src/bnetd/luafunctions.h @@ -52,7 +52,8 @@ namespace pvpgn extern int __command_get_group(lua_State* L); extern int __icon_get_rank(lua_State* L); - + extern int __describe_command(lua_State* L); + extern int __messagebox_show(lua_State* L); } } diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 63ea62510..0f27b9c07 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -140,6 +140,8 @@ namespace pvpgn { "command_get_group", __command_get_group }, { "icon_get_rank", __icon_get_rank }, + { "describe_command", __describe_command }, + { "messagebox_show", __messagebox_show }, { 0, 0 } }; From ee04fdd23dfef90f0b852a6e90df23c7f5edc08e Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Mon, 26 May 2014 16:17:51 +0400 Subject: [PATCH 031/144] Lua scripts pack. It is a part of PvPGN now. First large implementation in Lua is Trivia Quiz Game (/quiz command) http://i.imgur.com/8QV3blt.png --- CMakeLists.txt | 6 +- conf/bnhelp.conf.in | 50 +- lua/CMakeLists.txt | 19 +- lua/command/redirect.lua | 32 + lua/command/w3motd.lua | 29 + lua/config.lua | 23 + lua/extend/account.lua | 26 + lua/extend/account_wrap.lua | 516 ++++ lua/extend/channel.lua | 43 + lua/extend/enum/attr.lua | 13 + lua/extend/enum/eventlog.lua | 17 + lua/extend/enum/game.lua | 133 + lua/extend/enum/message.lua | 46 + lua/extend/enum/messagebox.lua | 51 + lua/extend/game.lua | 17 + lua/extend/message.lua | 15 + lua/handle_channel.lua | 22 + lua/handle_command.lua | 83 + lua/handle_game.lua | 63 + lua/handle_server.lua | 17 + lua/handle_user.lua | 20 + lua/include/bitwise.lua | 33 + lua/include/common.lua | 19 + lua/include/file.lua | 76 + lua/include/string.lua | 59 + lua/include/table.lua | 160 + lua/include/timer.lua | 65 + lua/main.lua | 13 + lua/quiz/command.lua | 128 + lua/quiz/helper.lua | 54 + lua/quiz/questions/dota.txt | 155 + lua/quiz/questions/misc.txt | 5150 +++++++++++++++++++++++++++++++ lua/quiz/questions/warcraft.txt | 42 + lua/quiz/quiz.lua | 274 ++ lua/quiz/records.lua | 87 + lua/quiz/records.txt | 0 36 files changed, 7534 insertions(+), 22 deletions(-) create mode 100644 lua/command/redirect.lua create mode 100644 lua/command/w3motd.lua create mode 100644 lua/config.lua create mode 100644 lua/extend/account.lua create mode 100644 lua/extend/account_wrap.lua create mode 100644 lua/extend/channel.lua create mode 100644 lua/extend/enum/attr.lua create mode 100644 lua/extend/enum/eventlog.lua create mode 100644 lua/extend/enum/game.lua create mode 100644 lua/extend/enum/message.lua create mode 100644 lua/extend/enum/messagebox.lua create mode 100644 lua/extend/game.lua create mode 100644 lua/extend/message.lua create mode 100644 lua/handle_channel.lua create mode 100644 lua/handle_command.lua create mode 100644 lua/handle_game.lua create mode 100644 lua/handle_server.lua create mode 100644 lua/handle_user.lua create mode 100644 lua/include/bitwise.lua create mode 100644 lua/include/common.lua create mode 100644 lua/include/file.lua create mode 100644 lua/include/string.lua create mode 100644 lua/include/table.lua create mode 100644 lua/include/timer.lua create mode 100644 lua/main.lua create mode 100644 lua/quiz/command.lua create mode 100644 lua/quiz/helper.lua create mode 100644 lua/quiz/questions/dota.txt create mode 100644 lua/quiz/questions/misc.txt create mode 100644 lua/quiz/questions/warcraft.txt create mode 100644 lua/quiz/quiz.lua create mode 100644 lua/quiz/records.lua create mode 100644 lua/quiz/records.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index a970e4a0f..ed0a3732a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,5 +30,9 @@ option(WITH_PGSQL "include PostgreSQL user accounts support" OFF) option(WITH_ODBC "include ODBC user accounts support" OFF) include(ConfigureChecks.cmake) -subdirs(src conf man files lua) +subdirs(src conf man files) +if(WITH_LUA) + add_subdirectory(lua) +endif(WITH_LUA) + ENABLE_TESTING() diff --git a/conf/bnhelp.conf.in b/conf/bnhelp.conf.in index 3ca1dc3f1..2fee341b2 100644 --- a/conf/bnhelp.conf.in +++ b/conf/bnhelp.conf.in @@ -162,7 +162,7 @@ -------------------------------------------------------- /games all Displays a list of all games. - /games [l]obby + /games l[obby] Displays a list of games in lobby. %channels chs @@ -383,11 +383,11 @@ -------------------------------------------------------- /mail [options] -------------------------------------------------------- - /mail [s]end + /mail s[end] Sends mail to with . - /mail [r]ead [index] + /mail r[ead] [index] Reads mail [index] - /mail [del]ete {all|} + /mail del[ete] {all|} Deletes mail or [all] mail. %flag @@ -411,7 +411,7 @@ -------------------------------------------------------- /ipban [option] [time] -------------------------------------------------------- - /ipban [l[ist]] + /ipban l[ist] Displays a list of banned IP addresses /ipban c[heck] Checks if IP address is banned or not. @@ -460,25 +460,25 @@ Create a new clan (max length = 4; spaces are allowed in ) Commands for clan members: - /clan [m]sg (alias [w]hisper) + /clan m[sg] (alias [w]hisper) Whispers a message to all your fellow clan members - /clan [inv]ite + /clan inv[ite] Invite to your clan. - /clan [inv]ite get + /clan inv[ite] get Show clanname which you have been invited - /clan [inv]ite accept + /clan inv[ite] accept Accept invitation to clan - /clan [inv]ite decline + /clan inv[ite] decline Decline invitation to clan Commands for clan chieftain: /clan motd Update the clan's Message of the Day to . - /clan [pub]lic (alias: pub) + /clan pub[lic] (alias: pub) Opens the clan channel up to the public so that anyone may enter. - /clan [priv]ate (alias: priv) + /clan priv[ate] (alias: priv) Closes the clan channel such that only members of the clan may enter. - /clan [dis]band + /clan dis[band] Disband your clan. %ping p latency @@ -589,13 +589,27 @@ Commands for clan chieftain: Use /icon without [name] to display list of available icons in your stash. -------------------------------------------------------- Syntax for operator/admin: - /icon [a]dd + /icon a[dd] Add icon into user stash - /icon [d]el + /icon d[el] Remove icon from user stash - /icon [s]et + /icon s[et] Set custom icon to user without adding it in user stash - /icon [l]ist + /icon l[ist] Display icons in user's stash - /icon [l]ist + /icon l[ist] Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt index 6466e70b5..1836e1a89 100644 --- a/lua/CMakeLists.txt +++ b/lua/CMakeLists.txt @@ -1,4 +1,17 @@ -# TODO: add lua files here +# copy all files from lua directory + +file(GLOB DEPLOY_FILES_AND_DIRS "${PROJECT_SOURCE_DIR}/lua/*") + +foreach(ITEM ${DEPLOY_FILES_AND_DIRS}) + IF( IS_DIRECTORY "${ITEM}" ) + LIST( APPEND DIRS_TO_DEPLOY "${ITEM}" ) + ELSE() + IF(NOT ${ITEM} MATCHES "CMakeLists.txt") + LIST( APPEND FILES_TO_DEPLOY "${ITEM}" ) + ENDIF(NOT ${ITEM} MATCHES "CMakeLists.txt") + ENDIF() +endforeach() + +INSTALL( FILES ${FILES_TO_DEPLOY} DESTINATION ${LOCALSTATEDIR}/lua ) +INSTALL( DIRECTORY ${DIRS_TO_DEPLOY} DESTINATION ${LOCALSTATEDIR}/lua ) -install(FILES - DESTINATION ${LOCALSTATEDIR}/lua) diff --git a/lua/command/redirect.lua b/lua/command/redirect.lua new file mode 100644 index 000000000..428ad4d50 --- /dev/null +++ b/lua/command/redirect.lua @@ -0,0 +1,32 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Send text to user from server. Works like /announce, +-- but directly to user and message text is not red. +-- /redirect +function command_redirect(account, text) + + local args = split_command(text, 2) + + if not args[1] or not args[2] then + api.describe_command(account.name, args[0]) + return 1 + end + + -- get destination account + local dest = api.account_get_by_name(args[1]) + + if next(dest) == nil or dest.online == "false" then + api.message_send_text(account.name, message_type_error, account.name, "User '" ..args[1].. "' is offline") + return 1 + end + + api.message_send_text(dest.name, message_type_info, dest.name, args[2]) + + return 1 +end diff --git a/lua/command/w3motd.lua b/lua/command/w3motd.lua new file mode 100644 index 000000000..5c47373a3 --- /dev/null +++ b/lua/command/w3motd.lua @@ -0,0 +1,29 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- +-- Read file w3motd.txt line by line and send text to user +-- + +local username = nil + +function command_w3motd(account, text) + -- allow warcraft 3 client only + if not (account.clienttag == "W3XP" or account.clienttag == "WAR3") then + return 0 + end + + username = account.name + local data = file_load(config.motdw3file, w3motd_sendline_callback) + + return 1 +end + +function w3motd_sendline_callback(line) + api.message_send_text(username, message_type_info, nil, line) +end diff --git a/lua/config.lua b/lua/config.lua new file mode 100644 index 000000000..c74266d11 --- /dev/null +++ b/lua/config.lua @@ -0,0 +1,23 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Config table can be extended here with your own variables +-- values are preloaded from bnetd.conf +config = { + -- Quiz settings + quiz = true, + quiz_filelist = "misc, dota, warcraft", -- display available files in "/quiz start" + quiz_competitive_mode = true, -- top players loses half of points which last player received; at the end top of records loses half of points which players received in current game + quiz_max_questions = 100, -- from start to end + quiz_question_delay = 5, -- delay before send next question + quiz_hint_delay = 20, -- delay between prompts + quiz_users_in_top = 15, -- how many users display in TOP list + quiz_channel = nil, -- (do not modify!) channel when quiz has started (it assigned with start) + +} + diff --git a/lua/extend/account.lua b/lua/extend/account.lua new file mode 100644 index 000000000..f04e6a673 --- /dev/null +++ b/lua/extend/account.lua @@ -0,0 +1,26 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Get count of all online users +function users_get_count() + local count = 0 + for id,username in pairs(api.server_get_users()) do + count = count + 1 + end + return count +end + +-- Get count of all server account +function accounts_get_count() + local count = 0 + for id,username in pairs(api.server_get_users(true)) do + count = count + 1 + end + return count +end + diff --git a/lua/extend/account_wrap.lua b/lua/extend/account_wrap.lua new file mode 100644 index 000000000..6fde66af7 --- /dev/null +++ b/lua/extend/account_wrap.lua @@ -0,0 +1,516 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- All attribute get/set actions must have a wrapper to avoid write a wrong type into database + +-- +-- Profile +-- + +function account_get_acct_email(username) + return api.account_get_attr(username, "BNET\\acct\\email", attr_type_str) +end +function account_set_acct_email(username, value) + return api.account_set_attr(username, "BNET\\acct\\email", attr_type_str, value) +end + +function account_get_auth_admin(username, channelname) + if channelname then + return api.account_get_attr(username, "BNET\\auth\\admin\\" .. channelname, attr_type_bool) + else + return api.account_get_attr(username, "BNET\\auth\\admin", attr_type_bool) + end +end +function account_set_auth_admin(username, channelname, value) + if channelname then + return api.account_set_attr(username, "BNET\\auth\\admin\\" .. channelname, attr_type_bool, value) + else + return api.account_set_attr(username, "BNET\\auth\\admin", attr_type_bool, value) + end +end + +function account_get_auth_operator(username, channelname) + if channelname then + return api.account_get_attr(username, "BNET\\auth\\operator\\" .. channelname, attr_type_bool) + else + return api.account_get_attr(username, "BNET\\auth\\operator", attr_type_bool) + end +end +function account_set_auth_operator(username, channelname, value) + if channelname then + return api.account_set_attr(username, "BNET\\auth\\operator\\" .. channelname, attr_type_bool, value) + else + return api.account_set_attr(username, "BNET\\auth\\operator", attr_type_bool, value) + end +end + +function account_get_auth_voice(username, channelname) + if channelname then + return api.account_get_attr(username, "BNET\\auth\\voice\\" .. channelname, attr_type_bool) + else + return api.account_get_attr(username, "BNET\\auth\\voice", attr_type_bool) + end +end +function account_set_auth_voice(username, channelname, value) + if channelname then + return api.account_set_attr(username, "BNET\\auth\\voice\\" .. channelname, attr_type_bool, value) + else + return api.account_set_attr(username, "BNET\\auth\\voice", attr_type_bool, value) + end +end + +function account_is_operator_or_admin(username, channelname) + return account_get_auth_operator(username, channelname) or account_get_auth_admin(username, channelname) or account_get_auth_operator(username, nil) or account_get_auth_admin(username, nil) +end + + +function account_get_auth_announce(username) + return api.account_get_attr(username, "BNET\\auth\\announce", attr_type_bool) +end +function account_set_auth_announce(username, value) + return api.account_set_attr(username, "BNET\\auth\\announce", attr_type_bool, value) +end + +function account_get_auth_botlogin(username) + return api.account_get_attr(username, "BNET\\auth\\botlogin", attr_type_bool) +end +function account_set_auth_botlogin(username, value) + return api.account_set_attr(username, "BNET\\auth\\botlogin", attr_type_bool, value) +end + +function account_get_auth_lock(username) + return api.account_get_attr(username, "BNET\\auth\\lockk", attr_type_bool) +end +function account_set_auth_lock(username, value) + return api.account_set_attr(username, "BNET\\auth\\lockk", attr_type_bool, value) +end + +function account_get_auth_locktime(username) + return api.account_get_attr(username, "BNET\\auth\\locktime", attr_type_int) +end +function account_set_auth_locktime(username, value) + return api.account_set_attr(username, "BNET\\auth\\locktime", attr_type_int, value) +end + +function account_get_auth_lockreason(username) + return api.account_get_attr(username, "BNET\\auth\\lockreason", attr_type_str) +end +function account_set_auth_lockreason(username, value) + return api.account_set_attr(username, "BNET\\auth\\lockreason", attr_type_str, value) +end + +function account_get_auth_lockby(username) + return api.account_get_attr(username, "BNET\\auth\\lockby", attr_type_str) +end +function account_set_auth_lockby(username, value) + return api.account_set_attr(username, "BNET\\auth\\lockby", attr_type_str, value) +end + +function account_get_auth_mute(username) + return api.account_get_attr(username, "BNET\\auth\\mute", attr_type_bool) +end +function account_set_auth_mute(username, value) + return api.account_set_attr(username, "BNET\\auth\\mute", attr_type_bool, value) +end + +function account_get_auth_mutetime(username) + return api.account_get_attr(username, "BNET\\auth\\mutetime", attr_type_int) +end +function account_set_auth_mutetime(username, value) + return api.account_set_attr(username, "BNET\\auth\\mutetime", attr_type_int, value) +end + +function account_get_auth_mutereason(username) + return api.account_get_attr(username, "BNET\\auth\\mutereason", attr_type_str) +end +function account_set_auth_mutereason(username, value) + return api.account_set_attr(username, "BNET\\auth\\mutereason", attr_type_str, value) +end + +function account_get_auth_muteby(username) + return api.account_get_attr(username, "BNET\\auth\\muteby", attr_type_str) +end +function account_set_auth_muteby(username, value) + return api.account_set_attr(username, "BNET\\auth\\muteby", attr_type_str, value) +end + +function account_get_auth_command_groups(username) + return api.account_get_attr(username, "BNET\\auth\\command_groups", attr_type_int) +end +function account_set_auth_command_groups(username, value) + return api.account_set_attr(username, "BNET\\auth\\command_groups", attr_type_int, value) +end + +function account_get_acct_lastlogin_time(username) + return api.account_get_attr(username, "BNET\\acct\\lastlogin_time", attr_type_int) +end +function account_set_acct_lastlogin_time(username, value) + return api.account_set_attr(username, "BNET\\acct\\lastlogin_time", attr_type_int, value) +end + +function account_get_acct_lastlogin_owner(username) + return api.account_get_attr(username, "BNET\\acct\\lastlogin_owner", attr_type_str) +end +function account_set_acct_lastlogin_owner(username, value) + return api.account_set_attr(username, "BNET\\acct\\lastlogin_owner", attr_type_str, value) +end + +function account_get_acct_createtime(username) + return api.account_get_attr(username, "BNET\\acct\\ctime", attr_type_int) +end +function account_set_acct_createtime(username, value) + return api.account_set_attr(username, "BNET\\acct\\ctime", attr_type_int, value) +end + +function account_get_acct_lastlogin_clienttag(username) + return api.account_get_attr(username, "BNET\\acct\\lastlogin_clienttag", attr_type_str) +end +function account_set_acct_lastlogin_clienttag(username, value) + return api.account_set_attr(username, "BNET\\acct\\lastlogin_clienttag", attr_type_str, value) +end + +function account_get_acct_lastlogin_ip(username) + return api.account_get_attr(username, "BNET\\acct\\lastlogin_ip", attr_type_str) +end +function account_set_acct_lastlogin_ip(username, value) + return api.account_set_attr(username, "BNET\\acct\\lastlogin_ip", attr_type_str, value) +end + +function account_get_acct_passhash(username) + return api.account_get_attr(username, "BNET\\acct\\passhash1", attr_type_str) +end +function account_set_acct_passhash(username, value) + return api.account_set_attr(username, "BNET\\acct\\passhash1", attr_type_str, value) +end + +function account_get_acct_verifier(username) + return api.account_get_attr(username, "BNET\\acct\\verifier", attr_type_raw) +end +function account_set_acct_verifier(username, value) + return api.account_set_attr(username, "BNET\\acct\\verifier", attr_type_raw, value) +end + +function account_get_acct_salt(username) + return api.account_get_attr(username, "BNET\\acct\\salt", attr_type_raw) +end +function account_set_acct_salt(username, value) + return api.account_set_attr(username, "BNET\\acct\\salt", attr_type_raw, value) +end + +-- +-- Profile +-- + +function account_get_auth_adminnormallogin(username) + return api.account_get_attr(username, "BNET\\auth\\adminnormallogin", attr_type_bool) +end +function account_set_auth_adminnormallogin(username, value) + return api.account_set_attr(username, "BNET\\auth\\adminnormallogin", attr_type_bool, value) +end + +function account_get_auth_changepass(username) + return api.account_get_attr(username, "BNET\\auth\\changepass", attr_type_bool) +end +function account_set_auth_changepass(username, value) + return api.account_set_attr(username, "BNET\\auth\\changepass", attr_type_bool, value) +end + +function account_get_auth_changeprofile(username) + return api.account_get_attr(username, "BNET\\auth\\changeprofile", attr_type_bool) +end +function account_set_auth_changeprofile(username, value) + return api.account_set_attr(username, "BNET\\auth\\changeprofile", attr_type_bool, value) +end + +function account_get_auth_createnormalgame(username) + return api.account_get_attr(username, "BNET\\auth\\createnormalgame", attr_type_bool) +end +function account_set_auth_createnormalgame(username, value) + return api.account_set_attr(username, "BNET\\auth\\createnormalgame", attr_type_bool, value) +end + +function account_get_auth_joinnormalgame(username) + return api.account_get_attr(username, "BNET\\auth\\joinnormalgame", attr_type_bool) +end +function account_set_auth_joinnormalgame(username, value) + return api.account_set_attr(username, "BNET\\auth\\joinnormalgame", attr_type_bool, value) +end + +function account_get_auth_createladdergame(username) + return api.account_get_attr(username, "BNET\\auth\\createladdergame", attr_type_bool) +end +function account_set_auth_createladdergame(username, value) + return api.account_set_attr(username, "BNET\\auth\\createladdergame", attr_type_bool, value) +end + +function account_get_auth_joinladdergame(username) + return api.account_get_attr(username, "BNET\\auth\\joinladdergame", attr_type_bool) +end +function account_set_auth_joinladdergame(username, value) + return api.account_set_attr(username, "BNET\\auth\\joinladdergame", attr_type_bool, value) +end + +-- +-- Profile +-- + +function account_get_sex(username) + return api.account_get_attr(username, "profile\\sex", attr_type_str) +end +function account_set_sex(username, value) + return api.account_set_attr(username, "profile\\sex", attr_type_str, value) +end + +function account_get_age(username) + return api.account_get_attr(username, "profile\\age", attr_type_str) +end +function account_set_age(username, value) + return api.account_set_attr(username, "profile\\age", attr_type_str, value) +end + +function account_get_location(username) + return api.account_get_attr(username, "profile\\location", attr_type_str) +end +function account_set_location(username, value) + return api.account_set_attr(username, "profile\\location", attr_type_str, value) +end + +function account_get_description(username) + return api.account_get_attr(username, "profile\\description", attr_type_str) +end +function account_set_description(username, value) + return api.account_set_attr(username, "profile\\description", attr_type_str, value) +end + + + +-- +-- Warcraft 3 +-- + +function account_get_soloxp(username) + return api.account_get_attr(username, "Record\\W3XP\\solo_xp", attr_type_num) +end +function account_set_soloxp(username, value) + return api.account_set_attr(username, "Record\\W3XP\\solo_xp", attr_type_num, value) +end + +function account_get_sololevel(username) + return api.account_get_attr(username, "Record\\W3XP\\solo_level", attr_type_num) +end +function account_set_sololevel(username, value) + return api.account_set_attr(username, "Record\\W3XP\\solo_level", attr_type_num, value) +end + +function account_get_solowins(username) + return api.account_get_attr(username, "Record\\W3XP\\solo_wins", attr_type_num) +end +function account_set_solowins(username, value) + return api.account_set_attr(username, "Record\\W3XP\\solo_wins", attr_type_num, value) +end + +function account_get_sololosses(username) + return api.account_get_attr(username, "Record\\W3XP\\solo_losses", attr_type_num) +end +function account_set_sololosses(username, value) + return api.account_set_attr(username, "Record\\W3XP\\solo_losses", attr_type_num, value) +end + +function account_get_solorank(username) + return api.account_get_attr(username, "Record\\W3XP\\solo_rank", attr_type_num) +end +function account_set_solorank(username, value) + return api.account_set_attr(username, "Record\\W3XP\\solo_rank", attr_type_num, value) +end + + +-- +-- Starcraft +-- + +function account_get_normal_wins(username) + return api.account_get_attr(username, "Record\\SEXP\\0\\wins", attr_type_num) +end +function account_set_normal_wins(username, value) + return api.account_set_attr(username, "Record\\SEXP\\0\\wins", attr_type_num, value) +end + +function account_get_normal_losses(username) + return api.account_get_attr(username, "Record\\SEXP\\0\\losses", attr_type_num) +end +function account_set_normal_losses(username, value) + return api.account_set_attr(username, "Record\\SEXP\\0\\losses", attr_type_num, value) +end + +function account_get_normal_draws(username) + return api.account_get_attr(username, "Record\\SEXP\\0\\draws", attr_type_num) +end +function account_set_normal_draws(username, value) + return api.account_set_attr(username, "Record\\SEXP\\0\\draws", attr_type_num, value) +end + +function account_get_normal_disconnects(username) + return api.account_get_attr(username, "Record\\SEXP\\0\\disconnects", attr_type_num) +end +function account_set_normal_disconnects(username, value) + return api.account_set_attr(username, "Record\\SEXP\\0\\disconnects", attr_type_num, value) +end + +function account_get_normal_last_time(username) + return api.account_get_attr(username, "Record\\SEXP\\0\\last game", attr_type_num) +end +function account_set_normal_last_time(username, value) + return api.account_set_attr(username, "Record\\SEXP\\0\\last game", attr_type_num, value) +end + +function account_get_normal_last_result(username) + return api.account_get_attr(username, "Record\\SEXP\\0\\last game result", attr_type_num) +end +function account_set_normal_last_result(username, value) + return api.account_set_attr(username, "Record\\SEXP\\0\\last game result", attr_type_num, value) +end + + +function account_get_ladder_wins(username) + return api.account_get_attr(username, "Record\\SEXP\\1\\wins", attr_type_num) +end +function account_set_ladder_wins(username, value) + return api.account_set_attr(username, "Record\\SEXP\\1\\wins", attr_type_num, value) +end + +function account_get_ladder_losses(username) + return api.account_get_attr(username, "Record\\SEXP\\1\\losses", attr_type_num) +end +function account_set_ladder_losses(username, value) + return api.account_set_attr(username, "Record\\SEXP\\1\\losses", attr_type_num, value) +end + +function account_get_ladder_draws(username) + return api.account_get_attr(username, "Record\\SEXP\\1\\draws", attr_type_num) +end +function account_set_ladder_draws(username, value) + return api.account_set_attr(username, "Record\\SEXP\\1\\draws", attr_type_num, value) +end + +function account_get_ladder_disconnects(username) + return api.account_get_attr(username, "Record\\SEXP\\1\\disconnects", attr_type_num) +end +function account_set_ladder_disconnects(username, value) + return api.account_set_attr(username, "Record\\SEXP\\1\\disconnects", attr_type_num, value) +end + +function account_get_ladder_last_time(username) + return api.account_get_attr(username, "Record\\SEXP\\1\\last game", attr_type_num) +end +function account_set_ladder_last_time(username, value) + return api.account_set_attr(username, "Record\\SEXP\\1\\last game", attr_type_num, value) +end + +function account_get_ladder_last_result(username) + return api.account_get_attr(username, "Record\\SEXP\\1\\last game result", attr_type_num) +end +function account_set_ladder_last_result(username, value) + return api.account_set_attr(username, "Record\\SEXP\\1\\last game result", attr_type_num, value) +end + +function account_get_ladder_rating(username) + return api.account_get_attr(username, "Record\\SEXP\\1\\rating", attr_type_num) +end +function account_set_ladder_rating(username, value) + return api.account_set_attr(username, "Record\\SEXP\\1\\rating", attr_type_num, value) +end + +function account_get_ladder_rank(username) + return api.account_get_attr(username, "Record\\SEXP\\1\\rank", attr_type_num) +end +function account_set_ladder_rank(username, value) + return api.account_set_attr(username, "Record\\SEXP\\1\\rank", attr_type_num, value) +end + +-- TODO: wrappers for 2x2 + + +-- +-- Warcraft 2 +-- + +--[[ Warcraft 2 has the same functions as Starcraft, but "W2BN" instead of "SEXP" in path. Replace it if you have a single 2 server. ]]-- + + + +-- +-- Diablo +-- + +function account_get_normal_level(username) + return api.account_get_attr(username, "Record\\DRTL\\0\\level", attr_type_num) +end +function account_set_normal_level(username, value) + return api.account_set_attr(username, "Record\\DRTL\\0\\level", attr_type_num, value) +end + +function account_get_normal_class(username) + return api.account_get_attr(username, "Record\\DRTL\\0\\class", attr_type_num) +end +function account_set_normal_class(username, value) + return api.account_set_attr(username, "Record\\DRTL\\0\\class", attr_type_num, value) +end + +function account_get_normal_diablo_kills(username) + return api.account_get_attr(username, "Record\\DRTL\\0\\diablo kills", attr_type_num) +end +function account_set_normal_diablo_kills(username, value) + return api.account_set_attr(username, "Record\\DRTL\\0\\diablo kills", attr_type_num, value) +end + +function account_get_normal_strength(username) + return api.account_get_attr(username, "Record\\DRTL\\0\\strength", attr_type_num) +end +function account_set_normal_strength(username, value) + return api.account_set_attr(username, "Record\\DRTL\\0\\strength", attr_type_num, value) +end + +function account_get_normal_dexterity(username) + return api.account_get_attr(username, "Record\\DRTL\\0\\dexterity", attr_type_num) +end +function account_set_normal_dexterity(username, value) + return api.account_set_attr(username, "Record\\DRTL\\0\\dexterity", attr_type_num, value) +end + +function account_get_normal_vitality(username) + return api.account_get_attr(username, "Record\\DRTL\\0\\vitality", attr_type_num) +end +function account_set_normal_vitality(username, value) + return api.account_set_attr(username, "Record\\DRTL\\0\\vitality", attr_type_num, value) +end + +function account_get_normal_gold(username) + return api.account_get_attr(username, "Record\\DRTL\\0\\gold", attr_type_num) +end +function account_set_normal_gold(username, value) + return api.account_set_attr(username, "Record\\DRTL\\0\\gold", attr_type_num, value) +end + + +-- +-- Westwood Online +-- + +function account_get_wol_apgar(username) + return api.account_get_attr(username, "Record\\WOL\\auth\\apgar", attr_type_str) +end +function account_set_wol_apgar(username, value) + return api.account_set_attr(username, "Record\\WOL\\auth\\apgar", attr_type_str, value) +end + +function account_get_locale(username) + return api.account_get_attr(username, "Record\\WOL\\auth\\locale", attr_type_str) +end +function account_set_locale(username, value) + return api.account_set_attr(username, "Record\\WOL\\auth\\locale", attr_type_str, value) +end diff --git a/lua/extend/channel.lua b/lua/extend/channel.lua new file mode 100644 index 000000000..48300aa8e --- /dev/null +++ b/lua/extend/channel.lua @@ -0,0 +1,43 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Return channel id by name (if channel not found then return -1) +function channel_get_id_by_name(channel_name) + for id,name in pairs(api.server_get_channels()) do + if name == channel_name then + return id + end + end + return -1 +end + + +-- Send message in channel +-- message_type: message_type_info | message_type_error +function channel_send_message(channel_name, text, message_type) + channel_id = channel_get_id_by_name(channel_name) + if (channel_id == -1) then + return nil + end + + channel = api.channel_get_by_id(channel_id) + + for username in string.split(channel.memberlist,",") do + api.message_send_text(username, message_type, nil, text) + end +end + + +-- Get count of all channels +function channels_get_count() + local count = 0 + for id,channelname in pairs(api.server_get_channels()) do + count = count + 1 + end + return count +end \ No newline at end of file diff --git a/lua/extend/enum/attr.lua b/lua/extend/enum/attr.lua new file mode 100644 index 000000000..84c0fadbb --- /dev/null +++ b/lua/extend/enum/attr.lua @@ -0,0 +1,13 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +attr_type_str, +attr_type_num, +attr_type_bool, +attr_type_raw += 0,1,2,3 \ No newline at end of file diff --git a/lua/extend/enum/eventlog.lua b/lua/extend/enum/eventlog.lua new file mode 100644 index 000000000..dc538f5af --- /dev/null +++ b/lua/extend/enum/eventlog.lua @@ -0,0 +1,17 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +eventlog_level_none, +eventlog_level_trace, +eventlog_level_debug, +eventlog_level_info, +eventlog_level_warn, +eventlog_level_error, +eventlog_level_fatal, +eventlog_level_gui -- Win32 GUI += 0,1,2,4,8,16,32,64 diff --git a/lua/extend/enum/game.lua b/lua/extend/enum/game.lua new file mode 100644 index 000000000..a2e0aa252 --- /dev/null +++ b/lua/extend/enum/game.lua @@ -0,0 +1,133 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +game_type_none, +game_type_all, +game_type_topvbot, +game_type_melee, +game_type_ffa, +game_type_oneonone, +game_type_ctf, +game_type_greed, +game_type_slaughter, +game_type_sdeath, +game_type_ladder, +game_type_ironman, +game_type_mapset, +game_type_teammelee, +game_type_teamffa, +game_type_teamctf, +game_type_pgl, +game_type_diablo, +game_type_diablo2open, +game_type_diablo2closed, +game_type_anongame += 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 + + +game_status_started, +game_status_full, +game_status_open, +game_status_loaded, +game_status_done += 0,1,2,3,4 + + +game_result_none, +game_result_win, +game_result_loss, +game_result_draw, +game_result_disconnect, +game_result_observer, +game_result_playing += 0,1,2,3,4,5,6 + + +game_option_none, +game_option_melee_normal, +game_option_ffa_normal, +game_option_oneonone_normal, +game_option_ctf_normal, +game_option_greed_10000, +game_option_greed_7500, +game_option_greed_5000, +game_option_greed_2500, +game_option_slaughter_60, +game_option_slaughter_45, +game_option_slaughter_30, +game_option_slaughter_15, +game_option_sdeath_normal, +game_option_ladder_countasloss, +game_option_ladder_nopenalty, +game_option_mapset_normal, +game_option_teammelee_4, +game_option_teammelee_3, +game_option_teammelee_2, +game_option_teamffa_4, +game_option_teamffa_3, +game_option_teamffa_2, +game_option_teamctf_4, +game_option_teamctf_3, +game_option_teamctf_2, +game_option_topvbot_7, +game_option_topvbot_6, +game_option_topvbot_5, +game_option_topvbot_4, +game_option_topvbot_3, +game_option_topvbot_2, +game_option_topvbot_1 += 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32 + + +game_maptype_none, +game_maptype_selfmade, +game_maptype_blizzard, +game_maptype_ladder, +game_maptype_pgl, +game_maptype_kbk, +game_maptype_compusa += 0,1,2,3,4,5,6 + + +game_tileset_none, +game_tileset_badlands, +game_tileset_space, +game_tileset_installation, +game_tileset_ashworld, +game_tileset_jungle, +game_tileset_desert, +game_tileset_ice, +game_tileset_twilight += 0,1,2,3,4,5,6,7,8,9 + + +game_speed_none, +game_speed_slowest, +game_speed_slower, +game_speed_slow, +game_speed_normal, +game_speed_fast, +game_speed_faster, +game_speed_fastest += 0,1,2,3,4,5,6,7 + + +game_difficulty_none, +game_difficulty_normal, +game_difficulty_nightmare, +game_difficulty_hell, +game_difficulty_hardcore_normal, +game_difficulty_hardcore_nightmare, +game_difficulty_hardcore_hell += 0,1,2,3,4,5,6 + + +game_flag_none, +game_flag_private += 0,1 + diff --git a/lua/extend/enum/message.lua b/lua/extend/enum/message.lua new file mode 100644 index 000000000..8fa60da2b --- /dev/null +++ b/lua/extend/enum/message.lua @@ -0,0 +1,46 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +message_type_adduser, +message_type_join, +message_type_part, +message_type_whisper, +message_type_talk, +message_type_broadcast, +message_type_channel, +message_type_userflags, +message_type_whisperack, +message_type_friendwhisperack, +message_type_channelfull, +message_type_channeldoesnotexist, +message_type_channelrestricted, +message_type_info, +message_type_error, +message_type_emote, +message_type_uniqueid, -- bad message type? +message_type_mode, -- bad message type? +message_type_kick, +message_type_quit, +-- IRC specific messages +message_type_nick, +message_type_notice, +message_type_namreply, +message_type_topic, +-- Westwood Online Extensions +message_type_host, +message_type_invmsg, +message_type_page, +message_type_wol_joingame, +message_type_gameopt_talk, +message_type_gameopt_whisper, +message_type_wol_start_game, +message_type_wol_advertr, +message_type_wol_chanchk, +message_type_wol_userip, +message_type_null += 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34 diff --git a/lua/extend/enum/messagebox.lua b/lua/extend/enum/messagebox.lua new file mode 100644 index 000000000..bcbe7f57d --- /dev/null +++ b/lua/extend/enum/messagebox.lua @@ -0,0 +1,51 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- https://github.com/HarpyWar/pvpgn/issues/15 +-- http://msdn.microsoft.com/en-us/library/windows/desktop/ms645505(v=vs.85).aspx +-- +-- use math_or(mb_type1, mb_type2) to combine two messagebox types +--[[ Example code to display Windows MessageBox: + local mb_type = math_or(MB_DEFBUTTON2, math_or(MB_ABORTRETRYIGNORE, MB_ICONEXCLAMATION) ) + api.messagebox_show(account.name, "aaaaaaaaaaaaaaaaaaaaaaaaawwadwwadawdawdawdwadawdaaw", "MessageBox from " .. config.servername, mb_type) +]]-- + +MB_ABORTRETRYIGNORE, +MB_CANCELTRYCONTINUE, +MB_HELP, +MB_OK, +MB_OKCANCEL, +MB_RETRYCANCEL, +MB_YESNO, +MB_YESNOCANCEL, + +MB_ICONEXCLAMATION, +MB_ICONWARNING, +MB_ICONINFORMATION, +MB_ICONASTERISK, +MB_ICONQUESTION, +MB_ICONSTOP, +MB_ICONERROR, +MB_ICONHAND, + +MB_DEFBUTTON1, +MB_DEFBUTTON2, +MB_DEFBUTTON3, +MB_DEFBUTTON4, + +MB_APPLMODAL, +MB_SYSTEMMODAL, +MB_TASKMODAL, + +MB_DEFAULT_DESKTOP_ONLY, +MB_RIGHT, +MB_RTLREADING, +MB_SETFOREGROUND, +MB_TOPMOST, +MB_SERVICE_NOTIFICATION += 0x00000002,0x00000006,0x00004000,0x00000000,0x00000001,0x00000005,0x00000004,0x00000003,0x00000030,0x00000030,0x00000040,0x00000040,0x00000020,0x00000010,0x00000010,0x00000010,0x00000000,0x00000100,0x00000200,0x00000300,0x00000000,0x00001000,0x00002000,0x00020000,0x00080000,0x00100000,0x00010000,0x00040000,0x00200000 diff --git a/lua/extend/game.lua b/lua/extend/game.lua new file mode 100644 index 000000000..19855ba91 --- /dev/null +++ b/lua/extend/game.lua @@ -0,0 +1,17 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Get count of all games +function games_get_count() + local count = 0 + for id,gamename in pairs(api.server_get_games()) do + count = count + 1 + end + return count +end + diff --git a/lua/extend/message.lua b/lua/extend/message.lua new file mode 100644 index 000000000..1eeb303c8 --- /dev/null +++ b/lua/extend/message.lua @@ -0,0 +1,15 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Send announce to all connected users +function message_send_all(text) + for id,username in pairs(api.server_get_users()) do + api.message_send_text(username, message_type_broadcast, nil, text) + end +end + diff --git a/lua/handle_channel.lua b/lua/handle_channel.lua new file mode 100644 index 000000000..d54260bd8 --- /dev/null +++ b/lua/handle_channel.lua @@ -0,0 +1,22 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +function handle_channel_message(channel, account, text, message_type) + if config.quiz and channel.name == config.quiz_channel then + quiz_handle_message(account.name, text) + end + + --api.eventlog(eventlog_level_gui, __FUNCTION__, text) + --return 1 +end +function handle_channel_userjoin(channel, account) + --api.eventlog(eventlog_level_gui, __FUNCTION__, account.name.." joined "..channel.name) +end +function handle_channel_userleft(channel, account) + --api.eventlog(eventlog_level_gui, __FUNCTION__, account.name.." left "..channel.name) +end diff --git a/lua/handle_command.lua b/lua/handle_command.lua new file mode 100644 index 000000000..60cd8ba38 --- /dev/null +++ b/lua/handle_command.lua @@ -0,0 +1,83 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- List of available lua commands +-- (To create a new command - create a new file in directory "commands") +local lua_command_table = { + [1] = { + ["/w3motd"] = command_w3motd, + + -- Quiz + ["/quiz"] = command_quiz, + }, + [8] = { + ["/redirect"] = command_redirect, + }, +} + + +-- Global function to handle commands +-- ("return 1" from a command will break next C++ code execution) +function handle_command(account, text) + -- find command in table + for cg,cmdlist in pairs(lua_command_table) do + for cmd,func in pairs(cmdlist) do + if string.starts(text, cmd) then + + -- check if command group is in account.commandgroups + if not math_and(account.commandgroups, cg) then + api.message_send_text(account.name, message_type_error, account.name, "This command is reserved for admins.") + return 1 + end + + -- FIXME: we can use _G[func] if func is a text but not a function, + -- like ["/dotastats"] = "command_dotastats" + -- and function command_dotastats can be defined below, not only before + return func(account, text) + end + end + end + return 0 +end + + +-- Split command to arguments, +-- index 0 is always a command name without a slash +-- return table with arguments +function split_command(text, args_count) + local count = args_count + local result = {} + local tmp = "" + + -- remove slash from the command + if not string:empty(text) then + text = string.sub(text, 2) + end + + i = 0 + -- split by space + for token in string.split(text) do + if not string:empty(token) then + if (i < count) then + result[i] = token + i = i + 1 + else + if not string:empty(tmp) then + tmp = tmp .. " " + end + tmp = tmp .. token + end + end + end + -- push remaining text at the end + if not string:empty(tmp) then + result[count] = tmp + end + return result +end + diff --git a/lua/handle_game.lua b/lua/handle_game.lua new file mode 100644 index 000000000..fb25cff4f --- /dev/null +++ b/lua/handle_game.lua @@ -0,0 +1,63 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Global function to handle game create +function handle_game_create(game) + --for i,j in pairs(game) do + -- api.message_send_text(game.owner, message_type_info, game.owner, i.." = "..j) + --end +end + + + + +-- Global function to handle user join to game +function handle_game_userjoin(game, account) + --for i,j in pairs(game) do + -- message_send_text(account.name, message_type_info, account.name, i.." = "..j) + --end +end + + +-- Global function to handle user left from game +function handle_game_userleft(game, account) + --for username in string.split(str,",") do + -- if (account.name ~= username) then + -- api.message_send_text(username, message_type_whisper, nil, "Bye ".. account.name) + -- end + --end +end + +-- Global function to handle game end +function handle_game_end(game) + --api.message_send_text(game.owner, message_type_whisper, nil, "End game") +end + +-- Global function to handle game report +function handle_game_report(game) + + --for i,j in pairs(game) do + -- api.message_send_text("harpywar", message_type_info, game.owner, i.." = "..j) + -- api.message_send_text(game.owner, message_type_info, game.owner, i.." = "..j) + --end + + --api.eventlog(eventlog_level_gui, __FUNCTION__, game.last_access) +end + + + +-- Global function to handle game destroy +function handle_game_destroy(game) + --api.message_send_text(game.owner, message_type_whisper, nil, "Destroy game") +end + + +-- Global function to handle game status +function handle_game_changestatus(game) + --api.message_send_text(game.owner, message_type_info, nil, "Change status of the game to ".. game.status) +end diff --git a/lua/handle_server.lua b/lua/handle_server.lua new file mode 100644 index 000000000..8028314c0 --- /dev/null +++ b/lua/handle_server.lua @@ -0,0 +1,17 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Loop each second +function handle_server_mainloop() + -- Tick all timers + for t in pairs(__timers) do + __timers[t]:tick() + end + + -- api.eventlog(eventlog_level_gui, __FUNCTION__, os.time()) +end diff --git a/lua/handle_user.lua b/lua/handle_user.lua new file mode 100644 index 000000000..62e63aee3 --- /dev/null +++ b/lua/handle_user.lua @@ -0,0 +1,20 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +function handle_user_whisper(account_src, account_dst, text) + --api.eventlog(eventlog_level_gui, __FUNCTION__, account_src.name.."->"..account_dst.name.. ": ".. text) + --return 1; +end +function handle_user_login(account) + --api.eventlog(eventlog_level_gui, __FUNCTION__, account.name.." logged in") + --return 1; +end +function handle_user_disconnect(account) + --api.eventlog(eventlog_level_gui, __FUNCTION__, account.name.." disconnected") +end + diff --git a/lua/include/bitwise.lua b/lua/include/bitwise.lua new file mode 100644 index 000000000..584641603 --- /dev/null +++ b/lua/include/bitwise.lua @@ -0,0 +1,33 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- +-- Bitwise functions: +-- math_not, math_and, math_or, math_xor +-- + +local function nand(x,y,z) + z=z or 2^16 + if z<2 then + return 1-x*y + else + return nand((x-x%z)/z,(y-y%z)/z,math.sqrt(z))*z+nand(x%z,y%z,math.sqrt(z)) + end +end +function math_not(y,z) + return nand(nand(0,0,z),y,z) +end +function math_and(x,y,z) + return nand(math_not(0,z),nand(x,y,z),z) +end +function math_or(x,y,z) + return nand(math_not(x,z),math_not(y,z),z) +end +function math_xor(x,y,z) + return math_and(nand(x,y,z),math_or(x,y,z),z) +end \ No newline at end of file diff --git a/lua/include/common.lua b/lua/include/common.lua new file mode 100644 index 000000000..a4eaa7696 --- /dev/null +++ b/lua/include/common.lua @@ -0,0 +1,19 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Return the script path and line of the function where it is executed +__FUNCTION__ = nil +setmetatable(_G, {__index = + function(t, k) + if k == '__FUNCTION__' then + local w = debug.getinfo(2, "S") + return w.short_src..":"..w.linedefined + end + end +}) + diff --git a/lua/include/file.lua b/lua/include/file.lua new file mode 100644 index 000000000..80fac0c0d --- /dev/null +++ b/lua/include/file.lua @@ -0,0 +1,76 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Read file line by line +-- callback 2 is optional +-- You can process line with function callback1(line, callback2) +function file_load(filename, callback1, callback2) + local file = io.open(filename, "r") + if file then + for line in file:lines() do + if callback2 then + callback1(line, callback2) + else + callback1(line) + end + end + file.close(file) + api.eventlog(eventlog_level_trace, __FUNCTION__, "File readed " .. filename) + else + api.eventlog(eventlog_level_error, __FUNCTION__, "Could not open file " .. filename) + return false + end + return true +end + +-- (callback) for "file_load" to load file with each line format like "key = value" +function file_load_dictionary_callback(line, callback) + if string:empty(line) then return 0 end + + local idx = 0 + local a, b + for v in string.split(line, "=") do + if idx == 0 then + a = string:trim(v) + else + b = string:trim(v) + end + idx = idx + 1 + end + if not string:empty(b) and not string:empty(a) then + callback(a, b) + end +end + + + + + + +-- Save raw text "data" into a filename +function file_save(data, filename) + local file = io.open(filename, "w") + + file:write(data) + file:close() +end + +-- Save file using callback +function file_save2(filename, callback) + local file = io.open(filename, "w") + + callback(file) + file:close() +end +-- Check file for exist +function file_exists(filename) + local f=io.open(filename, "r") + if f~=nil then io.close(f) return true else return false end +end + + diff --git a/lua/include/string.lua b/lua/include/string.lua new file mode 100644 index 000000000..0ad2bc798 --- /dev/null +++ b/lua/include/string.lua @@ -0,0 +1,59 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Split text into table by delimeter +-- Usage example: string.split("one,two",",") +function string:split(str) + str = str or '%s+' + local st, g = 1, self:gmatch("()("..str..")") + local function getter(segs, seps, sep, cap1, ...) + st = sep and seps + #sep + return self:sub(segs, (seps or 0) - 1), cap1 or sep, ... + end + return function() if st then return getter(st, g()) end end +end + +-- Check string is nil or empty +-- bool +function string:empty(str) + return str == nil or str == '' +end + +-- bool +function string.starts(str, starts) + if string:empty(str) then return false end + return string.sub(str,1,string.len(starts))==starts +end + +-- bool +function string.ends(str, ends) + if string:empty(str) then return false end + return ends=='' or string.sub(str,-string.len(ends))==ends +end + +-- Replace string +function string.replace(str, pattern, replacement) + if string:empty(str) then return str end + local s, n = string.gsub(str, pattern, replacement) + return s +end + +function string:trim(str) + if string:empty(str) then return str end + return (str:gsub("^%s*(.-)%s*$", "%1")) +end + + + +-- Replace char in specified position of string +function replace_char(pos, str, replacement) + if string:empty(str) then return str end + return str:sub(1, pos-1) .. replacement .. str:sub(pos+1) +end + + diff --git a/lua/include/table.lua b/lua/include/table.lua new file mode 100644 index 000000000..0ebe8c4ae --- /dev/null +++ b/lua/include/table.lua @@ -0,0 +1,160 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Clear table +function table.clear(_table) + for k in pairs(_table) do + _table[k] = nil + end +end + +-- Get table size +function table.count(T) + if not T or not next(t) then return 0 end + + local count = 0 + for _ in pairs(T) do count = count + 1 end + return count +end + + +--[[ + Save Table to File + Load Table from File + v 1.0 + + Lua 5.2 compatible + + Only Saves Tables, Numbers and Strings + Insides Table References are saved + Does not save Userdata, Metatables, Functions and indices of these + ---------------------------------------------------- + table.save( table , filename ) + + on failure: returns an error msg + + ---------------------------------------------------- + table.load( filename or stringtable ) + + Loads a table that has been saved via the table.save function + + on success: returns a previously saved table + on failure: returns as second argument an error msg + ---------------------------------------------------- + + Licensed under the same terms as Lua itself. +]]-- +do + -- declare local variables + --// exportstring( string ) + --// returns a "Lua" portable version of the string + local function exportstring( s ) + return string.format("%q", s) + end + + --// The Save Function + function table.save( tbl,filename ) + local charS,charE = " ","\n" + local file,err = io.open( filename, "wb" ) + if err then return err end + + -- initiate variables for save procedure + local tables,lookup = { tbl },{ [tbl] = 1 } + file:write( "return {"..charE ) + + for idx,t in ipairs( tables ) do + file:write( "-- Table: {"..idx.."}"..charE ) + file:write( "{"..charE ) + local thandled = {} + + for i,v in ipairs( t ) do + thandled[i] = true + local stype = type( v ) + -- only handle value + if stype == "table" then + if not lookup[v] then + table.insert( tables, v ) + lookup[v] = #tables + end + file:write( charS.."{"..lookup[v].."},"..charE ) + elseif stype == "string" then + file:write( charS..exportstring( v )..","..charE ) + elseif stype == "number" then + file:write( charS..tostring( v )..","..charE ) + end + end + + for i,v in pairs( t ) do + -- escape handled values + if (not thandled[i]) then + + local str = "" + local stype = type( i ) + -- handle index + if stype == "table" then + if not lookup[i] then + table.insert( tables,i ) + lookup[i] = #tables + end + str = charS.."[{"..lookup[i].."}]=" + elseif stype == "string" then + str = charS.."["..exportstring( i ).."]=" + elseif stype == "number" then + str = charS.."["..tostring( i ).."]=" + end + + if str ~= "" then + stype = type( v ) + -- handle value + if stype == "table" then + if not lookup[v] then + table.insert( tables,v ) + lookup[v] = #tables + end + file:write( str.."{"..lookup[v].."},"..charE ) + elseif stype == "string" then + file:write( str..exportstring( v )..","..charE ) + elseif stype == "number" then + file:write( str..tostring( v )..","..charE ) + end + end + end + end + file:write( "},"..charE ) + end + file:write( "}" ) + file:close() + end + + --// The Load Function + function table.load( sfile ) + local ftables,err = loadfile( sfile ) + if err or not ftables() then return _,err end + local tables = ftables() + + for idx = 1,#tables do + local tolinki = {} + for i,v in pairs( tables[idx] ) do + if type( v ) == "table" then + tables[idx][i] = tables[v[1]] + end + if type( i ) == "table" and tables[i[1]] then + table.insert( tolinki,{ i,tables[i[1]] } ) + end + end + -- link indices + for _,v in ipairs( tolinki ) do + tables[idx][v[2]],tables[idx][v[1]] = tables[idx][v[1]],nil + end + end + return tables[1] + end +-- close do +end + +-- ChillCode \ No newline at end of file diff --git a/lua/include/timer.lua b/lua/include/timer.lua new file mode 100644 index 000000000..25ac0fc52 --- /dev/null +++ b/lua/include/timer.lua @@ -0,0 +1,65 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Global table with timers +__timers = {} + +function timer_add(id, interval, callback) + timer_object = timer:new(id, interval, callback) + table.insert(__timers, timer_object) +end + +function timer_del(id) + -- safe remove from the timers (we can not just use __timers = nil here) + local i = 0 + for k,v in pairs(__timers) do + i = i + 1 + if (v.id == id) then + table.remove(__timers, i) + return true + end + end + return false +end + +function timer_get(id) + local i = 0 + for k,v in pairs(__timers) do + i = i + 1 + if (v.id == id) then + return v + end + end +end + + +-- +-- Timer class +-- +timer = {} + +-- Create a new timer with unique id and given interval +function timer:new(id, interval, callback) + options = { id = id, interval = interval, prev_time = 0, callback = callback } + self.__index = self + return setmetatable(options, self) +end + +-- Event when timer executes +function timer:tick() + if os.time() < self.prev_time + self.interval then return 0 end + self.prev_time = os.time() + + -- Debug: display time when the timer ticks + -- api.eventlog(eventlog_level_gui, __FUNCTION__, self.interval .. ": " .. os.time()) + + -- execute callback function + return self.callback(self) +end + + diff --git a/lua/main.lua b/lua/main.lua new file mode 100644 index 000000000..c6dd3cba8 --- /dev/null +++ b/lua/main.lua @@ -0,0 +1,13 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- this function executes after preload all the lua scripts +function main() + + +end diff --git a/lua/quiz/command.lua b/lua/quiz/command.lua new file mode 100644 index 000000000..d333e6643 --- /dev/null +++ b/lua/quiz/command.lua @@ -0,0 +1,128 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- /quiz +function command_quiz(account, text) + if not config.quiz then + return 0 + end + + local args = split_command(text, 2) + + if (args[1] == "start") then + return q_command_start(account, args[2]) + + elseif (args[1] == "stop") then + return q_command_stop(account) + + elseif (args[1] == "stats") then + if not args[2] then + return q_command_toplist(account) + else + return q_command_stats(account, args[2]) + end + end + + api.describe_command(account.name, args[0]) + return 1 +end + + +-- Start quiz in current channel +function q_command_start(account, filename) + + local channel = api.channel_get_by_id(account.channel_id) + if not channel then + api.message_send_text(account.name, message_type_error, account.name, "This command can only be used inside a channel.") + return 1 + end + + if not account_is_operator_or_admin(account.name, channel.name) then + api.message_send_text(account.name, message_type_error, account.name, "You must be at least a Channel Operator to use this command.") + return 1 + end + + if config.quiz_channel then + api.message_send_text(account.name, message_type_error, account.name, 'Quiz has already ran in channel "'..config.quiz_channel..'". Use /qstop to force finish.') + return 1 + end + + -- check if file exists + if not filename or not file_exists(q_directory() .. "/questions/" .. filename .. ".txt") then + api.message_send_text(account.name, message_type_error, account.name, "Available Quiz dictionaries: ") + api.message_send_text(account.name, message_type_error, account.name, " " .. config.quiz_filelist) + return 1 + end + + quiz:start(channel.name, filename) + return 1 +end + +-- Stop quiz +function q_command_stop(account) + + if not config.quiz_channel then + api.message_send_text(account.name, message_type_error, account.name, 'Quiz is not running.') + return 1 + end + + quiz:stop(account.name) + + return 1 +end + +-- Display Quiz Top players record +function q_command_toplist(account) + + -- load records (if it was not loaded yet) + if not q_load_records() then + return 0 + end + + local output = "Top " .. config.quiz_users_in_top .. " Quiz records:" + api.message_send_text(account.name, message_type_info, account.name, output) + + -- display TOP of total records + for i,t in pairs(q_records_total) do + if (i > config.quiz_users_in_top) then break end + + local output = string.format(" %d. %s [%d points]", i, t.username, t.points) + api.message_send_text(account.name, message_type_info, account.name, output) + end + + return 1 +end + + +-- Display single player's record +function q_command_stats(account, username) + + -- load records (if it was not loaded yet) + if not q_load_records() then + return 0 + end + + local found = false + -- find user in records + for i,t in pairs(q_records_total) do + if string.upper(t.username) == string.upper(username) then + api.message_send_text(account.name, message_type_info, account.name, t.username.. "'s Quiz record:") + + local output = string.format(" %d. %s [%d points]", i, t.username, t.points) + api.message_send_text(account.name, message_type_info, account.name, output) + + found = true + end + end + + if not found then + api.message_send_text(account.name, message_type_info, account.name, username .. " has never played Quiz.") + end + + return 1 +end diff --git a/lua/quiz/helper.lua b/lua/quiz/helper.lua new file mode 100644 index 000000000..95a3e279d --- /dev/null +++ b/lua/quiz/helper.lua @@ -0,0 +1,54 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Get path to Quiz directory +function q_directory() + return config.scriptdir .. "/quiz" +end + +-- Replace each symbol in string with * +-- Example: input = "hello world", return = "***** *****" +function q_hide_unswer(input) + local output = input + for i = 1, #input do + local c = input:sub(i,i) + if not (c == " ") then + output = replace_char(i, output, "*") + end + end + return output +end + +-- Open one random symbol in hidden (with *) string from original string +-- Example: hidden = "***** *****", original = "hello world", return = "***l* *****" +function q_show_next_symbol(hidden, original) + local output = hidden + + if hidden == original then + return output + end + + local replaced = false + while not replaced do + local i = math.random(#hidden) + local c = hidden:sub(i,i) + if c == "*" then + local c2 = original:sub(i,i) + output = replace_char(i, hidden, c2) + replaced = true + end + end + return output +end + + + +-- Callback to sort records table descending +function q_compare_desc(a,b) + return tonumber(a.points) > tonumber(b.points) +end diff --git a/lua/quiz/questions/dota.txt b/lua/quiz/questions/dota.txt new file mode 100644 index 000000000..80c0dbf94 --- /dev/null +++ b/lua/quiz/questions/dota.txt @@ -0,0 +1,155 @@ +************************************************** +Category: DotA +Author: AGOES +************************************************** + +One of illegal tools for playing dota? = Maphack +How many kills needed for the title killing spree? = three +How many kills needed for the title Dominating? = four +How many kills needed for the title Megakill? = five +How many kills needed for the title Unstoppable? = six +How many kills needed for the title Whicked Sick? = seven +How many kills needed for the title Monster Kill? = eight +How many kills needed for the title GodLike? = nine +How many kills needed for the title Beyond Godlike(Holy Shit!)? = ten +First kill of the Game? = First Blood +Two Kills simutaneously. = Double Kill +Three Kills simutaneously. = Triple Kill +Hero Nicknames: Vengeful Spirit. = Vs +Hero Nicknames: Leshrac the Malicious Tormented Soul. = Leshrac +Hero Nicknames: Kel'Thuzad the Lich King. = Lich +Hero Nicknames: Krobelus the Death Prophet. = Dp +Hero Nicknames: Lion the Demon Witch. = Lion +Hero Nicknames: Lesale Deathbringer the Venomancer. = Veno +Hero Nicknames: Magnus the Magnataur. = Magnataur +Hero Nicknames: Visage The Necro'lic. = Visage +Hero Nicknames: Nessaj the Chaos Knight. = Ck +Hero Nicknames: Banehallow the Lycanthrope. = Lycan +Hero Nicknames: Black Arachnia the Broodmother. = Brood +Hero Nicknames: Mortred the Phantom Assassin. = Pa +Hero Nicknames: Medusa the Gorgon. = Medusa +Hero Nicknames: Balanar the NightStalker. = Ns +Hero Nicknames: King Leoric the Skeleton King. = Leo +Hero Nicknames: Lucifer the DoomBringer. = Lucy +Hero Nicknames: Pharoh'moth the Nerubian Assassin. = Na +Hero Nicknames: Slardar the Slithereen Guard. = Slardar +Hero Nicknames: Akasha the Queen of Pain. = QoP +Hero Nicknames: Bone Clinkz the Bone Fletcher. = Clinkz +Hero Nicknames: Darkterror the Faceless Void. = Void +Hero Nicknames: Viper the Netherdrake. = Viper +Hero Nicknames: Razor the Lightning Revenant. = Razor +Hero Nicknames: Nai'x the Lifestealer. = Naix +Hero Nicknames: Pugna the Oblivion. = Pugna +Hero Nicknames: Leviathan the Tidehunter. = Levi +Hero Nicknames: Atropos the Bane Elemental. = Bane +Hero Nicknames: Rotund'jere the Necrolyte. = Necro +Hero Nicknames: Pudge the Butcher. = Pudge +Hero Nicknames: Barathrum the Spiritbreaker. = Sb +Hero Nicknames: Anub'seran the Nerubian Weaver. = Weaver +Hero Nicknames: Crixalis the Sandking. = Sk +Hero Nicknames: Mogul Kahn the Axe. = Axe +Hero Nicknames: Strygwyr the BloodSeeker. = seeker +Ultimate: Nether Swap. = Vengeful Spirit +Ultimate: Thunder God's Wrath. = Lord of Olympia +Ultimate: Untouchable. = Enchantress +Ultimate: Replicate. = Morphling +Ultimate: Freezing Field. = Crystal Maiden +Ultimate: God's Strength. = Rogue Knight +Ultimate: Song of the Siren. = Naga Siren +Ultimate: Echo Slam. = Earth Shaker +Ultimate: Permanent Invisibility. = Stealth Assassin +Ultimate: True Form. = Lone Druid +Ultimate: Laguna Blade. = Slayer +Ultimate: Omnislash. = Juggernaught +Ultimate: Global Silence. = Silencer +Ultimate: Overgrowth. = Treant Protector +Ultimate: Blackhole. = Enigma +Ultimate: Ignis Fatuus. = Keeper of the Light +Ultimate: Enrage. = Ursa Warrior +Ultimate: Phantom Edge. = Phantom Lancer +Ultimate: Mutli Cast. = Ogre Magi +Ultimate: Rearm. = Tinker +Ultimate: Wrath of Nature. = Prophet +Ultimate: Grow. = Stone Giant +Ultimate: Remote Mines. = Goblin Techies +Ultimate: Hand of God. = Holy Knight +Ultimate: Eclispe. = Moon rider +Ultimate: Assassinate. = Dwarven Sniper +Ultimate: Rampage. = Troll Warlord +Ultimate: Mass Serpent Wards. = Shadow Shaman +Ultimate: Warpath. = Bristleback +Ultimate: Primal Split. = Pandaren Battlemaster +Ultimate: Great Fortitude. = Centaur Warchief +Ultimate: Track. = Bounty Hunter +Ultimate: Elder Dragon Form. = Dragon Knight +Ultimate: Mana Void. = Anti-Mage +Ultimate: Marksmanship. = Drow Ranger +Ultimate: Guardian Angel. = Omni Knight +Ultimate: Sunder. = Soul Keeper +Ultimate: Pulse Nova. = Tormented Soul +Ultimate: Chain Frost. = Lich +Ultimate: Exorcism. = Death Prophet +Ultimate: Finger of Death. = Demon Witch +Ultimate: Poison Nova. = Venomancer +Ultimate: Reverse Polarity. = Magnataur +Ultimate: Raise Revenants. = Necro'lic +Ultimate: Phantasm. = Chaos Knight +Ultimate: Shapeshift. = Lycanthrope +Ultimate: Insatiable Hunger. = Broodmother +Ultimate: Coupe De Grace. = Phantom Assassin +Ultimate: Purge. = Gorgon +Ultimate: Darkness. = Night Stalker +Ultimate: Reincarnation. = Skeleton King +Ultimate: Doom. = Doom Bringer +Ultimate: Vendetta. = Nerubian Assassin +Ultimate: Amplify Damage. = Slithereen Guard +Ultimate: Sonic Wave. = Queen of Pain +Ultimate: Death Pact. = Bone Fletcher +Ultimate: Chronosphere. = Faceless Void +Ultimate: Viper Strike. = Netherdrake +Ultimate: Rage. = Lifestealer +Ultimate: Life Drain. = Oblivion +Ultimate: Ravage. = Tidehunter +Ultimate: Fiend's Grip. = Bane Elemental +Ultimate: Reaper's Scythe. = Necrolyte +Ultimate: Disember. = Butcher +Ultimate: Nether Strike. = Spiritbreaker +Ultimate: Time Lapse. = Nerubian Weaver +Ultimate: Requim of Souls. = Shadow Fiend +Ultimate: Epicenter. = Sand King +Ultimate: Culling Blade. = Axe +Ultimate: Rupture. = Bloodseeker +Armor Type: Spirit Tower = Fortified +Armor Type: The Frozen Throne = Fortified +Cost: Belt of Giant Strength = 450 +Cost: Blades of Alarcrity = 1000 +Cost: Blades of Attack in map 6.73c = 450 +Cost: Boots of Elvenskin = 450 +Cost: Boots of Speed = 500 +Cost: Broadsword = 1200 +Cost: Claymore = 1400 +Cost: Dagger of Escape = 2150 +Cost: Demon Edge = 2400 +Cost: Eaglehorn = 3300 +Cost: Gauntlets of Ogre Strength = 150 +Cost: Gem of True Sight = 700 +Cost: Helm of Iron Will = 950 +Cost: Mantle of Intelligence = 150 +Cost: Mask of Death = 900 +Cost: Mithril Hammer = 1600 +Cost: Ogre Axe = 1000 +Cost: Platemail = 1400 +Cost: Robe of the Magi = 450 +Cost: Sacred Relic = 3800 +Cost: Scroll for Black King Bar = 1300 +Cost: Scroll for Dagon = 1350 +Cost: Scroll for Heart of Tarrasque = 1200 +Cost: Scroll for Null Talisman = 170 +Cost: Scroll for Radiance = 1325 +Cost: Scroll for Stygian Desolator = 1200 +Cost: Slippers of Agility = 150 +Cost: Staff of Wizardry = 1000 +Cost: Ultimate Orb = 2100 +Cost: Vitality Booster = 1200 +Cost: Void Stone = 875 + diff --git a/lua/quiz/questions/misc.txt b/lua/quiz/questions/misc.txt new file mode 100644 index 000000000..4e197605c --- /dev/null +++ b/lua/quiz/questions/misc.txt @@ -0,0 +1,5150 @@ +************************************************** +Category: Various +Author: unknown +************************************************** + +What is the worlds #1 most populous city = seoul +What is the worlds #2 most populous city = sao paulo, brazil +What is the worlds #3 most populous city = bombay +What is the worlds #4 most populous city = jakarta +What is the worlds #5 most populous city = moscow +What is the worlds #6 most populous city = istanbul +What is the worlds #7 most populous city = mexico city +What is the worlds #8 most populous city = shanghai +What is the worlds #9 most populous city = tokyo +What is the worlds #10 most populous city = new york city +What is the worlds #11 most populous city = beijing +What is the worlds #12 most populous city = delhi, india +What is the worlds #13 most populous city = london +What is the worlds #14 most populous city = cairo +What is the worlds #15 most populous city = teheran +What is the worlds #16 most populous city = hong kong +What is the worlds #17 most populous city = bangkok +What is the worlds #18 most populous city = tianjin +What is the worlds #19 most populous city = lima +What is the worlds #20 most populous city = rio de janeiro +What is the worlds #21 most populous city = santafe de bogota, colombia +What is the worlds #22 most populous city = shenyang +What is the worlds #23 most populous city = santiago, chile +What is the worlds #24 most populous city = calcutta +What is the worlds #25 most populous city = st. petersburg +What is the worlds #26 most populous city = wuhan +What is the worlds #27 most populous city = guangzhou +What is the worlds #28 most populous city = madras +What is the worlds #29 most populous city = baghdad +What is the worlds #30 most populous city = pusan, south korea +Who isolated adrenaline in 1897 = john jacob abel +In what year did John Jacob Abel isolate adrenalin = 1897 +Who invented the aerosol can = erik rotheim +In what year did Erik Rotheim invent the aerosol can = 1926 +In what country was Erik Rotheim, the inventor of the aerosol can, born = norway +Who invented the air brake = george westinghouse +In what year did George Westinghouse invent the air brake = 1868 +Who invented the air conditioner = willis carrier +In what year did Willis Carrier invent air conditioning = 1911 +Who invented aluminum manufacture, (by electrolytic action) = charles hall +In what year did Charles M. Hall invent aluminum manufacture, (by electrolytic action) = 1866 +Who invented anesthetic: (first use of anesthetic-ether-on humans) = crawford long +In what year was anesthetic (ether) first used on humans = 1842 +Who invented the electric fan = schuyler wheeler +In what year did Schuyler Wheeler invent the electric fan = 1882 +Who invented the electric flatiron = henry seely +In what year did Henry Seely invent the electric flat iron = 1882 +Who invented the electric washing machine = alva fisher +In what year did Alvin Fisher invent the electric washing machine = 1906 +Who invented aspirin = dr felix hoffman +In what year did Dr Felix Hoffman invent aspirin = 1899 +Who first proposed the concept of atomic structure in 1911 = ernest rutherford +The first internal combustion engine was developed in 1885 by = karl benz +Who discovered bacteria in 1683 = anton van leeuwenhoek +In what year did Anton van Leeuwenhoek discover bacteria = 1683 +Who invented barbed wire in 1873 = joseph e. glidden +In what year did Joseph E. Glidden invent barbed wire = 1873 +Who invented the barometer in 1643 = evangelista torricelli +In what year did Evangelista Torricelli invent the barometer = 1643 +Who invented the first MODERN bicycle in 1884 = james starley +Who founded the FIRST "Big Bang" theory in 1927 (the universe originated with a huge explosion) = george lemaitre1927 +Who founded the knowledge of blood circulation = william harvey +In what year did William Harveyfound the knowledge of blood circulation = 1628 +Who invented braille in 1829 = louis braille +In what year was braille invented = 1829 +Who invented the conical bullet = claude minie +In what year did Claude Minie invent the conical bullet = 1849 +Who was the inventor of the calculating machine in 1614 = john napier +Who was the inventor of the slide rule in 1632 = william oughtred +Who was the inventor of the digital calculator in 1642 = blaise pascal +In what year did John Napier invent the calculating machine = 1614 +In what year did William Oughtred invent the slide rule = 1632 +In what year did Blaise Pascal invent the digital calculator = 1642 +Who invented the carpet sweeper in 1876 = melville r bissell +In what year did Melville R Bissell invent the carpet sweeper = 1876 +In what year was the car radio invented by William Lear and Elmer Wavering = 1929 +Who invented cement in 1824 = joseph aspdin +In what year did Joseph Aspdin invent cement = 1824 +Who invented chewing gum in 1848 = john curtis +In what year did John Curtis invent chewing gum = 1848 +Who invented the pendulum clock in 1656 = christian huygens +In what year did Christian Huygens invent the pendulum clock = 1656 +What company invented the compact disk in 1972 = rca +In what year did RCA invent the compact disk = 1972 +Who invented condensed milk in 1853 = gail borden +In what year did Gail Borden invent condensed milk = 1853 +Who defined the contagion theory (infectious diseases caused by living agent transmitted from person to person) in 1546 = girolamo Fracastoro +In what year did Girolamo Fracastoro define the contagion theory = 1546 +Who defined the continental drift theory in 1858 = antonio snider-pellegrini +In what year did Antonio Snider-Pellegrini define the continental drift theory = 1858 +In what country were cosmetics first used = egypt +In what year were cosmetics first used = 4000 b c +Who first postulated the cosamic string theory = thomas kibble +In what year did Thomas Kibble first postulate the cosamic theory = 1976 +Where was the crossbow invented = china +In what year was the crossbow invented = 300 b c +The elevator was invented by = elisha otis +In what year did Elisha Otis invent the elevator = 1852 +Who discovered the fermentation process in 1860 = louis pasteur +In what year was the fermentation process discovered by Louis Pasteur = 1860 +Who invented fiber optics = narinder kapany +In what year was fiber optics discovered by Narinder Kapany = 1955 +Frozen food was first developed by = clarence birdseye +Gunpowder was invented in = china +In what year was gunpowder invented = 700 +The gyrocompass was invented by = elmer sperry +In what year did Elmer Sperry invent the gyrocompass = 1905 +After whom was Halley's Comet named = edmund halley +Who invented the holograph = dennis gabor +In what year was the holograph invented = 1947 +Who developed the Ice age theory in 1840 = louis agassiz +Who developed the LCD (liquid crystal display) = hoffmann-la roche +In what year was the LCD first developed = 1970 +Who invented the first bifocal lens = benjamin franklin +In what year was the first bifocal lens developed = 1760 +Who developed the first cylinder lock = linus yale +In what year was the first cylinder lock developed = 1851 +Who invented the 1st generation machine gun in 1718 = james puckle +Who invented the 2nd generation machine gun in 1861 = richard j gatling +In what year did James Puckle invent the first generation machine gun = 1718 +In what year did Richard J Gatling invent the second generation machine gun = 1861 +Who was the inventor of the phosphorus match = francois derosne +In what year did Francois Derosne invent the phosphorus match = 1816 +Who invented the microphone = charles wheatstone +In what year did Charles Wheatstone invent the microphone = 1827 +Who invented the microwave oven = percy spencer +In what year was the microwave oven invented = 1947 +Who invented the moving assembly line in 1913 = henry ford +IN what year did Henry Ford invent the moving assembly line = 1913 +Who first discovered the existence of Neptune = johann galle +In what year did Johann Galle first discover the existence of Neptune = 1846 +Who discovered the neutron = james chadwick +In what year was the neurton first discovered = 1932 +Nitroglycerin was developed by = ascanio sobrero +In what year did Ascanio Sobrero develop nitroglycerin = 1846 +Who developed the first nuclear reactor = enrico fermi +In what year did Enrico Fermi develop the first nuclear reactor = 1942 +Who invented the first oil well = edwin drake +In what year was the first oil well invented = 1859 +Who discovered the ozone = christian schonbein +In what year did Christian Schonbein discover the ozone = 1839 +Who developed the first internal pacemaker = clarence lillehie +In what year did Clarence Lillehie invent the first internal pacemaker = 1957 +Paper was invented in China in = 100 a d +The parachute was invented in 1783 by = louis lenormand +In what year did Louis Lenormand invent the parachute = 1783 +Who developed the laws of planetary motion = johannes kepler +Who invented plate tectonics = alfred wegener +Where was the forked plow invented = mesopotamia +When was the forked plow invented = before 3000 b c +Who discovered the positron in 1932 = carl anderson +In what year did Carl Anderson discover the positron = 1932 +Who invented the pressure cooker (early version) = denis papin +In what year did Denis Papin invent the pressure cooker = 1679 +Who discovered the proton in England in 1919 = ernest rutherford +What year did Ernest Rutherford discover the proton = 1919 +Who invented rabies immunization = louis pasteur +In what year did Louis Pasteur invent rabies immunization = 1885 +Who invented the first practical radar = sir robert watson-watt +In what year did Sir Robert Watson-Watt invent the first practical radar = 1934 +Who discovered radiocarbon dating = willard libby +In what year did Willard Libby discover radiocarbon dating = 1947 +In what year did Willard Libby first demonstrate radiocarbon dating = 1950 +Who was the first person to receive radio noise signals from outside our galaxy = karl jansky +In what year did Karl Jansky receive the first radio noise signals from outer space = 1931 +Who successfully marketed the first safety razor = king gillette +In what year was the first safety razor successfully marketed = 1901 +Who invented the revolver = samuel colt +In what year did Samuel Colt invent the revolver = 1835 +Name the inventor of the Richter scale = charles richter +In what year did Charles Richter invent the Richter scale = 1935 +Who invented the automatic rifle = john browning +In what year did John Browning invent the automatic rifle = 1918 +Who invented the liquid-fuelled rocket = robert goddard +In what year did Robert GToddard invent the liquid-fuelled rocket = 1926 +Who invented the vulcanizationprocess of rubber = charles goodyear +In what year did Charles Goodyear invent the vulcanization process of rubber = 1839 +Who invented the safety pin = walter hunt +In what year did Walter Hunt invent the safety pin = 1849 +Who invented the first accurate seismograph = john milne +In what year did John Milne invent the first accurate seismograph = 1880 +Who invented the first sewing machine = elias howe +In what year was the first sewing machine invented = 1846 +Who invented the first continuous stitch sewing machine = isaac singer +In what year was the first continuous stitch sewing machine invented = 1851 +Who was the first person to make the first realistic application of solar energy using parabolic solar reflector to drive caloric engine on steam boiler = john ericsson +In what year did John Ericsson make the first realistic application of solar energy using parabolic solar reflector to drive caloric engine on steam boiler = 1860 +Last names of the two men who invented spectrum analysis = kirchhoff & bunsen = bunsen & kirchhoff +In what year did Kirchhoff & Bunsen invent spectrum analysis = 1859 +Who invented the stethoscope = rene laennec +In what year did Rene Laennec invent the stethoscope = 1819 +Who invented the military tank = sir ernest swinton +In what year did Sir Ernest Swinton invent the military tank = 1914 +Who invented the tape recorder (magnetic steel tape) = valdemar poulsen +In what year was the tape recorder invented = 1899 +Who invented teflon = dupont +In what year was teflon invented = 1943 +Who invented the electric transformer = william stanley +In what year was the electric transformer invented = 1885 +What is the element symbol for Actinium = ac +What is the element symbol for Aluminum = al +What is the element symbol for Americum = am +What is the element symbol for Antimony = sb +What is the element symbol for Argon = ar +What is the element symbol for Arsenic (gray) = as +What is the element symbol for Astatine = at +What is the element symbol for Barium = ba +What is the element symbol for Berkelium = bk +What is the element symbol for Berylium = be +What is the element symbol for Bismuth = bi +What is the element symbol for Bohrium = bh +What is the element symbol for Boron = b +What is the element symbol for Bromine = br +What is the element symbol for Cadmium = cd +What is the element symbol for Calcium = ca +What is the element symbol for Californium = cf +What is the element symbol for Carbon = c +What is the element symbol for Cerium = ce +What is the element symbol for Cesium = cs +What is the element symbol for Chlorine = cl +What is the element symbol for Chromium = cr +What is the element symbol for Cobalt = co +What is the element symbol for Copper = cu +What is the element symbol for Curium = cm +What is the element symbol for Dubnium = db +What is the element symbol for Dysprosium = dy +What is the element symbol for Einsteinium = es +What is the element symbol for Erbium = er +What is the element symbol for Europium = eu +What is the element symbol for Fermium = fm +What is the element symbol for Fluorine = f +What is the element symbol for Francium = fr +What is the element symbol for Gadolinium = gd +What is the element symbol for Gallium = ga +What is the element symbol for Germanium = ge +What is the element symbol for Gold = au +What is the element symbol for Hafnium = hf +What is the element symbol for Hassium = hs +What is the element symbol for Helium = he +What is the element symbol for Holmium = ho +What is the element symbol for Hydrogen = h +What is the element symbol for Indium = in +What is the element symbol for Iodine = i +What is the element symbol for Iridium = ir +What is the element symbol for Iron = fe +What is the element symbol for Krypton = kr +What is the element symbol for Lanthanum = la +What is the element symbol for Lawrencium = lr +What is the element symbol for Lead = pb +What is the element symbol for Lithium = li +What is the element symbol for Lutetium = lu +What is the element symbol for Magnesium = mg +What is the element symbol for Manganese = mn +What is the element symbol for Meitnerium = mt +What is the element symbol for Mendelevium = md +What is the element symbol for Mercury = hg +What is the element symbol for Molybdenum = mo +What is the element symbol for Neodymium = nd +What is the element symbol for Neon = ne +What is the element symbol for Neptunium = np +What is the element symbol for Nickel = ni +What is the element symbol for Niobium (Columbium) = nb +What is the element symbol for Nitrogen = n +What is the element symbol for Osmium = os +What is the element symbol for Palladium = pd +What is the element symbol for Phosphorous (white) = p +What is the element symbol for Platinum = pt +What is the element symbol for Plutonium = pu +What is the element symbol for Polonium = po +What is the element symbol for Potassium = k +What is the element symbol for Praseodymium = pr +What is the element symbol for Promethium = pm +What is the element symbol for Protactinium = pa +What is the element symbol for Radium = ra +What is the element symbol for Radon = rn +What is the element symbol for Rhenium = re +What is the element symbol for Rhodium = rh +What is the element symbol for Rubidium = rb +What is the element symbol for Rutherfordium = rf +What is the element symbol for Ruthenium = ru +What is the element symbol for Samarium = sm +What is the element symbol for Scandium = sc +What is the element symbol for Seaborgium = sg +What is the element symbol for Selenium (gray) = se +What is the element symbol for Silicon = si +What is the element symbol for Silver = ag +What is the element symbol for Sodium = na +What is the element symbol for Strontium = sr +What is the element symbol for Sulfur = s +What is the element symbol for Tantalum = ta +What is the element symbol for Technetium = tc +What is the element symbol for Tellurium = te +What is the element symbol for Terbium = tb +What is the element symbol for Thallium = tl +What is the element symbol for Thorium = th +What is the element symbol for Thulium = tm +What is the element symbol for Tin (white) = sn +What is the element symbol for Titanium = ti +What is the element symbol for Tungsten = w +What is the element symbol for Uranium = u +What is the element symbol for Vanadium = v +What is the element symbol for Xenon = xe +What is the element symbol for Ytterbium = yb +What is the element symbol for Yttrium = y +What is the element symbol for Zinc = zn +What is the element symbol for Zirconium = zr +Category: Definitions: A harmful deviation from the normal structural or functional state of an organism = disease +Category: Definitions: The training of the body to improve its function and enhance its fitness... = excercise +Category: Definitions: In human beings, the extent of an individual's continuing physical, emotional, mental, and social ability to cope with his environment = health +Category: Definitions: The physical substance of the human organism, composed of living cells and extracellular materials and organized into tissues, organs, and systems = human body +Category: Definitions: The practice concerned with the maintenance of health and the prevention, alleviation, or cure of disease = medicine +Category: Definitions: The process by which an organism absorbs and utilizes food substances = nutrition +Category: Definitions: The process involved in knowing, or the act of knowing, which in its completeness includes perception and judgment = cognition +Category: Definitions: Discipline that is concerned, in this context, mainly with methods of teaching and learning = education +Category: Definitions: Traditionally, a collection of books used for reading or study, or the building or room in which such a collection is kept = library +Category: Definitions: The study of the surface of the Earth = geography +Category: Definitions: Graphic representation, drawn to scale and usually on a flat surface, of features--for example, geographical, geological, or geopolitical--of an area of the Earth or of any other celestial body = map +Category: Definitions: The scientific study of the material remains of past human life and activities = archeology +True or False: No matter where you are in Australia you are never more than 1000 kilometers from the ocean = true +True or False: All owls lay white eggs = true +True or False: It takes a week to make a jelly bean = true +True or False: You can't tickle yourself = true +True or False: The University of Texas system is the third-largest landowner in the United States = true +Who was the LAST man to walk on the moon = gene cernan +How many stars are there in the Paramount movie logo = twenty two = 22 +True or False: You can't trademark surnames = true +What are the names of the two stone lions in front of the New York Public Library = patience & fortitude +What is Tennessee Williams' real name = thomas lanier williams +What is the scent on the artificial rabbit that is used in greyhound races = anise +Only one satellite has been ever been destroyed by a meteor -- the European Space Agency's ______ = olympus +In what year was the European Space Agency's satellite destoyed by a meteor = 1993 +What is the Western-most point in continental Europe = cabo de rocha, portugal +What is the largest breed of domesticated cat in the world = ragdoll +What is the oldest city in the US = st augustine, florida +What is the second oldest city in the US = st. mary's, georgia +what is the Latin name for moose = alces alces +There are two years that will look the same when written right side up and upside down. The first is 1961. What is the other = 6009 +What was the name of the plane to drop the SECOND atomic bomb on Japan in WW II = bock's car +True or False: Kermit the Frog has 11 points on his collar around his neck = true +True or False: Harvard uses "Yale" brand locks on their buildings = true +True or False: Yale uses "Best" brand locks on their building = true +True or False: There are more Samoans in Los Angeles than on American Samoa = true +Whats is soccer legend Pele's real name = edson arantes do nascimento +True or False: Both Fleet Commanders in the Pacific Theater of World War II Admiral Isoroku Yamamoto for the Japanese, and Admiral Chester Nimitz for theUnited States were each missing 3 fingers as a result of accidents while younger officers onboard ship = false, 2 +On March 29, 1848, Niagara Falls stopped flowing for 30 hours. What caused this = ice jam blocking the niagara river +Where is America's largest rosary is located = fatima shrine in holliston, massachusetts +What was the first product to have a UPC bar code on its packaging = wrigley's gum +What is the "you are here" arrow on maps called = ideo locator +WHat does the "J.R.R." in J.R.R.Tolkien stand for = john ronald reuel +What is the country with the biggest percentage of female heads of household = botswana +In English, "four" is the only digit that has the same number of letters as its = value +On the London Underground, one station has adifferent name on two of its platforms. They are = bank & monument +A pregnant goldfish is called a = twit +Duelling is legal in Paraguay as long as both parties are registered = blood donors +The metal part of a lamp that surrounds the bulb and supports the shade is called a = harp +The metal part at the end of a pencil is twenty percent = sulfur +A pig's penis is shaped like a = corkscrew +The most sensitive finger is the = forefinger +Dublin comes from the Irish Dubh Linn which means = blackpool +Scottish is the language called Gaelic, whereas Irish is actually called = gaeilge +There is actually a word for a 64th note -- a = hemidemisemiquaver +True or False: No words in the English language rhyme with orange, silver or purple = true +When is it impossible to sneeze = with your eyes open +Paul McCartney's mother was a = midwife +A baby eel is called an = elver +A baby oyster is called a = spat +There are only how many letters in the Hawaiian alphabet = twelve = 12 +Fossilized dinosaur droppings are called = coprolites +Rabbits love this black stuff = licorice +Ogdensburg, New York is the only city in the United States situated what river = st lawrence +Gilligan of Gilligan's Island had a first name that was only used once, on the never-aired pilot show. His first name was = willy +In England, the Speaker of the House is not allowed to = speak +What color do turnips turn when sunburnt = green +A flamingo can eat only when its head is = upside down +An elephant can be pregnant for up to how many years = two = 2 +Your left lung is smaller than your right lung to make room for your = heart +Heroin is the brand name of morphine once marketed by = bayer +One of the many Tarzans, Karmuela Searlel, was mauled to death on the set by a = elephant +A game of pool is referred to as a = frame +The Soviet Sukhoi-34 is the first strike fighter with a _____ in it = toilet +During WWII, Americans tried to train bats to = drop bombs +Swahili is a combination of African tribal languages = arabic & portuguese +An enneahedron is solid with ho many faces = nine = 9 +There are more _____ than any other kind of creature in the world = beetles +Jean Harlow was the first actress to appear on the cover of ____ magazine = life +Shrimps' hearts are in their = heads +Charlie Brown's father was a = barber +The most common name in the world is = mohammed +Pickled herrings were invented in what year = 1375 +Bank robber John Dillinger played professional = baseball +The housefly hums in the middle octave, key of = f +The only capital letter in the Roman alphabet with exactly one endpoint is = p +The longest time someone has typed on a typewriter continuously is ____ hours, set by Violet Gibson Burns = 264 +Hydroxydesoxycorticosterone and hydroxydeoxycorticosterones are the largest = anagrams +Only one person in two billion will live to be ___ or older = 116 +A cat has __ muscles in each ear = thirty two = 32 +Tigers have striped ____, not just striped fur = skin +Gerald Ford pardoned Robert E. Lee posthumously of all crimes of = treason +The band Duran Duran got their name from an astronaut in the 1968 Jane Fonda movie = barbarella +A Laforte fracture is a fracture of all _____ bones = facial +There is a word in the English language with only one vowel, which occurs six times = indivisibility +Cleo and Caesar were the early stage names of = sonny & cher +Genghis Khan's original name was = temujin +Genghis Khan started out as a = goatherd +The two lines that connect your top lip to the bottom of your nose are known as the = philtrum +The dirt road that General Washington and his soldiers took to fight off General Clinton during the Battle of Monmouth was called the = burlington path +Lucifer is latin for = light bringer +Satan means = adversary +Devil means = liar +The "wild" horses of western North America are actually _____, not wild = feral +When two words are combined to form a single word (e.g., motor + hotel = motel, breakfast + lunch = brunch) the new word is called a = portmanteau +Every photograph of an American atomic bomb detonation was taken by = harold edgerton +The longest recorded flight of a chicken is = thirteen seconds = 13 seconds +The muzzle of a lion is like a fingerprint -- no two lions have the same pattern of = whiskers +Wilma Flinestone's maiden name was = wilma slaghoopal +Betty Rubble's Maiden name was = betty jean mcbricker +When ocean tides are at their highest, they are called = spring tides +When ocean tides are at their lowest, they are call = neap tides +Mice, whales, elephants, giraffes and man all have seven = neck vertebra +Sunbeams that shine down through the clouds are called = crepuscular rays +Very small clouds that look like they have been broken off of bigger clouds are called = scuds +The poisonous copperhead smells like fresh cut = cucumbers +In Disney's "Fantasia", the Sorcerer's name is Disney spelt backwards = yensid +When angered, the ears of Tazmanian devils turn what color = pinkish red +The roads on the island of Guam are made with = coral +The sand on the beaches of Guam is actually = ground coral +What country is the world leader in cobalt mining, producing two-thirds of the world's cobalt supply = zaire +The only person ever to decline a Pulitzer Prize for Fiction was Sinclair Lewis for his book = arrowsmith +A poem written to celebrate a wedding is called an = epithalamium +These letters define what - AA = alcoholics anonymous +These letters define what - AI = artificial intelligence +These letters define what - AKA = also known as +These letters define what - ASAP = as soon as possible +These letters define what - ATM = automated teller machine +These letters define what - AT&T = american telephone and telegraph +These letters define what - AWOL = absent without leave +These letters define what - BBC = british broadcasting corporation +These letters define what - BLT = bacon, lettuce, tomato +These letters define what - BYOB = bring your own beer +These letters define what - CB = citizen's band +These letters define what - CBS = columbia broadcasting system +These letters define what - CPR = cardiopulmonary resuscitation +These letters define what - DOA = dead on arrival +These letters define what - ER = emergency room +These letters define what - ETA = estimated time of arrival +These letters define what - FAQ = frequently asked questions +These letters define what - GPS = global positioning system +These letters define what - HIV = human immunodefficiency virus +These letters define what - IRA = irish republican army +These letters define what - KIA = killed in action +These letters define what - LCD = liquid crystal display +These letters define what - LED = light emitting diode +These letters define what - MASH = mobile army surgical hospital +These letters define what - MIA = missing in action +These letters define what - MIT = massachusetts institute of technology +These letters define what - MO = modus operandi +These letters define what - MP = military police +These letters define what - NATO = north atlantic treaty organization +These letters define what - NBA = national basketball association +These letters define what - NBC = national broadcasting company +These letters define what - NFL = national football league +These letters define what - NHL = national hockey league +These letters define what - NOW = national organization of women +These letters define what - PBS = public broadcasting system +These letters define what - PDQ = pretty damned quick +These letters define what - POTUS = president of the united states +These letters define what - POW = prisoner of war +These letters define what - PSI = pounds per square inch +These letters define what - PVC = polyvinyl chloride +These letters define what - RCA = radio corporation of america +These letters define what - RDA = recommended daily allowance +These letters define what - RNA = ribonucleic acid +These letters define what - ROM = read only memory +These letters define what - ROTC = reserve officers training corps +These letters define what - SPF = sun protection factor +These letters define what - SRO = standing room only +These letters define what - STD = sexually transmitted disease +These letters define what - SWAK = sealed with a kiss +These letters define what - SWAT = special weapons and tactics +These letters define what - TGIF = thank god it's friday +These letters define what - UHF = ultra high frequency +These letters define what - UNESCO = united nations educational, scientific and cultural organization +These letters define what - UNICEF = united nations international children's emergency fund +These letters define what - URL = uniform resource locator +These letters define what - VCR = video cassette recorder +These letters define what - VHF = very high frequency +These letters define what - VHS = video home system +These letters define what - WAC = women's army corps +These letters define what - WC = water closet +These letters define what - WYSIWYG = what you see is what you get +These letters define what - Y2K = year 2000 +These letters define what - ZIP = zone improvement plan +These letters define what - ASCII = american standard code for information exchange +These letters define what - AMOCO = american oil company +These letters define what - BB = ball bearing +These letters define what - DEW = distant early warning +These letters define what - ESPN = entertainment and sports programming network +These letters define what - FORTRAN = formula translation +These letters define what - GATT = general agreement on tariffs and trade +These letters define what - GIGO = garbage in, garbage out +These letters define what - HDL = high density lipoprotein +These letters define what - LDL = low density lipoprotein +These letters define what - HUMVEE = high mobility multi purpose wheeled vehicle +These letters define what - ICBM = inter continental ballistics missile +These letters define what - JPL = jet propulsion laboratory +These letters define what - LASER = light amplification by stimulated emission of radiation +These letters define what - MASER = microwave amplification by the stimulated emission of radiation +These letters define what - MG = morris & garash +These letters define what - NEC = nippon electronics corporation +These letters define what - NSA = national security administration +These letters define what - NORAD = north american air defense command +These letters define what - OCR = optical character recognition +These letters define what - OSHA = occupational safety and health administration +These letters define what - Parsec = parallax second +These letters define what - PPP = point to point protocol +These letters define what - PT = patrol torpedo +These letters define what - SAR = search and rescue +These letters define what - SOP = standard operating procedure +These letters define what - TIFF = tag image file format +These letters define what - TTY = teletypewriter +These letters define what - WAVES = women accepted for volunteer emergency service +These letters define what - WNL = within normal limits +These letters define what - CAT = computerized axial tomography +These letters define what - COBOL = common business oriented language +These letters define what - CONUS = continental united states +These letters define what - GAF = general aniline and film +These letters define what - HDPE = high density polyethylene +These letters define what - JVC = japan victor company +These letters define what - LDPE = low density polyethylene +These letters define what - MCI = microwave communications of america +These letters define what - M&M = mars & murray +These letters define what - MRI = magnetic resonance imaging +These letters define what - MIDI = musical instrument digital interface +These letters define what - SCSI = small computer serial interface +These letters define what - TDK = tokyo denki kogaku +North American Indians ate Watercress to dissolve gravel and stones in the _______ = bladder +In Russia, suppositories cut from fresh potatoes were used for quick relief of ______ = haemorrhoids +A salt enema used to be given to children to rid them of _______ = threadworms +Powdered Tea was once used as a snuff to stop bleeding _______ = noses +A decoction of dandelion roots and leaves is an old remedy for dissolving urinary _______ = stones +Comfrey (herb) baths were popular before the wedding night to attempt to repair the hymen and thereby apparently restore _______ = virginity +The thyroid cartilage is more commonly known as the _____ = adam's apple +Stroking the sole of the foot is used by doctor's to produce _______ = the babinski effect +Insulin is produced in the _________ = pancreas +Acute hasopharyngitis is more commonly known as a ______ = cold +Keratitis is an inflammation of the cornea which may lead to _________ = blindness +Oophorectomy is the surgical removal of the ______ = ovaries +Sperm is the smallest single ____ in a mans body = cell +Estragon protects against _____ disease = heart +Hair, prompted by testosterone, grows faster in men in anticipation of _____ = sex +An average, in America, three sex change operations are performed _______ = every day +In 1977, Napoleon's _____ was sold in Paris for about US $3 800 to an American urologist = penis +The most sensitive cluster of nerves is at the base of the ____ = spine +In 1855, dentist Robert Arthur was the first to use ____ to fill cavities = gold +The fleshy muscular organ joined to the hyoid bone is the ____ = tongue +Quinine is an alkaloid extract of the bark of the _______ tree = cinchona +By raising your legs slowly and laying on your back, you can't sink in ________ = quicksand +An Eskimo would be ingesting toxic doses of Vitamin A if he ate a polar bears ______ = liver +Smallpox is also known as _______ = variola +The disease Tuberculosis, is best known as ________ = consumption +Victorian women tried to enlarge their breasts by bathing in _______ = strawberries +The fissure of Rolando, would be found in the ________ = human brain +Iron deficiency causes the most common form of _________ = anaemia +Red blood cells are produced in the ________ = bone marrow +The smallest bone in the body is the ______ = stirrup +The Mount of Jupiter and the Girdle of Venus are found on the _________ = palm of your hand +The Auricularis muscles are used to move the____ = ears +The vaccine for ________ was developed in 1798 = smallpox +In the United States, 1982, the painkiller 'Tylenol' was spiked with = cyanide +The normal body temperature in ___ degrees Celsius = thirty seven = 37 +In 1982, Englishman William Hall committed suicide by drilling holes into his head with a power drill . . . it took ___ holes = eight = 8 +The rate of Quadruplets are 1 (set) in every __________ births = 490,000 +A person suffering from polythelia has 3 _______ = nipples +Clinophobia is a fear of = beds +The human brain is __% water = eighty = 80 +The brain uses more than __% of the oxygen used by the human body = twenty five = 25 +The nose continues to _____ throughout your life = grow +Blonde beards grow ______ than darker beards = faster +The left side of the brain is usually responsible for the control of = speech +The space between two adjacent neurones is called the = synapse +The crystalline quartz, Amethyst was once believed to prevent = drunkenness +Sigmund Freud brought his first sample of _______ for $1.27 per gram = coccaine +The septum linguae is found on the = tongue +Stroking the sole of the foot produces the ______ reflex = babinski +During a orchidectomy, a man has a _______ removed = testicle +The medical term for a black eye is = circumorbital haematoma +Medical experts say you should sleep on your right side to improve _____ = digestion +The largest cell in the human body is the female reproductive cell = the ovum +The smallest cell in the human body is the = male sperm +There are over 100 million light sensitive cells in the = retina +The opposite of 'cross-eyed' is = wall eyed +From the age of thirty, humans gradually begin to ______ in size = shrink +A tincture of opium, was a common sedative in Victorian times = laudanum +In the early Twentieth century, rattlesnake venom was used to treat _____ = epilepsy +The human body contains about sixthy thousand miles of _____ _______ = blood vessels +The surface area of a human lung is equal to a = tennis court +The human body transmits nerve impulses at about __ metres a second = ninety = 90 +Spread out, the walls of the human intestines would cover an area of about = one hundred square feet +The hydrochloric acid in the human stomach is strong enough to dissolve a = nail +There are ______ phalanges (finger bones) in a human hand = fourteen = 14 +In 1979 Dr. Christian Barnard was offered ________ by the American National Enquirer to perform a human head transplant = $250,000 +Most people have lost fifty per cent of their taste buds by the time they reach the age of = sixty = 60 +The amount of carbon in the human body is enough to fill about _____ 'lead' pencils = 9,000 +Cancer claims ____ victims an hour in America = forty = 40 +In the English hospitals of the seventeenth century, children were entitled to ___ gallons of beer as part of their weekly diet = two = 2 +Podobromhidrosis is more commonly known as = smelly feet +If a surgeon in Ancient Egypt lost a patient while performing an operation, his hands were = cut off +Men have on average __% more red blood cells than women = ten = 10 +New Zealand's first hospital was opened in = 1843 +One square inch of human skin contains ___ sweat glands = 625 +When you blush, your also ___________ reddens = stomach lining +The largest muscle in the human body is the = buttock muscle +The Islands of Langerhans won't be found on a map, they're a group of cells located in the = pancreas +Every time you step forward, you use ________ muscles = fifty four = 54 +A Rhinologist specialises in the human = nose +If you could remove all the space from the atoms that make up your body, you could walk through the = eye of a needle +A chromosome is large than a = gene +The average human brain weighs ___ kg = 1.3 +Eighty per cent of all body heat escapes through the = head +The Black Death claimed roughly __________ lives in the thirteenth century = forty million = 40,000,000 +The human wrist contains more bones than the = ankle +Someone who grinds their teeth is a = bruxomaniac +If the present birth rate continues, New York city will have a black majority by the = end of the century +In 1562 a man was dug up six hours after his burial, after he had been seen breathing by someone at the funeral - he lived for another ___ years = seventy five = 75 +Physcrophilia is the sexual arousal by = cold +If __% of the human liver was removed, it could still function and would eventually restore itself to its original size = eighty = 80 +There is more pigment in ______ eyes than blue = brown +Nearly a quarter of all human bones can be found in the = feet +The ' funny bone' is not a bone but a = nerve +Most people blink about ______ times a day = 25,000 +The human body has enough fat to produce ___ bars of soap = seven = 7 +The human head is a quarter of our total length at birth, but only an eighth of our total length by the time we reach = adulthood +There is no single word given to describe the back of the = knee +From fertilisation to birth, a baby's weigh increase ________ times = five billion +The woman of the Brazilin Apinaly Tribe bite their mates eyebrows during = intercourse +Thomas Wedders, the English circus freak, had a _____ which was seven and a half inches long = nose +The human body has less muscles in it than a = caterpillar +Men are ten times more likely to be ________ than women = color blind +An eighteenth century woman used only lard to 'wash' her face and hands and lived to the age of = one hundred & sixteen = 116 +The liver is the largest internal organ weighing about ____ kilograms = 10.5 +Human adults breathe about _____ time a day = 23,000 +It requires __ muscles to raise your eyebrows = thirty = 30 +The most common form of cancer is _____ cancer = skin +The Middle ear and the Pharynx are joined with the ________ tube = eustachian +The Extensor digiti minimi manus is used to extend the = little finger +If you are a universal donor your blood group is = type o +When recognising someone's face, you use the ___ side of your brain = right +When Albert Einstein died, his final words died with him. The nurse at his side didn't understand = german +St Patrick, the patron saint of Ireland, was not = irish +The lance ceased to be an official battle weapon in the British Army in = 1927 +St. John was the only one of the 12 _____ to die a natural death = apostles +Many sailors used to wear ____ earrings so that they could afford a proper burial when they died = gold +Some very Orthodox Jew refuse to speak Hebrew, believing it to be a language reserved only for the = prophets +A South African monkey was once awarded a medal and promoted to the rank of _______ during World War I = corporal +Because they had no proper rubbish disposal system, the streets of ancient ___________ became literally knee-deep in rubbish = mesopotamia +The _______, Seventh-century native Mexicans, went into battle with wooden swords so as not to kill their enemies = toltecs +China banned the pigtail in 1911 as it was seen as a symbol of = feudalism +The Amayra guides of Bolivia are said to be able to keep pace with a trotting horse for a distance of = 100 kilometres +Sliced bread was patented by Mrs P. Ride, a mother of 5, on 1 April = 1954 +Ivan the terrible claimed to have 'deflowered thousands of virgins and butchered a similar number of resulting = offspring +Before the Second World War, it was considered a sacrilege to even touch an = emperor of japan +An American aircraft in Vietnam shot ______ down with one of its missiles = itself +Ancient drinkers warded off the devil by _____ their cups = clinking +The cost of the first pay-toilets installed in England was = tuppence +Pogonophobia is the fear of = beards +In 1647 the English Parliament abolished = christmas +King George III was declared violently insane in ___, 9 years before he died = 1811 +In Ancient Peru, when a woman found an 'ugly' _______, it was the custom for her to push it into the face of the nearest man = potato +When George I became King of England in 1714, his wife did not become Queen. He placed her under house arrest for ____ years = thirty two = 32 +The richest 10 per cent of the French people are approximately _____ times better off than the poorest 10 per cent = fifty +Henry VII was the only British King to be crowned on the = field of battle +During World War One, the future Pope John XXIII was a _______ in the Italian Army = sergeant +Richard II died aged __ in 1400. A hole was left in the side of his tomb so people could touch his royal head, but 376 years later some took advantage of this and stole his ______ = 33 & jawbone +The magic word "Abracadabra" was originally intended for the specific purpose of curing = hay fever +The Puritans forbade the singing of ______ ______, judging them to be out of keeping with the true spirit of Christmas = christmas Carols +Albert Einstein was once offered the Presidency of _____. He declined saying he had no head for problems = israel +Uri Geller, the professional psychic was born on December 20 ____ = 1946 +As to the origin of his alleged powers, Uri Geller maintains that they come from the distant planet of = hoova +Ralph and Carolyn Cummins had ____ children between 1952 and 1966, all were born on the 20 February = five = 5 +John D. Rockefeller gave away over US$ _________ during his lifetime = 500,000,000 +In the 1970's, the Rhode Island Legislature in the US entertained a proposal that there be a $2 tax on every act of _____ ____ in the State = sexual intercourse +Widows in equatorial ____ actually wear sackcloth and ashes when attending a funeral = africa +The British did not release the body of Napoleon Bonaparte to the French until _____ days after his death = twenty = 20 +John Glenn, the American who first orbited the Earth, was showered with ______ tonnes of ticker tape when he got back = 3,529 +American Red Indians used to name their children after the first thing they saw as they left their _____ subsequent to the birth. Hence such strange names as Sitting Bull and Running Water = tepees +Catherine the First of Russia, made a rule that no man was allowed to get drunk at one of her parties before ____ o'clock = nine = 9 +Queen Elizabeth I passed a law which forced everyone except for the rich to wear a flat cap on = sundays +In 1969 the shares of the Australian company 'Poseidon' were worth $1, one year later they were worth $___ each = 280 +Julius Caesar wore a laurel wreath to cover the onset of = baldness +Ernest Bevin, Minister of Labour during World War II, left school at the age of = eleven = 11 +It is illegal to be a prostitute in Siena,Italy, if your name is = mary +The Turk's consider it considered unlucky to step on a = piece of bread +The authorities do not allow tourists to take pictures of ______ in Zambia = pygmies +The Dutch in general prefer their french fries with = mayonnaise +Sir Isaac Newton was obsessed with the = occult and supernatural +One of Queen Victoria's wedding gifts was a 3 metre diameter, half tonne = cheese +Alexander Graham Bell, the inventor of the telephone, never phones his wife or his mother, they were both = deaf +It was considered unfashionable for Venetian women, during the Renaissance to have anything but _____ _____ hair = silvery blonde +Queen Victoria was one of the first women ever to use ________ to combat pain during childbirth = chloroform +Atilla the Hun is thought to have been a = dwarf +The warriors tribes of ________ used to hang the testicles of those they killed in battle on the ends of their spears = ethiopia +There are over _____ religious denominations in the United States = two hundred = 200 +Eau de Cologne was originally marketed as a way of protecting yourself against the = plague +Charles the Simple was the grandson of Charles the Bald, both were rulers of = france +Gabriel and Michael are the only 2 angels to be named in the = bible +The women of an African tribe make themselves more attractive by permanently ______ their faces = scaring +Some moral purists in the Middle Ages believed that women's ____ ought to be covered up because the Virgin Mary had conceived a child through them = ears +Hindus don't like dying in bed, they prefer to die beside a = river +While at Havard University, Edward Kennedy was suspended for cheating on a _____ exam = spanish +It is a criminal offence to drive around in a dirty car in = russia +The mad Emperor Caligula once decided to go to war with the Roman God of the sea, Poseidon, and ordered his soldiers to throw their spears into the _____ at random = water +The Ecuadorian poet, Jos Olmedo, has a statue in his honour in his home country. But, unable to commission a sculptor, due to limited funds, the government brought a second-hand statue .. Of the English poet = lord byron +In ______, at only 7 years old, Charles Sauson inherited the post of official executioner = 1726 +In parts of _____, the women keep harems of men = malaya +The childrens' nursery rhyme 'Ring-a-Ring-a-Roses' actually refers to the Black Death which killed about ______ people in the fourteenth-century = 30,000,000 +During the reign of Elizabeth I, there was a tax put on men's = beards +Idi Amin, one of the most ruthless tyrants in the world, before coming to power, served in the = british army +Some Eskimos have been known to use _________ to keep their food from freezing = refrigerators +It is illegal to play tennis in the streets of = cambridge +Custer was the youngest General in US history, he was promoted at the age of = twenty three = 23 +It costs more to send someone to reform school than it does to send them to = eton +The American pilot Charles Lindbergh received the Service Cross of the German Eagle from _____ _____ in 1938 = hermann goering +The active ingredient in Chinese Bird's nest soup is = saliva +It was quite common for the men of Ancient Greece to exercise in public ...... = naked +John Paul Getty, once the richest man in the world, had a ______ in his mansion = payphone +Iceland is the world's oldest functioning = democracy +The national flag of _____ was designed by Napoleon Bonaparte = italy +The Matami Tribe of West Africa play a version of football, the only difference being that they use a ____ ____ instead of a more normal ball = human skull +John Winthrop introduced the fork to the American dinner table for the first time on 25 June = 1630 +Abraham Lincoln was shot with a = derringer +When shipped to the US, the London bridge ( thought by the new owner to be the more famous Tower Bridge ) was classified by US customs to be a 'large = antique +Sir Winston Churchill was born in a ladies' cloakroom after his mother went into labour during a dance at = blenheim palace +In _____, David Atchison became President of the United States for just one day, and he spent most of the day sleeping = 1849 +Between the two World War's, France was controlled by ___ different governments = forty +The 'Crystal Palace' at the Great Exhibition of 1851, contained ______ square metres of glass = 92,900 +It was the custom in Ancient Rome for the men to place their right hand on their testicles when taking an oath. The modern term _______ is derived from this tradition = testimony +Sir Winston Churchill's mother was descended from a = red indian +The study of stupidity is called = monology +More money is spent each year on alcohol and cigarettes than on = life insurance +In ____ - 3 men were hung for the murder of Sir Edmund Berry at Greenbury Hill, their last names were Green, Berry , and Hill = 1911 +A firm in Britain sold fall-out shelters for = pets +During the seventeen century , the Sultan of Turkey ordered his entire harem of women _____, and replace with a new one = drowned +There are no clocks in Las Vegas _____ = casinos +The Great Pyramid of Giza consists of _________ blocks each weighing 2.5 tons = 2,300,000 +On 9 February ____, soap rationing began in Britain = 1942 +Paul Revere was a = dentist +A parthenophobic has a fear of = virgins +South American gauchos were known to put raw steak under their saddles before starting a day's riding, in order to ______ the meat = tenderise +There are _______ white dots in a Pacman arcade game = two hundred & forty = 240 +In 1939 the US political party 'The American Nazi Party' had _________ members = 200,000 +King Solomon of Israel had about ______ wives as well as hundreds of mistresses = seven hundred = 700 +Urine was once used to = wash clothes +North American Indian, Sitting Bull, died on 15 December = 1890 +St Nicholas, the original Father Christmas, is the patron saint of thieves, virgins and communist = russia +______ is home of the Fairy Investigation Society = dublin +People in Siberia often buy ____ frozen on a stick = milk +Princess Ann was the only competitor at the 1976 Montreal Olympics that did not have to undergo a ____ test = sex +Coffins which are due for cremation are usually made with ______ handles = plastic +Blackbird, who was the chief of _______ Indians, was buried sitting on his favourite horse = omaha +The two highest IQ's ever recorded (on a standard test) both belong to = women +The Imperial Throne of Japan has been occupied by the same family for the last ______ _________ years = thirteen hundred = 1300 +In the seventeenth-century a Boston man was sentenced to two hours in the stocks for obscene behaviour, his crime, kissing his wife in a public place on a = sunday +President Kaunda of ______ once threatened to resign if his fellow countrymen didn't stop drinking so much alcohol = zambia +Due to staggering inflation in the 1920's, 4,000,000,000,000,000,000 ____ _______ were worth 1 US dollar = german marks +The city of ____ ____ contains a district called 'Hell's Kitchen' = new york +The city of ______ left the Industrial Promotion Centre standing as a monument the atomic bombing = hiroshima +During the Medieval Crusades, transporting bodies off the battlefield for burial was a major problem, this was solved by carrying a huge cauldron into the Holy wars, boiling down the bodies, and taking only the _____ with them = bones +A Cicada passes eggs through its = ovipositor +A pigs snout is called a = gruntle +When they mate, a yak and a cow produce a = dzo +A cat's whiskers are called = vibrissae +Goats produce = cashmere +The common term for a member of the bee genus 'Bombus' is the = bumblebee +A turkey's furcula better known as a = wishbone +A 'geep' is the resulting offspring of a sheep and a = goat +The typical housefly cruses at ___ km/hr = eight = 8 +The chemical ______, found in ripe fruit, causes jam to set when cooling = pectin +In 1876, Sir Henery Wickham transported _______ rubber tree seeds from Brazil to Kew Gardens in London = 70,000 +The compound carotene gives the _______ its colour = carrot +Bananas grow pointing = upwards +Kiwi eggs, when not completely white, are tinged with = green +The cucumber is a _____, not a vegetable = fruit +The flying fish has been known to glide up to _____ metres = ninety = 90 +A starfish can turn its ______ inside out = stomach +Sea otters have ______ coats of fur = two = 2 +Hummingbirds can't = walk +A moth has no = stomach +Lobsters have blue = blood +Despite the hump, a camels spine is = straight +1 kg of lemons contain more sugar than 1 kg of = strawberries +The largest eggs in the world are laid by a = shark +Oranges cease to _____ after picking = ripen +More people are killed each year from _____ than snakes = bees +The Siberian ____ accounts for more than 20% of all the worlds trees = larch +Midges beat their wings about ______ time every second = 1,000 +A ____ can last longer without water than a camel can = rat +A mole can dig over ____ feet of tunnel in a single night = 250 +The animal with the largest brain in relation to its body is the = ant +Peanuts are used in the production of = dynamite +What nuts are used in the production of dynamite = peanuts +A crocodiles ______ is attached to the roof of its mouth = tongue +Sharks are immune to = cancer +The blood of a grasshopper is = white +Golden ____ are so rare that a biological reserve has been specifically created for them = toads +The walking _______ can live on land = catfish +96% of a _____ is water = cucumber +The _____ got its name from the corruption of the words ' Day's eye' = daisy +Crocodiles swallow ______ to help them dive deeper = stones +When a rabbit scratches its dowsets, it has itchy = testicles +Mexican jumping beans jump because of a ____ ______ inside the bean = moth larva +A 6 pound sea-hare can lay ______ eggs in a single minute = 40,000 +In 1978 the United Nations Food and Agricultural Organisation estimated that 'all the tea in China' amounted to approx. _______ tonnes = 356,000 +The ________ is the only animal whose evidence is admissible in an American court = bloodhound +Only the _____ nightingale sings = male +A chameleon's _____ is twice the length of its body = tongue +The black widow spider can devour as many as _______ 'mates' in a single day = twenty = 20 +A woodchuck breathes only ___ times during hibernation = ten = 10 +Goldfish can suffer _____ sickness = motion +When young, black sea basses are mostly female, but at the age of _____ years many switch sexes to male = five = 5 +Gorillas often sleep for up to _______ hours a day = fourteen = 14 +Giraffes are unable to = cough +A 2 year old horse has ___incisors = six = 6 +The last of a cat's senses to develop is = sight +The Ancient Egyptians trained ______ to wait at their tables = baboons +In relation to its size, the ordinary house spider is ______ times faster than an Olympic sprinter = eight = 8 +A millipede has ____ legs on each segment of its body = four = 4 +Sloths spend ____% of their lives asleep = seventy five = 75 +During its lifetime an ______ changes its sex from male to female and back several times = oyster +The ____ was wrongly named after what was thought to be its country of origin = turkey +About 70% of all living organisms in the world are = bacteria +Camels are born without = humps +Many male fish blow bubbles when they want to = copulate +Crocodiles are ______ blind = colour +Snails mate only once in their lifetime, but it can take up to ____ hours = twelve = 12 +Dogs are ________ blind = colour +Anteaters prefer _______ to ants = termites +Baby eels are = elvers +Whales increase in weight 30,000,000,000 times in their first ___ years = two = 2 +There are more ____ in the world than all other animals together = insects +On average, elephants sleep for about ________ per day = two hours = 2 hours +A giraffe's neck contains the same number of ________ as a human = vertebrae +An electric eel produces an average of ____________ volts = four hundred = 400 +Spiders' webs are a traditional natural ______ _______, when applied to a cut they quickly stop the flow of blood = clotting agent +The orang-utan's warning signal to would be aggressors is a loud = belch +The Emu gets its name from the ______ word for ostrich = portuguese +Squid can commit suicide by eating their own = tentacles +A cheetah can accelerate from 0 to _____ in 2 seconds = seventy km/h = 70 km/h +Although Cleopatra was meant to have died after a bite from an ____, the species does not exist in Egypt = asp +The 'Alligator Pear' is better known as the = avocado +Snails can sleep for _____ without eating = three years = 3 years +An Elephant's trunk can hold over _____ litres of water = five = 5 +The largest shark ever caught with a rod was just less than ______ feet long = seventeen = 17 +Bees have ___ eyes = five = 5 +The mullet fish only turns _____ after death = red +The Goliath frog of West Africa is nearly _____ feet long = three = 3 +To make half a kilo of honey, bees must collect nectar from over ___ _______ individual flowers = two million = 2,000,000 +Vampire Bats can hear sound frequencies which are over _____ times higher than any picked up by the human ear = eight = 8 +The male Californian sea-otter grips the nose of the female with his teeth during = mating +The heart of giraffe is two feet long, and can weigh as much as ____ ____ pounds = twenty four = 24 +The smallest trees in the world are Greenland = dwarf willows +A myrmecologist studies = ants +The original source of the dye 'sepia' was the = cuttlefish +Dogs ______ through the pads of their feet = sweat +Only male canaries can = sing +The Kiwi is the only bird with _____ at the end of its bill = nostrils +Shark's teeth are literally as hard as = steel +Turkey's often look up at the sky during a = rainstorm +The only wild camels in the world are found in = australia +At full tilt, Pumas can leap a distance of about ____ feet = sixty = 60 +Crocodiles carry their ____ in their mouths = young +Tarantula's can survive ______ years without food = two & half = 2.5 +It has been estimated that there are something like ____ _____ million cats in the U.S = twenty three = 23 +A sloth can move ______ as fast in water as it can on land = twice +India has a Bill of Rights for = cows +What can run faster uphill than they can (or want to) downhill, because of the bone structure of their legs = bulls +99% of all life forms to exist on Earth are now = extinct +The sperm of a _____ is longer than the sperm of an elephant = mouse +A dog has = elbows +Whales can't swim = backwards +Penguins can jump over ____ feet = six = 6 +Lions have been exported to _____ by Windsor Safari Park in England = africa +An Elephant has the world's largest penis, weighing about _____ kg = twenty seven = 27 +The aquatic animal, the Red Sponge, can be broken into a thousand pieces and still _______ itself = reconstitute +The Moa bird of New Zealand, which became extinct four hundred years ago, was over ____ feet tall = ten = 10 +Australian termites have been known to build mounds ______ feet high = twenty = 20 +Australian termites have been known to build mounds at least ____ feet wide = one hundred = 100 +The ________ is born under water = hippopotamus +Catgut comes from _____ not cats = sheep +Male cats have _____ on their genitals, which cause the females to cry out in pain on withdrawal = barbs +The average porcupine has about _______ quills = 30,000 +Cats have no facility for tasting = sugar +Only ___ mosquitoes bite = female +It takes _______ to hardboil an ostrich egg = four hours = 4 hours +The nerve fibres in the squid are ____ times thicker than a humans' = five hundred = 500 +A shark must keep ___ ____ to stay alive = moving forward +Fish are the only vertebrates that outnumber = birds +Some snakes can take as long as ______ _______ hours to copulate = twenty four = 24 +Polar bears can run as fast as _______ km/h = forty = 40 +A ______ is capable of devouring a pig whole = python +The ordinary house-fly beats its wings nearly ____ _______ times a second = two hundred = 200 +Rhinoceros horn, when powered, is believed in some countries to increase a persons = sexual potency +A mosquito has _____ teeth = forty seven = 47 +An anencephalous creature has no = brain +A large whale needs more than _____ tonnes of food a day = two = 2 +Pedals were added to the bicycle in = 1839 +The early personal computer, the Sinclair ZX80, had _________ of internal memory = 1 kilobyte +Allied bombers were issued with Biro pens as pens leaked at high altitude = fountain +The Dotmatrix printer was developed for the 1964 Tokyo Olympic Games by the Japanese company = seiko +The worlds longest escalator is in Leningrad Metro, ______ metres long = one hundred & twenty = 120 +The fluorescent tube uses ___% of the power to produce an equal amount of light as a tungsten filament bulb = twenty = 20 +The tip of a rotary mower travels at over _____ km/hr = two hundred = 200 +In an atom, the electron weighs _________ th of the weight of the proton = 1/2000 +The world's oldest man-made alloy is = bronze +Rainfall is measured with a = ombrometer +The 'screwdriver' was invented by _______, who used the tool to stir the drink = oilmen +Polytetrafluoroethylene is more commonly known as = teflon +Ammonia is the active ingredient in = smelling salts +When hydrogen burns in the air, _______ is formed = water +Near-sighted model, Grace Robin was the first to show off contact lenses in = 1930 +The diameter of wool is measured in = microns +Gunpowder is formed after mixing charcoal, ______ and sulphur = saltpetre +Gunpowder is formed after mixing charcoal, saltpetre and _______ = sulphur +Plutonium was developed by deuteron bombardment of uranium-238 in a = cyclotron +Oxygen, carbon, hydrogen and nitrogen make up ______% of the human body = ninety = 90 +The revolving door was invented in = 1888 +Cars were first started with ignition keys in = 1949 +The three primary colours are red, yellow and blue. The three secondary colours are = green, orange & purple +The first washing machine was marketed by Hurley Machine Co in = 1907 +Pearls melt in = vinegar +Twenty two carat gold has _____ parts per thousand pure gold = 916 +A shadow of a four-dimensional object would have _____ dimensions = three = 3 +What color light has the greatest wavelength = red +Brimstone, referred to in the Bible and some Alchemy text, is = sulphur +Nicotinic acid is listed on breakfast cereal boxes as = niacin +The hottest flame known is produced with carbon subnitride (C4N2), which can generate a temperature of ____C = 4988 +Ninety eight per cent of the weight of water is made up from = oxygen +For every extra kilogram carried on a space flight, _____ kg of excess fuel are needed at lift-off = 530 +Sugar was first added to chewing gum in ____ . . . by a dentist ( William Semple) = 1869 +A full loaded supertanker travelling at normal speed takes a least ______ minutes to stop = twenty = 20 +Paper money was first used in = china +Some soft drinks are made sweeter by adding = coal +Albert Einstein was thought to be suffering from dyslexia, as he couldn't speak properly until he was _____ years old = nine = 9 +The Chinese used fingerprints as a method of identification as far back as AD = seven hundred = 700 +Sir Isaac Newton was only _______ ______ years old when he discovered the law of universal gravitation = twenty three = 23 +A flush toilet exists that dates back to = 2000 bc +No matter its size or thickness, no piece of paper can be folded in half more than ______ times = seven = 7 +Just after the first moon walk, Pan-American Airlines announced that they were willing to take enquires about future commercial flights to the moon. They received ________ requests almost immediately = 80,000 +When cutting a diamond with a laser, _______ dust is formed = graphite +The metal ______ will melt in the heat of your hands = gallium +A Boeing 707 uses _____ _____ gallons of petrol in its take-off climb = four thousand = 4000 +The study of soil is = paedology +The Lie Detector was invented by John Augustus Larson in = 1921 +Another term for pure china clay is = kaolin +Soap was originally made by boiling fat and adding ____ to it = lye +The active ingredient in smelling salts is = ammonia +Light is ______ ______ radiation = electro magnetic +Minus ______ degrees Celsius is exactly the same as minus _____ degrees Fahrenheit = forty = 40 +The screwdriver was invented before the = screw +The first taxi with metered fares were operational in = 1907 +Rubber is an impertinent ingredient in the manufacture of = bubble gum +The zeppelin 'The Hindenburg' which exploded in a huge fireball, was filled with = hydrogen +Speleology is the study of = caves +The wristwatch was invented by Louis Cartier in = 1904 +The stratosphere is higher than the = troposphere +It snowed in the Sahara desert on 18 February = 1979 +On average, an iceberg weighs __________ tons = twenty million = 20,000,000 +The far side of the moon was first photographed by a Russian satellite in = 1959 +Captain Cook was the first man to set foot on all continents except = antarctica +The diameter of the Moon is ______ km = 3,476 +200 million years ago Earth contained 1 land mass called = pangaea +The largest wave ever recorded was near the Japanese Island of Ishigaki in 1971. It was recorded at ______metres high = eighty five = 85 +The largest iceberg recorded ( in 1956 ) was 200 miles long and 60 miles wide, larger that the country of = belgium +The surface of the Dead Sea is _______ metres below the surface of the Mediterranean Sea, which is only 75 km away = four hundred = 400 +The country of Benin changed its name from Dahomey in = 1975 +The Nova Zemlya Glacier in the (former) USSR is over _____ km long = four hundred = 400 +The coldest temperature ever recorded was ____ deg Celsius, in Siberia = -70 +The US state of Florida first saw the cultivation of oranges in = 1539 +The world's largest exporter of sugar is = cuba +There are no rivers in = saudi arabia +England's Stonehenge is ______ years older than Rome's Colosseum = fifteen hundred = 1500 +In 1896, Britain and Zanzibar were at war for _____ minutes = thirty eight = 38 +Numbering houses in London streets only began in = 1764 +More than 75% of all the countries in the world are _____ of the equator = north +Less than 1% of the ________ Islands are inhabited = caribbean +On average, an iceberg weighs __________ tons = twenty million = 20,000,000 +Fulgurite is formed when lightning strikes = sand +Mountains are formed by a process called = orogeny +Obsidian, used by American Indians for tools, weapons and ornaments, is dark _______ glass = volcanic +It takes 8.5 minutes for light to get from the ____ to earth = volcanic +82% of the workers on the Panama Canal suffered from = malaria +The tree dictated on the Lebanese flag is a = cedar +The _____ Ocean covers the world's longest mountain range = atlantic +In 1825 Upper Peru became = bolivia +New York City contains ________ kilometres of shoreline = nine hundred & twenty = 920 +There are 3 Great pyramids at = giza +The world's largest delta was created by the river = ganges +60% of all US potato products originate in = idaho +The northern most country claiming part of Antarctica is = norway +The inhabitants of ________ are known as 'Monegasques' = monaco +New York's Central Park opened in = 1876 +The city of Istanbul straddles two separate continents, ______ & _______ = europe & asia +At the nearest point , Russia and America are less than ____ km apart = four = 4 +99% of the solar systems mass is concentrated in the = sun +The furthest point from any ocean would be in = china +The Tibetan Mountain people use yak's milk as their form of = currency +The Spanish Inquisition once condemned the entire _______ to death for heresy = netherlands +Earth is the only planet not named after a = god +The Angel falls in Venezuela are nearly _________ times taller than Niagara falls = twenty = 20 +The Channel between England and France grows about ______ millimetres each year = three hundred = 300 +Until the 18th century ____ produced almost all the worlds diamonds = india +As the Pacific plate moves under its coast, the ______ Island of New Zealand is getting larger = north +If you travel from east to west across the Soviet Union, you will cross _____ time zones = seven = 7 +Sahara mean _______ in Arabic = desert +Every litre of water taken from the Red Sea would contain about _____ grams of salt = two hundred = 200 +Lighting strikes the Earth about ______ times a second = two hundred = 200 +Very hard rain would pour down at the rate of about _____ miles per hour = twenty = 20 +No rain has ever been recorded falling in the Atacama desert in = chile +The background radiation in ________ is twice that of the rest of Great Britain = aberdeen +The southern most tip of Africa is not the 'Cape of Good Hope' but = cape agulhas +Due to gravitational effects, you weigh slightly less when the moon is directly = overhead +The tower of London, during its lifetime has served many purposes, including a = zoo +There is a village near the Somme in ______ which is simply called Y = france +In the north of _______, the sun shines constantly for about 14 weeks each summer = norway +The Polynesian country of _______ is a 170 square kilometre limestone rock emerging 60 metres from the Pacific = niue +Yugoslavia is bordered by _____ other countries = seven = 7 +Within a few years of Columbus' discovery of America, the ______ had killed one and a half million Indians = spaniards +Hawaii officially became apart of the US on June 14, = 1900 +If the population of China walked past you in single file, the line would never end because of the rate of = reproduction +The earth's average velocity orbiting the sun is _________ km per hour = 107,220 +The sun has a core temperature of ________ Kelvin = 154,000,000 +A day on Jupiter is about ____ hours, 50 minutes, 30 seconds at the equator = nine = 9 +Carolyn Shoemaker has discovered 32 comets and approximately ______ asteroids = eight hundred = 800 +The Earth is pear shaped, the North Pole radius being ____ mm longer than the South Pole radius = forty four = 44 +'Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu' is the name of a hill in = new Zealand +The book by Copernicus, which suggested that the Sun and not the Earth was the centre of the solar system, was banned officially banned by the Papacy until = 1835 +A quarter of Russia is covered by = forest +South Africa produces two-thirds of the world's = gold +What is the densest planet in the solar system = earth +There is no point in England more than _____ miles from the ocean = seventy five = 75 +The ____ sea is not mentioned in the Bible = red +England is smaller than = new england +The number of UFO sightings constantly increase when _____ is nearest the Earth = mars +The first city in the world to have a population of over one million was = london +New York was once = new amsterdam +The fastest tectonic movement on earth is 240 mm per year, at the Tonga micro-plate near = samoa +In 1980 Rhodesia became independent = zimbabwe +The model ape used in the 1933 movie ' King Kong ' was ______ inches tall = eighteen = 18 +There are over ______ verses in the Bible = 30,000 +The tablecloth in da Vinci's Last supper was = white +World heavyweight boxing champion, Gene Tunney also lectured on Shakespeare at _____ University later in his life = yale +William Shakespeare's father's first name was = john +Elzie Crisler Segar created the comic strip character Popeye in = 1919 +The 'Thing', from the movie of the same name, had ___ blood = green +Charles Dickens was an insomniac, who believed his best chance of sleeping was in the centre of a bed facing directly = north +The writer, Rudyard Kipling, only ever used _____ ink = black +John Lennon's middle name was = winston +Over ________ different languages are spoken throughout what used to be known as the Soviet Union = two hundred = 200 +The 3 largest newspaper circulations are = russian +There are ______ semihemidemisemiquavers in a breve = 256 +The subject of the first printed book in England was = chess +Composer Ludwig van Beethoven was once arrested for = vagrancy +Monaco's national _______ is bigger than its army = orchestra +Of the two chipmunks, Chip and Dale, ____ has the black nose = chip +Charlie Chaplain's cane was made of = bamboo +Colophony is a = bow resin +A Penny whistle has ____ finger holes = six = 6 +Turkey has a ban on _______ in films = kissing +EMI stands for = electrical and musical instruments +Leonardo da Vinci played the = viola +Some hotels in Las Vegas have _________ floating in their swimming pools = gambling tables +A hydrodaktulopsychicharmonica is a variety of = musical glasses +The first recorded reference to cricket dates back to = 1272 +The highjump method of jumping head first and landing on their back is called the = fosbury flop +Orienteering originated in = sweden +Snooker originated in = india +A soccer ball has _____ panels = thirty two = 32 +To a yachtsman, a fresh breeze is about _____ knots = twenty = 20 +The collecting of Beer mats is called = tegestology +Grabatology is the collecting of = ties +The Australian term for extras in cricket are = sundries +When kicked in the groin, a soccer player has been = banjoed +What is the middle name of Cassius Clay = marcellus +Pistols were first used in the Olympic games shooting events in = 1984 +Cystallite is the material _________ are made from = snooker balls +How many million kilometres from the Sun is Saturn = 1427 +Saturn is __________ kilometres in diameter = 119,000 +Saturn is __________ miles in diameter = 74,000 +In what year was Pluto discovered = 1930 +Pluto is __________ kilometres in diameter = 6,000 +Pluto is __________ miles in diameter = 3,728 +Mercury is __________ kilometres in diameter = 4,880 +Mercury is __________ miles in diameter = 3,032 +Venus is __________ kilometres in diameter = 12,000 +Venus is __________ miles in diameter = 7,456 +Mars is __________ kilometres in diameter = 6,790 +Mars is __________ miles in diameter = 4,219 +One day on Mercury lasts _____ Earth days = fifty eight = 58 +Venus is ____ million kilometres from the Sun = one hundred & eight = 108 +Mars is ____ million kilometres from the Sun = two hundred & twenty eight = 228 +Jupiter is _________ kilometres in diameter = 143,000 +Jupiter is _________ miles in diameter = 89,000 +Jupiter is ____ million kilometres from the Sun = seven hundred & seventy eight = 778 +Neptune is _________ million kilometres from the Sun = 4,500 +Uranus is ______ kilometres in diameter = 52,000 +Uranus is ______ miles in diameter = 32,000 +Uranus is ______ million kilometres from the Sun = 2,870 +Earth is ______ kilometres in diameter = 3,476 +Earth is ______ miles in diameter = 2,160 +Earth is ______ million kilometres from the Sun = one hundred & fifty = 150 +One "day" on Mercury lasts more than ___ Earth days = fifty eight = 58 +Venus takes nearly ___ Earth days to circle the Sun = two hundred & twenty five = 225 +Mars is sometimes called the ___ planet = red +Mars takes ______ Earth days to circle the sun = six hundred & eighty seven = 687 +Saturn takes just over ____ Earth years to circle the Sun = twenty nine = 29 +When was the last Supernova in our galaxy = 1604 +Gas from a Supernova can travel up to _________ kilometres per second = 10,000 +Gas from a Supernova can travel up to _________ miles per second = 6,000 +One light year is equivalent to how many million kilometres = 9,460,000 +One light year is equivalent to how many million miles = 5,912,500 +When was the first space shuttle launched = april, 1981 +How many signs in the Zodiac = twelve = 12 +What is the Zodiac sign of the scorpion = scorpio +What is the Zodiac sign of the scales = libra +What is the Zodiac sign of the virgin = virgo +What is the Zodiac sign of the lion = leo +What is the Zodiac sign of the crab = cancer +What is the Zodiac sign of the twins = gemini +What is the Zodiac sign of the bull = taurus +What is the Zodiac sign of the ram = aries +What is the Zodiac sign of the water carrier = aquarius +What is the Zodiac sign of the archer = sagittarius +What is the Zodiac sign of the goat = capricorn +What is the Zodiac sign of the fish = pisces +What is the largest of the dinosaur family = brachiosaurus +What does the name "Brachiosaurus" mean = arm lizard +Approximately how tall was the Brachiosaurus, in metres = twelve = 12 +Approximately how long was the Brachiosaurus, in metres = twenty four = 24 +Approximately how long was the Diplodocus, in metres = twenty seven = 27 +While the earth's atmosphere is divided into 4 main zones, which is the highest zone = exosphere +The main elements of the Exosphere are hydrogen and ______ = helium +The Exosphere merges with the _______ = ionosphere +The four main elements of eath's atmosphere are exosphere, ionosphere, stratosphere and __________ = troposphere +What is the largest ocean on earth = pacific +What type of rock is sandstone = sedimentary +Sedimentary rocks are usually formed in _______ = layers +Sedimentary rocks often contain ______ = fossils +Where are metamorphic rocks usually found = mountain ranges +An example of a metamorphic rock is ____ = slate = marble +There are three types of rock - metamorphic, sedimentary and ______ = igneous +An example of an igneous rock is____ = granite = quartz +What is mercury also known as = quicksilver +What is the hardest mineral = diamond +What is the second hardest mineral = corundum +What is one of the softest minerals = aluminite = talc +Most precious stones are minerals, though some come from animals or plants, one of these is = pearl = amber = coral +Gemstones are formed from slowly cooling __________ rocks = igneous +Where are icebergs usually larger = antarctica +What is the monetary unit of Algeria = dinar +What is the monetary unit of Angola = kwanza +What is the monetary unit of Botswana = pula +What is the monetary unit of Cameroon = franc +What is the monetary unit of Chad = franc +What is the monetary unit of Egypt = egyptian pound +What is the monetary unit of Ethiopia = birr +What is the monetary unit of Gambia = dalasi +What is the monetary unit of Ghana = cedi +What is the monetary unit of Kenya = shilling +In ancient Rome, auburn-haired puppies were sacrificed to ensure a plentiful ______ crop = corn +Ostriches live about ____ years and can reproduce for 50 years = seventy five = 75 +In England, the most commonly used guide dog for the blind is the__________ = yellow labrador retriever +Contrary to popular belief, dogs do not sweat by salivating. They sweat through the____________ = pads of their feet +In Korea, the _____ is a symbol of long life, and is often portrayed in the company of immortals = deer +Cougars can kill animals ______ times their size = eight = 8 +The venom of the king cobra is so deadly that one gram of it can kill ______ people = one hundred and fifty = 150 +The Virginia opossum is the only marsupial (pouched mammal) indigenous to __________ = north america +The Virginia opossum have a litter size of up to ____ = twenty two = 22 +The opossum offspring say in their mothers pouch for the first __________ days = sixty = 60 +The largest Great White Shark ever caught measured _______ feet = thirty seven = 37 +The largest Great White Shark ever caught weighed ________ pounds = 24,000 +The largest jellyfish in the world has a bell that can reach _______ feet across = eight = 8 +The burrowing boodie of Australia is the only kangaroo in the world that lives _________ = underground +The whistling swan has more than __________ feathers on its body = 25,000 +Pandas spend about _____ hours a day eating bamboo = twelve = 12 +The white elephant is the sacred animal of _______ = thailand +The largest order of mammals, with about _____ species, is rodents = 1,700 +Bats are second largest order of mammals, with about ______ species = nine hundred and fifty = 950 +In one year, hens in America lay enough eggs to encircle the globe _____ times = one hundred = 100 +The woolly mammoth, extinct since the Ice Age, had tusks almost _____ feet high = sixteen = 16 +The largest species of seahorse measures _____ inches = eight = 8 +In Pakistan, goats are often sacrificed to improve the performance of the________ = stock market +The word "puppy" comes from the French poupee, meaning = doll +The leech has 32 _______ = brains +In Russia, dogs have been trained to sniff out ore deposits that contain _________ = iron sulfides +The word "struthious" refers to something that resembles or is related to ______ = ostriches +The leech will gorge itself up to _____ times its body weight and then just fall off its victim = five = 5 +The chameleon has a tongue that is _______ times the length of its body = 1.5 +In the air, puffins are powerful flyers, beating their wings 300 to 400 times a minute to achieve speeds up to _____ miles per hour = forty = 40 +The world's fastest reptile (measured on land) is the spiny-tailed iguana of Costa Rica. It has been clocked at nearly _____ miles per hour = twenty two = 22 +The life expectancy of the average mockingbird is ____ years = 10 +Pigs, walruses, and light-colored horses can be = sunburned +The lungfish can live out of water in a state of suspended animation for _____ years = three = 3 +The chicken can travel up to _____ miles per hour = nine = 9 +Pink elephants? In regions of India where the soil is red, elephants take on a permanent pink tinge because they regularly spray dust over their bodies to protect themselves against ________ = insects +It is estimated that a single toad may catch and eat as many as ________ insects in the course of a summer = 10,000 +Prior to migration a goose will consume the equivalent of up to ____ percent of its body weight per day, accumulating large amounts of fat = twenty five = 25during the migration, geese may cover up to ____ miles per day = six hundred = 600 +It is estimated that manatees live a maximum of ___ years = sixty = 60 +A "winkle" is an edible = sea snail +A 42-foot sperm whale has about _____ tons of oil in it = seven = 7 +A 4-inch-long abalone can grip a rock with a force of ______ pounds = four hundred = 400 +A baby giraffe is about _____ feet tall at birth = 6 +A baby gray whale drinks enough milk to fill more than ______ bottles a day = 2,000 +A bear in hibernation loses up to _____ percent of its body weight = twenty five = 25 +The world's largest mammal, the blue whale, weighs _____ tons at birth = fifty = 50 + Fully grown, a blue whale can weigh as much as ______ tons = one hundred and fifty = 150 +There are ________ known species of starfishes in the world = 1,600 +The color of the blood of an octopus is = bluish green +A bison can jump ___ feet = 6 +There are _____ species of parrotsthree hundred and twenty eight = 328 +Racehorses have been known to wear out new ______ in one race = shoes +There are ________ muscles and tendons in an elephant's trunk = 40,000 +Rats can swim for a 1/2 mile without resting, and they can tread water for _____ days straight = three = 3 +There are ______ known species of bats = six hundred and ninety = 690 +The massive skeleton of the African elephant accounts for about _______ percent of the body weight = fifteen = 15 +The crayfish isn't a fish at all - it is related to the = lobster +There are about _____ species of owl = one hundred and thirty = 130 +It takes a lobster approximately ________ years to grow to be one pound = seven = 7 +It takes about _______ hours for a snake to digest one frog = fifty = 50 +There are about _______ species of coral known = 5,000 +The Mola Mola, or Ocean Sunfish, lays up to _______ eggs at one time = five million = 5,000,000 +Researchers don't know why killer whales like to rub their sensitive stomachs on the bottom of shallow beaches, but they think it may be a form of = grooming +There are about 500 different kinds of cone snails around the world. All have a sharp, modified tooth that stabs prey with venom like a harpoon. Most cone snails hunt worms and other snails, but some eat fish. These are the ones most dangerous to people. The nerve toxin that stops a fish is powerful enough to also kill a = human +The crocodile is surprisingly fast on land. If pursued by a crocodile, a person should run in a ______ motion, for the crocodile has little or no ability to make sudden changes of direction = zigzag +What city has more homeless cats per square mile than any other city in the world = rome +It takes approximately ____ venom extractions from the coral snake to fill a 1-pint container = 69,000 +The most carnivorous of all bears is the ______ bear = polar +It would require an average of ____ hummingbirds to weigh in at 1 ounce = eighteen = 18 +The digestive juices of crocodiles contain so much __________ that they have dissolved iron spearheads and 6-inch steel hooks that the crocodiles have swallowed = hydrochloric acid +Seals can withstand water pressure of up to _________ pounds per square inch = eight hundred and fifty = 850 +Jackrabbits are powerful jumpers. A 20-inch adult can leap ___ feet in a single bound = twenty = 20 +Javelinas are very noisy animals among each other and squeal, snort, woof, and click their teeth to = communicate +There are close to ______ known species of frogs, including toads = 4,000 +The most venomous of all snakes, known as the _____, has enough venom in one bite to kill more than 200,000 mice = taipan +There are fewer than _____ Bactrian camels left in the wild = one thousand = 1,000 +Bactrian camels have survived in a land with no water in an area used for nuclear testing. Their numbers, however, are falling dramatically as humans encroach farther and farther into China's ______ Desert = gobi +The dog and the turkey were the only two domesticated animals in ancient = mexico +The ________ is a fish that can actually walk on land = mudskipper +Time magazine named the computer its "Man of the Year" in = 1982 +A 1999 survey of 25,500 standard English-language dictionary words found that ______ percent of them have been registered as .coms = ninety three = 93 +A ball of glass will bounce higher than a ball of = rubber +A ball of solid steel will bounce higher than one made entirely of = glass +A chest X-ray is comprised of 90,000 to 130,000 ______ volts = electron +A NUKE InterNETWORK poll found that ________ percent of Internet users have cut back on watching TV in order to spend more time online; 12 percent have cut back on seeing friends = fifty two = 52 +A standard 747 Jumbo Jet has ______ seats = four hundred and twenty = 420 +After his death in 1937, Guglielmo Marconi, inventor of the ___________ was honored by broadcasters worldwide as they let the airwaves fall silent for two minutes in his memory = wireless telegraph +Artificial rain was first used near _______, New Hampshire, in 1947 to fight a forest fire = concord +At a glance, the Celsius scale makes more sense than the Fahrenheit scale for temperature measuring. But its creator, Anders Celsius, was an oddball scientist. When he first developed his scale, he made freezing 100 degrees and boiling 0 degrees, or upside down. No one dared point this out to him, so fellow scientists waited until Celsius died to change the scale. True or False = true +At a jet plane's speed of ______ miles per hour, the length of the plane becomes one atom shorter than its original length = six hundred and twenty = 620 +Bill Gates formed a company to sell a computerized traffic counting system to cities, which made $20,000 its first year. Business dropped sharply when customers learned Gates was only _______ years old = fourteen = 14 +Colonel Waring, New York City Street Cleaning Commissioner, was responsible for organizing the first rubbish-sorting plant for recycling in the United States in = 1898 +Cooking and salad _____ could lubricate machinery, such as cars and boats, according to Penn State chemical engineers = oils +Dating back to the 1600s, thermometers were filled with ______ instead of mercury = brandy +Early models of vacuum cleaners were powered by = gasoline +Focus group information compiled by CalComp revealed that 50 percent of computer users do not like using a = mouse +From 9,000 pounds of roses, which totals about 55,000 blossoms, ___ pounds of costly rose essence can be extracted to be used as a component in fragrances = two = 2 +The condensed water vapor trail left behind by jets and rockets is called a = contrail +The first automobile to cross the United States took ______ days in 1903 to travel from San Francisco to New York = fifty two = 52 +The first commercial passenger airplane began flying in = 1914 +The first commercial passenger airplane with a bathroom began flying in = 1919 +The first parking meter was installed in Oklahoma City, Oklahoma, in = 1935 +The first video game was _____, introduced in 1972 by Noel Bushnell, who then created Atari = pong +The highest man-made temperature - _____ million degrees Celsius - was generated at Princeton University in a fusion power experiment in 1978 = seventy = 70 +The last 12-cylinder car produced in the United States was the 1948 __________ = lincoln continental +Gold salts are sometimes injected into the muscles to relieve = arthritis +What is used as a center for golf balls and in antifreeze mixtures = honey +Horn & Hardart opened the first U.S. automat in Philadelphia in = 1902 +IBM was incorporated in 1911 as the Computer-Tabulating-Recording Co. with a product line that included time clocks, scales and punch card tabulators. The name was changed in _____ = 1924 +In 1878, Wanamaker's of Philadelphia was the first U.S. department store to install = electric lighting +In 1900, there were _______ cars in the United States = 8,000 +By 1919, there were _________ cars in the U.S = six million = 6,000,000 +The little "m's" on "M&M's"(r) Chocolate Candies weren't printed on the candies until ____ = 1950 +The maximum flight speed of a Boeing 747-300 jetliner is __________ miles per hour = five hundred and eighty three = 583 +The ______ is the U.S. Marine tilt-rotor transport that takes off and lands like a helicopter, but flies like an airplane = osprey +The Osprey is also known as the = v-22 +The rare metal gallium melts at _________ degrees Fahrenheit. It is safe to touch; if you hold a piece of it in your hand and wait, it will melt = eighty six = 86 +The Studebaker auto company produced a car called the "_____" from 1927-1936 = dictator +The Times Square "time ball" for the year 2000 was named the = star of hope +The Times Square "time ball" for the year 2000 was specially made by _________ in Ireland = waterford crystal +The Times Square "time ball" for the year 2000 contained _____ glass crystals cut into triangles = five hundred and four = 504 +The Times Square "time ball" for the year 2000 contained _______ light bulbs = six hundred = 600 +The Times Square "time ball" for the year 2000 contained _______ big lights = ninety six = 96 +The Times Square "time ball" for the year 2000 contained _______ mirrors = ninety two = 92 +In 1995, the average U.S. public school contained _____ computers = seventy two = 72 +In computer-ese, "wysiwyg" is an acronym for = what you see is what you get +In December of 1957 -- Shippingport, Pennsylvania became the site of the first full-scale ______ power plant in the U.S = nuclear +In July of 1955 - Arco, Idaho, with a population of 1,000, became the first U.S. town powered by nuclear energy. The town's energy was supplied by an experimental boiling-water reactor called the = borax iii +Half a byte is called a = nybble +There are five types of simple machines: the _____, the pulley, the inclined plane, the screw, and the wheel and axle = lever +There are five types of simple machines: the lever, the _____, the inclined plane, the screw, and the wheel and axle = pulley +There are five types of simple machines: the lever, the pulley, the _________, the screw, and the wheel and axle = inclined plane +There are five types of simple machines: the lever, the pulley, the inclined plane, the _____, and the wheel and axle = screw +There are five types of simple machines: the lever, the pulley, the inclined plane, the screw, and the__________ = wheel and axle +There are hefty pricetags on some Internet domain names. The highest-selling domain name to date, business.com, went for ________ in 1999 = $7.5 million +There are more than ____ satellites orbiting earth solely for the purpose of private communications services, including pagers, telephones, and computers = two hundred = 200 +Thirty-two percent of computer data loss cases are due to ______ error = human +In Rome, the world's first paved streets were laid out in _____ B.C = one hundred and seventy = 170 +In the military world, EGADS is an acronym for = electronic ground automatic destruct system +In web site addresses on the Internet, "http" stands for = hypertext transfer protocol +In years past, spermaceti oil - from the sperm whale - was used as _________ in Rolls-Royce automobiles = transmission oil +Indonesia is the world's largest producer of = liquefied natural gas +ISBN stands for = international standard book number +It is estimated that ________ light bulbs are manufactured each year in the United States = 1.8 billion +To make a daguerreotype, an early photograph, required a 15-minute average _______ time = exposure +What cities expressways, built on a radial pattern dating from the eighteenth century, are so overloaded that traffic often grinds to a halt for 30 to 40 miles outside the city = tokyo +A device invented as a primitive steam engine by the Greek engineer Hero, about the time of the birth of Christ, is used today as a = rotating lawn sprinkler +During the U.S. Civil War, telegraph wires were strung to follow and report on the action on the battlefield. But there was no telegraph office in the White House, so President Lincoln trekked across the street to the ___________ to get the news = war department +In ___, Namco released Pac-Man, the most popular arcade game of all time = 1979 +WD-40 Company products are sold in more than ________ countries around the world = one hundred and fifty = 150 +When the first escalator, or "inclined elevator," was installed in the department store Harrod's in London (near the turn of the century), ________ was served to passengers who felt faint = brandy +It takes _____ watts to run an electric toaster = 1,100 +It took Henry Ford's Motor Company seven years to manufacture 1 million automobiles. One hundred thirty-two working days after this figure was reached (in 1924), the company had made ______ more cars = nine million = 9,000,000 +Microsoft CEO Bill Gates, launched his business career in 1969, at age 14 by forming a company named Lakeside Programming Group. Gates and his friend ______ signed an agreement with Computer Center Corporation to report bugs in PDP-10 software, in exchange for computer time = paul allen +Nanotechnology has produced a guitar no bigger than a ______ = blood cell +The smallest guitar made by Nanotechnology is _________ long, has six strummable strings = 10 micrometers +Natural gas has no = smell +Penicillin causes about ________ deaths in the United States every year = three hundred = 300 +Forget-me-not pollen grains are so small that _______ of them can fit on the head of a pin = ten thousand = 10,000 +The sale of lawn mowers got a great boost when lawn tennis came into vogue in England in = 1870 +Skydivers accelerate to a terminal velocity of ______ mph = one hundred and twenty = 120 +Some Chinese typewriters have ______ characters = 5,700 +Steve Jobs and Steve Wozniak are best known as the creators of the _____ computer = apple +Steve Jobs and Steve Wozniak designed a popular arcade game for Atari called = breakout +An estimated __________ lab mistakes are made in the 100,000 laboratories in the U.S. every day = two million +The average 60-minute audio cassette tape has _______ feet of tape in it = 562.5 +The B-2 Stealth Bomber is designed to fly undetected by = radar +In Milwaukee during the 1900s, ______ horses in the city left an estimated 133 tons of manure and urine on the streets per year = 12,500 +In Milwaukee during the 1900s, 12,500 horses in the city left an estimated ____ tons of manure and urine on the streets per year = 133 +Sharks and rays are the only animals known to man that cannot succumb to cancer. Scientists believe this is related to the fact that they have no bone - only = cartilage +The duckbill platypus of Australia can store up to _____ worms in its large cheek pouches = six hundred = 600 +There are more than ____ species of finches throughout the world = four hundred and fifty = 450 +The ears of the Asiatic _____ bears are larger than those of other bear species = black +Sharks can travel up to _____ miles per hour = forty = 40 +The Nile crocodile averages about 45 years in the wild, and may live up to ____ years in captivity = eighty = 80 +Sheep will not drink from __________. Hence, the line in the Twenty-third Psalm: "He leadeth me beside the still waters" = running water +There are no wild deer of any kind in Australia, and the small red deer is the only one found in = africa +The normal body temperature of the Clydesdale horse is ________ degrees Fahrenheit = one hundred and one = 101 +There are _______ distinctive types of combs on chickens = seven = 7 +The now-extinct ancestor of the horse, _______, had a short neck, a pug muzzle, and stood no higher than a medium-sized dog = eohippus +The electric eel is the most shocking animal on Earth - no other animal packs such a big charge. If attacking a large prey, a 9-foot-long eel can discharge about _____ volts = eight hundred = 800 +Since white tigers have pigmented stripes and blue eyes, they are not = albinos +There are some _____ different species of sea snakes, and all of them are venomous = fifty = 50 +The once popular dog name "Fido" is from Latin and means = fidelity +Most lipstick contains = fish scales +What is the longest word that alternates hands = skepticisms +No piece of square dry paper can be folded more than _____ times in half = seven = 7 +A group of geese on the ground is a gaggle, a group of geese in the air is a = skein +Over _______ left handed people a year are killed from using products made for right handed people = 2500 +There are more than _______ bricks in the Empire State Building = 10 million +If you counted 24 hours a day, it would take ______ years to reach one trillion = 31,688 +A crocodile always grows new _____ to replace the old ones = teeth +The sun is _______ times larger than the earth = 330,330 +Clinophobia is the fear of = beds +A _____ is an actual unit of time for 1/100th of a second = jiffy +Porcupines ______ in water = float +The longest recorded flight of a chicken is = thirteen seconds = 13 seconds +The world's termites outweigh the world's humans 10 to 1 = humans +The electric chair was invented by a = dentist +Windmills always turn counter-clockwise. Except for the windmills in = ireland +A hedgehog's heart beats ______ times a minute on average = three hundred = 300 +Camels have three ______ to protect themselves from blowing sand = eyelids +The placement of a donkey's eyes in its' heads enables it to see all it's ___ at all times = feet +A mole can dig a tunnel ________ feet long in just one night = three hundred = 300 +A hummingbird weighs less than a = penny +Until 1796, there was a state in the United States called Franklin. Today it's known as = tennessee +The Earth weighs around _____________ tons = 6,588,000,000,000,000,000,000,000 +A cockroach can live several weeks with its _______ cut off - it dies from starvation = head +Every time you lick a _____, you're consuming 1/10 of a calorie = stamp +The average person has over ________ dreams a year = 1,460 +One in every _____ Americans has appeared on television = four = 4 +The average American/Canadian will eat about 11.9 pounds of _______ per year = cereal +It's against the law to burp, or sneeze in a certain church in = omaha, nebraska +You're born with 300 bones, but when you get to be an adult, you only have = two hundred and six = 206 +Human thigh bones are stronger than = concrete +Over _________ birds a year die from smashing into windows = ten thousand = 10,000 +The state of Florida is bigger than = england +It was once against the law to have a pet dog in a city in = iceland +Your heart beats over _________ times a day = one hundred thousand = 100,000 +Thomas Edison, lightbulb inventor, was afraid of the = dark +Some ribbon worms will eat _______ if they cant find any food = themselves +Dolphins ________ with one eye open = sleep +The worlds oldest piece of chewing gum is over _____ years old = nine thousand = 9000 +In space, astronauts cannot cry, because there is no ________, so the tears can't flow = gravity +There are more ______ flamingos in the U.S, than real ones = plastic +About 3000 years ago, most _____ died by the time they were 30 = egyptians +More people use ______ toothbrushes, than red ones = blue +More people use blue toothbrushes, than ____ ones = red +A sneeze travels out your mouth at over ______ m.p.h. = one hundred = 100 +Your ribs move about _______ times a year, every time you breathe = five million +In the White House, there are _______ knives, forks and spoons = 13,092 +Recycling one glass jar, saves enough energy to watch T.V for ________ hours = three = 3 +Lightning strikes about _______ times per minute on this planet = six thousand = 6,000 +The average American/Canadian drinks about _______ sodas a year = six hundred = 600 +It was once against the law to slam your car door in a city in = switzerland +There wasn't a single pony in the Pony Express, just = horses +Honeybees have a type of _______ on their eyes = hair +A jellyfish is 95 percent = water +In _______, kids as young as 15 can be jailed for cheating on their finals = bangladesh +The katydid bug hears through holes in its ____ legs = hind +A company in _______ makes dinnerware out of wheat, so you can eat your plate = taiwan +More ______ money is printed in a year, than real money printed throughout the world = monopoly +The elephant is the only mammal that can't = jump +The penguin is the only bird who can swim, but not = fly +What is the only letter in the alphabet that does not appear in the name of any of the United States! = q +One quarter of the bones in your body are in your = feet +Fortune cookies were actually invented in America, in ______, by Charles Jung = 1918 +A man named Charles Osborne had the hiccups for _________ years = sixty nine = 69 +A giraffe can clean its ears with its _____-inch tongue = twenty one = 21 +Chewing gum while peeling onions will keep you from = crying +How many pieces of mail are delivered each year in the U.S = 166,875,000,000 +How many miles of telephone wire a strung across the U.S = 1,525,000,000 +How many cars are being driven down the U.S's highways = 123,000,000 +How many tons of paper are used each year in the U.S = 85,000,000 +How many people go to Major League baseball each year = 56,000,000 +Bats always turn _____ when exiting a cave = left +The praying mantis is the only insect that can turn its = head +In Tokyo, they sell toupees for = dogs +There are over _______ dogs in the U.S = fifty eight million = 58,000,000 +Dogs and cats consume over ________ worth of pet food a year = $11,000,000,000 +You blink over _______ times a year = 10,000,000 +Baby robins eat _____ feet of earthworms every day = fourteen = 14 +In England, in the 1880's, ______ was considered a dirty word = pants +Most dust particles in your house are made from = dead skin +The blesbok, a South African ______, is almost the same color as grapejuice = antelope +The average person laughs _______ times a day = thirteen = 13 +Dogs can hear _______ that humans cant = sounds +Men are 6 times more likely to be struck by _______ than women = lighting +It is estimated that millions of trees in the world are accidentally planted by _______ who bury nuts and then forget where they hid them = squirrels +Ernest Vincent Wright wrote a novel, "Gadsby", which contains over 50,000 words -- none of them with the letter = e +A toothpick is the object most often _______ on by Americans = choked +There are more than ________ earthquakes throughout the world every year = fifty thousand = 50,000 +The original name for the butterfly was = flutterby +The opposite sides of a dice cube always add up to = seven = 7 +Nose prints are used to identify = dogs +Bulls are _______ = colorblind +Apples are more efficient than ______ in keeping people awake in the mornings = caffeine +Smelling bananas and/or green apples (smelling, not eating) can help you lose = weight +A hard working adult sweats up to ______ gallons per day = four = 4 +The average ice berg weighs ___________ tons = 20,000,000 +The poison-arrow frog has enough poison to kill about _______ people = 2,200 +A lump of pure gold the size of a matchbox can be flattened into a sheet the size of a = tennis court +After eating, a _______ regurgitates its food and then eats it again = housefly +Which are the most used muscles in the body = eye muscles = eye +Which Australian animal rolls into a spiky ball when in danger = echidna +Which author wrote the Belgariad Series = david eddings +Which blood vessels carry blood from the heart to the various parts of the body = arteries +Which book has to do with instructions about sacrificial worship = leviticus +Which book, first published in 1949, begins with the words: "it was a bright cold day in april & the clocks were striking thirteen" = 1984 +Which boxer is heaviest a bantamweight, middleweight or welterweight = middleweight +Which British sports car took its name from the Morris garages where it was developed = the mg +Which Canadian province extends farthest north = quebec +Which Canadian province has the largest population = ontario +Which canary sings the male or female = the male +Which capital city has a statue of a mermaid in its harbour = copenhagen +Which cicada is the noisy one the male or the female = male +Which city 50 miles from the coast is America's eighth busiest port = houston +Which city does Orly airport serve = paris +Which city has the famous opera house La Scala = milan +Which city has the largest rodeo in the world = calgary +Which city has the two steepest streets in the usa = san francisco +Which city hosted the 1952 winter olympics = oslo +Which city hosted the 1956 summer olympics = melbourne +Which city hosted the 1968 summer olympics = mexico city +Which city hosted the 1988 summer olympics = seoul +Which city hosted the first modern olympics in 1896 = athens +Which city hosted the first winter olympics in 1924 = chamonix +Which city hosted the olympics in 1920 = antwerpen +Which city hosted the second olympics in 1900 = paris +Which city hosted the third olympics 1904 = st louis +Which city is home to the White City tennis courts = sydney +Which city is known as the windy city = chicago, illinois = chicago +Which city is sacred to Jews, Christians, & Muslims = jerusalem +Which city is the home of the sundae = two rivers +Which colour goes before angel & bayou on Roy Orbison's singles = blue +Which colourless, odourless light gas is used to lift airships = helium +Which comes first in a butteryfly's life being a caterpillar or being a pupa = caterpillar +Which comic strip was banned from "Stars & Stripes" = beetle bailey +Which company made magic carpet = bullfrog +Which company released it's first personal computer on august 12, 1981 = ibm +Which continent stretches further Aouth Africa or South America = south america +Which continent was the original home to the humble potato = south america +Which countries occupy the Iberian Peninsula = spain & portugal +Which countries occupy the Scandinavian Peninsula = norway & sweden +Which country (as of 2000) has the lowest crime rate in the world = togo +Which country are the Galapagos Islands part of = ecuador +What geometric shape is a stop sign = octagon +What geometric shape is a tennis court = rectangular +What German military leader of the Afrika Korps was known as 'The Desert Fox' = erwin rommel = rommel +What gland is found just below the optic chiasma of your brain = pituitary gland +What gods are the planets of our solar system named after = roman gods = roman +What goes with ruby, emerald & sapphire to make up the world's most valuable gems = diamond +What golfer was nicknamed "super mex" = lee trevino +What golfer was nicknamed 'the golden bear' = jack nicklaus +What grain is Australia's most important crop = wheat +What grain is used to make spaghetti = wheat +What grass is the favourite food of pandas = bamboo +What green vegetable comes in varieties such as cos & mignonette = lettuce +What group landed in America in 1620 = pilgrims +What group of superheroes display the number 4 on their chests = the fantastic four +What gun cannot be silenced, due to all the noisy gasses which escape the cylinder gap at the rear of the barrel = revolver +What habit forming plant did Columbus find on his first new world trip = tobacco +What hair color of people do mosquitoes seem to be the most attracted to = blonde +What hall of fame was opened in 1990 in Canastota, New York = boxing +What Hans Christian andersen fairy tale character is immortalized in a famous statue in Copenhagen's Harbor = the little mermaid +What happens to male ants soon after they mate = they die +What happens when reverse peristalsis takes place = you puke +What has a bitch done if she has just whelped = given birth +What has been called "the land of frozen time" = antarctica +What has been clinically demonstrated to work twice as well as dramamine for fighting motion sickness, with no side effects = ginger +What has to be missing out of anhydrous compounds = water +What Hawaii town lies very close to Volcanoes National Park = hilo +What heavyweight boxing champion was nicknamed the Manassa Mauler = jack dempsey +What hemisphere are you in if your water drains clockwise = southern +What herb is most often used as a garnish = parsley +What herb is used in the sauce traditionally served with roast lamb = mint +What hip russian word means "giving voice to something" = glasnost +What hobby was developed by the Palmer Paint Company of Detriot = paint by numbers +What holiday is held on April 25 in Australia & New Zealand = anzac day +What hormone is produced by the adrenal glands = adrenaline +What household appliance has a tube & an agitator = washing machine +What human organ does a pacemaker pace = heart +What ice cream company registered the slogan "dedicated to perfection" = haagen daas +What ill fated auto bit the dust in 1959 after losses of millions = edsel +What illness is controlled by taking insulin = diabetes +What important historic artifact was found in November of 1922 = king tuts tomb = king tutankhamun's tomb +What indian tribe did Custer encounter at the Battle of Little Big Horn = sioux +What indoor track milestone was Jim Beatty the first to break in 1962 = four minute mile +What inert gas is used in fluorescent lights = argon +What insect has a king as well as a queen = termites +What instrument is used for measuring the distance between two points on a curved surface = caliper +What instrument is used to measure the pressure of gases = manometer +What instruments are used to measure air pressure = barometers +What is "Banda Oriental" known as today = uruguay +What is 113 in Roman numerals = cxiii +What is 2 + 3 = 5 +What is 30% of 90 = twenty seven +What is 99% of 200 = one hundred & ninety eight = 198 +What is a 300th anniversary called = tercentenary +What is a artificial egg hatching device called = incubator +What is a baby frog called = tadpole +What is a baby goose called = gosling +What is a baby kangaroo called = a joey +What is a baby owl called = an owlet = owlet +What is a baby rooster = cockerel +What is a baby seal called = pup +What is a baby swan called = cygnet +What is a baby whale called = calf +What is a bone specialist = osteopath +What is a bowler credited with when no runs are scored off his over = maiden over +What is a buckey ball made of = carbon +What is a 'bunker' in a game of golf = sand trap +What is a calm ocean region near the equator = doldrums +What is a camberwell beauty = butterfly +What is a cancer causing substance = carcinogen +What is a cancerous tumour = malignant +What is a castrated shy sheep called = wether +What is a cob & a pen = swan +What is a 'colander' = sieve +What is a corrosive substance = acid +What is a crime worse than a misdemeanor = felony +What is a dactyologram = fingerprint +What is a dried plum called = a prune +What is a fear of germs = spermophobia +What is a female bear = sow +What is a female fox called = vixen +What is a female swan called = pen +What is a french policeman called = gendarme +What is a group kangaroos = troop +What is a group of baboons = troop +What is a group of badgers called = cete +What is a group of bears called = sleuth +What is a group of cockroaches = intrusion +What is a group of curs = cowardice +What is a group of donkeys called = herd +What is a group of elks called = gang +Which railway station in London is known by two names = bank & monument +Which religious group grew out of the Watch Tower Society = jehovah's witnesses +Which river contains the most fresh water = amazon +Which Russian city used to be called Leningrad & Petrograd = st petersburg +Which saint has the deer as his iconographical emblem = st francis +Which saying is attributed to author Henry David Thoreau = any fool can make a rule +Which science fiction author used the penname Edward Powys Bradbury = michael moorcock +Which science fiction novel has its title from the flash point of paper = farenheit 451 +Which science fiction writer penned "The Martian Chronicles" & "Farenheit 451" = ray bradbury +Which science studies weather = meteorology +Which Scottish born machinist became America's first environmentalist = john muir +Which sea is between Australia & Tasmania = tasman sea +Which sea is the city of Beirut on = mediterranean +Which shoulder go superstitious people throw salt over = left +Which shoulder should you throw spilled salt over = left +Which side of a book are the even numbered pages usually on = left +Which side of a commercial jet does the pilot sit on = left +Which side of the human body is controlled by the left side of the brain = right side +Which side of the road do people drive on in France = right +Which side of the road would be travel on if you were driving in Japan = left +Which small animals reportedly march to the sea to drown = lemmings +Which son of Zeus was a messenger & herald of the gods = hermes +Which sport do Australia & NZ play when battling for the manning cup = hockey +Which sport has a movement called a 'telemark' = skiing +Which state has Cape Hatteras = north carolina +Which state has the most hospitals = california +Which state is called the pelican state = louisiana +Which state is the wolverine state = michigan +Which state of Australia lays claim to Lizard & Heron Islands = queensland +Which state's official flag is in the shape of a pennant = ohio +Which strong wine gets its name from a city in Northern Portugal = port +Which superhero loves peace enough to kill for it = peacemaker +Which terminal of a battery is indicated by a plus sign = positive +Which town is the birthplace of Jesus Christ = bethlehem +Which tree has the same name as a part of your hand = palm +Which two countries became independent in 1957 = ghana & malaysia +Which two countries form what used to be called Patagonia = chile & argentina +Which two sports do you go backwards to win = rowing & tug of war +Which type of paint dries faster oil or acrylic = acrylic +Which tyre company withdrew from Formula 1 at the end of 1986 = pirelli +Which US city is known as Beantown = boston +Which US city is known as the biggest little city in the world = reno, nevada +Which US city was named after the only person to be governor of 2 states = houston +Which US coin has 118 ridges around the edge = dime +Which US gangster town gave its name to the group who had a no 1 with 'if you leave me now' = chicago +Which US government branch includes the president & vice president = executive branch +Which US president lead his "rough riders" up San Juan hill = theodore roosevelt +Which US president received & 10% of the profits when he was interviewed by david frost = richard nixon +Which US president said, "the buck stops here" = harry truman +Which US state borders a canadian territory = alaska +Which US state is known as the "last frontier" = alaska +Which US state was the 50th = hawaii +Which was the first apostle to be stoned to death = stephen +Which was the first book to tell the story of the lioness Elsa = born free +Which was the first Japanese city bombed in 1945 = hiroshima +Which was the sacred animal of ancient Egypt = cat +Which was the second Japanese city bombed in 1945 = nagasaki +Which was the world's first space station = salyut 1 +Which weighs more hot water or cold water = hot water +Which word is related to these three: rat, blue, cottage = cheese +Which would usually live longer, a giraffe or a zebra = zebra +Which writer & illustrator was fired in july 1992 by King Features over an abortion rights story line in his daily comic strip Popeye = bobby london +Which writer said "a little learning is a dangerous thing" = alexander pope +Which writer's widow changed the family's name to Holland after his death to avoid scandal = oscar wilde +Which zodiacal sign is represented by a goat = capricorn +While sleeping, one man in eight does what = snores +While sleeping, one man in ten does what = grinds his teeth +White, crystalline solid that has the formula c6h4(oh)cooh = salicylic acid +Who abolished Christmas in 1647 = english parliament +Who allegedly killed officer J D Tippett = lee harvey oswald +Who allowed the bugging of the Democratic committee headquarters. = richard nixon +Who always ended his show in a white e type jaguar = simon dee +Who always tried to kill Krazy Kat = captain marvel +Who appeared on the back of the $20 bill in 1875 = pocahontas +Who appears when Aladdin rubs the lamp = genie +Who are the Bronte Sisters in alphabetical order = anne, charlotte, emily +Who assassinated President Kennedy = lee harvey oswald +Who baptised Jesus = john the baptist +Who beat Captain Robert Scott in the race to the south pole in 1912 = roald amundsen +Who became famous for photographing the civil war = mathew brady +Who became the first englishman to win the Nobel prize for literature in 1907 = rudyard kipling +Who betrayed Jesus to the Romans = judas iscariot +Who built Camelot = king arthur +Who buys corner blocks = stamp collectors +Who 'came whiffling through the tulgey wood' = jabberwock +Who camped by a billabong = swagman +Who carried on Charles Babbages work when he died = his son +Who carved the worlds tallest totem pole out of one log = mungo martin +Who claimed "Rosencrantz & Gguildenstern are dead" = tom stoppard +Who climbed Mt Fuji at age 99 = teiichi igarashi +Who coached the Celtics to 6 NBA championships = bob cousy +Who coined the term, 'the evil empire' = ronald reagan +Who coined the word 'bourgeoise' = karl marx +Who collects coins or medals = numismatist +Who collects match box labels = philluminist +Who collects stamps = philatelist +Who comes hopping down the bunny trail = peter cottontail +Who commanded the rough riders in Cuba in the Spanish American War = leonard wood +Who commanded the Russian navy on the Black Sea from 1788 1789 = john paul jones +Who composed the music for Apollo 13 = james horner +Who controls more than 80% of the world's rough diamond supply = de beers +Who could distinguish 140 forms of tobacco ash = sherlock holmes +Who counted himself out on march 31, 1968 = lyndon johnson +Who created detective Nero Wolfe = rex stout +Who created Jergens Lotion = andrew jergens +Who created John Blackthorne = james clavell +Who created master spy George Smiley = john le carre +Who created Miss Marple = agatha christie +Who created 'Peter Rabbit' = beatrix potter +Who created the first flavored soda pop = townsend speakman +Who created Winnie the Pooh = a a milne +Who deciphered the Rosetta stone = jean champollion +Who define heat in ergs per calorie = james joule +Who denied Jesus three times = peter +Who described the moon during Apollo 11 as "magnificent desolation" = buzz aldrin +Who designed the uniforms for the Vatican City's Swiss guards = michelangelo +Who designed the union buildings = sir herbert baker +Who detailed her romance with Bill Clinton in the December Penthouse = jennifer flowers +Who did Adolf Hitler marry = eva braun +Who did Adolph Hitler keep a framed photograph on his desk of = henry ford +Who did always rescue sweet Polly Purebred = underdog +Who did Anne Boleyn lose her head over = henry viii +Who did David kill = goliath +Who did Joseph Stalin succeed as premier of Russia = lenin +Who did Louis XVI give the Hope diamond to = marie antoinette +Who did New York's Cosmos buy for $4.5 million in 1975 = pele +Who did pussy cat go to see in London = queen +Who did Queen Elizabeth II marry = prince phillip +Who did Samson fall in love with = delilah +Who did Simple Simon meet on the way to the fair = pieman +Who did the Miracle Mets defeat to win the 1969 world series = thailand +Who discovered Florida = ponce de leon +Who discovered morphine = friedrich saturner +Who discovered natural radioactivity = antoine becquerel +Who discovered that galaxies were all red shifted i.e the universe was expanding = edwin hubble +Who discovered the Mississippi River = hernando de soto +Who discovered the neutron in 1932 = sir james chadwick +Who discovered the planet Uranus = william herschel +Who discovered x rays = wilhelm roentgen +Who do Brazilians call Huguinho, Zezinho & Luisinho = huey dewey louie +Who do the Japanese call Miki Mauso = mickey mouse +Who dreamed about the sun, moon & stars bowing down to him = job +Who edited the Joy of Sex = alex comfort +Who ended his news broadcasts with "glad we could get together" = john cameron swayze +Who fiddled while Rome burned = nero +Who first calculated 'pi' around 250 bc = archimedes +Who flew the rocket powered Bell X IAa at a record mach 2.5 = chuck yaeger +Who followed Alexander Haig as US foreign secretary in 1982 = george schultz +Who fought professionally in Roman arenas = gladiators +Who founded Atari = nolan bushnell +Who founded histology = marie bichat +Who founded mormonism = joseph smith +Who founded the boy scout movement = robert baden powell +Who founded the boy scouts of America = daniel beard +Who founded the foundation for infantile paralysis = franklin roosevelt +Who founded the Persian empire = king cyrus +Who gather together in covens = witches +Who gave Joseph Keaton his nickname of "Buster" = harry houdini +Who gave the U. S.A. the Statue of Liberty = france +Who ghost wrote Xaviera Hollanders "The Happy Hooker" = yvonne dunleavy +Who got his name because of a yellow & black striped shirt he wore until it literally fell apart = sting +Who got the worlds worst circumcision = john bobbit +Who had over 1000 patents registered to him when he died = thomas edison +Who had six fingernails on one hand , but only five fingers on that hand = anne boleyn +Who had teenage sidekicks Zan, Wendy, Jayna & Marvin = super friends +Who had the vision that resulted in the book of Revelations = john +Who has been nicknamed Dr Death in the 1990s = dr jack kevorkian +Who has more chromosomes, Tarzan or Cheetah = cheetah +Who has the biggest percentage of female heads of household = botswana +Who hid in a house at 263 Princengracht, Amsterdam, for two years = anne frank +Who hit a homerun in his first at bat in college, the olympics, & the major leagues = will clark +Who holds the record for most touchdown passes in one season = dan marino +Who hosts the Monza grand prix = italy +Who in baseball was known as king kong = dave kingman +What is this short for - HiOAg = hi ho silver +What are u doing here - |r|e|a|d|i|n|g| = reading between the lines +Einstein gave this successful prediction of the stock market when asked what it would do in the next year. He said = it would fluctuate +Nearly a third of all bottled drinking water purchased in the US is contaminated with _________ = bacteria +If you sneeze too hard, you can = fracture a rib +If you try to suppress a sneeze, you can rupture a _________ in your head or neck and die = blood vessel +Rats multiply so quickly that in 18 months, two rats could have over ________ descendents = one million = 1,000,000 +The average chocolate bar has ____ insects' legs in it = eight = 8 +The average human eats __________ spiders in their lifetime at night = eight = 8 +The shortest war in history was between ___________ in 1896 = zanzibar & england +The shortest war in history Zanzibar surrendered after _______ minutes = thirty eight = 38 +A polar bear's skin is black. Its fur is not white, but actually = clear +Elvis had a twin brother named ____, who died at birth = garon +Donald Duck comics were banned in ______ because he doesn't wear pants = finland +More people are killed by _______ annually than are killed in plane crashes = donkeys +What is the longest word typed with only the left hand = stewardesses +Shakespeare invented the words _________ & _______ = assassination & bump +Marilyn Monroe had six = toes +If you keep a goldfish in the dark room, it will eventually turn = white +Women blink nearly ______ as much as men = twice +Right handed people live, on average, ______ years longer than left handed people do = nine = 9 +The name of all the _______ end with the same letter that they start with = continents +The word "lethologica" describes the state of not being able to _______ the word you want = remember +If the population of China walked past you in single file, the line would never end because of the rate of = reproduction +The words _____ & _____ are the same whether they are read left to right or right to left = racecar & kayak +A snail can sleep for _____ years = three = 3 +American Airlines saved $40,000 in 1987 by eliminating one _______ from each salad served in first-class = olive +How many World Championship points are awarded to a winning Grand Prix driver = ten = 10 +In French what country is Ecosse = scotland +Which Daniel Defoe character was born in Newgate Prison = moll flanders +Why is Caspian Sea a misnomer = its a lake +Which two ballet dancers were Marguerite and Armand created for = fonteyn and nureyev +What fruit do viticulturists grow = grapes +In which year did it become illegal to beat your sernants to death in the Mississippi basin area = 1985 +What was the capital of Kenya prior to Nairobi = mombassa +Which country supplies almost 80% of the worlds jute = bangladesh +What was the nationality of the very first man to stand on the sumit of Mount Everest = new zealander +What is added to chalk to produce cement = clay +What part of the body does a cytologist study = cells +Which language do Walloons speak a version of = french +How did Eva Peron die = cancer +What three words follow Shakespeare's Now is the winter of our discontent = made glorious summer +What is a planet's apogee = furthest point from the earth +What is the Russian word for citadel = kremlin +What common word used by road users is derived from the Hindu god Jagganath = juggernaut +Of which country is the flower the French Marigold a native = mexico +Which country originated the Carpetbag Steak = australia +Which former racing driver owns Austria's second largest airline company = niki lauda +What nationality is Salman Rushdie = british +What is a satellite's perigee = closest point to the earth +What natural materials are tussah and habutai types of = silk +Who won 4 tennis grand slams before she was 18 = monica seles +Which town would you be leaving if you were sailing away from the capital of the Flemish coast = dunkirk +Which 937 foot tanker caused the worlds worst oil pollution disaster in 1989 = the exxon valdez +Where do hikers sleep, was founded by George Williams and sung about by Village People = ymca +Which Richard Adams book featured a fox terrier called Snitter = the plague dogs +Which of the American Marshal Islands became famous as a nuclear test site = bikini atoll +A glow worm isn't a worm, its a = beetle +Which river flows over the Victoria Falls = zambezi +Which sci-fi author predicted artificial satellites in 1945 = arthur c clark +Which writer became a Governor General of Canada = john buchan +What was the original name of the communications satellite Intelsat = early bird +Into which ocean does the Zambezi river flow into = indian +What was the former name of Zambia = northern rhodesia +Who led the unsuccessful Roman slave revolt in73 BC = spartacus +Who was the famous son of Philip II of Macedonia = alexander the great +What is the second most frequently used letter in the English language = t +Where did Laika the first dog in space die = in space +What was the former name of Zimbabwe = southern rhodesia +Which Greek island was the home of the Minoan bull culture = crete +What writer said "Youth is wasted on the young" = george bernard shaw +What does the term Honking mean to a cyclist = standing out of the saddle +What is the largest city in Switzerland = zurich +Who said "A woman is only a woman, but a good cigar is a smoke" = rudyard kipling +Which sport is Wayne Gretzky famous for = ice hockey +Which city was the seat of the Holy Roman Emperors in the 17th century = vienna +Which pharaoh built the great temple at Abu Simbel = ramses ii +Which poet first said "A thing of beauty is a joy forever" = keats +In which country did Alexander the Great mount his great campaign of 327-325 BC = india +What words from Tennyson's Charge of the Light Brigade follow "Theirs is not to reason why = theirs is but to do or die +What title is given to the head of state in Brunei = sultan +Which London club saw the start of Phileas Fogg's journey = the reform club +What do Americans call the silencer on a car = muffler +What did Japanese athlete Suburaya do after failing to win in the 1964 Olympics = committed hari-kiri +What was removed from Mussolini's body before it was buried = brain +Who wrote Death of a Salesman = arthur miller +Why was a last minute decision made to bomb Nagasaki rather than the chosen target of kokura = because it was obscured by cloud +To which family of birds does the robin belong = thrush +Who was the most senior serving Nazi to be tried at Nuremberg = hermann goering +Which is the only city still in existence that is mentioned in Genesis = damascus +Where did Anne Frank die = belsen +Which city is the setting for Bizet's Carmen = seville +What is the common name for Seborrheic Dermatitis = dandruff +Which major planet spins in the opposite direction to the rest = venus +What is the main river to flow through Hamburg = elbe +What do architects claim Chicago's Tacoma Building to be the first of = skyscraper +On which ship did Sir Francis Drake receive his knighthood = the golden hind +Which country is called Misr by its natives = egypt +What are a whales breathing organs called = lungs +Which power station in Pennsylvania was the scene of a 1979 nuclear accident = three mile island +How many cards are dealt to each player in gin rummy = ten = 10 +What is made from a tree bark that turns a gin pink = angostura bitters +Who said he could distinguish between 140 different types of tobacco ash = sherlock holmes +Before 1992 what 4 letters were on Soviet Olympic vests = cccp +Which country can be reached by bridge from Singapore = malaysia +What material did cordwainers work with = leather +What kind of dance is the Blue Danube = waltz +What colour are blue tit's breasts = yellow +Who cut off Van Gogh's ear = himself +What city was called 'The Rose red city, half as old as time = petra +In 1995 what nation restarted its nuclear weapon testing programme = france +Why do woodpeckers peck trees = to catch insects +What nationality was Mata Hari = javanese +Which organ of the body produces bile = liver +How many red stripes are there on the US flag = seven +Which planets year is shorter than its day = venus +Which South American city is built in the shape of an aeroplane = brasilia +What 18th century tourist attraction is at the end of berlins Unter den Linden = brandenburg gate +Who is the most widely translated French author = jules verne +What is rust on copper called = verdigris +Which country is part of ANZUS security alliance along with New Zealand & the USA = australia +Which is the worlds second largest French speaking city = montreal +What name is given to grotesquely carved church water spouts = gargoyles +Where do gallinaceous birds nest = on the ground +Which is the worlds hottest capital city = khartoum +What was another name for the Atlantic Penguin which became extinct in 1844 = great auk +How many pounds does the Olympic hammer weigh = sixteen +Who built Peking's Winter Palace = kubla khan +Which Italian tourist attraction was exposed as a mediaeval fake in 1988 = turin shroud +In which country is the Atacama Desert where rain has never fallen = chile +What was Moonie leader-Reverend Moon jailed for in 1976 = tax fraud +In what year was the last manned moon landing = 1972 +What was the real name of malcolm X = malcolm little +Which of Arthurs knights undertook the Seige Perilous = galahad +How many of the United States don't border the main land mass = two +For which product was Millais' painting Bubbles used to advertise = pear's soap +How many letters are there in the french alphabet = twenty five +Who wrote the book the Jewel in the Crown = paul scott +What kind of stick does an artist rest his brush on = maulstick +Which organisation killed Aldo Moro = the red brigade +What rare water creature gives its name to a river in Florida = manatee +Who discovered gamma rays = ernest rutherford +Who succeedeed president Marcos = mrs corazon aquino +What did Disraeli refer to as a 'milestone round our necks' = colonies +Whats the maximum number of wives permitted at any one time under Islamic law = four +Which Paris building has a glass pyramid in its forecourt = the louvre +By what name was Cambodian leader Saloth Sar better known = pol pot +What was banned in bermuda until 1946 = cars +What is the largest structure ever made by living creatures = great barrier reef +In 1950 Stevie---------- , singer/songwriter (You are The Sunshine of My Love), born. = wonder +In 1961 Gary---------- , 2 time Academy award winning actor, dies at 60. = cooper +In 1965 Rolling Stones record "---------- ". = satisfaction +In 1966 Rolling Stones release "---------- ". = paint it black +In 1970 Beatles movie "---------- " premiers. = let it be +In 1981 Pope John ---------- shot, wounded by assailant in St Peter's Square. = paul ii +In 1988 Chet ---------- jazz trumpeter fell to death out of a hotel window at 59. = baker +In 1989 Approx ---------- students begin hunger strike in Tiananmen Square, China. = 2,000 +In 1944 George ---------- director (Star Wars), born. = lucas +In 1952 David ---------- Dunbartin Scotand, rocker (Talking Heads-Psycho Killer) , born. = byrne +In 1973 ---------- launched, the 1st Space Station. = skylab +In 1987 Rita ---------- actress, dies at 68 of Alzheimer's disease. = hayworth +In 1602 Cape Cod was discovered by the English navigator ---------- Gosnold. = batholomew +In 1753 ---------- Term Day. = whitsunday +In 1886 American poet Emily ---------- died. = dickinson +In 1918 US Airmail begins between Wash DC, ---------- and New York. = philadelphia +In 1919 Wladziu Valentino---------- , pianist, born = liberace +In 1930 A United Air Lines flight from---------- , CA to Cheyenne, WY carried the first airline "air hostess" (stewardess) -- Ellen Church. = oakland +In 1934 US Dept of Justice offers ---------- reward for Dillinger, dead or alive. = $25,000 +In 1936 Paul---------- , playwright, born = zindel +In 1940 Nylon ---------- on sale for the first time in the United States. = stockings +In 1948 Brian---------- , singer, songwriter, born = eno +In 1955 Lee---------- , actor, born = horsley +In 1958 The Soviet Union launched---------- . = sputnik iii +In 1770 Marie ---------- married the future King Louis XVI of France. = antoinette +In 1801 William H.---------- , who bought Alaska at $0.02/acre, born. = seward +In 1905 Henry ---------- (in Grand Island, Nebraska), actor, born. = fonda +In 1920 Joan of Arc was ---------- in Rome. = canonized +In 1929 First Academy Awards were given out. '---------- ' won best picture. Best Actor went to Emil Jennings; Best Actress, Janet Gaynor. = wings +In 1952 Pierce ---------- (in Israel), actor (current James Bond), born. = brosnan +In 1955 Debra ---------- (in Columbus, Ohio), actor, born. = winger +In 1955 Olga ---------- (in Russia), gymnast, born. = korbut +In 1966 Janet---------- , singer, Michael's sister, born. = jackson +In 1969---------- , Venus landing. First successful landing on another planet. = venera 5 +In 1970 Gabriela---------- , tennis professional, raqueteer, born. = sabatini +In 1975 Japanese Junko ---------- became first woman to reach Mt Everest's summit. = tabei +In 1990 Sammy---------- , Jr., "The Complete Entertainer", dies of throat cancer. = davis +In 218 7th recorded ---------- passage of Halley's Comet. = perihelion +In 352 ---------- begins his reign as Catholic Pope. = liberius +In 884 St ---------- begins his reign as Catholic Pope. = adrian iii +In 1444 Sandro---------- , Italian painter (Birth of Venus), born. = botticelli +In 1620 1st merry-go-round seen at a fair (Philippapolis,---------- ). = turkey +In 1630 Italian Jesuit Niccolo---------- , 1st to see 2 belts on Jupiter surface. = zucchi +In 1672 Frontenac becomes governor of ---------- (Canada). = new france +In 1809 Papal States annexed by---------- . = france +In 1836 Joseph Norman ---------- discovered Helium/founded Nature magazine, born. = lockyer +In 1900 Ayatollah Ruhollah ---------- Iran's spiritual leader, born. = khomeini +In 1928 ---------- modern Olympic games opens in Amsterdam. = 9th +In 1936 Dennis ---------- actor (True Grit, Blue Velvet, Easy Rider), born. = hopper +In 1940 Germany occupies---------- , Belgium & begins invasion of France. = brussels +In 1942 Taj ---------- NYC, singer/songwriter (The Real Thing), born. = mahal +In 1950 Christian---------- , French couturier, born. = lacroix +In 1956 "Sugar" Ray ---------- welter/middle/light-heavyweight boxing champion, born. = leonard +In 1963 Brigitte ---------- actress (Red Sonja, Rocky IV, Domino), born. = nielsen +In 1970 Thor ---------- crosses the Atlantic on reed raft 'Ra'. = heyerdahl +In 1975 ---------- releases "I'm Not in Love". = 10cc +In 1983 Israel & ---------- sign a peace treaty. = lebanon +In 1989 Nelson ---------- recieves a BA from University of South Africa. = mandela +In 526 St ---------- ends his reign as Catholic Pope. = john i +In 1830 Edwin ---------- of England signs an agreement for manufacture of his invention, the lawn mower. = budding +In 1868 ---------- last Russian tsar (1894-1917), born. = nicholas ii +In 1872 Bertrand ---------- England, mathematician/philosopher (Nobel 1950), born. = russell +In 1897 Frank ---------- movie director (Its a Wonderful Life, Arsenic & Old Lace), born. = capra +In 1900 Britain proclaims protectorate over kingdom of---------- . = tonga +In 1910 Passage of ---------- through tail of Halley's Comet causes near-panic. = earth +In 1912 Perry ---------- singer/TV (Perry Como Show, What did Delaware?), born. = como +In 1919 Dame Margot ---------- England, ballerina (partner of Nureyev), born. = fonteyn +In 1960 Yannick ---------- France, tennis player (French 1983), born. = noah +In 1965 Gene ---------- suggests 16 names including Kirk for Star Trek Captain. = roddenberry +In 1980 Ian ---------- musician (Joy Division), dies. = curtis +In 1980 Mount ---------- blows its top in Washington State. = st helens +In 715 St ---------- begins his reign as Catholic Pope. = gregory ii +In 1536 Anne ---------- wife of Henry VIII, beheaded. = boleyn +In 1588 Spanish Armada sets sail for---------- , bound to England. = lisbon +In 1611 Innocent XI ---------- Roman Catholic pope (1676-89), born. = 240th +In 1890 ---------- trail blazer/leader of Vietnam (1946, 1969), born. = ho chi minh +In 1925 ---------- Omaha NB, assassinated leader of black muslims, born. = malcolm x +In 1928 "Firedamp" explodes in ---------- Pa coal mine killing 195 of 273 miners. = mather +In 1935 T.E. ---------- (of Arabia) dies in a motorcycle crash. = lawrence +In 1945 Peter ---------- singer (Who-Tommy), born. = townsend +In 1964 US diplomats find at least 40 secret mics in the ---------- embassy. = moscow +In 1966 Tortoise reportedly given to Tonga's king by Capt. ---------- (1773), dies. = cook +In 1971 Ogden ---------- poet/TV panelist (Masquerade Party), dies at 68. = nash +In 1971 USSR launches---------- , 1st spacecraft to crash land on Mars. = mars 2 +In 1976 ---------- ownership legalized in Australia. = gold +In 1979 Guitarist Eric Clapton marries Patti---------- . = boyd +Nicosia is the capital of which island = cyprus +The musician Stephane Grappelli was famous for playing which instrument = violin +Of which country was Anwar Sadat the president = egypt +Ferdinand Marcos was the president of which country = philippines +The Dead Sea lies on the border of Israel and which other country = jordan +Which character was played by Roger Mooore in 'The Saint' = simon templar +The Golden Temple at Amritsar is sacred to which religion = sikhism +In which field were the Boulting Brothers famous = cinema +A yarmulka is a skullcap worn by followers of which religion = judaism +What is a yarmulka = a skullcap +TV /Movies:Hugo Drax was the villian of which James Bond book and film = moonraker +TV /Movies:The song 'Evergreen' features in which Barbra Streisand film = a star is born +The Ural mountains are mainly in which country = russia +In which country are the Southern Alps = new zealand +The Santa Maria was the ship of which explorer = christopher columbus +What kind of bird is a macaw = parrot +Typically, which type of literary form is an elegy = poem +What is the modern name for Petrograd = st. petersburg +What are seraphim and cherubim = ranks of angels +A popular climbing plant with sweet smelling flowers = sweet pea +On which continent is the Limpopo River = africa +What is a bantam = chicken +Where in the world is El Salvador = central america +Complete the title of the Charles Dickens novel 'Martin = chuzzlewit +TV /Movies:Who was the male star in the film The Beach = leonardo dicaprio +What term is applied to the widow of a king = queen dowager +Which car manufaturer produces a model called the 'Laguna' = renault +What type of creature is a pollack = fish +TV /Movies:What type of dog is Lady in the cartoon 'Lady and the Tramp' = cocker spaniel +Which US state has the postal abbreviation IN = indiana +Which Shakespeare play features the line 'Something is rotten in the state of Denmark = hamlet +What is dermatophobia the fear of = skin +In which century was the first skyscraper built = 19th +What nationality is the novelist Norman Mailer = american +What is the maximum number of consecutive terms that a US president can now serve = two +TV /Movies:Who played the title roll in the 1938 film 'The Adventures of Robin Hood' = errol flynn +TV /Movies:Who played the suave thief,Sir Charles Lytton, in the film The Pink Panther = david niven +What nationality is the artist Jackson Pollock = american +Andalusia is a region located in the south of which country = spain +What is the technical name for the collarbone = clavicle +Jupiter is the Roman name for which god of Greek mythology = zeus +Which planet in our solar system was discovered most recently = pluto +Which musical term means a mass for the dead = requiem +The Greek warrior Odysseus played a major role in which war = trojan +What type of creature is a basilisk = lizard +In which European country do one hundred grochen equal one schilling = austria +TV /Movies:Which film actor began his climb to stardom in the TV cowboy series 'Rawhide' = clint eastwood +Charcoal is made by heating what = wood +Instruments made from tea chests and washboards were a feature of which specific type of music = skiffle +Sephardim are followers of which religion = judaism +Which ballet company is based at the Maryinsky Theatre = kirov ballet +In German towns, what is the S-bahn = railway +A 'schipperke' is a breed of which animal = dog +TV /Movies:Who is the star of the 2000 film 'The Patriot' = mel gibson +In yoga how is the lotus position performed = sitting cross-legged +What does the word 'maudlin' mean = self-pitying +The cap and bells formed the insignia of which group of people = jesters +TV /Movies:The song 'A Whole New World' comes from which Disney film = aladdin +In the abbreviation P & O, what does the O stand for = oriental +What type of book is a 'cahier' = note book +Who wrote the novel the Valley of the Dolls = jaqueline susann +Which American footballer won four Super Bowls with the San Francisco 49ers = joe montana +Which country was once ruled by a Mikado = japan +In literature who has a servant called Sanch Panza = don quixote +The book "Cry the Beloved Country' was set in which country = south africa +Who adopted the title 'Il Caudillo' = franco +Tristan da Cunha is an island group in which ocean = atlantic +What is the name of the hammer used by doctors to test a patient's reflexes = plexor +Which canal was nationalised in 1956 = suez +What is the name for a line of longitude on a map = meridian +Which term connects a type of match and a nickname for the Devil = lucifer +Which fish is pickled to make rollmops = herring +A rune is a letter of what ancient alphabet = germanic +What is the back of a ship called = stern +The name Felicity means what = happiness +What is a 'shillelagh' = cudgel +Which dog name is a slang term for a detective = bloodhound +Who would be described as a 'sophomore' = student +What name is given to young herrings = whitebait +Pitcairn Island was settled by crew members of which ship = bounty +What was the favourite colour of the novelist Barbra Cartland = pink +What type of drug would be used to treat hay fever = antihistamine +What name is given to an army chaplain = padre +Which compny makes the perfume 'Coco' = chanel +Geographically, what is an eddy = whirlpool +Paul Newman married which actress = joanne woodward +Fianna Fail is a political party in which country = ireland +What nationality is the singer/actress Bjork = icelandic +The Rialto Bridge is associated with which canal = grand +Complete the title of this Travis song 'Why Does it Always.... = rain on me +What is the name for the load line on a ship = plimsoll line +What is the smallest independent country in South America = surinam +Who married the actor Liam Neeson = natasha richardson +The word 'bus' is shortened from which other word = omnibus +What was the last name of Isadora, the famous dancer = duncan +Which 20th century king reigned for less than a year = edward viii +Nantucket Island is part of which American state = massachusetts +Sepia is obtained from which sea creature = cuttlefish +What is the name given to a type of fossil resin = amber +What was the first name of Baden-Powell the founder of the Scout movement = robert +Mir is the highest point in which mountain range = hindu kush +Peter Sellers had a top ten hit in 1960 with which other film star = sophia loren +Which oscar winning actress married media mogul Ted Turner in 1991 = jane fonda +Who won the 1980 Pullitzer prize for literature for 'The Executioner's Song' = norman mailer +Jazz musician Bud Powell was best known for playing what instrument = piano +A Victoria Cross is struck from gun metal of Russian cannons captured at which battle = sebastopol +What is an 'ocarina' = wind instrument +What is the largest species of toad = cane toad +Albert Einstein worked at which American university = princeton +Which New Mexico town adopted the name of a radio quiz show = truth or consequences +In which year was the sculptor and painter Alberto Giacommetti born = 1901 +Bougainville is part of which island group = solomon +How many novels did Anthony Trollope write = 47 +Papeete is the capital of which overseas area of France = french polynesia +In which year was prohibition repealed in the USA = 1933 +What nationality was the playwright August Strindberg = swedish +What does the constellation Vulpecula represent = fox +What kind of creature is a 'hoatzin' = bird +A marigraph is an instrument which records what = tide level +What kind of animal is a 'margay' = cat +Bodrum in Turkey is on the site of which famous city = halicarnassus +A 'dybbuk' is an evil spirit in which folklore = jewish +The Admiralty islands are part of which country = papua new guinea +The Cassini division is associated with which planet = saturn +What was the real first name of Tennessee Williams = thomas +Burke and Wills are most associated with the exploration of which continent = australia +Nephrite is a variety of which substance = jade +The conqueror Temujin was better known by what name = genghis khan +In which country is the city of Samarkand = uzbekistan +What is the birthstone of someone born on Christmas Day = turquoise +The extinct elephant bird was native to which island = madagascar +The coelacanth, once thought to be extinct, is what kind of creature = fish +In mythology who continued to weep after she had been turned to stone = niobe +In the Bible who was the mother of Ishmael = hagar +Who wrote the novel 'King Solomon's Mines' = h rider haggard +In India who or what is a 'dacoit' = robber +What kind of creatures are 'ratites' = birds +What nationality was the artist Hieronymus Bosch = dutch +Which part of the body is affected by the condition "blepharism' = eyelid +Who wrote the poem 'Hudibras' = samuel butler +Malcolm Cooper is an Olympic gold medal winner in which sport = shooting +Which island is called Kalaallit Nunaat in its own language = greenland +King Ludwig of Bavaria was patron of which composer = wagner +Which Pacific republic was formerly known as the New Hebrides = vanuatu +Which musical instrument has a mouthpiece called a 'fipple' = recorder +Which palace was built by Henry VIII on the site of a leper hospital = saint james's +Worn in ancient Greece what was a 'petasus' = hat +What does 'll Trovatore', as in the opera, mean = the troubador +In which city would you find the Hancock Tower and Filene's bargain basement = boston, mass +By what name is Jacopo Robusti better known = tintoretto +Which two US Presidents shared 1924 as the year of their birth = george bush & jimmy carter +Whose latest bestseller is entitled' look to Windward' = lain m banks +Place the following musical terms in order of increasing speed Lento, Largo, Andante, Allegro and Presto = lento, largo, andante, allegro and presto +Which Gilbert and Sullivan Opera is subtitled The Slave of Duty = pirates of penzance +Where would you find the volcano loki = on jupiter's moon i0 +What is the opening line of the Star Spangled Banner = oh, say can you see by the dawn's early light +What was Winston Churchill's only novel = savrola +Westminster Abbey was originally a monastery of which order of monks = benedictines +Which word can precede the following; -count -bath -bank = blood +Where would you find tricounis, clinkers and muggers = on the soles of old hiking boots +Written by Richard Ford, and made into a box office smash at the cinema, which book won the 1996 Pulitzer Prize for Fiction = independence day +Which German City is the home to the Becks brewery = bremen +What was set up in 1792 due to the treat of a French Invasion, and published its first official series in 1805 = ordnance survey +What is meant by the cookery term ' A La Crecy' = served with carrots +Madonna has had 8 number 1 's in the UK singles chart, yet her best selling single only reached number 3. Name it = like a virgin +Which polar explorer died in a plane crash, while searching for a missing Italian airship = ronald amundsen +Known as 'England's Darling' who led a resistance against William the Conqueror, on the Isle of Ely in 1070 = hereward the wake +Which beer was first brewed in Leuven in 1366 = stella artois +Which American author wrote the million pound sellers 'The Witches of Eastwick' and 'The Poorhouse Fair' = john updike +What was the name of the company founded by Prince Rupert in 1670 to trade furs with the North American Indians = hudson bay company +Who succeeded U Thant as Secretary General of the United Nations in 1972 = kurt waldheim +Which John Wayne film was a hit for Ultravox in 1982 = reap the wild wind +At which sport did Yvonne McGregor win a bronze medal for Great Britain at the Sydney Olympics = cycling +Which fictional character first appeared in 194 i, when she came to America from her Amazon homeland of Paradise Island to help the US defeat the Nazis = diana prince = wonder woman +In which US City is the TV programme' Ali McBeal' based = boston +Two islands are situated in San Francisco harbour. One is Alcatraz, name the other = angel island +Which comic book hero, with an alter ego of Steve Rogers, did Joe Simon and Jack Kirby create = captain america +Which railway station in London, designed by Edward Wilson and opened in 1874, serves East Anglia = :liverpool street +From which London jail did Ronnie Biggs escape in 1965 = wandsworth +Harrison Ford's performance in which film earned him his only Best Actor nomination = witness +In the Bible, who is recorded in' Acts' as purchasing a plot of land known as Potter's Field = judas iscariot +Which British animal has the scientific name Meles Meles = badger +Who led the revolt against Henry III during the Baron Wars of 1264 to 1267 = simon de montfort +Prior to their 1999 UK number 1 hit 'Maria', which record was Blondie's last number 1 in the UK singles chart = the tide is high +Which band were named after a 1950 film starring Bette Davis, Anne Baxter, George Sanders and Celeste Holm = all about eve +Which mythical land was supposed to lie between Cornwall and the Scilly Isles = l yonesse +Which car manufacturer takes its name from the Latin for 'I roll' = volvo +The battlefield of Austerlitz is in which modern day country = czech republic +In which Isle of Wight town would you find the History of Smuggling Museum = ventnor +Mentioned in many westerns, which Texan city, situated at the base of the Franklin Mountains, stands on the Rio Grande = el paso +The roadrunner, found in the deserts of North America, is a member of which bird family = cuckooo +In film, collectively, how were Gabriel Byme, Stephen Baldwin, Benico Del Toro, Kevin Pollock and Kevin Spacey known in 1995 = usual suspects +What creature is the subject of Roald Dahl's children's book Esio Trot = tortoise +Name the year. South African police kill 56 people in Shatpeville, Israeli intelligence agents capture Adolf Eichmann, and Nigeria gains its independence. = 1960 +A bottle of wine originating from the Mondavi coastal vineyard is produced in which country = u s a +Which British animal has the scientific name Lutra Lutra = otter +In children's literature what was the name that appeared over the door of 'Winnie the Pooh's house = mr sanders +During the time of the Roman occupation it was known as Lutetia. How is it known today = paris +Name the year. Walt Disney dies, Hastings Banda becomes Malawi's first President, and Nelson's pillar in O'Connell Street, Dublin is blown up = 1966 +The Romans called it Venta Belgarum. What is it called today = winchester +According to the song, in which city was 'The House of the Rising Sun' = new orleans +A bottle of wine originating from the 'Nobilo' vineyards, is produced in which country = new zealand +In the Old Testament, who consulted the Witch of Endor = king saul +Which one word links a Scottish river, the captain of the New Zealand Rugby Union team, and a BBC comedy programme = blackadder +In which battle of 1571 did the combined Spanish and Venetian forces defeat the Turkish navy = lepanto +Which is the largest member of the kingfisher family = kookaburra +Which one word connects Illinois, Mary O'Brien and 'The Simpsons' = springfield +In Greek mythology, who turned Odysseus's men into pigs = circe +In which battle of 1709 did the allied English army under Marlborough defeat French force led by Marshal Villars = malplaquet +The pop star 'Moby' is the great-grandson ofwhich famous author = herman mel ville +Which Marx Brothers film features a bunch of Nazis trying to make off with stolen treasure = a night in casablanca +What term can describe a cheap disreputable nightclub, and a style of ragtime piano playing = honky tonk +76. The first UK Top 10 chart appeared in November 1952 when A1 Martino was No 1 with 'Here in my Heart'. Who had three songs in that first top 10 chart = vera lynn +Which fishing port in California was the setting for Steinbeck's novels 'Cannery Row' and 'Tortilla Flat' = monterrey +Fu Manchu was the adversary of which Scotland Yard detective = nayland smith +What was the name given to the 3rd Indian Division that operated under the command of Brigadier Wingate during World War II = chindits +Which gangster was shot dead by the FBI on 22 July 1934 as he came out of the Biograph cinema in Chicago = john dillinger +Prior to David Coulthard this year, who was the last British driver to win the Monaco Grand Prix = jackie stewart +Bill Clinton is the first Democrat to be elected to two terms in office since which American President = franklin d roosevelt +Which Turkish town was the birthplace of St Paul = tarsus +What kind of animal is a civet = cat +Outside which building in London was Charles I executed = the banqueting house +What is the fruit of the 'Rubus fructicosus' = blackberry +What is the currency of Israel = shekel +Which country has the e-mail address '.ie' = republic of ireland +Who wrote the opera Rodelinda = handel +Which saint's emblem is two breasts on a dish = st agatha +Who carried the Union Jack at the opening ceremony in the Sydney Olympics = matthew pinsent +In which South/Central American country is the active volcano Arenal = costa rica +Whose debut album is named Hot = melanie b +Which bird family are the Anserinae = geese +Which Shakespeare play has only two female characters, Portia and Calpurnia = julius caesar +What is the common name of the plant Myosotis = forget me not +Where was the first beachhead established in the Falklands' War = san carlos +Who wrote From this Moment On = cole porter +What shape is the pasta conciglie = shell-shaped +The word ghetto is derived from the area in Venice where the Jews were confined. What does ghetto mean in Venetian dialect = foundry +In which opera do Ping, Pang and Pong appear = turandot +What can be described as a Flemish Bond = brickwork +Who in the 60s produced the 'Space Age' collection = pierre cardin +Who invented the World Wide Web = tim berners-lee +In which part of Britain did Boadicea's Iceni live = east anglia +An emmet is which type of a creature in old language = ant +In which city is the Grosvenor Museum situated = chester +What is the title of Geri Halliwell's recent book = if only = +Which London house was the home of the Duke Of Wellington. It was also known as No. 1 London. = apsley house +What kind of animal is a peccary = pig +What is the fruit of the Prunus Armeniaca = apricot +What is the currency of Holland = guilder +What country has the e-mail address '.za' = south africa +Who wrote the opera Fortinbras = schubert +Which saint's emblem is two eyes in a dish = st lucy +Who lit the Olympic flame at Sydney = cathy freeman +In which South/Central American country is the active volcano Cotopaxi = ecuador +Whose recent album is called Painting It Red = beautiful south +Who discovered the cholera micro-organism = koch +Whose last words were: 'Die, my dear Doctor, that is the last thing I shall do!' = lord palmerston +Which bird family are the Columbidae = doves and pigeons +Which Shakespeare play has female characters, Bianca and Katherine = the taming of the shrew +What is the common name of the plant Nigella = love in a mist +Name the British nuclear submarine that sank the General Belgrano = hms conqueror +Who wrote Mountain Greenery = rodgers and hart +What shape is the pasta Farfalle = butterfly-shaped +Which two of New York's boroughs are actually islands = manhattan & staten island +What colour is the left hand circle of the Olympic rings = blue +For which state was Al Gore a senator = tennessee +Which knight of the Round Table fought the Green Knight = sir gawain +In which musical is the song Day by Day = godspell +In which country is Bukhara = usbekistan +In which palace was Queen Elizabeth I born = greenwich +What is the name of the straits that separate Sicily from Italy = messina +According to the Old Testament, who was the wife of Abraham and mother of Isaac = sarah +Who is the new President of Yugoslavia = vojislav kostunica +Which eponymous animal in a children's story had friends called Merrylegs and Ginger = black beauty +Don John of Austria, the victorious admiral at Lepanto, was the illegitimate son of which Holy Roman Emperor = charles v +If a dish is described as "a la forestiere" which ingredient must it contain = mushrooms +Name Dolly Parton's Smokey Mountain theme park = dollywood +Name the fourth book of the Old Testament = numbers +What type of fruit are "Lancashire Lad" & "Langley Gage" = gooseberries +In the key of D major, which note is "Me" = f sharp +What is the capital of Slovenia = ljubljana +What is the main grape used in Chianti = sangiovese +What structure consisting of many blood cells, feeds the foetus during pregnancy = placenta +Which inert gas is a fission product of uranium nuclear reactors = xenon +Mexico shares a southern border with Guatamala and which other country = belize +Who makes the last speech in Shakespeare's "Macbeth" = malcolm +Traditionally what anniversary is your 55th = emerald +What car did Caractacus Potts drive = chitty chitty bang bang +Which European capital city has a bridge called the "Halfpenny Bridge" = dublin +What is the name of the staff carried by a bishop = crosier +Which British town did the Romans call DUBRIS = dover +Who composed "Ein Heldenleben" = richard strauss +Which Gilbert & Sullivan operetta contains the aria "The moon and I" = mikado +How many BTU's in a therm = 100,000 +The love story of which writer is portrayed in the film ""Shadowlands" = c s lewis +Which two cities are linked by the M8 = glasgow & edinburgh +Which South American national flag consists of nine blue and white horizontal stripes with a golden sun in the top left corner = uruguay +Name 10 CC's first UK No 1 = rubber bullets +Who painted "Van Gogh painting sunflowers" = paul gauguin +What was the then title of the man who married Elizabeth Bowes-Lyon in 1923 = duke of york +The common garden flower TAGETES is a variety of which popular plant = marigold +Ramon Mercador assassinated whom = leon trotsky +Who makes the last speech in Shakespeare's "Julius Caesar" = octavian +Which Roman fortification ran from the Firth of Clyde to the Firth of Forth = antonine wall +Which Gilbert & Sullivan operetta contains the aria "Oh, Foolish Fay" = iolanthe +What is the capital of Macedonia = skopje +Why was Naga Jolokia in the news in August this year = the hottest chilli known +A dish described as "Lyonnaise" has which ingredient = onions +Don Carlos, subject of an opera by Verdi, was the half brother of which king of Spain = philip iii +What name is given to the small sac or cavity from which a hair grows = follicle +Which father and daughter starred in the film "Tiger Bay" = john & hayley mills +Which European city has a bridge called the "Donkey Bridge" = amsterdam +Name the fifth largest of the Channel Islands. = herm +The Timor sea and the Arafura sea are off the north coast of which country = australia +By what name was Robert Stroud better known = birdman of alcatraz +Which nation recently won the Alfred Dunhill Cup at St. Andrews = spain +What name is given to the cap worn by a cardinal = biretta +Which birth sign precedes Cancer = gemini +Who composed "Emilia de Liverpool" = donizetti +What is the key signature of E flat major = 3 flats +How many inches in a cubit = eighteen = 18 +In country music, who is the "Coalminer's Daughter" = loretta lynn +What type of fruit are "Malling Jet" & "Wellington XXX" = blackcurrants +What is the main grape used in Barolo and Barbaresco = nebbiolo +What food did Tigga in Winnie the Pooh finally find he liked = extract of malt +Who is the second highest wicket taker in Test Cricket history = kapil dev +In which American state is the Three Mile Island nuclear reactor = pennysilvania +Which group's first album was called "Piper at the Gates of Dawn" = pink floyd +To which instrument does an orchestra normally tune = oboe +How precisely is the bird CYGNUS CYGNUS better known = whooper swan +Who in 1497 established the first Portuguese colony in India = vasco da gama +In Greek myth how were the children of Uranus & Gaea collectively known = the titans +Who wrote in 'Sonnets from the Portuguese "How do I love thee = let me count the ways."' = elizabeth browning +Which German city was the target of the first 'thousand bomber raid = cologne +Which battle took place in Leicestershire in 1485 = bosworth field +Oberon is a moon of which planet = uranus +Who was the husband of Jennie Van Westphalen = karl marx +On which Spanish costa would you find the resort of Alicante = costa blanca +Which king was known as 'The Hammer of the Scots' = edward i +Who wrote "The Nine Tailors" = dorothy l sayers +Which element, atomic number 74, takes its name from the Swedish for Heavy Stone = tungsten +Which holiday company is currently using the song "The Time of My Life" from "Dirty Dancing" to advertise its holidays = sandals +Fort Baxter, Kansas was the fictional setting for which TV series = seargant bilko = phil silvers show +As at 29 October 2000 who is the Prime Minister of Canada = jean chretien +Which part of the body is affected by the condition stomatitis = mouth +In which town does the comic hero Desperate Dan live = cactusville +Which crime fiction writer's titles have an alphabetical theme. e.g A is for Alibi and E is for evidence. = sue grafton +In the Bible, who sold his birthright for a mess of potage = esau +A radian is a unit used to measure what = angle +As at 29 October 2000 who is the Prime Minister of Australia = john howard +Which film role links Mary Elizabeth Mastrantonio, Olivia de Havilland and Audrey Hepburn = maid marian +Which crime fiction writer's titles have a numerical theme. e.g. 1 for the money, 2 for the Dough = janet evanovich +Name the English king who met King Francis 1st of France on the Field of the Cloth of Gold. = henry vii +Circle, Parabola and Hyperbola are three 3 of the four curves known as the conic sections. Name the fourth. = ellipse +In which U.S. state is Fort Knox = kentucky +In the Bible, who built the Golden Calf for the Israelites to worship = aaron +Which part of the body is affected by the condition nephritis = kidneys +Which element, atomic number 55, takes its name from the Greek for heavy = barium +Who wrote "The Four Just Men" = edgar wallace +Charter 77 was an association of individuals devoted to the assertion of lost human rights in which European country = czechoslovakia +Which internet company is currently using the song "Puppy Love" to advertise its search engine = lycos +Which film and TV role links, Leslie Howard, David Niven, Barry K Barnes and Anthony Andrews = the scarlet pimpernel +Which European city is served by Cointrin airport = geneva +Where would you find the only freshwater seals in the world = lake baikal +What is the common name of the herb Melissa Officanalis = lemon balm +The Beach Boys had two British number one hits, "Good Vibrations" and which other = do it again +Who painted " Girl with Red Scarf and Black Trousers" = l s lowry +In which county is the National Trust property "Cotehele" = cornwall +Whose face was described as being "like a woollen mat" = noel coward +Name the seaport of Tokyo = yokohama +The prefix 'thio' in chemical compounds indicates the presence of which element = sulphur +Which actress appeared in "A Handful of Dust", "The English Patient" and "The Horse Whisperer" = kirstin scott thomas +Who designed the Palace of Westminster = sir charles barry +According to the Beatles, how many holes are there in Blackburn = 4000 +Whose recent biography is entitled "Out of the Frying Pan" = keith floyd +Which Planet is 228 million kilometres from the Sun and has an orbital time of 1.88 years = mars +The English translation is "Ocean of Wisdom". How do we know the more common original = dalai lama +What was the pen-name of Eric Arthur Blair = george orwell +Who painted Six Bells, Abertillery, Rhondda = l s lowry +What does the SI prefix 'pico' mean = one millionth millionth +In which county is the National Trust property "Arlington Court" = devon +The United Nations building in New York was designed by whom = le corbusier +Which actor appeared in "Pulp Fiction", Reservoir Dogs" and "The Piano" = harvey keitel +According to the Beatles, upon what will there be a show for the benefit of Mr. Kite = trampoline +What is the name of the seaport of Perth, Western Australia = freemantle +An English translation is "Wind and Water". How do we know the more common original = feng shui +Which Planet is 2872 million kilometres from the Sun and has an orbital time of 84 years = uranus +Whose recent biography is entitled "Life in the Jungle" = michael hezeltine +Who was the last Danish king of England = hardicanute +Who directed John Wayne's last film "The Shootist" = don siegel +In what year was Joan of Arc burned at the stake = 1431 +With what branch of the arts is Rudolf Von Laban associated = dance = ballet +Who won this year's Nobel peace prize = kim dae jung +Who was known as "The King of Swing" = benny goodman +In Greek mythology who was the wife of Orpheus, the subject of the earliest surviving opera by Peri = eurydice +Name The Year: Pres. Reagan shot and wounded by John W. Hinckley Jr. = 1981 +Name The Year: Third Space Shuttle Mission - Columbia 3 returns to Earth. = 1982 +Name The Year: U.S. ends participation in multinational peace force in Lebanon. = 1984 +Name The Year: Portugal regains independence after 60 years of Spanish rule. = 1640 +Name The Year: Charles and M.N. Roberts ascend 2,000' in a hydrogen balloon. = 1783 +Name The Year: Santo Domingo (Dominican Rep) proclaims independence from Spain. = 1821 +Name The Year: Dom Pedro crowned emperor of Brazil. = 1822 +Name The Year: Sino-Portuguese treaty recognizes Portugal's control of Macao. = 1887 +Name The Year: Continuous moving assembly line introduced by Ford (1 car every 2.5 minutes). = 1913 +Name The Year: Iceland becomes independent state under the Danish crown. = 1918 +Name The Year: Lady Astor sworn-in as 1st female member of British Parliament. = 1919 +Name The Year: BINGO invented by Edwin S Lowe. = 1929 +Name The Year: Sergei Kirov Josef Stalin's collaborator, assassinated in Leningrad. = 1934 +Name The Year: Woody Allen [Allen Stuart Konigsberg] (Zelig, Annie Hall, Manhattan Murder Mystery), born. = 1935 +Name The Year: Lee Trevino, golfer (US Open 1968,71), born. = 1939 +Name The Year: Bell Labs tests coaxial cable for TV use. = 1936 +Name The Year: Richard Pryor, comedian/actor (Lady Sings the Blues, Stir Crazy), born. = 1940 +Name The Year: Bette Midler, singer/actress (Do You Want to Dance?), born. = 1945 +Name The Year: Aleister Crowley, occultist dies at 74. = 1947 +Name The Year: Central African Rep made autonomous member of French Commonwealth (Nat'l Day). = 1958 +Name The Year: 12 nations sign a treaty for scientific peaceful use of Antarctica. = 1959 +Name The Year: 1st color photograph of Earth from outer space. = 1959 +Name The Year: Australia grants self-government to Papua New Guinea. = 1973 +Name The Year: David Ben-Gurion founding father of Israel dies in Tel Aviv at 87. = 1973 +Name The Year: Digging begins to link England and France under the English Channel. = 1987 +Name The Year: Benazir Bhutto named 1st female PM of a Moslem country (Pakistan). = 1988 +Name The Year: East Germany drops the communist monopoly from its constitution. = 1989 +Name The Year: USSR Pres Mikhail S Gorbachev meets Pope John Paul II at the Vatican. = 1989 +Name The Year: British and French workers meet in English Channel's tunnel (Chunnel). = 1990 +Name The Year: Iraq accepts Bush's offer for talks. = 1990 +Name The Year: Lithauania, Estonia and Latvia hold their 1st joint session. = 1990 +Name The Year: Inaugural AIDS awareness day. = 1991 +Name The Year: Ukranian people vote for independence. = 1991 +Name The Year: Napoleon becomes 1st French emperor, placing crown on his own head. = 1804 +Name The Year: Napoleon defeats Russians & Austrians at Austerlitz. = 1805 +Name The Year: Franz Josef I becomes emperor of Austria and King of Hungary. = 1848 +Name The Year: 2nd French empire established; Louis Napoleon becomes emperor. = 1852 +Name The Year: Georges Seurat France, painter/pointillist (Grande Jatte), born. = 1859 +Name The Year: Peter Carl Goldmark, developed color TV & LP records, born. = 1906 +Name The Year: The opera "Samson et Dalila" is produced (Rouen). = 1877 +Name The Year: Gillette patents 1st disposable razor. = 1901 +Name The Year: Randolph Hearst newspaper publisher, born. = 1915 +Name The Year: 1st controlled nuclear chain reaction (University of Chicago). = 1942 +Name The Year: Benelux treaty signed by Belgium, Netherlands & Luxembourg. = 1958 +Name The Year: Fidel Castro declares he's a Marxist, & will lead Cuba to Communism. = 1961 +Name The Year: Soviet Mars 3 is 1st to soft land on Mars. = 1971 +Name The Year: Abu Dhabi, Ajman, Dubai, Fujeira, Sharjah & Umm ak Qiwain form the United Arab Emirates. = 1971 +Name The Year: Monica Seles tennis star (French Open-1990), born. = 1973 +Name The Year: Laos People's Democratic Republic founded (National Day). = 1975 +Name The Year: 1st permanent artificial heart successfully implanted (U of Utah) in retired dentist Barney Clark; lived 112 days with the Jarvic-7 heart. = 1982 +Name The Year: Desi Arnaz actor (Ricky Ricardo-I Love Lucy), dies at 69. = 1986 +Name The Year: "Naked Gun" premieres, a movie based on TV's "Police Squad". = 1988 +Name The Year: 1st parlimentary election in newly reunified Germany. = 1990 +Name The Year: Charles VI [the Well-Beloved], king of France (1380-1422), born. = 1368 +Name The Year: Sir Thomas Herriot introduces potatoes to England, from Colombia. = 1586 +Name The Year: Galileo perfects the telescope. = 1621 +Name The Year: Edmund Halley receives MA from Queen's College, Oxford. = 1678 +Name The Year: Ludvig Baron Holberg, a founder of Danish & Norwegian literature, born. = 1684 +Name The Year: Sir Rowland Hill introduced 1st adhesive postage stamp (1840). = 1795 +Name The Year: John Backus, inventor (FORTRAN computer language), born. = 1924 +Name The Year: Tennessee Williams play "A Streetcar Named Desire", opens. = 1947 +Name The Year: Ozzy Osbourne heavy metal musician, born. = 1948 +Name The Year: Mel Smith author/comedian, born. = 1952 +Name The Year: 1st human heart transplant performed (Dr Christian Barnard, S Africa). = 1967 +Name The Year: Pioneer 10 passes Jupiter (1st fly-by of an outer planet). = 1973 +Name The Year: 2,000 die from Union Carbide poison gas emission in Bhopal, India. = 1984 +Name The Year: A new war government takes office in France. = 1793 +Name The Year: The Bulgarian Government adopts a Communist Constitution. = 1947 +Name The Year: (AUSTRIA) Wolfgang Amadeus Mozart, composer, dies aged 37. = 1791 +Name The Year: (USA) Walt Disney born. = 1901 +Name The Year: (FRANCE) Claude Monet, imperssionist painter, dies. = 1926 +Name The Year: (USA) Ira Gershwin, composer, born. = 1896 +Name The Year: NASA launch Pioneer III. = 1958 +Name The Year: The Roman politician, Cicero, is slain. = 43BC +Name The Year: USA declares war on the Prussian-Hungarian forces, joining World War One on the side of the Allies. = 1917 +Name The Year: Japanese bomb Pearl Harbour. The USA join Allies in fighting the Axis forces soon after. = 1941 +Name The Year: (USA) Rube Goldberg, inventor and cartoonist, dies. = 1971 +Name The Year: Weekly airmail route starts between Australia and the United Kingdom. = 1934 +Name The Year: The Allies, along with Free France declare war on Japan. = 1941 +Name The Year: Saidi, great Persian poet (Orchard, Rose Garden) dies. = 1292 +Name The Year: Gustavus II Adolphus, king who made Sweden a major power (1611-32) = 1594 +Name The Year: John Milton, poet and puritan (Paradise Lost) born. = 1608 +Name The Year: Emmett Kelly, circus clown (Weary Willie) born. = 1898 +Name The Year: Margaret Hamilton, actor (Wizard of Oz -- Wicked Witch of the West) born. = 1902 +Name The Year: Douglas Fairbanks, Jr, actor (Ghost Story) born. = 1909 +Name The Year: Kirk Douglas, actor (Gunfight at the OK Corral, 7 Days in May) = 1918 +Name The Year: Redd Foxx, actor (Sanford and Son), comedian, born. = 1922 +Name The Year: Robert J.L. Hawke (Labor), prime minister of Australia (1983-1991) born. = 1929 +Name The Year: Donny Osmond, singer born. = 1957 +Name The Year: UN Gen Assembly unanimously approves Convention on Genocide. = 1948 +Name The Year: Tanganyika gains independence from Britain. = 1961 +Name The Year: Pioneer Venus 2 drops 5 probes into atmosphere of Venus. = 1978 +Name The Year: Martin Luther publicly burned papal edict demanding that he recant. = 1520 +Name The Year: Thomas H. Gallaudet, pioneer of educating the deaf, born. = 1787 +Name The Year: Cesar Franck (in Belgium), composer, born. = 1822 +Name The Year: George Macdonald, Scottish novelist (Lilith), born. = 1824 +Name The Year: Emily Dickinson (in Amherst, Mass), poet, born. = 1830 +Name The Year: Melvil Dewey, created the Dewey Decimal System for libraries = 1851 +Name The Year: Alfred Nobel dies; Swedish Nobel Prize ceremony on this date. = 1896 +Name The Year: Spanish-American War ends -- U.S. acquires Guam, Puerto Rico, the Phillipines, and Cuba from Spain. = 1898 +Name The Year: First Nobel Peace Prizes (to Jean Henri Dunant, Frederic Passy). = 1901 +Name The Year: Pres. Theodore Roosevelt (first American) awarded Nobel Peace Prize. = 1906 +Name The Year: Dorothy Lamour (in New Orleans, LA), actor (Road to Bali), born. = 1914 +Name The Year: UN General Assembly adopts Universal Declaration on Human Rights. = 1948 +Name The Year: First Human Rights Day. = 1949 +Name The Year: Susan Dey, actor (First Love, LA Law), born. = 1952 +Name The Year: Nia Peeples born. = 1961 +Name The Year: Zanzibar gains independence from Britain. = 1963 +Name The Year: Israeli hmuel Yosef Agnon wins Nobel Prize for literature. = 1966 +Name The Year: Singer Otis Redding dies in plane crash at 26. = 1967 +Name The Year: Soyuz 26 carries 2 cosmonauts to Salyut 6 space station. = 1977 +Name The Year: Soyuz T-5 returns to Earth, 211 days after take-off. = 1982 +Name The Year: South African Bishop Desmond Tutu received his Nobel Peace Prize. = 1984 +Name The Year: (US) Gugliemo Marconi sends the first wireless message across the Atlantic. = 1911 +Name The Year: (Ireland) Martial Law Declared. = 1920 +Name The Year: A general election results in a hung Parliament in the UK. James MacDonald, of the UK Labor Party wins the follow-up election next year. = 1923 +Name The Year: (UK) King George V crowned Emperor of India and founds New Dehli to replace Calcutta as the capital. = 1911 +Name The Year: (Germany) Hugo Junkers completes the first all metal airplane. = 1915 +Name The Year: The first "motel" opens in California's San Luis Obispo. = 1925 +Name The Year: Kenyan Independance Day. = 1964 +Name The Year: US, Japan, UK & France sign a treaty aimed at controlling naval build-up in the Pacific Ocean. = 1921 +Name The Year: Lebanon and Syria are made independent. = 1945 +Name The Year: Amundsen of Norway reaches the south pole. = 1911 +Name The Year: Women get the vote in Turkey = 1934 +Name The Year: Portugese President Sidonio Paes is assassinated. = 1918 +Name The Year: (Geneva, Switzerland) China and Austria added to Leauge of Nations = 1920 +Name The Year: Catherine of Aragon, first wife of Henry VIII, born. = 1485 +Name The Year: English Parliament adopts Bill of Rights after Cromwell's Revolution. = 1689 +Name The Year: Ludwig von Beethoven (in Bonn, Germany), composer, born. = 1770 +Name The Year: Big Tea Party in Boston Harbor. Indians welcome. British unwelcome. = 1773 +Name The Year: Jane Austen (in England), novelist (Pride and Prejudice), born. = 1775 +Name The Year: George Santayana, philosopher, poet, humanist, born. = 1863 +Name The Year: Anton Dvorak's "New World Symphony" premieres. = 1893 +Name The Year: Sir Noel Coward, playwright, born. = 1899 +Name The Year: "Variety", covering all phases of show business, first published. = 1905 +Name The Year: South Pole first reached, by Norwegian Roald Amundsen. = 1911 +Name The Year: Arthur C. Clarke, science-fiction author (2001, Childhood's End), born. = 1917 +Name The Year: Liv Ullman (in Tokyo, Japan), actor (Cries and Whispers), born. = 1939 +Name The Year: Battle of the Bulge begins. = 1944 +Name The Year: Gemini VI returns to Earth. = 1965 +Name The Year: Pope Paul III excommunicated England's King Henry VIII. = 1538 +Name The Year: France recognizes the independance of the 13 US colonies. = 1777 +Name The Year: Sir Humphry Davy, discovered several chemical elements = 1778 +Name The Year: Aztec calendar stone discovered in Mexico City. = 1790 +Name The Year: New York City traffic regulation creates the first one-way street. = 1791 +Name The Year: "A Christmas Carol" by Charles Dickens published in London. = 1843 +Name The Year: Violent bread riots at Montreal. = 1875 +Name The Year: At 10:35AM, for 12 seconds, first sustained motorized aircraft flight (36 meters) by Wright Brothers at Kitty Hawk, NC. = 1903 +Name The Year: Willard Frank Libby, invented carbon-14 "atomic clock", born. = 1908 +Name The Year: Japan receives League of Nations mandate over Pacific islands. = 1920 +Name The Year: First movie opening simultaneously in major cities "On The Beach". = 1959 +Name The Year: Budweiser rocket car reaches 1190 kph (record for wheeled vehicle). = 1979 +Name The Year: Charles Wesley, cofounder of Methodist movement = 1707 +Name The Year: Elizabeth, empress of Russia (to Peter the Great and Catherine I) = 1709 +Name The Year: Antonio Stradivari, violin maker, dies. = 1737 +Name The Year: Joseph Grimaldi, English pantomimist, "greatest clown in history" = 1779 +Name The Year: William Bond obtains first photograph of moon through a telescope. = 1849 +Name The Year: Paul Klee, Swiss abstract painter = 1879 +Name The Year: Edwin Armstrong, radio pioneer (invented FM) = 1890 +Name The Year: Auto speed record set -- 63 kph. = 1898 +Name The Year: George Grant wins patent for his golf tee. = 1899 +Name The Year: Willy Brandt (SD), chancellor of West Germany (1969-74) (Nobel '71) = 1913 +Name The Year: Betty Grable (in St. Louis, MO), actor = 1916 +Name The Year: Mohammed Ali, boxer = 1942 +Name The Year: Keith Richard, guitarist (Rolling Stones) = 1943 +Name The Year: Uruguay joined the United Nations. = 1945 +Name The Year: Steven Spielberg, director (Jaws, Raiders of the Lost Ark, etc.) = 1947 +Name The Year: Japan admitted to the United Nations. = 1956 +Name The Year: Niger gains autonomy within French Community (National Day). = 1958 +Name The Year: India annexes Portuguese colonies of Goa, Damao and Diu. = 1961 +Name The Year: Borman and Lovell Splash down in Atlantic. Ends two week Gemini VII flight. = 1965 +Name The Year: The British parliament voted for the abolition of death penalty. = 1969 +Name The Year: US began its heaviest bombing of North Vietnam. = 1972 +Name The Year: Soyuz 13 launched into earth orbit for 8 days. = 1973 +Name The Year: Soviet Premier Alexei Kosygin suffered a fatal heart attack at 76. = 1980 +Name The Year: UN Security Council unanimously condemns 'acts of hostage-taking'. = 1985 +Name The Year: Philip V, first Bourbon king of Spain (1700-46) = 1683 +Name The Year: Robinson Crusoe leaves his island after 28 years (as per Defoe). = 1686 +Name The Year: Benjamin Frankin begins publication of "Poor Richard's Almanack". = 1732 +Name The Year: Vitus Bering, Dutch navigator and explorer, died. = 1741 +Name The Year: Thomas Paine publishes his first 'American Crisis' essay. = 1776 +Name The Year: Sir William Parry, British Arctic explorer = 1790 +Name The Year: Mary Ashton Livermore, American reformer, women's suffrage leader = 1821 +Name The Year: Leonid Brezhnev (in Ukraine), Soviet statesman, in the Ukraine = 1906 +Name The Year: Jean Genet, French novelist and playwright (The Blacks) = 1910 +Name The Year: British Broadcasting Corp. began transmitting overseas. = 1932 +Name The Year: War broke out in Indochina as Ho Chi Minh attacked the French. = 1946 +Name The Year: Jennifer Beals (in Chicago), actor (Flashdance) = 1963 +Name The Year: Alyassa Milano, actor (Who's the Boss) = 1972 +Name The Year: Apollo 17 returns to Earth. = 1972 +Name The Year: USSR frees dissident Andrei Sakharov from internal exile. = 1986 +Name The Year: Russian calendar adjusted so Russian New Year occurs on January 1st, instead of September 1st. = 1699 +Name The Year: Turkey cedes the island of Crete to the Egyptians. = 1832 +Name The Year: Assorted Russian republics form together to found the Union of Soviet Socialist Republics. = 1922 +Name The Year: (USA) John Steinbeck, author, died. = 1968 +Name The Year: Five year truce between England and Scotland began. = 1491 +Name The Year: Benjamin Disraeli, British Statesman, born. = 1804 +Name The Year: Josef Stalin, Russian dictator, born. = 1879 +Name The Year: (England) F. Scott Fitzgerald, author, died. = 1940 +Name The Year: Ecuador and Iraq join the United Nations. = 1945 +Name The Year: N.A.S.A. launch Apollo 8 to fly around the moon. = 1968 +Name The Year: Dominican Order of Friars confirmed by the Pope. = 1216 +Name The Year: J. Arthur Rank, USA filmmaker, born. = 1888 +Name The Year: Menelik II, Emperor of Ethiopia, died. = 1913 +Name The Year: Coelacanth, a fish thought to have been extinct for 65 million years caught of the coast of South Africa. = 1938 +Name The Year: St. Philip of Moscow martyred by Ivan the Terrible. = 1569 +Name The Year: (Italy) Giovanni Cassini discovers Rhea, a satellite of Saturn. = 1672 +Name The Year: (England) John Flamsteed observes Uranus but doesn't realize it's undiscovered. = 1690 +Name The Year: (Scotland) Richard Arkwright, invented spinning frame. = 1732 +Name The Year: Alexander I, tsar of Russia (1801-25), born. = 1777 +Name The Year: George Washington resigned as US Army's commander-in-chief. = 1783 +Name The Year: Jean-Francois Champollion, deciphered Egyptian hieroglyphics. = 1790 +Name The Year: (USA) Joesph Smith, founder of the Mormon church, born. = 1805 +Name The Year: Joseph Hansom of London receives patent for Hansom cabs. = 1834 +Name The Year: (Italy) Jose Greco, dancer, born. = 1918 +Name The Year: Ireland divided into two parts, each with its own parliament. = 1920 +Name The Year: (USA) Transistor invented by Bardeen, Brattain and Shockley in Bell Labs. = 1947 +Name The Year: PM Tojo, 6 other Japanese hung for war crimes by US. = 1948 +Name The Year: Borman, Lovell and Anders first men to orbit moon. = 1968 +Name The Year: Earthquake destroys central Managua, Nicaragua. = 1972 +Name The Year: Six Persian Gulf nations double their oil prices. = 1973 +Name The Year: (USA) Rutan and Yeager make first around-the-world flight without refueling. = 1986 +Name The Year: Vasco da Gama Portuguese navigator dies in Cochin, India. = 1524 +Name The Year: "Silent Night" composed by Franz Joseph Gruber; 1st sung next day. = 1818 +Name The Year: James Prescott Joule, physicist, born. = 1818 +Name The Year: Giusseppi Verdi's "Aida" premieres in Cairo, at Suez canal opening. = 1871 +Name The Year: Bicycle with a back-pedal brake patented. = 1889 +Name The Year: Howard Hughes, reclusive billionaire/inventor, born. = 1905 +Name The Year: Fritz Leiber, writer, born. = 1910 +Name The Year: Anwar El Sadat, president of Egypt, born. = 1918 +Name The Year: Ava Gardner, actress, born. = 1922 +Name The Year: Albania becomes a republic. = 1924 +Name The Year: FDR appoints Gen Eisenhower supreme commander of Allied forces. = 1943 +Name The Year: 4th French republic established. = 1946 +Name The Year: United Kingdom of Libya gains independence from Italy via the UN. = 1951 +Name The Year: Laos gains its independence. = 1954 +Name The Year: Shooting begins on "The Cage" the pilot for Star Trek. = 1964 +Name The Year: Saddam says Israel will be Iraq's 1st target. = 1990 +Name The Year: Mikhail Gorbachev resigns as head of the Soviet Union. = 1991 +Name The Year: 1st Spanish settlement in New World founded by Columbus = 1492 +Name The Year: Charles Babbage, English inventor (calculating machine), born = 1792 +Name The Year: Jimmy Connors, tennis player, born = 1952 +Name The Year: Lars Ulrich, Danish/US heavy metal drummer (Metallica-Kill 'em All), born = 1963 +Name The Year: Beatles release "I Want To Hold Your Hand/I Saw Her Standing There" = 1963 +Name The Year: Harry Truman, 33rd US Pres (1945-53), dies in KC Mo at 88 = 1972 +Name The Year: 2 Skylab 3 astronauts walk in space for a record 7 hours = 1973 +Name The Year: (USA) Plane broke height altitude record at 11474 feet. = 1910 +Name The Year: (England) Charles Babbage, mathematician and developer of the speedometer, born. = 1791 +Name The Year: (USA) Coffee Percolator invented. = 1865 +Name The Year: Louis Pasteur, French bacteriologist, born. = 1822 +Name The Year: (France) Ether first used as an anasthetic in childbirth = 1845 +Name The Year: (Germany) Marlene Dietrich, actress, born. = 1901 +Name The Year: (France) Gerard Depardieu, actor, born. = 1948 +Name The Year: Thomas Beckett, archbishop, assassinated by 4 knights of King Henry II = 1170 +Name The Year: Bowling ball invented = 1862 +Name The Year: Mary Tyler Moore, Brooklyn, actress (Mary Tyler Moore, Ordinary People), born = 1937 +Name The Year: Jon Voight, Yonkers, NY, actor (Deliverance, Midnight Cowboy), born = 1938 +Name The Year: Germany begins dropping incendiary bombs on London (WW II) = 1940 +Name The Year: Ted Danson, SD Calif, actor (Sam Malone-Cheers, 3 Men & a Baby), born = 1947 +Name The Year: Nikolai Andrianov, USSR, gymnist (Olympic-gold-1972, 76, 80), born = 1952 +Name The Year: Star Trek's "Trouble With Tribbles" 1st airs = 1967 +Name The Year: Andrei Tarkovski, Russian director (Stalker), dies at 54 = 1986 +Name The Year: Frank Thring, Australian actor (El Cid, Ben-Hur), dies at 68 = 1994 +Name The Year: Shane Warne takes a hat-trick v England at cricket MCG = 1994 +Name The Year: (USA) Richard Clayderman, pianist, born. = 1953 +Name The Year: (USA) Denzel Washington, actor, born. = 1954 +Name The Year: (Messina, Italy) Earthquake (nearly 80,000 died). = 1908 +Name The Year: Chinese troops crossed the 38th Parallel in Korea. = 1950 +Name The Year: John Wycliffe English religious reformer, bible translator, dies. = 1384 +Name The Year: (France) Henri Matisse, impressionist painter, born. = 1869 +Name The Year: (USA) Edison gives 1st public demonstration of his incandescent lamp. = 1879 +Name The Year: (USA) The opera "The Pirates of Penzance" is produced (NYC). = 1879 +Name The Year: Ellis Island (NYC) opens as a US immigration depot. = 1890 +Name The Year: Brooklyn's last day as a city, it incorporates into NYC (1/1/1898). = 1897 +Name The Year: (USA) For the 1st time a ball drops at Times Square to signal the new year. = 1907 +Name The Year: (Wales) Anthony Hopkins, actor, born. = 1937 +Name The Year: (England) Ben Kingsley, Scarborough, actor, born. = 1943 +Name The Year: (USA) John Denver singer, born. = 1943 +Name The Year: (USA) Ratification of UN Charter completed. = 1945 +Name The Year: (USA) President Truman officially proclaims end of WW-II. = 1946 +Name The Year: (USA) 1st battery to convert radioactive energy to electrical announced. = 1951 +Name The Year: (USA) Val Kilmer, actor, born. = 1959 +Name The Year: (USA) 1st performance of the Beach Boys. = 1961 +Name The Year: Katanga becomes part of the Democratic Republic of the Congo. = 1962 +Name The Year: Donald Woods, a banned white editor flees South Africa. = 1977 +Name The Year: Brunei gains complete independence from Britain. = 1983 +Name The Year: Clark Gable, actor (didn't give a damn about Scarlet O'Hara) = 1901 +Name The Year: The first armored car is introduced. = 1920 +Name The Year: First telecast of atomic explosion. = 1951 +Name The Year: First X-ray moving picture process demonstrated. = 1951 +Name The Year: Rick James, musician = 1952 +Name The Year: Princess Stephanie of Monaco = 1965 +Name The Year: Lisa Marie Presley, actress = 1968 +Name The Year: Sonny and Cher resumes on TV despite real life divorce. = 1976 +Name The Year: Talleyrand, French statesman and diplomat, born. = 1754 +Name The Year: First shipload of Chinese immigrants arrives in San Francisco, CA. = 1848 +Name The Year: Mexico sells U.S. Texas, California, New Mexico and Arizona. = 1848 +Name The Year: National Baseball League formed with 8 teams. = 1876 +Name The Year: S.S. Strathleven arrives in London with first successful shipment of frozen mutton from Australia. = 1880 +Name The Year: James Joyce, writer, born. = 1882 +Name The Year: Lie detector first used in court at Portage, WI. = 1935 +Name The Year: Farrah Fawcett-Major (in Texas), actress (Charlie's Angels), born. = 1947 +Name The Year: Christie Brinkley, model, born. = 1954 +Name The Year: 8 of the 9 planets aligned for the first time in 400 years. = 1962 +Name The Year: "Late Night with David Letterman" premiers. = 1981 +Name The Year: Horace Greeley, editor (told young men to go west), born. = 1811 +Name The Year: World's first commercial cheese factory is established in Switzerland. = 1815 +Name The Year: Gertrude Stein, writer, born. = 1874 +Name The Year: Norman Rockwell, artist, born. = 1894 +Name The Year: James Michener, writer, born. = 1907 +Name The Year: Yalta Conference agreed that Russia would enter WWII against Japan. = 1945 +Name The Year: Morgan Fairchild (in Dallas, TX), actress, born. = 1950 +Name The Year: "Meet the Beatles" goes gold. = 1964 +Name The Year: Luna 9, first lunar landing. = 1966 +Name The Year: Tenth Space Shuttle Mission - Challenger 4 is launched. = 1984 +Name The Year: J.W. Goodrich introduces rubber galoshes to the public. = 1824 +Name The Year: At Montgomery, Alabama, the Confederate States are organized. = 1861 +Name The Year: Charles A. Lindburgh, 'Lucky Lindy', born. = 1902 +Name The Year: First Winter Olympics held at Lake Placid, NY. = 1932 +Name The Year: First radioactive substance produced synthetically (radium E). = 1936 +Name The Year: Roosevelt, Churchill, and Stalin began a conference at Yalta. = 1945 +Name The Year: Dan Quayle, U.S. Vice-president (1989-1992), alleged twit, born. = 1947 +Name The Year: Alice Cooper, musician, born. = 1948 +Name The Year: Ceylon (now Sri Lanka) gains independence from Britain. = 1948 +Name The Year: The Reshef - Israel's missile boat - is unveiled. = 1973 +Name The Year: Abolhassan Bani-Sadr was installed as president of Iran. = 1980 +Name The Year: Dwight Lyman Moody, evangelist, born. = 1837 +Name The Year: John Boyd Dunlop, developed the pneumatic rubber tire, born. = 1840 +Name The Year: Belle Starr, entertainer of the wild west, born. = 1848 +Name The Year: Andre-Gustave Citroen, French automaker, born. = 1878 +Name The Year: Giuseppe Verdi's opera "Otello" premiers. = 1887 +Name The Year: Adlai E. Stevenson, statesman, born. = 1900 +Name The Year: Red Buttons, comedian, actor, born. = 1919 +Name The Year: N.Y. Yankees purchase 20 acres in the Bronx for Yankee Stadium. = 1921 +Name The Year: FDR proposes enlarging Supreme Court, plan failed because critics feared it would allow "court packing" in his favor. = 1937 +Name The Year: Charlotte Rampling (in England), actress, born. = 1946 +Name The Year: Barbara Hershey (in Atlanta, Georgia), actress, born. = 1948 +Name The Year: Bobby Brown, singer, married to Whitney Houston, born. = 1969 +Name The Year: New Zealand Day = 1840 +Name The Year: English Admiral Robert Fitzroy issues storm warnings for ships putting out to sea, creating the first "weather forecast." = 1861 +Name The Year: George Herman 'Babe' Ruth, born. = 1895 +Name The Year: Spanish-American War ends. = 1900 +Name The Year: Ronald Reagan, 40th President (1981-1989), born. = 1911 +Name The Year: Zsa Zsa Gabor (in Budapest), actress, ex-con, born. = 1919 +Name The Year: Tom Brokaw, journalist, born. = 1940 +Name The Year: Natalie Cole (in Los Angeles, CA), singer, born. = 1950 +Name The Year: Elizabeth II becomes queen of Great Britain. = 1952 +Name The Year: Jean-Claude "Papa Doc" Duvalier is forced to leave Haiti. = 1986 +Name The Year: John Deere, pioneer manufacturer of agricultural implements, born. = 1804 +Name The Year: Charles Dickens (in England), author, born. = 1812 +Name The Year: Ballet introduced to the U.S. at Bowery Theatre, New York City. = 1827 +Name The Year: Last bare knuckle champion John L. Sullivan KOs Paddy Ryan in Miss. = 1882 +Name The Year: The assault on Anzio begins. = 1944 +Name The Year: Garth Brooks, C&W singer, born. = 1962 +Name The Year: Soyuz 24 is launched. = 1977 +Name The Year: Mary Queen of Scots executed. = 1587 +Name The Year: Jules Verne (in France), author who pioneered what later became science fiction, born. = 1828 +Name The Year: Louis Waterman begins experiments that invent the fountain pen. = 1883 +Name The Year: Chester F. Carlson, invented xerography, born. = 1906 +Name The Year: Gypsy Rose Lee (in Seattle, WA), stripper, born. = 1914 +Name The Year: Lana Turner (in Wallace, Idaho), actress, born. = 1920 +Name The Year: Radio arrives in the White House. = 1922 +Name The Year: Jack Lemmon, actor, born. = 1925 +Name The Year: James Dean, actor (Rebel Without a Cause), born. = 1931 +Name The Year: Nick Nolte, actor, born. = 1940 +Name The Year: Mia Farrow (in Los Angeles, CA), actress, born. = 1945 +Name The Year: Gary Coleman, actor, born. = 1968 +Name The Year: Skylab 4's astronauts land. = 1974 +Name The Year: Soyuz T-10 is launched. = 1984 +Name The Year: Christian V became King of Denmark and Norway. = 1670 +Name The Year: Russian cruisers Variag and Korietz sunk off Korean coast by Japanese. = 1904 +Name The Year: (USA) Gypsy Rose Lee, stripper, born. = 1914 +Name The Year: Treaty of Paris ends the French and Indian War. = 1763 +Name The Year: Charles Lamb (in England), writer, born. = 1775 +Name The Year: YWCA is founded in New York City. = 1870 +Name The Year: Jimmy Durante, comedian, born. = 1893 +Name The Year: Bertolt Brecht, born. = 1898 +Name The Year: Robert Wagner, actor, born. = 1930 +Name The Year: Roberta Flack (in North Carolina), singer, born. = 1940 +Name The Year: Glenn Miller's "Chattanooga Choo Choo" goes gold. = 1942 +Name The Year: Mark Spitz, swimmer, born. = 1950 +Name The Year: Greg Norman, golfer, born. = 1955 +Name The Year: Thomas Alva Edison (in New Jersey), inventor who lit up your life, born. = 1847 +Name The Year: Major streets lit by coal gas for first time. = 1854 +Name The Year: Eva Gabor (Budapest, Hungary), actress (Green Acres), born. = 1921 +Name The Year: Vatican City (world's Smallest Country) is made an enclave of Rome. = 1929 +Name The Year: Pumping begins to build Treasure Island, San Francisco. = 1936 +Name The Year: Burt Reynolds, actor, born. = 1936 +Name The Year: Sergio Mendes, artist, born. = 1941 +Name The Year: Tenth Space Shuttle Mission - Challenger 4 returns to Earth. = 1984 +Name The Year: Santiago, Chile founded. = 1541 +Name The Year: Abraham Lincoln, 16th President (1861-1865), born. = 1802 +Name The Year: Charles Darwin, evolutionist, born. = 1809 +Name The Year: First New York to Paris auto race (via Alaska and Siberia) begins. George Schuster wins after 88 days behind the wheel. = 1908 +Name The Year: Lorne Greene, actor (Bonanza, Battlestar Galactica), born. = 1915 +Name The Year: Cornerstone laid for Lincoln Memorial in Washington, DC. = 1915 +Name The Year: Gershwin's "Rhapsody In Blue" premieres in Carnegie Hall. = 1924 +Name The Year: Maud Adams (in Sweden), born. = 1946 +Name The Year: Joanna Kerns, actress, born. = 1953 +Name The Year: "Blue Danube" waltz premiers in Vienna. = 1867 +Name The Year: Emanuel Ungaro, fashion designer, born. = 1933 +Name The Year: George Segal, actor, banjo player, born. = 1934 +Name The Year: "Prince Valiant" comic strip appears; known for historical detail and fine detail drawing. Thanks Hal. = 1937 +Name The Year: Stockard Channing (in New York), born. = 1944 +Name The Year: Israel acquires 4 of the 7 dead sea scrolls = 1955 +Name The Year: Alexander Graham Bell files an application for a patent for the telephone. = 1876 +Name The Year: John Barrymore, actor, born. = 1882 +Name The Year: Benjamin Kubelski (AKA Jack Benny), actor, comedian, born. = 1894 +Name The Year: James Pike, clergyman, born. = 1913 +Name The Year: Jimmy Hoffa, missing labor leader, born. = 1913 +Name The Year: USSR calendar conversion. = 1918 +Name The Year: St. Valentine's Day Massacre in Chicago, 7 gangsters killed by rivals disguised as cops (The Night Chicago Died). = 1929 +Name The Year: Florence Henderson (in Indiana), actress (Alice in The Brady Bunch), born. = 1934 +Name The Year: Gregory Hines, actor, dancer, born. = 1946 +Name The Year: Element 103, lawrencium, first produced in Berkeley, California lab. = 1961 +Name The Year: Mrs. Kennedy gives the TV audience a tour of the White House. = 1962 +Name The Year: John and Yoko guest-host The Mike Douglas Show for the entire week. = 1972 +Name The Year: Galileo Galilei, astronomer, born. = 1564 +Name The Year: English standing army first founded. = 1645 +Name The Year: Henry Engelhard Steinway, piano maker, born. = 1797 +Name The Year: Susan B. Anthony, Woman's suffaregette, born. = 1820 +Name The Year: John Barrymore, actor, born. = 1882 +Name The Year: First Teddy Bear introduced in America. Made by Morris and Rose Michtom, Russian immigrants. = 1903 +Name The Year: Cesar Romero, actor who played the Joker in the TV version of Batman, born. = 1907 +Name The Year: Yuan Shik-K'ai elected the first President of the Republic of China. = 1912 +Name The Year: Harvey Korman, actor, born. = 1927 +Name The Year: Jane Seymour [Joyce Frankenberg], Middlesex England, actress (Dr Quinn, East of Eden, Lassiter), born. = 1951 +Name The Year: Production announced-first pilot plant to produce man-made diamonds. = 1955 +Name The Year: Li Hung Chang, chinese statesman, born. = 1823 +Name The Year: Ladies Home Journal begins publication. = 1883 +Name The Year: Robert Flaherty, father of the documentary film, born. = 1884 +Name The Year: First airplane flight to Los Angeles from San Francisco. = 1914 +Name The Year: Howard Carter finds the Pharoah Tutankhamun. = 1923 +Name The Year: First radio-telescope news messages transmitted from U.S. to England. = 1923 +Name The Year: Nylon patented by W. H. Carothers. = 1937 +Name The Year: US forces land on Corregidor (complete conquest on March 3). = 1945 +Name The Year: First commercially designed helicopter tested at Bridgeport, CT. = 1946 +Name The Year: James Ingram. actor, born. = 1956 +Name The Year: Fidel Castro became Premier of Cuba. = 1959 +Name The Year: John McEnroe, tennis player, brat, born. = 1959 +Name The Year: Andy Taylor, guitarist with Duran Duran, born. = 1961 +Name The Year: First all solid propellant rocket put into orbit from Wallops Island, VA. = 1961 +Name The Year: Beatles second appearance on Ed Sullivan. = 1964 +Name The Year: Heathen religions banned in Poland. = 1387 +Name The Year: Moliere, French Dramatist, died = 1673 +Name The Year: Frederick Krupp, Arms manufacturer, born = 1854 +Name The Year: Samuel S. McClure, organizer of the first news syndicate, born = 1857 +Name The Year: Sardines were first canned, in Eastport, Maine. = 1876 +Name The Year: First telephone exchange in San Francisco opens with 18 phones. = 1878 +Name The Year: Geronimo, Apache Indian Chief, died = 1909 +Name The Year: Battle of Eniwetok Atoll (U.S. victory on Feb 22). = 1944 +Name The Year: St. Clare of Assissi declared patron saint of television. = 1958 +Name The Year: Hal Holbrook, actor, born. = 1925 +Name The Year: Alan Bates, actor, born. = 1934 +Name The Year: Pat Morrow (in Los Angeles), actor (Peyton Place), born. = 1945 +Name The Year: Lou Diamond Philips, actor, born. = 1962 +Name The Year: Michael Jordan, gravity-defying hoopster, born. = 1963 +Name The Year: Queen Mary I, first reigning queen of Great Britain, born. = 1516 +Name The Year: Count Alessandro Giuseppe Antonio Anastasio Volta, invented the electric battery, born. = 1745 +Name The Year: Louis Comfort Tiffany, glassmaker, born. = 1848 +Name The Year: C.S.A. President Jefferson Davis is inaugurated at Montgomery, AL. = 1861 +Name The Year: Andres Segovia, guitarist, born. = 1894 +Name The Year: Jack Palance, actor (Believe It......Or Not), born. = 1920 +Name The Year: Helen Gurly Brown in Portland Maine, publisher (Cosmopolitan), born. = 1922 +Name The Year: Planet Pluto discovered by Clyde W. Tombaugh. = 1930 +Name The Year: Yoko Ono (in Tokyo, Japan), singer, wife of John Lennon, born. = 1933 +Name The Year: Kim Novak (in Chicago, Illinois), actress, born. = 1933 +Name The Year: Golden Gate International Exposition opens on Treasure Island (built for the occasion) in San Francisco Bay. = 1939 +Name The Year: Cybill Shepherd (in Memphis, TN), actress (Moonlighting, Sybil), born. = 1950 +Name The Year: Premier of first 3-D feature film, "Bwana Devil", at NY city. = 1953 +Name The Year: John Travolta, actor, born. = 1954 +Name The Year: Vanna White (in South Carolina), game show hostess (Wheel of Fortune), born. = 1957 +Name The Year: Matt Dillon, actor, born. = 1964 +Name The Year: Gambian National Day = 1965 +Name The Year: Molly Ringwald (in Los Angeles, CA), actress (Pretty in Pink), born. = 1968 +Name The Year: Nicolaus Copernicus (in Poland), astronomer, born. = 1473 +Name The Year: Thomas Alva Edison patents the phonograph. = 1878 +Name The Year: Merle Oberon (in Tasmania), born. = 1911 +Name The Year: Lee Marvin, actor, born. = 1924 +Name The Year: Smokey Robinson, singer, born. = 1940 +Name The Year: Marines land on Iwo Jima. = 1945 +Name The Year: Margaux Hemingway (in Portland, Oregon), actress, daughter of Ernest, born. = 1955 +Name The Year: Prince Andrew, Second eldest son of HRH Queen Elizabeth II, born. = 1960 +Name The Year: Hana Mandlikova, tennis player, born. = 1962 +Name The Year: Justine Bateman (in Rye, NY), actress (Family Ties), born. = 1966 +Name The Year: President Ford pardons Iva Toguri D'Aquino ("Tokyo Rose"). = 1977 +Name The Year: Enzo Ferrari, car designer and manufacturer, born. = 1898 +Name The Year: Ansel Adams, knows how to handle a camera, born. = 1902 +Name The Year: Alexei Kosygin, Soviet Premier, born. = 1904 +Name The Year: Gloria Vanderbilt, fashion designer (Don't my jeans look great!), born. = 1924 +Name The Year: Sydney Poitier, actor, born. = 1924 +Name The Year: Robert Altman, director (M = A = S = H), born. = 1925 +Name The Year: Bobby Unser, auto racer, born. = 1934 +Name The Year: First automobile/airplane combination tested, Santa Monica, Ca = 1937 +Name The Year: John Glenn aboard Friendship 7, is first American to orbit the Earth. = 1962 +Name The Year: Charles Barkley, Star player for the Pheonix Suns and Houston Rockets basketball teams, born. = 1963 +Name The Year: President Nixon visits China. = 1972 +Name The Year: Clarence Nash, the voice of Donald Duck, died. = 1985 +Name The Year: First self-propelled locomotive on rails demonstrated, in Wales. = 1804 +Name The Year: First electric burglar alarm is installed in Boston, Mass. = 1858 +Name The Year: First Telephone book is issued, in New Haven, Conn. = 1878 +Name The Year: WW I Battle of Verdun begins. = 1916 +Name The Year: Larry Hagman, actor, born. = 1931 +Name The Year: Camera exposure meter patented, W. N. Goodwin. = 1932 +Name The Year: Nina Simone (in Tyron, NC), born. = 1933 +Name The Year: David Geffen, record company president, born. = 1943 +Name The Year: Tyne Daly (in Madison, WI), actress (Cagney and Lacey), born. = 1946 +Name The Year: First instant develop camera demonstrated in NY City by E. H. Land. = 1947 +Name The Year: Malcolm X assassinated. = 1965 +Name The Year: Richard Nixon first American president to visit China. = 1972 +Name The Year: Charles Rocket clearly says a four-letter word on Saturday Night Live. = 1981 +Name The Year: Popcorn is introduced by an Indian named Quadequina to the English colonists at their first Thanksgiving dinner. = 1630 +Name The Year: George Washington, father figure for U.S., President (1789-1796), born. = 1732 +Name The Year: Johann Nikolaus Forkel, musicologist and first biographer of Bach, born. = 1749 +Name The Year: Empress of China sets sail on first New York to China route. = 1784 +Name The Year: Frederic Chopin, composer, born. = 1810 +Name The Year: Lord Robert Baden-Powell, founder of the Boy Scouts, born. = 1857 +Name The Year: Edna St. Vincent Millay, poet, born. = 1892 +Name The Year: Hawaii becomes a U.S. territory. = 1900 +Name The Year: Julius "Magic" Erving, basketball player, born. = 1950 +Name The Year: Drew Barrymore, actress, member of the Barrymore clan, born. = 1975 +Name The Year: USA beats the Russians in Olympic Hockey (4-3). = 1980 +Name The Year: Gutenberg Day = 1584 +Name The Year: George Frideric Handel, Baroque composer in Germany, born. = 1685 +Name The Year: Alamo is besieged by Santa Anna, entire garrison eventually killed. = 1836 +Name The Year: Rotary Club is founded by four men in Chicago. = 1905 +Name The Year: First rocket air mail flight, Greenwood Lake, NY. = 1935 +Name The Year: Peter Fonda, actor, son of Henry, born. = 1940 +Name The Year: US Marines raise flag on Iwo Jima, famous photo and statue. = 1945 +Name The Year: Howard Jones, musician, born. = 1955 +Name The Year: Wilhelm Karl Grimm, story teller, born. = 1786 +Name The Year: Admiral Chester Nimitz, in charge of Pacific Fleet in WWII, born. = 1885 +Name The Year: First rocket to reach outer space launched at White Sands, NM. = 1949 +Name The Year: Steven Jobs, co-founder of Apple Computer, born. = 1955 +Name The Year: Cassius Clay beats Sonny Liston for the heavyweight championship. = 1964 +Name The Year: USA beats Finland and wins the Olympic Gold Medal (4-2). = 1980 +Name The Year: Voyager 2, first Uranus flyby. = 1986 +Name The Year: Funeral for Japan's Emperor Hirohito costs his government $80-billion dollars, attracts all major world leaders. = 1989 +Name The Year: United Airlines 747 jet rips open in flight from Honolulu to New Zealand, 9 passengers sucked out of plane, many injuries. = 1989 +Name The Year: A London pedestrian walks 20 miles backward and 20 miles forward in 8 hours. = 1838 +Name The Year: Renoir, painter, born. = 1841 +Name The Year: Enrico Caruso (in Italy), singer, born. = 1873 +Name The Year: First aircraft carrier "Ranger" launched. = 1933 +Name The Year: George Harrison, singer (Beatles), born. = 1943 +Name The Year: Paul McCartney releases "Give Ireland back to the Irish" single. = 1972 +Name The Year: Soyuz 24 returns to Earth. = 1977 +Name The Year: Soyuz 32 is launched. = 1979 +Name The Year: Victor Hugo, French author, born. = 1802 +Name The Year: William "Buffalo Bill" Cody (near Davenport, Iowa), frontiersman, born. = 1846 +Name The Year: Second French Republic was proclaimed. = 1848 +Name The Year: John Harvey Kellogg, English Corn Flake inventor. = 1852 +Name The Year: First New York City subway line was opened to the public. = 1870 +Name The Year: S.S. Ceylon begins first round-the-world cruise from Liverpool. = 1881 +Name The Year: Jackie Gleason, Comedian, born. = 1916 +Name The Year: U.S. Congress established Grand Canyon National Park in Arizona. = 1919 +Name The Year: Tony Randall, actor (The Odd Couple), born. = 1920 +Name The Year: Fats Domino, singer, born. = 1928 +Name The Year: Johnny Cash, singer, The Man in Black, born. = 1932 +Name The Year: Golden Gate Bridge ground-breaking ceremony held at Crissy Field. = 1933 +Name The Year: PM Winston Churchill announced that Britain had its own atomic bomb. = 1952 +Name The Year: First typesetting machine (photo engraving) used at Quincy, Mass. = 1954 +Name The Year: First aviator to bail out at supersonic speed - G. F. Smith. = 1955 +Name The Year: Levi Eshkol dies, Golda Meir becomes premier of Israel. = 1969 +Name The Year: Beatles release "Beatles Again" a.k.a. "Hey Jude" album. = 1970 +Name The Year: Philippines President Ferdinand E. Marcos flees in defeat, takes up residence in Hawaii with wife Imelda. = 1986 +Name The Year: Barings Bank disaster. Nick Leeson loses billions of Pounds Sterling in offshore investments, ruining Barings Bank. = 1995 +Name The Year: Constantine = 1583 +Name The Year: Henry Wadsworth Longfellow (in Portland, Maine), poet, born. = 1807 +Name The Year: Dominican Republic gains it's independence. = 1844 +Name The Year: Oscar Hammerstein patents first practical cigar-rolling machine. = 1883 +Name The Year: John Steinbeck, writer, born. = 1902 +Name The Year: U.S. Supreme Court unanimously upheld the 19th Amendment (woman's right to vote). = 1922 +Name The Year: Joanne Woodward (in Thomasville, GA), actress, wife of Paul Newman, born. = 1930 +Name The Year: Elizabeth Taylor (in London, England), actress, had many husbands, born. = 1932 +Name The Year: Reichstag building in Berlin was set afire, Nazis blame Communists. = 1933 +Name The Year: Chaim Weizmann becomes the first Israeli president. = 1949 +Name The Year: President Nixon and Chinese Premier Chou En-lai issued the Shanghai Communique. = 1972 +Name The Year: American Indian Movement occupy Wounded Knee in South Dakota. = 1973 +Name The Year: American Republican Party formed at Ripon, Wisconsin. = 1854 +Name The Year: First vaudeville theater opens. = 1883 +Name The Year: Zero Mostel, actor (Fiddler on the Roof), born. = 1915 +Name The Year: Svetlana Stalina, daughter of Josef Stalin, born. = 1926 +Name The Year: Gavin MacLeod, actor (Love Boat, Mary Tyler Moore Show), born. = 1930 +Name The Year: Stephane Beacham, actrss, born. = 1947 +Name The Year: Bernadette Peters (in Queens, New York), actress, Tony winner, born. = 1948 +Name The Year: Forrester issued a patent for computer core memory. = 1956 +Name The Year: The final episode of TV show "M_A_S_H." = 1983 +Name The Year: It was made legal in Scotland for women to propose to men. = 1288 +Name The Year: Pope Paul III, born. = 1468 +Name The Year: Pope Hilarius, born. = 1584 +Name The Year: Britian and US signed treaty on seal hunting in Bering Sea. = 1892 +Name The Year: Jimmy Dorsey, bandleader, born. = 1904 +Name The Year: Howard Nemerov, poet, born. = 1916 +Name The Year: Al Rosen, baseball player and executive, born. = 1924 +Name The Year: Arthur Wellsley Duke of Wellington, British PM (C) (1828-30), born. = 1769 +Name The Year: Mozart's opera "Marriage of Figaro" premiers in Wien (Vienna). = 1786 +Name The Year: Chardonnet, France inventor (rayon), born. = 1839 +Name The Year: 1st adhesive postage stamps ("Penny Blacks" from England) issued. = 1840 +Name The Year: 1st International Workers Day, according to the 2nd International. = 1889 +Name The Year: Walter Susskind, Praha (Prague) Czechoslovakia, conductor, born. = 1913 +Name The Year: Harry Belefonte calypso singer (The Banana Boat Song), born. = 1927 +Name The Year: Paul Doumer Pres of France, assassinated by Russia's Paul Gargalov. = 1932 +Name The Year: Philippine legislature accepts US proposal for independence. = 1934 +Name The Year: Batman Comics hit the street. = 1939 +Name The Year: Judy Collins, singer (Send in the Clowns, Clouds), born. = 1939 +Name The Year: "Citizen Kane," directed & starring Orson Welles, premiers in NY. = 1941 +Name The Year: Joanna Lumley, Kashmir India, actress (Absolutely Fabulous, The Avengers), born. = 1946 +Name The Year: Ray Parker Jr rocker (Ghostbusters theme), born. = 1954 +Name The Year: Oscar Torp, Norwegian premier, dies. = 1959 +Name The Year: Russia shoots down Francis Gary Powers' U-2 spy plane over Sverdlovsk. = 1960 +Name The Year: Fidel Castro announces there will be no more elections in Cuba. = 1961 +Name The Year: Tanganyika granted full internal self-government by Britain. = 1961 +Name The Year: Indonesia takes control of Irian Jaya (west New Guinea) from Netherlands. = 1963 +Name The Year: 1st BASIC program run on a computer (Dartmouth). = 1964 +Name The Year: Priscilla & Elvis Presley wed. = 1967 +Name The Year: Elton John becomes 1st pop star to perform in Israel. = 1979 +Name The Year: Home rule introduced to Kalaallit Nunaat (Greenland). = 1979 +Name The Year: Marshall Islands (in the Pacific) become self-governing. = 1979 +Name The Year: 135 acre Disney's MGM studio officially opens to the public. = 1989 +Name The Year: Leonardo Da Vinci artist/scientist, dies at 67. = 1519 +Name The Year: Alessandro Scarlatti, Palermo Italy, composer (Tigrane), born. = 1660 +Name The Year: Treaty of Aix-la-Chapelle, ends War of Devolution. = 1668 +Name The Year: Catherine II (the Great) empress of Russia (1762-96), born. = 1729 +Name The Year: France & Spain agree to donate arms to American rebels. = 1776 +Name The Year: William Herschel discovers 1st binary star, Xi Ursae Majoris. = 1780 +Name The Year: Uprising against French occupation begins in Madrid. = 1808 +Name The Year: Leo XIII, 257th Roman Catholic pope (1878-1903), born. = 1810 +Name The Year: Theodor Herzl, founded Zionist movement, born. = 1840 +Name The Year: Congo Free State established by King Leopold II of Belgium. = 1885 +Name The Year: Manfred Freiherr von Richthofen [the Red Baron], German WW I ace, born. = 1892 +Name The Year: Benjamin Spock, pediatrician/author (Common Sense Book of Baby Care), born. = 1903 +Name The Year: Bing Crosby (claimed this to be his Birthdate: True Date May 3 1903), crooner/actor (Going My Way), born. = 1904 +Name The Year: Faisal II, King of Iraq, born. = 1935 +Name The Year: Russia takes Berlin. = 1945 +Name The Year: Prisoners revolt at Alcatraz, 5 die. = 1946 +Name The Year: 1st commercial jet plane, BOAC Comet. = 1952 +Name The Year: US Lab detects high-temperature microwave radiation from Venus. = 1956 +Name The Year: Joseph McCarthy commie hunting senator, dies at 47. = 1957 +Name The Year: Beatles' Second album goes #1 & stays #1 for for 5 weeks. = 1964 +Name The Year: Apple records closes down (Beatles first record company). = 1975 +Name The Year: "Quadrophenia" premieres in London. = 1979 +Name The Year: Joseph Doherty & 3 other IRA men arrested for murder. = 1980 +Name The Year: David Rappaport 3'11' actor (wizard), shoots himself at 38. = 1990 +Name The Year: First regular steam train passenger service starts. = 1830 +Name The Year: Francois Coty, perfumemaker, born = 1874 +Name The Year: Golda Meir, Israeli leader, born = 1898 +Name The Year: James Brown, singer (I Feel Good . . . HEH!), born. = 1933 +Name The Year: Frankie Valli, seasonal singer, born = 1947 +Name The Year: First landing by an airplane at geographic North Pole. = 1952 +Name The Year: Alexander VI divides non-Christian world between Spain & Portugal. = 1493 +Name The Year: Indians sell Manhattan Island for $24 in cloth & buttons. = 1626 +Name The Year: French manufacturer debuts 1st folding umbrella (Paris). = 1715 +Name The Year: Thomas Henry Huxley scientist/humanist/Darwinist, born. = 1825 +Name The Year: War of the Reform (Mexico); Liberals establish capital at Vera Cruz. = 1858 +Name The Year: Haymarket riot in Chicago; bomb kills 7 policemen. = 1886 +Name The Year: Sherlock Holmes "dies" at Reichenbach Falls. = 1891 +Name The Year: Kakuei Tanaka Japanese PM convicted of bribe-taking, born. = 1918 +Name The Year: Academy of Motion Picture Arts & Sciences forms. = 1927 +Name The Year: Audrey Hepburn (Hepburn-Ruston Edda van Heemstra), Brussels, Belguim (Breakfast at Tiffany's, My Fair Lady), born. = 1929 +Name The Year: Douglas Hyde (a protestant) becomes 1st president of Eire. = 1938 +Name The Year: Keith Haring Kutztown Pa, graffiti artist (Vanity Fair, Paris Review), born. = 1958 +Name The Year: Randy Travis country singer (Always & Forever), born. = 1959 +Name The Year: 4 students at Kent State University killed by Ohio National Guard during anti-war protest. = 1970 +Name The Year: Kiss performs their 1st concert. = 1976 +Name The Year: Margaret Thatcher becomes prime minister of England. = 1979 +Name The Year: Angela Bowie reveals that ex husband David slept with Mick Jagger. = 1990 +Name The Year: Latvia's parliment votes 138-0 (1 abstention) for Independence. = 1990 +Name The Year: Pres Bush is hospitalized for erratic heartbeat. = 1991 +Name The Year: 2nd Council of Constantinople (5th ecumenical council) opens. = 553 +Name The Year: Leopold I Emperor of Holy Roman Empire, dies at 64. = 1705 +Name The Year: Sren Kierkegaard Denmark, philosopher, founded Existentialism, born. = 1813 +Name The Year: Karl Marx philospher (Communist Manifesto, Das Kapital), born. = 1818 +Name The Year: Battle of Puebla; Mexicans defeat Maximilian's forces (Cinco de Mayo). = 1867 +Name The Year: Carnegie Hall opens in NYC with Tchaikovsky as guest conductor. = 1891 +Name The Year: Spencer Tracy actor (Guess Who's Coming to Dinner), born. = 1900 +Name The Year: Rex Harrison England, actor (My Fair Lady, Cleopatra), born. = 1908 +Name The Year: 5th modern Olympic games opens in Stockholm. = 1912 +Name The Year: Tyrone Power actor (Mark of Zorro, Alexander's Ragtime Band), born. = 1913 +Name The Year: John T Scopes arrested for teaching evolution in Tennessee. = 1925 +Name The Year: 1st woman to fly solo from England to Australia takes-off (Amy Johnson). = 1930 +Name The Year: Michael Palin comedian (Monty Python, Fish Called Wanda), born. = 1943 +Name The Year: Netherlands & Denmark liberated from Nazi control. = 1945 +Name The Year: 1st large-scale US Army ground units arrive in South Vietnam. = 1965 +Name The Year: Bobby Sands IRA activists dies in his 66th day of his hunger strike. = 1981 +Name The Year: Paul Hogan & Linda Koslowski wed in Byron Bay, Eastern Australia. = 1990 +Name The Year: conjunction of Sun, Mercury, Venus, Mars, Jupiter, Saturn & Moon. = 2000 +Name The Year: Sack of Rome - End of the Renaissance. = 1527 +Name The Year: Karl Marx, author of the Communist Manifesto, born = 1818 +Name The Year: Patent granted to Dr. John Farrie for a "refrigeration machine". = 1851 +Name The Year: Sigmund Freud, cigar smoker, psychiatrist, born = 1856 +Name The Year: Rudolph Valentino, silent film star, sheik = 1895 +Name The Year: T. H. White, writer, born = 1915 +Name The Year: Orson Welles, actor (Citizen Kane), director, genius, born = 1915 +Name The Year: The dirigible Hindenburg explodes in flames at Lakehurst, NJ. = 1937 +Name The Year: Roger Bannister breaks the 4 min mile in 3:59:4 = 1954 +Name The Year: Seventeenth Space Shuttle Mission - Challenger 7 returns to Earth. = 1985 +Name The Year: Robert Browning, poet, born. = 1812 +Name The Year: Beethoven's Ninth Symphony presented for first time. = 1824 +Name The Year: Johannes Brahms, composer, born. = 1833 +Name The Year: Peter Ilich Tchaikovsky, composer, born. = 1840 +Name The Year: Gary Cooper, actor (High Noon, The Plainsman), born. = 1901 +Name The Year: Edwin Land, founded instant photography (Polaroid), born. = 1909 +Name The Year: Eva Peron, Argentine first lady, born = 1919 +Name The Year: World War II ends in Europe. Nazis surrender to General Eisenhower at Reims, France. = 1945 +Name The Year: Traci Lords, actress, born. = 1968 +Name The Year: John II ends his reign as Catholic Pope. = 535 +Name The Year: St Boniface IV ends his reign as Catholic Pope. = 615 +Name The Year: St Benedict II ends his reign as Catholic Pope. = 685 +Name The Year: Jack Cade's Rebellion-Kentishmen revolt against King Henry VI. = 1450 +Name The Year: Hernando de Soto discovers Mississippi River. = 1541 +Name The Year: Edward Gibbon England, historian (Decline & Fall of Roman Empire), born. = 1737 +Name The Year: Miguel Hidalgo father of Mexican independence, born. = 1753 +Name The Year: William Walker filibuster, president of Nicaragua (1856-57), born. = 1824 +Name The Year: Jean Henri Dunant Switzerland, founded Red Cross, YMCA (Nobel 1901), born. = 1828 +Name The Year: Australian Rules Football is created. = 1866 +Name The Year: Harry S Truman Missouri, 33rd US President (D) (1945-1949), born. = 1884 +Name The Year: Atlanta pharmacist John Styth Pemberton invents Coca Cola. = 1886 +Name The Year: China cedes Taiwan to Japan under Treaty of Shimonoseki. = 1895 +Name The Year: Richard F Attenborough environmentalist/zoologist/filmmaker (BBC), born. = 1926 +Name The Year: Gary Snyder beat poet (Rip Rap & Cold Mountain Poems), born. = 1930 +Name The Year: Gary Glitter [Paul Gadd] England, rocker (Rock & Roll Part II), born. = 1944 +Name The Year: Nazi General Von Keitel surrenders to Russian Marshal Zhukov near Berlin. = 1945 +Name The Year: V-E Day; Germany signs unconditional surrender, WW II ends in Europe. = 1945 +Name The Year: Beatles release "Let it Be" album. = 1970 +Name The Year: USSR announces it will not participate in LA Summer Olympics. = 1984 +Name The Year: Robert A Heinlein sci-fi writer, dies of heart failure at 80. = 1988 +Name The Year: Columbus left Spain on his 4th and final trip to the New World. = 1502 +Name The Year: James M. Barrie (in Scotland), Author (Peter Pan) = 1860 +Name The Year: Howard Carter, Egyptologist who found King Tutankhamen = 1873 +Name The Year: Albert Finney, actor (Oliver, The Twelve Chairs) = 1936 +Name The Year: Italy annexed Ethiopia. = 1936 +Name The Year: Czechoslovak National Day. = 1945 +Name The Year: Candice Bergen (in Beverly Hills), actor (Murphy Brown) = 1946 +Name The Year: Billy Joel (in the Bronx, NY), singer, pianoman = 1949 +Name The Year: EEC Anniversary. = 1950 +Name The Year: House Judiciary Committee begin formal hearings on Nixon impeachment. = 1974 +Name The Year: John Wilkes Booth assassin of Abraham Lincoln, born. = 1838 +Name The Year: Sir Thomas Lipton tea magnate (Lipton Tea), born. = 1850 +Name The Year: Gen Stonewall Jackson dies from wounds received at Chancellorsville. = 1863 +Name The Year: Victoria Woodhull becomes 1st woman nominated for US president. = 1872 +Name The Year: Meteor falls near Estherville, Iowa. = 1879 +Name The Year: Fred Astaire Omaha Neb, tap dancer/actor (Easter Parade, Swingtime), born. = 1899 +Name The Year: David O Selznick Pittsburgh Pa, producer (Gone With the Wind), born. = 1902 +Name The Year: 1st Mother's Day held (Phila). = 1908 +Name The Year: Comet Halley's closest approach to Earth. = 1910 +Name The Year: William Huggins discoverer of stellar nature of Andromeda, dies. = 1910 +what is the best IRC Network = www.nothingbutstyle.net +Name The Year: Winston Churchill succeeds Neville Chamberlain as British PM. = 1940 +Name The Year: England's House of Commons detroyed in a blitz. = 1941 +Name The Year: Donovan (Leitch) Scotland, rock singer (Mellow Yellow), born. = 1943 +Name The Year: Mark David Chapman assassin of John Lennon, born. = 1955 +Name The Year: Sid Vicious [John Beverly], bassist (Sex Pistols), born. = 1957 +Name The Year: Bono aka Paul Hauson, rocker (U2), born. = 1960 +Name The Year: Decca signs the Rolling Stones on advice of Beatle George Harrison. = 1963 +Name The Year: Tommy Lee drummer of Motley Crue marries Heather Locklear. = 1986 +Name The Year: Constantinople (later Istanbul) founded. = 330 +Name The Year: Waltz introduced into English ballrooms. Most observers consider it disgusting & immoral. No wonder it caught on! = 1812 +Name The Year: Irving Berlin [Isadore Balin], Temun, Russia, composer (White Xmas), born. = 1888 +Name The Year: Dame Margaret Rutherford, England, actress (Murder Most Foul), born. = 1892 +Name The Year: Salvador Dali, Spain, surrealist artist (Crucifixion), born. = 1904 +Name The Year: Einstein's Theory of General Relativity presented. = 1916 +Name The Year: Britain grants Royal Letters Patent to New Zealand. = 1917 +Name The Year: Jackie Milburn, English soccer star (Newcastle United). = 1924 +Name The Year: Mort Sahl comedian/political satirist/beatnik (Big Party). = 1927 +Name The Year: Eric Burdon, rocker (Animals-House of the Rising Sun). = 1941 +Name The Year: Laos accepts constitution for parliamentary democracy. = 1947 +Name The Year: By a vote of 37-12, Israel becomes 59th member of UN. = 1949 +Name The Year: Siam renames itself Thailand. = 1949 +Name The Year: Jay Forrester patents computer core memory. = 1951 +Name The Year: Elvis Presley's 1st entry on UK charts with "Heartbreak Hotel". = 1959 +Name The Year: Israeli soldiers capture Adolf Eichmann in Buenos Aires. = 1960 +Name The Year: John D Rockefeller Jr philanthropist, dies at 86. = 1960 +Name The Year: Bob Marley reggae singer, dies at 36 of brain & lung cancer. = 1981 +Name The Year: Emilio Estevez actor (Breakfast Club, Young Guns). = 1962 +Name The Year: Bangladesh windstorm kills 17,000. = 1965 +Name The Year: Israel signs an agreement with European Economic Market. = 1975 +Name The Year: Ted Turner manages an Atlanta Braves game. = 1977 +Name The Year: St Stephen I begins his reign as Catholic Pope. = 254 +Name The Year: Edward Lear England, landscape painter, writer of nonsense verse, born. = 1812 +Name The Year: Florence Nightingale Florence, Italy, nurse (Crimean War), born. = 1820 +Name The Year: Treaty of Bardo, Tunisia becomes a French protectorate. = 1881 +Name The Year: Burt Bacharach composer (I'll Never Fall in Love Again), born. = 1929 +Name The Year: George VI's coronation in Great Britain. = 1936 +Name The Year: Beryl Burton UK, won record (7) women's cycling titles, born. = 1937 +Name The Year: Nazi blitz conquest of France began by crossing Muese River. = 1940 +Name The Year: Axis forces in North Africa surrender. = 1943 +Name The Year: Steve Winwood England, rocker (A Higher Love), born. = 1948 +Name The Year: West begins Berlin Airlift to get supplies around Soviet blockade. = 1949 +Name The Year: Shozo Fujii judo champion, born. = 1950 +Name The Year: Elvis Presley appears on a Frank Sinatra TV special. = 1960 +Name The Year: Emilio Estevez actor (Young Guns), born. = 1962 +Name The Year: Bob Dylan walks off Ed Sullivan Show. = 1963 +Name The Year: Israel & West Germany exchange letters beginning diplomatic relations. = 1965 +Name The Year: Paul McCartney & Wings release "Mary Had a Little Lamb". = 1972 +Name The Year: 1st quadrophonic concert (Pink Floyd in London). = 1977 +Name The Year: In Fatima Portugal, a Spanish priest with a bayonet is stopped prior to his attempt to attack Pope John Paul II. = 1982 +Name The Year: South African prisoner Nelson Mandela sees his wife for 1st time in 22 years. = 1984 +Name The Year: Nora Dunn & Sinead O'Connor boycott Saturday Night Live to protest Andrew "Dice" Clay's hosting. = 1990 +Name The Year: St Agapitus I begins his reign as Catholic Pope. = 535 +Name The Year: Innocent XIII, 244th Roman Catholic pope (1721-24), born. = 1655 +Name The Year: Empress Maria Theresa, Austria (Wife of Napolean), born. = 1717 +Name The Year: Sir Arthur Sullivan, London, England, of Gilbert & Sullivan fame, born. = 1842 +Name The Year: Peter Henry Emerson, 1st to promote photography as an independent art, born. = 1856 +Name The Year: Brazil abolishes slavery. = 1888 +Name The Year: Daphne du Maurier novelist (Rebecca, The Parasites), born. = 1907 +Name The Year: Royal Flying Corps established in England. = 1912 +Name The Year: 1st 4 engine aircraft built & flown (Igor Sikorsky-Russia). = 1913 +Name The Year: Jim Jones, reverend, poisoned over 100 in Guyana, born. = 1931 +Name The Year: Churchill says "I have nothing to offer but blood, toil, tears & sweat". = 1940 +Name The Year: Ritchie Valens, singer (Donna, La Bamba), born. = 1941 +Name The Year: Peter Gabriel, rocker (Genesis-Against All Odds), born. = 1950 +Name The Year: Diner's Club issues its 1st credit cards. = 1950 +Name The Year: Stevie Wonder, singer/songwriter (You are The Sunshine of My Love), born. = 1950 +Name The Year: Gary Cooper, 2 time Academy award winning actor, dies at 60. = 1961 +Name The Year: Rolling Stones record "Satisfaction". = 1965 +Name The Year: Rolling Stones release "Paint it Black". = 1966 +Name The Year: Beatles movie "Let it Be" premiers. = 1970 +Name The Year: Pope John Paul II shot, wounded by assailant in St Peter's Square. = 1981 +Name The Year: Chet Baker jazz trumpeter fell to death out of a hotel window at 59. = 1988 +Name The Year: Approx 2,000 students begin hunger strike in Tiananmen Square, China. = 1989 +Name The Year: George Lucas director (Star Wars), born. = 1944 +Name The Year: David Byrne Dunbartin Scotand, rocker (Talking Heads-Psycho Killer) , born. = 1952 +Name The Year: Skylab launched, the 1st Space Station. = 1973 +Name The Year: Rita Hayworth actress, dies at 68 of Alzheimer's disease. = 1987 +Name The Year: Cape Cod was discovered by the English navigator Batholomew Gosnold. = 1602 +Name The Year: Whitsunday Term Day. = 1753 +Name The Year: American poet Emily Dickinson died. = 1886 +Name The Year: US Airmail begins between Wash DC, Philadelphia and New York. = 1918 +Name The Year: Wladziu Valentino Liberace, pianist, born = 1919 +Name The Year: US Dept of Justice offers $25,000 reward for Dillinger, dead or alive. = 1934 +Name The Year: Paul Zindel, playwright, born = 1936 +Name The Year: Nylon stockings on sale for the first time in the United States. = 1940 +Name The Year: Brian Eno, singer, songwriter, born = 1948 +Name The Year: Lee Horsley, actor, born = 1955 +Name The Year: The Soviet Union launched Sputnik III. = 1958 +Name The Year: Marie Antoinette married the future King Louis XVI of France. = 1770 +Name The Year: William H. Seward, who bought Alaska at $0.02/acre, born. = 1801 +Name The Year: Henry Fonda (in Grand Island, Nebraska), actor, born. = 1905 +Name The Year: Joan of Arc was canonized in Rome. = 1920 +Name The Year: Pierce Brosnan (in Israel), actor (current James Bond), born. = 1952 +Name The Year: Debra Winger (in Columbus, Ohio), actor, born. = 1955 +Name The Year: Olga Korbut (in Russia), gymnast, born. = 1955 +Name The Year: Janet Jackson, singer, Michael's sister, born. = 1966 +Name The Year: Venera 5, Venus landing. First successful landing on another planet. = 1969 +Name The Year: Gabriela Sabatini, tennis professional, raqueteer, born. = 1970 +Name The Year: Japanese Junko Tabei became first woman to reach Mt Everest's summit. = 1975 +Name The Year: Sammy Davis, Jr., "The Complete Entertainer", dies of throat cancer. = 1990 +Name The Year: Later that day, Jim Henson, creator of the Muppets, dies from pneumonia and complications. = 1990 +Name The Year: 7th recorded perihelion passage of Halley's Comet. = 218 +Name The Year: Liberius begins his reign as Catholic Pope. = 352 +Name The Year: St Adrian III begins his reign as Catholic Pope. = 884 +Name The Year: Sandro Botticelli, Italian painter (Birth of Venus), born. = 1444 +Name The Year: 1st merry-go-round seen at a fair (Philippapolis, Turkey). = 1620 +Name The Year: Italian Jesuit Niccolo Zucchi, 1st to see 2 belts on Jupiter surface. = 1630 +Name The Year: Frontenac becomes governor of New France (Canada). = 1672 +Name The Year: Edward Jenner England, physician, started vaccination, born. = 1749 +Name The Year: Papal States annexed by France. = 1809 +Name The Year: Joseph Norman Lockyer discovered Helium/founded Nature magazine, born. = 1836 +Name The Year: Ayatollah Ruhollah Khomeini Iran's spiritual leader, born. = 1900 +Name The Year: 9th modern Olympic games opens in Amsterdam. = 1928 +Name The Year: Dennis Hopper actor (True Grit, Blue Velvet, Easy Rider), born. = 1936 +Name The Year: Germany occupies Brussels, Belgium & begins invasion of France. = 1940 +Name The Year: Taj Mahal NYC, singer/songwriter (The Real Thing), born. = 1942 +Name The Year: Christian Lacroix, French couturier, born. = 1950 +Name The Year: "Sugar" Ray Leonard welter/middle/light-heavyweight boxing champion, born. = 1956 +Name The Year: Brigitte Nielsen actress (Red Sonja, Rocky IV, Domino), born. = 1963 +Name The Year: Thor Heyerdahl crosses the Atlantic on reed raft 'Ra'. = 1970 +Name The Year: 10cc releases "I'm Not in Love". = 1975 +Name The Year: Israel & Lebanon sign a peace treaty. = 1983 +Name The Year: Nelson Mandela recieves a BA from University of South Africa. = 1989 +Name The Year: St John I ends his reign as Catholic Pope. = 526 +Name The Year: Napoleon became Emperor of France. = 1804 +Name The Year: Edwin Budding of England signs an agreement for manufacture of his invention, the lawn mower. = 1830 +Name The Year: Nicholas II last Russian tsar (1894-1917), born. = 1868 +Name The Year: Bertrand Russell England, mathematician/philosopher (Nobel 1950), born. = 1872 +Name The Year: Frank Capra movie director (Its a Wonderful Life, Arsenic & Old Lace), born. = 1897 +Name The Year: Britain proclaims protectorate over kingdom of Tonga. = 1900 +Name The Year: Passage of Earth through tail of Halley's Comet causes near-panic. = 1910 +Name The Year: Perry Como singer/TV (Perry Como Show, What did Delaware?), born. = 1912 +Name The Year: Pope John Paul II 264th Roman Catholic pope (1978- ), born. = 1918 +Name The Year: Dame Margot Fonteyn England, ballerina (partner of Nureyev), born. = 1919 +Name The Year: Yannick Noah France, tennis player (French 1983), born. = 1960 +Name The Year: Gene Roddenberry suggests 16 names including Kirk for Star Trek Captain. = 1965 +Name The Year: Ian Curtis musician (Joy Division), dies. = 1980 +Name The Year: Mount St Helens blows its top in Washington State. = 1980 +Name The Year: St Gregory II begins his reign as Catholic Pope. = 715 +Name The Year: Anne Boleyn wife of Henry VIII, beheaded. = 1536 +Name The Year: Spanish Armada sets sail for Lisbon, bound to England. = 1588 +Name The Year: Innocent XI 240th Roman Catholic pope (1676-89), born. = 1611 +Name The Year: About midday, near-total darkness descends on much of New England to this day it's cause is still unexplained. = 1780 +Name The Year: Ho Chi Minh trail blazer/leader of Vietnam (1946, 1969), born. = 1890 +Name The Year: Malcolm X Omaha NB, assassinated leader of black muslims, born. = 1925 +Name The Year: "Firedamp" explodes in Mather Pa coal mine killing 195 of 273 miners. = 1928 +Name The Year: T.E. Lawrence (of Arabia) dies in a motorcycle crash. = 1935 +Name The Year: Peter Townsend singer (Who-Tommy), born. = 1945 +Name The Year: US diplomats find at least 40 secret mics in the Moscow embassy. = 1964 +Name The Year: Tortoise reportedly given to Tonga's king by Capt. Cook (1773), dies. = 1966 +Name The Year: Ogden Nash poet/TV panelist (Masquerade Party), dies at 68. = 1971 +Name The Year: USSR launches Mars 2, 1st spacecraft to crash land on Mars. = 1971 +Name The Year: Gold ownership legalized in Australia. = 1976 +Name The Year: Guitarist Eric Clapton marries Patti Boyd. = 1979 +Name The Year: NASA launches Intelsat V. = 1983 +Name The Year: Syzygy: 8 of 9 planets aligned on same side of sun. = 2161 +Name The Year: Earthquake kills 250,000 in Antioch, Syria. = 526 +Name The Year: Christopher Colombus explorer, dies in poverty in Spain at 55. = 1506 +Name The Year: England passes Act of Grace, forgiving followers of James II. = 1690 +Name The Year: Honore de Balzac France, novelist (Pere Goriot), born. = 1799 +Name The Year: John Stuart Mill philosopher/political economist/Utilitarian, born. = 1806 +Name The Year: Levi Strauss markets blue jeans with copper rivets, price $13.50 doz. = 1874 +Name The Year: 2nd modern Olympic games opens in Paris (lasted 5 months). = 1900 +Name The Year: Jimmy Stewart, actor (Mr Smith Goes to Wash, Wonderful Life), born. = 1908 +Name The Year: Moshe Dayan Israeli general/politician, born. = 1915 +Name The Year: Thomas Edison says Americans prefer silent movies over talkies. = 1926 +Name The Year: Great Britain via treaty grants Saudi Arabia's kingdom independence. = 1927 +Name The Year: Joe Cocker England, rock musician (You can leave your hat on), born. = 1944 +Name The Year: Cher, rocker/actress (I got you babe, Jack Lalane, Mask), born. = 1946 +Name The Year: Atomic fusion (thermonuclear) bomb dropped from plane-Bikini Atoll. = 1956 +Name The Year: BBC bans Beatle's "A Day in the Life" (drug references). = 1967 +Name The Year: The Beatles' "Let it Be" movie premiers in UK. = 1970 +Name The Year: Republic of Cameroon declared as constitution is ratified. = 1972 +Name The Year: 1st western pop star to tour the USSR-Elton John. = 1979 +Name The Year: FBI arrests John A Walker Jr, convicted of spying for USSR. = 1985 +Name The Year: China declares martial law in Beijing. = 1989 +Name The Year: Gilda Radner comedienne (Sat Night Live), dies at 42 of cancer. = 1989 +Name The Year: B.C. Plato (Aristocles), philosopher/writer, Athens, born. = 427 +Name The Year: Albrecht Drer Nrnberg Germany, Renaissance painter/print maker, born. = 1471 +Name The Year: Philip II king of Spain (1556-98) & Portugal (1580-98), born. = 1527 +Name The Year: Alexander Pope England, poet, born. = 1688 +Name The Year: Fats Waller jazz pianist, composer (Ain't Misbehavin'), born. = 1904 +Name The Year: Federation Internationale de Football Association (FIFA), Soccer's World governing body forms. = 1904 +Name The Year: Lindburgh lands in Paris, after 1st solo air crossing of Atlantic. = 1927 +Name The Year: Leo Sayer [Gerard], England, singer (When I Need Love), born. = 1948 +Name The Year: Mr T [Lawrence Tero], Chicago, actor, (A-Team, Rocky III, T & T), born. = 1952 +Name The Year: "Empire Strikes Back" premieres. = 1980 +Name The Year: David Bowie's "Let's Dance" single goes #1. = 1983 +Name The Year: Rajiv Gandhi Indian Prime Minster, assassinated. = 1991 +Name The Year: 14th recorded perihelion passage of Halley's Comet. = 760 +Name The Year: Townsend Speakman 1st sells fruit-flavored carbonated drinks (Phila). = 1807 +Name The Year: Richard Wagner Leipsig Germany, composer (Ring, Flying Dutchman, Ride of the Valkries), born. = 1813 +Name The Year: Confederacin Granadina (now Colombia) forms. = 1858 +Name The Year: Sir Arthur Conan Doyle UK, brought Sherlock Holmes to life twice, born. = 1859 +Name The Year: Great Train Robbery; 7 men make off with $98,000 in cash. = 1868 +Name The Year: Charles Aznavour Paris France, singer (Monsieur Carnavel), born. = 1924 +Name The Year: Hitler & Mussolini sign "Pact of Steel". = 1939 +Name The Year: Morrissey, (Steven Patrick) British rocker (The Smiths & solo artist), born. = 1959 +Name The Year: Beatles' "Ticket to Ride," single goes #1. = 1965 +Name The Year: Egyptian president Nassar closes Straits of Tiran to Israel. = 1967 +Name The Year: Ceylon becomes Republic of Sri Lanka as its constitution is ratified. = 1972 +Name The Year: Final European scheduled run of the Orient Express (94 years). = 1977 +Name The Year: Rocky Graziano boxer, dies at 71, of heart failure. = 1990 +Name The Year: Joan of Arc captured by Burgundians who sold her to the English. = 1430 +Name The Year: King Henry VIII and Catherine of Aragon marriage declared null and void by the newly formed Church of England. = 1533 +Name The Year: Captain Kidd is hanged in London after convicted of piracy and murder. = 1701 +Name The Year: Douglas Fairbanks, first and greatest of Hollywood's swashbucklers, born = 1883 +Name The Year: Canada's North West Mounted Police force (The Mounties) first established. = 1873 +Name The Year: Italy declared war on Austria-Hungary in World War I. = 1915 +Name The Year: Joan Collins (in London), actor, born = 1933 +Name The Year: Bonnie and Clyde shot in Louisana ambush. = 1934 +Name The Year: Industrialist John D. Rockfeller died in Ormond Beach, FL. = 1937 +Name The Year: Nazi Himmler committed suicide while in prison at Luneburg, Germany. = 1945 +Name The Year: West Germany was proclaimed. = 1949 +Name The Year: 'Marvelous' Marvin Hagler (in New Jersey), boxer, born = 1952 +Name The Year: Israel announced capture of Nazi Adolf Eichmann in Argentina. = 1960 +Name The Year: Gabriel Daniel Fahrenheit, invented the thermometer = 1686 +Name The Year: Jean-Paul Marat, philosopher = 1743 +Name The Year: Queen Victoria, British ruler = 1819 +Name The Year: Samuel F.B. Morse taps out "What Hath God Wrought". = 1844 +Name The Year: The first auto repair shop opens in Boston, MA. = 1899 +Name The Year: Robert Zimmerman (a.k.a. Bob Dylan) (in Minnesota), folk singer = 1941 +Name The Year: Patti Labelle, singer = 1944 +Name The Year: Priscilla Presley, actor, wife of Elvis = 1945 +Name The Year: First rocket to exceed 150 mile altitude - White Sands, NM. = 1954 +Name The Year: First house with built-in bomb shelter exhibited, Pleasant Hills, Pa. = 1959 +Name The Year: M. Scott Carpenter aboard Aurora 7 is launched. = 1962 +Name The Year: Beatles' third appearance on Ed Sullivan. = 1964 +Name The Year: Soyuz 18B is launched. = 1975 +Name The Year: B.C. 1st known prediction of a solar eclipse. = 585 +Name The Year: St Gregory VII, pope (1073-85), dies (birth date unknown). = 1085 +Name The Year: Alfonso VI of Castile captured Toledo, Spain, and brought the Moorish center of science into Christian hands. = 1085 +Name The Year: Ralph Waldo Emerson US, essayist/philosopher, born. = 1803 +Name The Year: Argentina declares independence from Napoleonic Spain (Natl Day). = 1810 +Name The Year: Bill "Bojangles" Robinson, actor (Stormy Weather, Little Colonel), born. = 1878 +Name The Year: Igor Sikorsky developed a working helicopter, born. = 1889 +Name The Year: Revolution in Mexico overthrows President Diaz. = 1911 +Name The Year: British House of Commons passes Irish Home Rule. = 1914 +Name The Year: Miles Davis trumpeter; pioneered cool jazz (Porgy & Bess), born. = 1926 +Name The Year: Robert Ludlum spy novelist (Bourne Identity), born. = 1927 +Name The Year: Henry Ford stops producing Model T car (begins Model A). = 1927 +Name The Year: Jesse Owens equals or breaks 6 world records in one hour. = 1935 +Name The Year: 5,000 drown in a storm at Ganges Delta region in India. = 1941 +Name The Year: Sally Jesse Raphael TV talk show host (Sally), born. = 1943 +Name The Year: Frank Oz Heresford England, puppeteer (Sesame St, Muppet Show), born. = 1944 +Name The Year: Arther C Clarke proposes relay satellites in geosynchronous orbit. = 1945 +Name The Year: Jordan gains independence from Britain (Natl Day). = 1946 +Name The Year: Paul Weller guitar (Jam-This is the Modern World, Style Council), born. = 1958 +Name The Year: John Lennon takes delivery of his psychedelic painted Rolls Royce. = 1967 +Name The Year: "Star Wars" released. = 1978 +Name The Year: "Return of the Jedi" (Star Wars 3) released. = 1983 +Name The Year: William of Ockham forced to flee from Avignon by Pope John XXII. = 1328 +Name The Year: Abraham De Moivre French mathematician (De Moivre's theorem), born. = 1667 +Name The Year: Alexander S Pushkin Russia, writer (Eugene Onegin), born. = 1799 +Name The Year: Al Jolson jazz singer/silent film actor (Mamie, Swanee), born. = 1886 +Name The Year: Last Czar of Russia, Nicholas II, crowned. = 1896 +Name The Year: John Wayne "Duke", [Marion Michael Morrison] actor (True Grit), born. = 1907 +Name The Year: Peter Cushing England, actor (Hound of the Baskervilles), born. = 1913 +Name The Year: Georgian Social Democratic Republic declared independence from Russia. = 1918 +Name The Year: 1st Le Mans Grand Prix d'Endurance was run. = 1923 +Name The Year: San Francisco Bay's Golden Gate Bridge opens. = 1937 +Name The Year: Patent filed in US for H-Bomb. = 1946 +Name The Year: Stevie Nicks Phoenix Az, rocker (Fleetwood Mac-Bella Donna), born. = 1946 +Name The Year: South Africa elects a nationalist govt with apartheid policy. = 1948 +Name The Year: Siouxsie [Susan Ballion], (Siouxsie & the Bandshee-Wild Thing), born. = 1957 +Name The Year: British Guiana gains independence, takes the name Guyana. = 1966 +Name The Year: Apollo 10 returns to Earth. = 1969 +Name The Year: John & Yoko begin their 2nd bed-in (Queen Elizabeth Hotel, Montreal). = 1969 +Name The Year: Achsah Young becomes 1st woman known to be executed as a witch (MA). = 1647 +Name The Year: Wild Bill Hickok cowboy, born. = 1837 +Name The Year: Samuel F.B. Morse completes 1st telegraph line. = 1844 +Name The Year: Vincent Price St Louis Mo, actor (The Fly, Laura), born. = 1911 +Name The Year: Ropert L Ripley cartoonist (Believe It or Not), dies at 55 in NY. = 1949 +Name The Year: Neil Finn rocker (Split Enz-I Got You, Crowded House), born. = 1958 +Name The Year: Pat Cash tennis player (Wimbeldon 1987), born. = 1965 +Name The Year: Dr. Joseph Guillotin, guess what he invented, born. = 1738 +Name The Year: First indoor swimming pool opens at Goodman's Fields, London. = 1742 +Name The Year: Jim Thorpe, Olympic athlete, born. = 1886 +Name The Year: Ian Fleming, writer (James Bond series) = 1908 +Name The Year: First all color talking picture "On With The Show" exhibited, NYC. = 1929 +Name The Year: Gladys Knight, singer, born. = 1944 +Name The Year: Premier of first animated 3-D cartoon in Technicolor - "Melody". = 1953 +Name The Year: First animals fired into space and rescued, Cape Canaveral. = 1959 +Name The Year: Amnesty International Anniversary. = 1961 +Name The Year: Mars 3 launched. First spacecraft to soft land on Mars. = 1971 +Name The Year: St Paul I begins his reign as Catholic Pope. = 757 +Name The Year: Constantinople falls to Muhammad II (Turks); ends Byzantine Empire. Also considered the end of the Middle Ages. = 1453 +Name The Year: Charles II king of England (1660-85), born. = 1630 +Name The Year: Ebenezer Butterick inventor (tissue paper dress pattern), born. = 1826 +Name The Year: Birth of Charles W. Fry, the English musician who, along with his three sons, formed the first Salvation Army brass band. = 1837 +Name The Year: Trademark "Escalator" registered by Otis Elevator Co.. = 1900 +Name The Year: 1st running of the Indianapolis 500. = 1911 +Name The Year: John Fitzgerald Kennedy, 35th U.S. President (1961-1963), born. = 1917 +Name The Year: Ecuador becomes independent. = 1922 +Name The Year: Al Unser, auto racer (Indianapolis 500-1970, 71), born. = 1939 +Name The Year: Hillary & Tenzing become 1st humans to reach top of Mt Everest. = 1953 +Name The Year: Annette Bening, actress (Bugsy, Valmont), born. = 1958 +Name The Year: Sue Press is 1st woman golfer to hit consecutive holes-in one. = 1977 +Name The Year: Larry Bird beats out Magic Johnson for NBA rookie of year. = 1980 +Name The Year: Eric Morecambe comedian (Morecambe & Wise), dies at 58. = 1984 +Name The Year: 35 die in rioting between British & Italians at European Cup soccer. = 1985 +Name The Year: Michael Jackson attempts to buy Elephant Man's remains. = 1987 +Name The Year: Joan of Arc burned at the stake in Rouen, France at age 19. = 1431 +Name The Year: The French philosopher Voltaire died. = 1778 +Name The Year: Benny Goodman, bandleader, king of swing, born = 1909 +Name The Year: Indianapolis 500 car race run for first time. Winning driver Ray Harroun takes it with a blazing 75 mph. = 1911 +Name The Year: Christine Jorgensen, pioneer transsexual, born = 1926 +Name The Year: Mariner 9 launched. = 1971 +Name The Year: Three Japanese PFL terrorists kill 24, wound 72 at Tel Aviv's Lydda airport. = 1972 +Name The Year: Spain became the 16th member of North Atlantic Treaty Organization . = 1982 +Name The Year: Lady Godiva takes a ride through Coventry. = 1678 +Name The Year: Composer Franz Josef Hayden died in Vienna, Austria. = 1809 +Name The Year: Walt Whitman (in West Hills, NY), poet, born. = 1819 +Name The Year: First recorded bicycle race, 2 kilometers in Paris. = 1868 +Name The Year: First electric railway opens at Berlin Trades Exposition. = 1879 +Name The Year: Don Ameche, actor (Cocoon, Trading Places), born. = 1908 +Name The Year: Union of South Africa was founded. = 1910 +Name The Year: During WW I British and German fleets fought the Battle of Jutland. = 1916 +Name The Year: Prince Rainier of Monaco, born. = 1923 +Name The Year: Clint Eastwood, actor (Dirty Harry, Heartbreak Ridge, City Heat), born. = 1930 +Name The Year: Tom Berenger, actor, born. = 1950 +Name The Year: South Africa became an independent republic. = 1961 +Name The Year: WW II Gestapo official Adolf Eichmann hung in Israel. = 1962 +Name The Year: Brooke Shields (in New York City), actor, model, born. = 1965 +Name The Year: Tens of thousands of people in Peru died in an earthquake . = 1970 +Name The Year: Israel and Syria sign an agreement concerning the Golan Heights. = 1974 +Name The Year: Martin Luther, protestant reformer = 1699 +Name The Year: Spencer Perceval (Tory), British PM (1809-12) = 1762 +Name The Year: Viscount Goderich (Tory), British PM (1827-28) = 1782 +Name The Year: Sir Benjamin Lee, Baronet Guinness, Irish brewer, Dublin mayor = 1798 +Name The Year: First published reference to the game of Poker describes it as a Mississippi riverboat game. = 1834 +Name The Year: Jose' Santos Zelaya (L), ruler of Nicaragua (1893-1910) = 1853 +Name The Year: Stephen Crane, poet (Red Badge of Courage) = 1871 +Name The Year: Carlos Saavedra Lamas, Argentine jurist (Nobel Peace Prize 1936) = 1878 +Name The Year: Sholem Asch, Yiddish novelist, playwright (Three Cities) = 1880 +Name The Year: Hermann Broch, Austrian novelist (Sleepwalkers, Bewitchment) = 1886 +Name The Year: Philip John Noel-Baker, statesman, disarmament advocate (Nobel '59) = 1889 +Name The Year: Alexander Alekhine of Russia, world chess champion (1927-46) = 1892 +Name The Year: Wernher von Braun named head of German liquid-fuel rocket program. = 1932 +Name The Year: Gary Player (in South Africa), golfer = 1935 +Name The Year: Larry Flint, publisher (Hustler) = 1942 +Name The Year: First black player in National Basketball Association, Fort Wayne, IN. = 1950 +Name The Year: First atomic explosion witnessed by troops, NM. = 1951 +Name The Year: First hydrogen device exploded at Eniwetok Atoll in the Pacific. = 1952 +Name The Year: Daniel Boone frontiersman/explorer, born. = 1734 +Name The Year: Marie-Antoinette Queen of France, born. = 1755 +Name The Year: Burt Lancaster NYC, actor (From Here to Eternity, Elmer Gantry), born. = 1913 +Name The Year: Ken Rosewall, Sydney, Australia, tennis star (US Open 1956), born. = 1934 +Name The Year: Montgomery (Br) defeats Rommel (Ger) in battle of Alamein (WW II). = 1942 +Name The Year: Howard Hughes' "Spruce Goose" flies for 1st (and last) time. = 1947 +Name The Year: Hungary appeals for UN assistance against Soviet invasion. = 1956 +Name The Year: Crew of Soyuz 29 returns to Earth aboard Soyuz 31. = 1978 +Name The Year: President Reagan signs a bill establishing Martin Luther King day. = 1983 +Name The Year: Mexican radio station erronously reports Mike Tyson dies in car crash. = 1988 +Name The Year: Jermaine Jackson releases "Word to the Badd!!" anti Michael song. = 1991 +Name The Year: Great panic occurs in Europe over the close approach of a comet. = 1679 +Name The Year: John Montague 4th Earl of Sandwich, inventor of sandwich, born. = 1718 +Name The Year: 1st opium war-2 British frigates engage several Chinese junks. = 1839 +Name The Year: Jack the Ripper kills last victim. = 1888 +Name The Year: Columbia grants Panama independence. = 1903 +Name The Year: Austro-Hungarian Empire disolves. = 1918 +Name The Year: Poland proclaims independence from Russia after WW I. = 1918 +Name The Year: Charles Bronson Penns, actor (Death Wish, Dirty Dozen), born. = 1922 +Name The Year: Turkey switches from Arabic to Roman alphabet. = 1928 +Name The Year: 1st commercially produced synthetic rubber manufactured. = 1931 +Name The Year: George II returns to Greece and regains monarchy. = 1935 +Name The Year: Roy Emerson Australia, tennis player (Wimbeldon '64, '65), born. = 1936 +Name The Year: Lulu, Glasgow, Scotland, singer/actress (To Sir With Love), born. = 1948 +Name The Year: Clarence Birdseye markets frozen peas. = 1952 +Name The Year: Roseanne Barr Arnold Salt Lake City, comedienne/TV star (Roseanne), born. = 1952 +Name The Year: Adam Ant [Stuart Goddard], punk rocker (If I Strip For You), born. = 1954 +Name The Year: Australia takes control of the Cocos Islands. = 1955 +Name The Year: USSR launches Sputnik 2 with a dog (Laika), 1st animal in orbit. = 1957 +Name The Year: Dolph Lundgren actor, born. = 1959 +Name The Year: Body of assassinated Indian PM Indira Gandhi cremated. = 1984 +Name The Year: Lebanese magazine Ash Shirra reveals secret US arms sales to Iran. = 1986 +Name The Year: Soviet Union agrees to allow teaching of Hebrew. = 1988 +Name The Year: Bill Clinton elected US President. = 1992 +Name The Year: King William III of Orange = 1650 +Name The Year: Lighthouse established on Alcatraz Island. = 1854 +Name The Year: Eden Phillpotts, English novelist, poet, playwright = 1862 +Name The Year: Kingdom of Italy annexes Venetia. = 1866 +Name The Year: James Ritty patents the first cash register, to combat stealing by bartenders in his Dayton, Ohio saloon. = 1879 +Name The Year: Art Carney, actor (Honeymooners, Harold and Maude) = 1918 +Name The Year: Howard Carter discovers the tomb of Tutankhamen. = 1922 +Name The Year: Loretta Swit (in Passaic, NJ), actor (M = A = S = H) = 1937 +Name The Year: First air conditioned automobile (Packard) exhibited, Chicago, IL. = 1939 +Name The Year: UN Educational, Scientific, and Cultural Organization formed. (UNESCO) = 1946 +Name The Year: Israeli troops reach the Suez Canal for the first time. = 1956 +Name The Year: Nicaragua holds first free elections in 56 years; Sandinistas win 63%. = 1984 +Name The Year: Christopher Columbus learns of maize (corn) from the Indians of Cuba. = 1492 +Name The Year: Gunpowder Plot; Catholics try to blow up English Parliament. Plot uncovered & leader Guy Fawkes hanged. = 1605 +Name The Year: El Salvador's 1st battle against Spain for independence. = 1811 +Name The Year: Honduras declares independence of Central American Federation. = 1838 +Name The Year: Italy attacks Turkey, takes Tipoli & Cyrenaica. = 1911 +Name The Year: Ludwig III crowned king of Bavaria. = 1913 +Name The Year: Vivien Leigh, actress (Gone With Wind), born. = 1913 +Name The Year: Britain annexes Cyprus. = 1914 +Name The Year: Parker Brothers launches game of Monopoly. = 1935 +Name The Year: Art Garfunkel, singer/actor (Sounds of Silence, Carnal Knowledge), born. = 1942 +Name The Year: US launches Mariner 3 toward Mars; no data returned. = 1964 +Name The Year: Iranian PM Jaafar Sharif-Emami resigns to Shah Mohammed Reza Pahlavi. = 1978 +Name The Year: Jacques Tati actor/director, dies of pulmonary embolism. = 1982 +Name The Year: Iceberg twice the size of Rhode Island sighted in Antarctic. = 1987 +Name The Year: Charles II, last Habsburg king of Spain (1665-1700) = 1661 +Name The Year: Colley Cibber, English dramatist, poet laureate (Love's Last Shift) = 1671 +Name The Year: Aloys Senefelder, inventor of lithography = 1771 +Name The Year: Spain grants Dominican Rep independence. = 1844 +Name The Year: Charles Henry Dow, co-founder of Dow Jones, first editor of the Wall Street Journal = 1851 +Name The Year: John Phillip Souza, march king (Stars and Stripes Forever, etc) = 1854 +Name The Year: Ignace Jan Paderewski, Polish composer, pianist, patriot = 1860 +Name The Year: James A. Naismith, inventor of basketball = 1861 +Name The Year: Marie Curie, discoverer of radium = 1867 +Name The Year: Heinrich Himmler, Nazi SS leader = 1900 +Name The Year: Bolshevik revolution begins. = 1917 +Name The Year: Joan Sutherland, opera star = 1926 +Name The Year: Joni Mitchell, singer = 1943 +Name The Year: Sally Field (in Pasadena, CA), actor (Flying Nun, Norma Rae) = 1946 +Name The Year: US explodes world's first hydrogen bomb at Eniwetok Atoll. = 1952 +Name The Year: Maria Shriver, Newscaster, married to Arnold Schartznegger = 1955 +Name The Year: Pres Reagan was elected to a second term, winning 49 states. = 1984 +Name The Year: 22nd Space Shuttle Mission - Challenger 9 returns to Earth. = 1985 +Name The Year: Muhammad ibn Hazm, historian, jurist, writer of Islamic Spain = 994 +Name The Year: Francisco de Zurbarin, Spanish Baroque painter = 1598 +Name The Year: Abolitionist Elijah Lovejoy murdered by mob at Alton, Ill. = 1837 +Name The Year: London Gazette, oldest surviving journal, is founded. = 1865 +Name The Year: Madame Marie Sklodowska Curie, discovered radium (Nobel 1903, 1911) = 1867 +Name The Year: Mary Celeste sails from NY to Genoa; found abandoned 4 weeks later. = 1872 +Name The Year: Verney Cameron is first European to cross equatorial Africa from sea to sea. = 1875 +Name The Year: Leon Trotsky, Russian Communist theorist, Bolshevik = 1879 +Name The Year: Konrad Lorenz, zoologist, ethologist, writer (Nobel 1973) = 1903 +Name The Year: Bolsheviks overthrew Russian govt in St Petersburg. = 1914 +Name The Year: October Revolution overthrows Russian Provisional Government. = 1917 +Name The Year: Goddard demonstrates tube-launched solid propellant rockets. = 1918 +Name The Year: Al Hirt, trumpet player = 1922 +Name The Year: Richard Nixon's first time quiting politics - "You won't have Nixon to kick around", he tells the press. = 1962 +Name The Year: Dana Plato (in Maywood, CA) = 1964 +Name The Year: "Gone With the Wind" is shown on TV. = 1976 +Name The Year: Bomb explodes in U.S. Capitol, causing heavy damage but no injuries. = 1983 +Name The Year: Colombian troops ends 27-hour siege of Bogota's Palace of Justice. = 1985 +Name The Year: Sir Edmond Halley, astronomer, first to calculate a comet's orbit = 1656 +Name The Year: Bourbon Whiskey is first distilled from corn by Reverend Elijah Craig in Bourbon County, Kentucky. = 1789 +Name The Year: The Louvre, in Paris, was opened to the public. = 1793 +Name The Year: Gottlob Frege, German mathematician, logician, philosopher = 1848 +Name The Year: Abraham Lincoln was elected to his second term as President. = 1864 +Name The Year: Wilhelm Rintgen discovers x-rays. = 1895 +Name The Year: Margaret Mitchell, author (Gone With the Wind) = 1900 +Name The Year: Katherine Hepburn (in Connecticut), actor (African Queen, On Golden Pond) = 1909 +Name The Year: Peter Weiss, German dramatist, novelist (Marat/Sade) = 1916 +Name The Year: Dr. Christiaan Barnard, performed first human heart transplantation = 1922 +Name The Year: Hitler's "Beer Hall Putsch" failed; writes "Mein Kampf" while in jail. = 1923 +Name The Year: Edward G. Gibson, astronaut (Skylab 4) = 1936 +Name The Year: "Life with Father", longest running Broadway drama, opens (closes in 1947). = 1939 +Name The Year: Allied forces invade North Africa. = 1942 +Name The Year: Bonnie Raitt (in Los Angeles, CA), guitarist, singer = 1949 +Name The Year: Christie Hefner, daughter of Hugh Hefner = 1952 +Name The Year: Rickie Lee Jones (in Chicago), singer = 1954 +Name The Year: Walt Disney's "Robin Hood" is released. = 1973 +Name The Year: Fourteenth Space Shuttle Mission - Discovery 2 is launched. = 1984 +Name The Year: Judge overturned Rubin "Hurricane" Carter's conviction. (The case that inspired Bob Dylan's song "The Story Of The Hurricane") = 1985 +Name The Year: George Bush becomes the first sitting vice-president of the U.S. in 150 years to win a presidential election. = 1988 +Name The Year: Napoleon becomes dictator (1st consul) of France = 1799 +Name The Year: Ivan Turgenev, Russia, novelist/poet/playwright (Fathers and Sons), born. = 1818 +Name The Year: Edward VII, king of England (1901-10), born. = 1841 +Name The Year: Israel Bak created 1st hebrew printing press, dies. = 1874 +Name The Year: Hedy Lamarr, actress (Ecstacy, Samson and Delilah), born. = 1913 +Name The Year: Bavaria proclaims itself a republic. = 1918 +Name The Year: Kaiser Wilhelm II abdicates after German defeat in WW I. = 1918 +Name The Year: Carl Sagan, NYC, astronomer/author/professor (Cosmos, Broca's Brain), born. = 1934 +Name The Year: "Kristallnacht" (Crystal Night)-Nazi stormtroopers attacked Jews. = 1938 +Name The Year: Germany invades Norway and Denmark in WW II. = 1940 +Name The Year: Chaim Weizmann 1st pres of Israel, dies at 57. = 1952 +Name The Year: Abdul-Aziz ibn Sa'ud founder of Saudi Arabia, dies (born c 1880). = 1953 +Name The Year: Cambodia (now Kampuchea) gains independence within French Union. = 1953 +Name The Year: Dylan Thomas author-poet, dies in NY at 39. = 1953 +Name The Year: Charles DeGaulle French pres, dies at 79. = 1970 +Name The Year: Gary Kasparov (USSR) becomes World Chess Champion at age of 22. = 1985 +Name The Year: East Berlin opens its borders. = 1989 +Name The Year: President Bush announces DOUBLING of US forces in Gulf. = 1990 +Name The Year: Yves Montand actor, dies at 70 from a heart attack. = 1991 +Name The Year: Martin Luther, Eisleben, Germany, founded Protestantism, born. = 1483 +Name The Year: George II king of England (1727-60), born. = 1683 +Name The Year: Austrian Archduke Maximilian became emperor of Mexico. = 1864 +Name The Year: Claude Rains London, actor (Invisible Man, Casablanca), born. = 1889 +Name The Year: 41 suffragists are arrested in front of the White House. = 1917 +Name The Year: Independence of Poland proclaimed by Jozef Pilsudski. = 1918 +Name The Year: Moise Tshombe, president of Katanga, then premier of the Congo (Zaire), born. = 1919 +Name The Year: Richard Burton, Wales, actor (Cleopatra, Virginia Woolf), born. = 1925 +Name The Year: Hirohito enthroned as Emperor of Japan. = 1928 +Name The Year: Roy Scheider Orange NJ, actor (All That Jazz, Jaws), born. = 1935 +Name The Year: Kemal Atarok 1st pres of Turkey, dies. = 1938 +Name The Year: 1st long distance telephone call without operator assistance. = 1951 +Name The Year: "Sesame Street" premieres on PBS TV. = 1969 +Name The Year: Leonid Brezhnev, Soviet 1st sectretary, dies of a heart attack at 75. = 1982 +Name The Year: River Rhine (Germany) polluted by chemical spill. = 1986 +Name The Year: Berlin Wall opens in East Germany. = 1989 +Name The Year: Guerrillas battle with government forces in El Salvador. = 1989 +Name The Year: Germans begin punching holes in the Berlin Wall. = 1989 +Name The Year: Transit of Earth as seen from Mars. = 2084 +Name The Year: Henry IV, Holy Roman emperor (1036-1106) = 1050 +Name The Year: 41 Pilgrims signed a compact aboard Mayflower. = 1620 +Name The Year: Yen Jo-chu, Chinese scholar of Ch'ing dynasty = 1636 +Name The Year: Dutch and French agree to divide St. Maarten, Leeward Islands. = 1648 +Name The Year: Charles IV, king of Spain (1788-1808) = 1748 +Name The Year: Chrysanthemums are introduced into England from China. = 1790 +Name The Year: Fyodor Dostoyevsky (in Russia), author (Crime and Punishment) = 1821 +Name The Year: George S. Patton, U.S. military leader = 1885 +Name The Year: Armistice Day -- WW I ends (at 11AM on Western Front). = 1918 +Name The Year: Kurt Vonnegut, Jr., author (Slaughterhouse Five, Sirens of Titan) = 1922 +Name The Year: During WWII Germany completed their occupation of France. = 1942 +Name The Year: Daniel Ortega Saavedra, president of Nicaragua (1984- ) = 1945 +Name The Year: Jigme Singye Wangchuk, king of Bhutan (1972- ) = 1955 +Name The Year: Demi Moore, actor (Ghost) = 1963 +Name The Year: Rhodesia proclaimed independence from Britain by PM Ian D. Smith. = 1965 +Name The Year: Gemini XII launched on four-day flight (the final Gemini flight). = 1966 +Name The Year: John Lennon and Yoko Ono appear nude on cover of "Two Virgins" album. = 1968 +Name The Year: US Army turned over Long Bihn base to South Vietnamese army. = 1972 +Name The Year: Portugal grants Angola independence (Natl Day). = 1975 +Name The Year: The crew of Soyuz 35 returns to Earth aboard Soyuz 37. = 1980 +Name The Year: 5th Space Shuttle Mission - Columbia 5 is launched (first commercial flight). = 1982 +Name The Year: Rev Martin Luther King Sr, dies in Atlanta at 84. = 1984 +Name The Year: Van Gogh's "Irises" sells for record $53.6 million at auction. = 1987 +Name The Year: Baha'Ullah (Mirza Husayn Ali), founded Baha'i faith = 1817 +Name The Year: Aleksandr Borodin, Russian composer = 1833 +Name The Year: Auguste Rodin, sculptor (Kiss) = 1840 +Name The Year: Jules Leotard performs the first Flying Trapeze circus act in Paris. He also designed the garment that bears his name. = 1859 +Name The Year: Sun Yat-sen, father of modern China (ROC and PRC) = 1866 +Name The Year: Harry A. Blackmun, U.S. Supreme Court justice = 1908 +Name The Year: Austria becomes a republic. = 1918 +Name The Year: Trotsky expelled from Soviet CP; Stalin becomes undisputed dictator. = 1927 +Name The Year: Grace Kelly (in Philadelphia, PA), actor, Princess of Monaco = 1929 +Name The Year: First Sunday football game in Philadelphia (previously illegal). = 1933 +Name The Year: First known photo of Loch Ness monster (or whatever) is taken. = 1933 +Name The Year: Richard H. Truly, U.S. astronaut (STS-2, 8) = 1937 +Name The Year: Stefanie Powers (in Hollywood, CA), actor (Hart to Hart) = 1942 +Name The Year: German battleship Tirpitz was sunk off Norway. = 1944 +Name The Year: Neil Young, singer/songwriter = 1945 +Name The Year: The first "autobank" (banking by car) was established, in Chicago. = 1946 +Name The Year: Walt Disney's "Song Of The South" released. = 1946 +Name The Year: Japanese premier Tojo sentenced to death by war crimes tribunal. = 1948 +Name The Year: Nadia Comaneci (in Romania), Olympic gymnist = 1961 +Name The Year: Venera 2 launched by Soviet Union toward Venus. = 1965 +Name The Year: New Orleans elects first black mayor, Ernest `Dutch' Morial. = 1977 +Name The Year: US space probe Voyager I approaches 77,000 miles of Saturn. = 1980 +Name The Year: First balloon crossing of Pacific completed (Double Eagle V). = 1981 +Name The Year: Second Space Shuttle Mission - Columbia 2 is launched. First time a spacecraft is launched twice. = 1981 +Name The Year: Yuri V. Andropov succeeds Leonid Brezhnev. = 1982 +Name The Year: Space shuttle astronauts snared a satellite first space salvage. = 1984 +Name The Year: St. Augustine of Hippo (in Numidia, Algeria) = 354 +Name The Year: St Nicholas I (the Great), pope (858-67) dies. = 867 +Name The Year: English king Ethelred II launches massacre of Danish settlers. = 1002 +Name The Year: Edward III, king of England (1327-77) = 1312 +Name The Year: Edward John Trelawney, English traveler, author = 1792 +Name The Year: Edwin Booth, American actor = 1833 +Name The Year: Robert Louis Stevenson (in Scotland), writer (Treasure Island) = 1850 +Name The Year: First shipment of canned pineapple from Hawaii. = 1895 +Name The Year: 250 miners die in a fire at St. Paul Mine at Cherry, Ill. = 1909 +Name The Year: "The Sheik", starring Rudolph Valentino, is released. = 1921 +Name The Year: The Holland Tunnel, first underwater vehicular tunnel, opened between New York and New Jersey. = 1927 +Name The Year: NBC forms first full sized symphony orchestra exclusively for radio. = 1937 +Name The Year: Walt Disney's "Fantasia" is released. = 1940 +Name The Year: British aircraft carrier Ark Royal sank in Mediterranean. = 1941 +Name The Year: U.S. Supreme Court struck down segregation of races on public buses. = 1956 +Name The Year: Cyclone kills estimated 300,000 in Bangladesh. = 1970 +Name The Year: Mariner 9, first orbit of another planet, first orbit of Mars. = 1971 +Name The Year: Karen Silkwood killed in a car crash. = 1974 +Name The Year: First manned balloon flight across Pacific Ocean ended. = 1981 +Name The Year: Korean boxer Duk Koo Kim fatally injured when KOed by Ray Mancini. = 1982 +Name The Year: Vietnam War Memorial dedicated in Washington, DC. = 1982 +Name The Year: Nevado del Ruiz volcano erupts in Colombia, kills 25,000. = 1985 +Name The Year: Soviets launch first unmanned Space Shuttle in two-day test. = 1988 +Name The Year: Samuel Pepys reports on first blood transfusion (between dogs). = 1666 +Name The Year: William Pitt the Elder (Whig), British PM (1756-61, 1766-68) = 1708 +Name The Year: Robert Fulton, built first commercial steamboat = 1765 +Name The Year: Henri Dutrochet, discovered & named process of osmosis = 1776 +Name The Year: Sir Charles Lyell, geologist = 1797 +Name The Year: Claude Monet, impressionist painter = 1840 +Name The Year: "Moby Dick", by Herman Melville, is published. = 1851 +Name The Year: Jawaharlal Nehru, first Indian PM (1947-64), made fashion statement = 1889 +Name The Year: Power plant at Niagara Falls begins operation. = 1896 +Name The Year: Louise Brooks, silent screen star (American Venus, Pandora's Box) = 1906 +Name The Year: Rosemary DeCamp (in Arizona) = 1910 +Name The Year: First airplane flight from the deck of a ship. = 1910 +Name The Year: Barbara Hutton, actress = 1912 +Name The Year: Veronica Lake, actress = 1919 +Name The Year: Brian Keith, actor = 1921 +Name The Year: BBC began domestic radio service. = 1922 +Name The Year: McLean Stevenson, actor (M = A = S = H) = 1929 +Name The Year: Edward H. White II, astronaut (Gemini 4) = 1930 +Name The Year: Fred Haise, astronaut (Apollo 13) = 1933 +Name The Year: Hussein I, king of Jordan (1953- ) = 1935 +Name The Year: During WW II, German planes destroyed most of Coventry, England. = 1940 +Name The Year: Charles Phillip Arthur George Windsor, Prince of Wales = 1948 +Name The Year: Kilauea Volcano's most spectacular eruption (in Hawaii). = 1959 +Name The Year: Apollo 12 is launched. = 1969 +Name The Year: Dow Jones closes above 1,000 for first time (1003.16). = 1972 +Name The Year: Britain's Princess Anne marries a commoner, Capt. Mark Phillips. = 1973 +Name The Year: Second Space Shuttle Mission, Columbia 2, returns to Earth. = 1981 +Name The Year: U.S. Securities and Exchange Commission imposes a record $100 million penalty against inside-trader Ivan Boesky. = 1986 +Name The Year: Johannes Kepler, planetary law-maker, dies. = 1630 +Name The Year: Sir William Herschel, astronomer discovered Uranus = 1738 +Name The Year: Gerhart Hauptmann, German writer (Before Dawn) (Nobel 1912) = 1862 +Name The Year: Dom Pedro II, Emperor of Brazil, deposed; republic proclaimed. = 1889 +Name The Year: Erwin Rommel, German field marshall, brilliant tactician = 1891 +Name The Year: League of Nations holds first meeting, in Geneva. = 1920 +Name The Year: Ed Asner, actor (Lou Grant) = 1929 +Name The Year: Petula Clark (in England), singer = 1932 +Name The Year: Walt Disney Art School created. = 1932 +Name The Year: Anni-Frid (in Lyngsdtad, Sweden), singer (ABBA) = 1945 +Name The Year: Actor Tyrone Power dies of a heart attack at 44. = 1958 +Name The Year: Gemini XII returns to Earth. = 1966 +Name The Year: Michael Adams in X-15 reaches altitude of 80 km. = 1967 +Name The Year: 250,000 protesters peacefully demonstrate against Vietnam War. = 1969 +Name The Year: President Jimmy Carter welcomes Shah of Iran. = 1977 +Name The Year: Pope John Paul II began 5 day visit to West Germany. = 1980 +Name The Year: Funeral services held in Moscow's Red Square for Leonid I. Brezhnev. = 1982 +Name The Year: Baby Fae, who received a baboon's, heart died at a California medical center. = 1984 +Name The Year: Soviet unmanned Space Shuttle completes 2 day test, lands just 8 miles from launch site in central Asia. = 1988 +Name The Year: Pizarro seizes Incan emperor Atahualpa. = 1532 +Name The Year: Rodolphe Kreutzer, French composer, virtuoso violinist = 1766 +Name The Year: N.E. Guerin of New York receives a patent for his cork filled life preserver. = 1841 +Name The Year: William Handy, blues musician, established the popularity of the blues in band music = 1873 +Name The Year: 6,000 Armenians massacred by Turks in Kurdistan. = 1894 +Name The Year: Paul Hindemith (in Germany), composer = 1895 +Name The Year: Burgess Meredith, actor (Batman, Rocky) = 1908 +Name The Year: Roosevelt establishes diplomatic relations with the Soviet Union. = 1933 +Name The Year: Donna McKechnie (in Pontiac, Michigan) = 1942 +Name The Year: The United Nations gets approval from the U.S. government for issuing postage stamps. = 1950 +Name The Year: First speed-boat to exceed 200 miles per hour (D.M. Campbell, pilot). = 1955 +Name The Year: First public announcement about Walt Disney World. = 1965 +Name The Year: Venera 3 launched. (Later, the first man-made object to land on another planet when it crashed into Venus.) = 1965 +Name The Year: Dr. Sam Sheppard freed after 9 years in jail, by a jury. = 1966 +Name The Year: Lisa Bonet (in San Francisco, CA), actor (Cosby Show) = 1967 +Name The Year: Donald Wolf, computer game creator = 1971 +Name The Year: Skylab 4 and its crew are launched into earth orbit (The final Skylab mission). = 1973 +Name The Year: Fifth Space Shuttle Mission - Columbia 5 returns to Earth. = 1982 +Name The Year: Fourteenth Space Shuttle Mission - Discovery 2 returns to Earth. = 1984 +Name The Year: Il Bronzino, Florentine painter = 1503 +Name The Year: Elizabeth I ascends English throne upon death of Queen Mary. = 1558 +Name The Year: Joost van den Vondel, Dutch poet, dramatist = 1587 +Name The Year: Jean d'Alembert, French mathematician, scientist, philosopher = 1717 +Name The Year: Louis XVIII, first post-revolutionary king of France (1814-24) = 1755 +Name The Year: August Ferdinand Mobius, mathematician, inventor of Mobius strip = 1790 +Name The Year: The Suez Canal opens. = 1869 +Name The Year: Field Marshal Viscount Montgomery of Alamein (in Moville, Ireland) = 1887 +Name The Year: Isamu Noguchi, sculptor = 1904 +Name The Year: The Panama Canal opens for use. = 1913 +Name The Year: Sculptor August Rodin died in Meudon, France. = 1917 +Name The Year: Rock Hudson (in Winnetka, Ill), actor (Pillow Talk, A Farewell to Arms, McMillan and Wife) = 1925 +Name The Year: Peter Cook, British actor, comedian = 1937 +Name The Year: Gordon Lightfoot, folksinger = 1938 +Name The Year: Martin Scorsese, director (Mean Streets, NY, NY) = 1942 +Name The Year: Lauren Hutton (in South Carolina), model, actor (American Gigolo, Lassiter) = 1943 +Name The Year: Danny DeVito, actor (Taxi, Ruthless People, Twins), director (War of the Roses) = 1944 +Name The Year: Britain's House of Commons voted to nationalize steel industry. = 1948 +Name The Year: Jeff Buckley (singer, son of Tim Buckley) = 1966 +Name The Year: Russia lands unmanned remote-controlled vehicle on Moon. = 1970 +Name The Year: Pres Nixon told AP "...people have got to know whether or not their pres is a crook. Well, I'm not a crook." = 1973 +Name The Year: Egyptian President Sadat formally accepts invitation to visit Israel. = 1977 +Name The Year: South Korean boxer Duk Koo Kim was legally declared dead. = 1982 +Name The Year: Bartolomeu Dias discovers Cape of Good Hope. = 1497 +Name The Year: Louis-Jacques-Mande Daguerre, developed a method of photography = 1789 +Name The Year: Battle of Vertieres, in which Haitians defeat French. = 1803 +Name The Year: Antarctica discovered by U.S. Navy Captain Nathaniel B. Palmer. = 1820 +Name The Year: Sir W.S. Gilbert, playwright (of Gilbert and Sullivan fame) = 1836 +Name The Year: U.S. and Canada begin the use of standard time zones (standard time zones established by the railroads in both countries). = 1883 +Name The Year: Oahu Railway begins public service in Hawaii. = 1889 +Name The Year: George H. Gallop, pollster (what's your opinion?) = 1901 +Name The Year: Hay-Bunau-Varilla Treaty, gives US exclusive canal rights through Panama. = 1903 +Name The Year: U.S. invades Nicaragua, later overthrows President Zelaya. = 1909 +Name The Year: Lincoln Deachey performs first airplane loop-the-loop. = 1913 +Name The Year: Latvia declares independence from Russia. = 1918 +Name The Year: Alan B. Shepard, Jr., first American in space (Freedom 7, Apollo 14) = 1923 +Name The Year: Mickey Mouse, cartoon character, sired by Walt Disney's pen = 1928 +Name The Year: Walt Disney's Mickey Mouse debuts in New York in "Steamboat Willie". = 1928 +Name The Year: William "Pete" Knight, X-15 pilot, born. = 1929 +Name The Year: Brenda Vaccaro (in Brooklyn, NY) actor (Midnight Cowboy) = 1939 +Name The Year: "Flowers and Trees" awarded first Academy Award for a cartoon. = 1932 +Name The Year: Main span of San Francisco's Golden Gate Bridge joined. = 1936 +Name The Year: Linda Evans, actor (Dynasty), born. = 1942 +Name The Year: First ambassador to Canada, Ray Atherton, nominated. = 1943 +Name The Year: Christopher Columbus discovers Puerto Rico. = 1493 +Name The Year: Puerto Rico Discovery Day. = 1582 +Name The Year: Charles I, king of England (1625-49); later executed by Parliament = 1600 +Name The Year: Pilgrims reach Cape Cod on the Mayflower. = 1620 +Name The Year: First protestant ministry society in New England. = 1644 +Name The Year: Ferdinand de Lesseps, French diplomat, built Suez Canal = 1805 +Name The Year: President Lincoln delivers his famous address at Gettysburg, PA. = 1863 +Name The Year: Jose Raul Capablanca of Cuba, world chess champion (1921-27) = 1888 +Name The Year: The pencil is invented. = 1895 +Name The Year: Tommy Dorsey, band leader = 1905 +Name The Year: Indira Gandhi, Indian prime minister (1966-77, 1980-84) = 1917 +Name The Year: Treaty of Versailles and League of Nations rejected by U.S. Senate. = 1919 +Name The Year: Dan Haggerty, actor (Grizzly Adams) = 1941 +Name The Year: Calvin Klein, clothes designer = 1942 +Name The Year: Kathleen Quinlan (in Mill Valley, CA), actor (Twilight Zone) = 1954 +Name The Year: Ford Motor Company cancels the Edsel. = 1959 +Name The Year: Jodie Foster (in Los Angeles, CA), actor (Silence of the Lambs, Nell, The Accused) = 1962 +Name The Year: Egyptian President Anwar Sadat arrives in Israel. = 1977 +Name The Year: Rev Jim Jones leads 911 people in suicide in Jonestown, Guyana. = 1978 +Name The Year: Otto von Guericke, invented the air pump. = 1602 +Name The Year: Britain declares war against Holland. = 1780 +Name The Year: Andres Bello, Venezuelan diplomat, author, humanist = 1781 +Name The Year: William Bundy invents the first timecard clock. = 1888 +Name The Year: Edwin Hubble, US astronomer, discoverer of galaxies, red shift = 1889 +Name The Year: Chester Gould, cartoonist (gave Dick Tracy a job) = 1900 +Name The Year: Revolution broke out in Mexico, led by Francisco I. Madero. = 1910 +Name The Year: The U.S. State Department starts requiring photographs for passports. = 1914 +Name The Year: Maya Plisetkaya, prima ballerina = 1925 +Name The Year: Robert Kennedy (in Brookline, Mass), Democratic Senator from New York, U.S. Attorney General; later assassinated = 1925 +Name The Year: Veronica Hamel (in Philadelphia, PA), actor (Hill Street Blues) = 1943 +Name The Year: International War Crimes Tribunal opens trial of Nazi leaders in Nuremberg. = 1945 +Name The Year: Britain's Princess Elizabeth, marries Duke Philip Mountbatten in London's Westminster Abbey. = 1947 +Name The Year: Bo Derek (in Long Beach, CA), actor? (10; Tarzan, Ape Man) = 1956 +Name The Year: Spain's Gen. Francisco Franco dies in Madrid at 82. = 1975 +Name The Year: Egyptian President Anwar Sadat became first Arab leader to address Israel's Knesset. = 1977 +Name The Year: Steve Ptacek in Solar Challenger makes first solar-powered flight. = 1980 +Name The Year: Anatoly Karpov, USSR retains world chess championship. = 1981 +Name The Year: UN's WHO announces first global effort to combat AIDS. = 1986 +Name The Year: Mayflower Compact signed by Pilgrims in Providencetown, MA harbor. = 1620 +Name The Year: Jakob Bohme, German philosophical mystic, dies (birth date unknown). = 1624 +Name The Year: Voltaire, thinker = 1694 +Name The Year: Pilftre de Rozier and Marquis d'Arlandes make first free balloon flight. = 1783 +Name The Year: William Beaumont, surgeon, studied digestion = 1785 +Name The Year: Sir Samuel Cunard, founded first regular Atlantic steamship line = 1787 +Name The Year: Benedict XV, 258th Roman Catholic pope (1914-22) = 1854 +Name The Year: Rene Magritte, painter (This is Not a Pipe) = 1898 +Name The Year: Coleman Hawkins, virtually created the tenor saxophone for jazz = 1904 +Name The Year: Vivian Blaine, actor (Guys and Dolls) = 1923 +Name The Year: Henry W. "Hank" Hartsfield, U.S. astronaut (STS-4, 41D, 61A) = 1933 +Name The Year: First US ambassador to the USSR (W.C. Bullitt). = 1933 +Name The Year: Marlo Thomas (in Detroit, Michigan), actor (That Girl) = 1938 +Name The Year: Natalia Maskarova (in Lenningrad), ballerina = 1940 +Name The Year: Juliet Mills (in London, England) = 1941 +Name The Year: Goldie Hawn (in Washington, DC), actor (Butterflies Are Free, Foul Play, Private Benjamin) = 1945 +Name The Year: Jack Benny (Violin) and Richard Nixon (Piano) play their famed duet. = 1959 +Name The Year: The Verrazanno Narrows Bridge (Brooklyn to Staten Island) opens, becoming the world's longest suspension bridge. = 1964 +Name The Year: The "Who Shot JR" episode of "Dallas" begins the tradition of season-ending cliff-hangers. = 1980 +Name The Year: Wilhelm Friedemann Bach, composer, son of J.S. Bach = 1710 +Name The Year: George Eliot (in England), novelist (Silas Marner) = 1819 +Name The Year: Tarzan of the Apes, according to Edgar Rice Burroughs' novel. = 1888 +Name The Year: Charles de Gaulle, pres of France (1958-69), general = 1890 +Name The Year: International Radio Telegraphic Convention adopts "SOS" as new call for help. = 1906 +Name The Year: Benjamin Britten, English composer = 1913 +Name The Year: Geraldine Page (in Kirksville, MO), actor (Trip to Bountiful) = 1924 +Name The Year: Owen K. Garriott, astronaut (Skylab 3, STS-9) = 1930 +Name The Year: Robert Vaughn, actor (Man from U.N.C.L.E) = 1932 +Name The Year: Billie Jean King (in California), tennis pro = 1943 +Name The Year: Lebanon gains independence from France (National Day). = 1943 +Name The Year: Jamie Lee Curtis (in Los Angeles, CA), actor, (Halloween, Trading Places, True Lies), Tony Curtis and Janet Leigh's daughter = 1958 +Name The Year: Mariel Hemingway (in Ketchum, Idaho), actor (Star 80, Manhattan, Personal Best) = 1961 +Name The Year: President John Kennedy assasinated in Dallas; Lee Harvey Oswald is assumed to have been the assasin. = 1963 +Name The Year: UN Security council passes resolution 242, declaring that Israel must give back land won in the 6 day war. = 1967 +Name The Year: Beatles release "The Beatles", their only double album. = 1968 +Name The Year: Otto I (the Great), German king, Holy Roman emperor (962-73) = 912 +Name The Year: Alfonso X (the Wise), king of Castile and Leon (1252) = 1221 +Name The Year: Just past midnight, a sharp jolt causes Lake Merced to drop 30 feet. = 1852 +Name The Year: Billy the Kid (William H. Bonney), criminal = 1859 +Name The Year: Karl Branting, Swedish statesman, diplomat (Nobel Peace Prize 1921) = 1860 +Name The Year: Battle of Chattanooga begins. = 1863 +Name The Year: Patent granted for a process of making color photographs. = 1863 +Name The Year: Boris Karloff, actor (Frankenstein, Isle of the Dead) = 1887 +Name The Year: The first jukebox is installed, at a saloon in San Francisco. = 1889 +Name The Year: Post Hospital at Presidio renamed Letterman General Hospital. = 1911 +Name The Year: Krzysztof Penderecki, Polish composer (Hiroshima Threnody) = 1933 +Name The Year: Vladislav N. Volkov, Soviet cosmonaut (Soyuz 7, 11) = 1935 +Name The Year: Lens to provide zoom effects patented (F.G. Back). = 1948 +Name The Year: Francie Larrieu, track runner = 1952 +Name The Year: Merle Oberon dies at age 68. = 1979 +Name The Year: Mae West dies at age 88. = 1980 +Name The Year: 25th Anniversary of "Dr. Who" - And still going strong. "Anyone seen a Tardis around here?" = 1988 +Name The Year: Destructive eruption of Vesuvius. = 1759 +Name The Year: South Carolina passes Ordinance of Nullification. = 1832 +Name The Year: Henre de Toulouse-Lautrec (in France), painter = 1864 +Name The Year: Dale Carnegie, author (How to Win Friends and Influence People) = 1888 +Name The Year: Charles Schultz, Peanuts Creator = 1922 +Name The Year: Oscar "Big O" Robertson, basketball player = 1938 +Name The Year: Agatha Christie's "The Mousetrap" opens in London. At last report, it is still running. = 1952 +Name The Year: First US Presidential airplane christened. = 1954 +Name The Year: First and only live murder on TV - Jack Ruby shoots Lee Harvey Oswald. = 1963 +Name The Year: Apollo 12 returns to Earth. = 1969 +Name The Year: Britain evacuated New York, their last military position in U.S. = 1783 +Name The Year: Andrew Carnegie, steel industrialist, library builder = 1835 +Name The Year: Carry Nation, scourge of barkeepers and drinkers = 1846 +Name The Year: Alfred Nobel invents dynamite. = 1867 +Name The Year: John XXIII (born Angelo Roncalli near Bergamo, Italy), 261st pope (1958-63) = 1881 +Name The Year: John B. Meyenberg of St Louis patented evaporated milk. = 1884 +Name The Year: Ricardo Montalban, actor (Fantasy Island, Star Trek II) = 1920 +Name The Year: First Soviet liquid rocket attains altitude of 261 ft. = 1933 +Name The Year: John Larroquette, actor (Night Court, Star Trek III) = 1937 +Name The Year: Tina Turner (in Brownsville, Texas), singer, actor = 1941 +Name The Year: John F. Kennedy, Jr. = 1960 +Name The Year: First atomic reactor for research and development, Richland, Wa. = 1960 +Name The Year: Greek Pres George Papadopoulos ousted in a bloodless military coup. = 1973 +Name The Year: UN Secretary-General U Thant dies in NY of cancer at 65. = 1974 +Name The Year: Netherlands grants Surinam independence (Natl Day). = 1975 +Name The Year: O.J. Simpson gains 273 yards for Buffalo vs. Detroit. = 1976 +Name The Year: Sugar Ray Leonard regains WBC welterweight championship. = 1980 +Name The Year: Soyuz T-9 returns to Earth, 149 days after take-off. = 1983 +Name The Year: William Schroeder, becomes second to receive Jarvik-7 artificial heart. = 1984 +Name The Year: John Harvard, English clergyman, scholar, founder of Harvard U. = 1607 +Name The Year: First lion to be seen in America was exhibited in Boston. = 1716 +Name The Year: William Cowper, English poet = 1731 +Name The Year: Captain Cook discovers Maui (in the Sandwich Islands). = 1778 +Name The Year: Sarah Moore Grimke, American antislavery, women's rights advocate = 1792 +Name The Year: Republican calendar replaces Gregorian calendar in France. = 1793 +Name The Year: Louisa May Alcott, author (Little Women) = 1832 +Name The Year: "Alice in Wonderland" is published. = 1865 +Name The Year: The first baseball game played in enclosed field in San Francisco, at 25th and Folsom. = 1868 +Name The Year: Willis Haviland Carrier, developed air-conditioning equipment = 1876 +Name The Year: First Meteor photograph. = 1885 +Name The Year: Norbert Wiener, inventor of cybernetics, absentminded-professor = 1894 +Name The Year: Eugene Ionesco, French dramatist (Rhinoceros) = 1912 +Name The Year: Robert Goulet (in Canada), singer, actor = 1933 +Name The Year: Boris Yegorov, Soviet cosmonaut (Voskhod 1) = 1937 +Name The Year: Rich Little (in Canada), impressionist = 1938 +Name The Year: Nazis force 4.5 mil Warsaw Jews to live in walled ghetto. = 1940 +Name The Year: India adopts a constitution as a British Commonwealth Republic. = 1949 +Name The Year: China enters Korean conflict. = 1950 +Name The Year: The fab fours' first recording session under the name Beatles (they were formerly the Silver Beatles). = 1962 +Name The Year: France launches first satellite, a 92-pound A1 capsule. = 1965 +Name The Year: First major tidal power plant opened at Rance estuary, France. = 1966 +Name The Year: Federal jury found Lynette Fromme guilty of attempted assassination. = 1975 +Name The Year: Yasuhiro Nakasone elected PM of Japan succeeding Zenko Suzuki. = 1982 +Name The Year: 23rd Space Shuttle Mission - Atlantis 2 is launched. = 1985 +Name The Year: Pope Urban II preaches first Crusade. = 1095 +Name The Year: Anders Celsius, scientist, invented centigrade temperature scale = 1701 +Name The Year: Sir Julius Benedict, composer = 1804 +Name The Year: Cracow declared a free republic. = 1815 +Name The Year: Chaim Weizmann, Israeli statesman = 1874 +Name The Year: Charles A. Beard, American historian = 1874 +Name The Year: Alfred Nobel establishes Nobel prize. = 1895 +Name The Year: NY's Penn Station opens as world's largest railway terminal. = 1910 +Name The Year: Alexander Dubcek, head of Czech Communist Party (1968-69) = 1921 +Name The Year: Benigno Aquino, Jr., Philippine opposition leader; assassinated = 1932 +Name The Year: Eddie Rabbitt, singer = 1941 +Name The Year: Jimi Hendrix, guitarist = 1942 +Name The Year: French navy at Toulon scuttled its ships and submarines to prevent them from falling into hands of Nazis. = 1942 +Name The Year: Gen George C. Marshall named special U.S. envoy to China. = 1945 +Name The Year: First rocket to intercept an airplane, White Sands, NM. = 1951 +Name The Year: Playwright Eugene O'Neill dies in Boston at 65. = 1953 +Name The Year: Beatles release "Magical Mystery Tour." = 1967 +Name The Year: George Harrison releases 3 album set "All Things Must Pass." = 1970 +Name The Year: Pope Paul VI wounded in chest during a visit to Philippines by a dagger-wielding Bolivian painter disguised as a priest. = 1970 +Name The Year: Mars 2, Mars landing. First crash landing on Mars. = 1971 +Name The Year: San Francisco Mayor George Moscone and City Supervisor Harvey Milk shot by Dan White. = 1978 +Name The Year: Soyuz T-3 is launched. = 1980 +Name The Year: Republic of Ireland gains consultative role in Northern Ireland. = 1985 +Name The Year: Space shuttle Atlantis makes second flight, carries 7 (1 Mexican). = 1985 +Name The Year: Magellan begins crossing the Pacific Ocean. = 1520 +Name The Year: John Bunyan, English cleric, author (Pilgrim's Progress) = 1628 +Name The Year: Jean Baptiste Lully, French composer, musician = 1632 +Name The Year: William Blake, poet (Songs of Innocence and Experience) = 1757 +Name The Year: Washington and his troops cross the Delaware River. = 1776 +Name The Year: Friedrich Engels, Marx's collaborator = 1820 +Name The Year: America's first auto race starts; 6 cars, 55 miles, winner averages a blazing 7 MPH. = 1895 +Name The Year: Claude Levi-Strauss, Belgian social anthropologist = 1908 +Name The Year: Admiral R.E. Byrd makes first South Pole flight. = 1929 +Name The Year: Roosevelt, Churchill and Stalin met at Tehran. = 1943 +Name The Year: Randy Newman, singer (Raindrops), songwriter = 1943 +Name The Year: Alexander Godunov, composer = 1949 +Name The Year: Paul Schaeffer, musician (Saturday Night Live, David Letterman), actor (This Is Spinal Tap), Thunder Bay, Ont. = 1949 +Name The Year: Mauritania gains independence from France (National Day). = 1960 +Name The Year: Mariner 4 launched. First spacecraft to fly by Mars. = 1964 +Name The Year: Ninth Space Shuttle Mission - Columbia 6 is launched. = 1983 +Name The Year: Reagan administration exceeds SALT II arms limitations for first time. = 1986 +Name The Year: Cardinal Thomas Wolsey adviser to England's King Henry VIII, died. = 1530 +Name The Year: Christian Doppler, discovered Doppler Effect (color shift) = 1803 +Name The Year: Sir Ambrose Fleming, inventor of the diode = 1849 +Name The Year: Colorado militia kills 150 peaceful Cheyenne Indians. = 1864 +Name The Year: Antonio Egas Moniz, Portuguese lobotomist (Nobel 1949) = 1874 +Name The Year: U.S. receives rights to Pearl Harbor, on Oahu, Hawaii. = 1887 +Name The Year: U.S. declares martial law in Dominican Republic. = 1916 +Name The Year: King Tut's Tomb is discovered in Egypt. = 1922 +Name The Year: Italian composer Giacomo Puccini died in Brussels. = 1924 +Name The Year: Richard Byrd and crew flies over the South Pole. = 1929 +Name The Year: Diana Ladd = 1932 +Name The Year: John Mayall, blues singer = 1933 +Name The Year: Chuck Mangione, jazz musician, composer = 1940 +Name The Year: Albania liberated from Nazi control (National Day). = 1944 +Name The Year: Yugoslav Republic Day. = 1945 +Name The Year: U.N. General Assmebly allows for a Jewish state in Palestine. = 1947 +Name The Year: First underground atomic explosion, Frenchman Flat, Nevada. = 1951 +Name The Year: President-elect Eisenhower visits Korea to assess the war. = 1952 +Name The Year: Howie Mandel, actor (St Elsewhere, Walk Like a Man), comedian = 1955 +Name The Year: Mercury 5 launches a chimp (Ham/Enos). = 1961 +Name The Year: Beatles release "I Want to Hold Your Hand." = 1963 +Name The Year: LBJ sets up Warren comm to investigate assassination of JFK. = 1963 +Name The Year: Actor Natalie Wood drowns off Santa Catalina, Calif., at 43. = 1981 +Name The Year: Cary Grant, dies in Davenport, Iowa, at 82. = 1986 +Name The Year: .C. Cleopatra died = 30 B +Name The Year: Andrea Doria, Genovese statesman, admiral = 1466 +Name The Year: Jonathan Swift, satirist (Gulliver's Travels, A Modest Proposal) = 1667 +Name The Year: Johann Lukas Schonlein, helped establish scientific medicine = 1793 +Name The Year: Oliver Fisher Winchester, rifle maker = 1810 +Name The Year: Samuel Clemens (a.k.a. Mark Twain) (at Hannibal, MO), author (Tom Sawyer, Huckleberry Finn) = 1835 +Name The Year: Sir Winston Churchill (C), Brit. PM (1940-45, 1951-55) (Nobel 1953) = 1874 +Name The Year: Virginia Mayo (in St Louis, MO) = 1920 +Name The Year: Efrem Zimbalist, Jr., actor (77 Sunset Strip, The Untouchables) = 1923 +Name The Year: Richard Crenna, actor = 1927 +Name The Year: Dick Clark, America's oldest teenager (American Bandstand) = 1929 +Name The Year: G. Gordon Liddy, tough guy, Watergate celebrity = 1930 +Name The Year: Abbie Hoffman, inventor of LSD = 1936 +Name The Year: The Soviet Union invades Finland over a border dispute. = 1939 +Name The Year: Only one day after the U.N. decrees Israel's right to exist, Jewish settlements are attacked. = 1947 +Name The Year: First meteorite known to have struck a woman - Sylacauga, Alabama. = 1954 +Name The Year: Billy Idol, rocker (White Wedding) = 1955 +Name The Year: First guided missile destroyer launched, the Dewey, Bath, Me. = 1958 +Name The Year: USSR launches Zond 2 towards Mars. = 1964 +Name The Year: Barbados gains independence from Britain (National Day). = 1966 +Name The Year: BC Alexander of Macedon defeats Persian army at Gaugamela. = 331 +Name The Year: Henry III, king of England (1216-72) = 1207 +Name The Year: Charles VI, Holy Roman emperor (1711-40) = 1685 +Name The Year: Maria Mitchell discovers a non-naked-eye comet. = 1847 +Name The Year: First postcards are issued in Vienna. = 1869 +Name The Year: William Edward Boeing, founded aircraft company = 1881 +Name The Year: Vladimir Horowitz, pianist = 1904 +Name The Year: Walter Matthau, actor (Odd Couple, Bad News Bears, Hopscotch) = 1920 +Name The Year: Tom Bosley, actor (Happy Days, Murder She Wrote) = 1927 +Name The Year: George Peppard, actor (Breakfast at Tiffany's, Blue Max, A-Team) = 1928 +Name The Year: Start of USSR experimental calender. = 1929 +Name The Year: Julie Andrews, actor, singer (Sound of Music, Mary Poppins, S.O.B.) = 1935 +Name The Year: Germany annexes Sudetenland (1/3 of Czechoslovakia). = 1938 +Name The Year: First jet propelled airplane tested. = 1942 +Name The Year: People's Rep of China proclaimed (National Day). = 1949 +Name The Year: First treaty signed by female ambassador - Eugenie Anderson. = 1951 +Name The Year: First ultra high frequency (UHF) television station, Portland, OR. = 1952 +Name The Year: Nigeria gains independence from Britain (National Day). = 1960 +Name The Year: France, the U.S.S.R., Great Britain, and the U.S. signed away their control over a partitioned Germany. = 1990 +Name The Year: BC Aristotle dies of indigestion = 322 +Name The Year: Hans Lippershey offers the Dutch government a new invention -- the telescope. = 1608 +Name The Year: Darwin returns to England aboard the HMS Beagle. = 1836 +Name The Year: Ferdinand Foch, believed to be the leader responsible for Allies winning World War I = 1851 +Name The Year: Mahatma K. Ghandi (at Porbandar, Kathiawad, India), pacifist = 1869 +Name The Year: Italy annexes Rome and the Papal States; Rome made Italian capital. = 1870 +Name The Year: Groucho Marx, comedian = 1895 +Name The Year: Graham Greene, prolific English novelist (Brighton Rock) = 1904 +Name The Year: Robert Runcie, archbishop of Canterbury = 1921 +Name The Year: Spanky McFarland, actor, little rascal = 1928 +Name The Year: Yuri N. Glazkov, Soviet cosmonaut (Soyuz 24) = 1939 +Name The Year: Don McLean, singer, songwriter (American Pie, Vincent) = 1945 +Name The Year: First self-sustaining nuclear chain reaction demonstrated in one of the squash court under Stagg Field, University of Chicago. = 1942 +Name The Year: First "Peanuts" Comic Strip featuring Charlie Brown and Snoopy appears, in 9 newspapers = 1950 +Name The Year: Sting, musician (Police), actor (Dune) = 1951 +Name The Year: "Alfred Hitchcock Presents" premiers. = 1955 +Name The Year: First atomic power clock exhibited -- New York City. = 1956 +Name The Year: Rod Serling's "Twilight Zone" premieres on CBS. = 1959 +Name The Year: Chubby Check (musician) born. = 1941 +Name The Year: John Lennon's "Imagine" documentary premieres. = 1988 +Name The Year: Louis X (the Stubborn), king of France (1314-16) = 1289 +Name The Year: Richard Cromwell, lord protector of England (1658-59) = 1626 +Name The Year: Mexico becomes a republic. = 1824 +Name The Year: Battle of Corinth ends. = 1862 +Name The Year: The 'Orient Express' begins its first run, linking Turkey to Europe by rail. = 1883 +Name The Year: Charlton Heston, actor (Ten Commandments, Ben Hur, Planet of the Apes) = 1923 +Name The Year: The comic strip "Dick Tracy" debuts. = 1931 +Name The Year: Patty LaBelle, singer = 1944 +Name The Year: Susan Sarandon (in New York City), actor (Great Waldo Pepper) = 1946 +Name The Year: Armand Assante, actor (Q&A, Judge Dredd) = 1949 +Name The Year: "Leave It to Beaver" debuts on CBS. = 1957 +Name The Year: USSR launches Sputnik I, the first artificial earth satellite. = 1957 +Name The Year: USSR Luna 3 sent back first photos of Moon's far side. = 1959 +Name The Year: Lesotho (Basutoland) gains independence from Britain (National Day). = 1966 +Name The Year: Janis Joplin dies at age 27. = 1970 +Name The Year: 21st Space Shuttle Mission - Atlantis 1 is launched. = 1985 +Name The Year: Graham Chapman, member of the Monty Python team, dies from cancer. = 1989 +Name The Year: Gregorian calendar introduced in Italy, other Catholic countries. = 1582 +Name The Year: Louis Lumiere with brother Auguste made 1st motion picture in 1895, born. = 1864 +Name The Year: Last day of Julian calendar in Alaska. = 1867 +Name The Year: Ray Kroc Illinois, founder of MacDonalds/baseball team owner (San Diego Padres), born. = 1902 +Name The Year: Bulgaria declares independence from Turkey, Ferdinand I becomes Tsar. = 1908 +Name The Year: Portugal overthrows monarchy, proclaims republic. = 1910 +Name The Year: Present constitution of Liechtenstein comes into effect. = 1921 +Name The Year: Sir Bob Geldof pop musician (Boomtown Rats, Band Aid), born. = 1951 +Name The Year: Clive Barker, novelist (Hell Raiser) = 1952 +Name The Year: Michael Andretti Indy-car racer/Auto Hall of Fame (elected 1986), born. = 1962 +Name The Year: Lech Walesa wins the Nobel Peace Prize. = 1983 +Name The Year: Cincinnati jury acquits art gallery of obsentity (Mappelthorpe photos). = 1990 +Name The Year: Li Ta-chao cofounder with Mao Tse-tung of Chinese Communist Party, born. = 1888 +Name The Year: Thomas Edison shows his 1st motion picture. = 1889 +Name The Year: Austria annexes Bosnia and Herzegovina. = 1908 +Name The Year: Thor Heyerdahl Norway, anthropologist/explorer (Kon Tiki, Aku-Aku), born. = 1914 +Name The Year: USSR adopts experimental calendar. = 1923 +Name The Year: Chiang Kai-Shek becomes president of China. = 1928 +Name The Year: Hitler announces he has no intention of war with Britain and France. = 1939 +Name The Year: Stephanie Zimbalist NYC, actress (Remington Steele, Centennial), born. = 1956 +Name The Year: Soviet Luna 3, 1st successful photographic spacecraft, impacts Moon. = 1959 +Name The Year: Yom Kippur War begins as Syria and Egypt attack Israel. = 1973 +Name The Year: John Hathaway completes a bicycle tour of every continent in the world and cycling 50,600 miles. = 1976 +Name The Year: Pres Ford says there is "no Soviet domination in Eastern Europe". = 1976 +Name The Year: Pope John Paul II is 1st Pope to visit the White House. = 1979 +Name The Year: Anwar Sadat assassinated. = 1981 +Name The Year: Bette Davis dies at 81. = 1989 +Name The Year: Elizabeth Taylor weds for the 8th time (Larry Fortensky). = 1991 +Name The Year: Turkish fleet defeated by Spanish and Italians in Battle of Lepanto. = 1571 +Name The Year: Edgar Allen Poe dies in Baltimore at 40. = 1849 +Name The Year: Niels Bohr, physicist, expanded quantum physics (Nobel 1922), born. = 1885 +Name The Year: Spain abolishes slavery in Cuba. = 1886 +Name The Year: Crete unites with Greece. = 1908 +Name The Year: Georgia Tech defeats Cumberland College 222-0 in gridiron (record). = 1915 +Name The Year: Al Martino, singer, born. = 1927 +Name The Year: First infra-red photograph, Rochester, NY. = 1931 +Name The Year: Desmond Tutu, Anglican Archbishop of South Africa (Nobel Peace Prize 1982), born. = 1931 +Name The Year: Oliver North, arms dealer, born. = 1943 +Name The Year: Dem. Rep of Germany (East) formed (National Day). = 1949 +Name The Year: U.S. forces invade Korea by crossing the 38th parallel. = 1950 +Name The Year: John Cougar Mellencamp, singer, born. = 1951 +Name The Year: Yo-Yo Ma, cellist, born. = 1955 +Name The Year: "Route 66" premiers. = 1960 +Name The Year: Motion Picture Association of America adopts film rating system. = 1968 +Name The Year: 21st Space Shuttle Mission - Atlantis 1 returns to Earth. = 1985 +Name The Year: The supernova called "Kepler's nova" is first sighted. = 1604 +Name The Year: J. Frank Duryea, with his brother, invented first auto built and operated in the US. = 1869 +Name The Year: Ejnar Hertzsprung, Danish astronomer (Hertzsprung-Russell diagram), born. = 1873 +Name The Year: Eddie Rickenbacker, aviator, born. = 1890 +Name The Year: Juan Peron, president of Argentina (1946-55, 1973-74), born. = 1895 +Name The Year: Rouben Mamoulian, movie director, born. = 1897 +Name The Year: Karl Nessler demonstrates the first 'permanent wave' for hair, in London. = 1906 +Name The Year: Sgt. Alvin York single-handedly kills 25, captures 132 Germans. = 1918 +Name The Year: Frank Herbert, sci-fi writer (Dune), born. = 1920 +Name The Year: Ozzie and Harriet Nelson married. = 1935 +Name The Year: David Carradine, actor (Kung fu, Death Race 2000), born. = 1940 +Name The Year: Chevy Chase, comedian, actor (SNL, Vacation, Fletch, Caddyshack), born. = 1943 +Name The Year: "Adventures of Ozzie and Harriet" debut on CBS radio. = 1944 +Name The Year: President Truman announced atomic bomb secret shared with Britain and Canada. = 1945 +Name The Year: Sigourney Weaver (in Los Angeles), actor (Aliens, GhostBusters), born. = 1949 +Name The Year: Johnny Ramone, rock guitarist, born. = 1951 +Name The Year: N. Korea reports 100% election turnout, 100% vote for Workers' Party. = 1962 +Name The Year: Soviet author Alexander I. Solzhenitsyn awarded Nobel Prize for Lit. = 1970 +Name The Year: Kenneth Warby sets world speed record on water (514 kph). = 1978 +Name The Year: Pres. Reagan greeted predecessors Jimmy Carter, Gerald R. Ford and Richard Nixon before their trip to Egypt for Anwar Sadat's funeral. = 1981 +Name The Year: OJ Simpson acquitted for double murder of his Ex-wife Nicole Brown Simpson and Ronald Goldman. = 1995 +Name The Year: Husain ibn 'Ali, Shi'i religious leader, enters martyrdom. = 680 +Name The Year: Leif Ericson discovers "Vinland" (possibly America). = 1000 +Name The Year: Korean Hangual alphabet devised. = 1446 +Name The Year: Miguel de Cervantes, novelist (Don Quixote), born. = 1547 +Name The Year: Charles X, king of France (1824-30); deposed, born. = 1757 +Name The Year: Jacques Tati, director (Traffic, Playtime, My Uncle), born. = 1908 +Name The Year: John Lennon, rocker/Beatle, born. = 1940 +Name The Year: John Entwistle, rocker (The Who), born. = 1944 +Name The Year: Peter Tosh, Jamaica, reggae musician, born. = 1944 +Name The Year: 1st electric blanket manufactured; sold for US$39.50. = 1946 +Name The Year: Scott Bakula, actor (Quantum Leap, The Invaders), born. = 1954 +Name The Year: Tanganyika becomes independent within the British Commonwealth. = 1961 +Name The Year: Volcano eruptions on Tristan de Cunha (South Atlantic). = 1961 +Name The Year: Uganda becomes a republic within the British Commonwealth. = 1963 +Name The Year: Che Guevara executed in Bolivia. = 1967 +Name The Year: Khmer Republic (Cambodia) declares independence. = 1970 +Name The Year: Elvis and Priscilla Presley divorce after 6 years. = 1973 +Name The Year: Saddam threatens to hit Israel with a new missile. = 1990 +Name The Year: Henry Cavendish, English physicist, chemist = 1731 +Name The Year: Giuseppe Verdi, composer of operas (Rigoletto, Aida, Otello), born. = 1813 +Name The Year: Emily Dickinson, poet, born. = 1830 +Name The Year: Neptune's moon Triton discovered by William Lassell. = 1846 +Name The Year: Fridtjof Nansen, Norwegian Arctic explorer, humanitarian (Nobel 1922), born. = 1861 +Name The Year: Griswold Lorillard wears the first dinner jacket to the Autumn Ball in Tuxedo Park. Thus the name 'tuxedo.' = 1886 +Name The Year: Ivo Andric, Yugoslav novelist (Bridge on the Drina) (Nobel '61), born. = 1892 +Name The Year: Lin Yi-t'ang, Chinese writer (My Country and My People), born. = 1895 +Name The Year: China Revolutionaries under Sun Yat-sen overthrew Manchu dynasty. = 1911 +Name The Year: Pacific and Atlantic mix as engineers blow Gamboa Dam, opening the Panama Canal. = 1913 +Name The Year: James Clavell, author (Shogun, Tai Pan, King Rat, Noble House, Whirlwind), born. = 1924 +Name The Year: Harold Pinter, playwright, born. = 1930 +Name The Year: First synthetic detergent for home use marketed. = 1933 +Name The Year: George Gershwin's "Porgy and Bess" opened in New York City. = 1935 +Name The Year: Germany completed annexation of Czechoslovakia's Sudetenland. = 1938 +Name The Year: Chiang Kai-shek took the oath of office as president of China. = 1943 +Name The Year: Ben Vereen, dancer, actor, singer, born. = 1946 +Name The Year: David Lee Roth, rocker, born. = 1955 +Name The Year: Treaty banning atmospheric nuclear tests signed by US, UK, USSR. = 1963 +Name The Year: 18th Summer Olympic Games opened in Tokyo. = 1964 +Name The Year: Fiji gains independence from Britain (National Day). = 1970 +Name The Year: Israel formally signs Sinai accord with Egypt. = 1975 +Name The Year: 4,500 people die when a pair of earthquakes struck NW Algeria. = 1980 +Name The Year: Very Large Array (VLA) radio telescope network dedicated. = 1980 +Name The Year: Pope John Paul II proclaimed Rev. M Kolbe, who volunteered to die in place of another inmate at Auschwitz concentration camp, a saint. = 1982 +Name The Year: U.S. fighter jets force Egyptian plane carrying hijackers of Italian ship Achille Lauro to land in Italy, gunmen were placed in custody. = 1985 +Name The Year: Wilhelm Olbers, discoverer of asteroids Pallas and Vesta, born. = 1758 +Name The Year: The Juliana, the first steam-powered ferryboat, begins operation. = 1811 +Name The Year: Henry John Heinz, founded a prepared-foods company, born. = 1844 +Name The Year: Art Blakey, jazz drummer (Jazz Messengers), born. = 1919 +Name The Year: Pioneer 1 launched; first spacecraft launched by NASA. = 1958 +Name The Year: Pope John XXIII convenes 21st Roman Catholic ecumenical council, Vatican II, in Rome. = 1962 +Name The Year: "Saturday Night Live" premiers. = 1975 +Name The Year: Soyuz 25 returns to Earth. = 1977 +Name The Year: Cosmonauts Popov and Ryumin set space endurance record of 184 days. = 1980 +Name The Year: 200,000 gays march for civil rights in Washington. = 1987 +Name The Year: Edward VI king of England (1547-53), born. = 1537 +Name The Year: Pedro I 1st emperor of Brazil (1822-31), king of Portugal, born. = 1798 +Name The Year: Elmer A Sperry inventor (gyrocompass), born. = 1860 +Name The Year: Matsuo Basho greatest Japanese haiku poet, dies. = 1694 +Name The Year: Charles Macintosh of Scotland begins selling raincoats (Macs). = 1823 +Name The Year: Robert E Lee General of the Confederate Army, dies at 63. = 1870 +Name The Year: Luciano Pavarotti Moderna Italy, operatic tenor (Oh Giorgio), born. = 1935 +Name The Year: Launch of Voskhod 1, 1st 3 man crew (Komarov, Feokistov, Yegorov). = 1964 +Name The Year: 19th modern Olympic games opens in Mexico City. = 1968 +Name The Year: Equatorial Guinea gains independence from Spain (National Day). = 1968 +Name The Year: Hua Guo-feng succeeds Mao Tse-tung as chairman of Communist Party. = 1976 +Name The Year: Representatives of Israel and Egypt open talks in Washington. = 1978 +Name The Year: IRA bombs hotel where Margaret Thatcher is staying. = 1984 +Name The Year: Ed Sullivan TV host (Ed Sullivan Show), dies at 73. = 1974 +Name The Year: Washington lays cornerstone of the Executive Mansion (White House). = 1792 +Name The Year: Yves Montand, France, actor/singer (Z, Napoleon), born. = 1921 +Name The Year: Lenny Bruce comedian, arrested on obsenity charges, born. = 1925 +Name The Year: Margaret Thatcher, (Tory) British PM (1979-90), Iron Lady, born. = 1925 +Name The Year: Paul Simon, singer (Kodachrome, Graceland), born. = 1942 +Name The Year: Italy declares war on former ally Germany. = 1943 +Name The Year: US 1st army begins battle of Aachen. = 1944 +Name The Year: "Beatlemania" is coined after the Beatles appear at the Palladium. = 1963 +Name The Year: Soyuz 8 is launched. = 1969 +Name The Year: 1st military use of trained dolphins (US Navy in Persian Gulf). = 1987 +Name The Year: Battle of Hastings, in which William the Conqueror wins England. = 1066 +Name The Year: Trial of Mary, Queen of Scots, for conspiracy against Queen Elizabeth I, begins. = 1586 +Name The Year: James II, king of England (1685-88), born. = 1633 +Name The Year: George Grenville, British prime minister (1763-65), born. = 1712 +Name The Year: British arrest Irish nationalist Daniel O'Connell for conspiracy. = 1843 +Name The Year: George Eastman patents paper-strip photographic film. = 1884 +Name The Year: e e cummings, poet, born. = 1894 +Name The Year: Lillian Gish, silent film and stage actor (Birth of a Nation), born. = 1896 +Name The Year: Theodore Roosevelt is shot in the chest in Milwaukee while campaigning for President with the Bull Moose Party. = 1912 +Name The Year: Roger Moore, actor, (The Saint, numerous James Bond movies), born. = 1926 +Name The Year: German Field Marshal Erwin Rommel commits suicide rather than face trial for his part in an attempt to overthrow Hitler. = 1944 +Name The Year: Chuck Yeager pilots the world's first supersonic flight (Mach 1.015 at 12,800 m) at Muroc, CA. = 1947 +Name The Year: 14 US Communist Party leaders convicted of sedition. = 1949 +Name The Year: Joe Engle in X-15 reaches 80 km. = 1965 +Name The Year: Soyuz 23 launched to Salyut 6, but return without docking. = 1976 +Name The Year: Bing Crosby dies in Madrid, Spain. = 1977 +Name The Year: First TV movie from a TV series - "Rescue from Gilligan's Island". = 1978 +Name The Year: C Virgil (Publius Vergilius Maro) (Mantua, Italy), poet (Aeneid), born. = 70 B +Name The Year: King Henry VIII of England orders bowling lanes to be built at Whitehall, in London. = 1520 +Name The Year: Akbar, Indian Mughal emperor (1556-1605), born. = 1542 +Name The Year: Catholic countries switch to Gregorian calendar cut 10 prior days. = 1582 +Name The Year: Jean Pilftre de Rozier makes captive-balloon ascent. = 1783 +Name The Year: Jose Miguel Carrera, president of Chile (1811-14), born. = 1785 +Name The Year: Asaph Hall, astronomer, discovered the moons of Mars, Phobos and Deimos, born. = 1829 +Name The Year: Friedrich Nietzsche, philosopher, Ubermensch, born. = 1844 +Name The Year: John Kenneth Galbraith, economist, born. = 1908 +Name The Year: Arthur Schlesinger, Jr., historian, born. = 1917 +Name The Year: Mata Hari executed by firing squad outside of Paris. = 1917 +Name The Year: Mario Puzo, author (Godfather), born. = 1921 +Name The Year: LaGuardia Airport opened in New York City. = 1939 +Name The Year: Penny Marshall (in New York City), actor (Laverne and Shirley), born. = 1943 +Name The Year: Richard Carpenter, musician (Carpenters), born. = 1946 +Name The Year: Nazi Hermann Goering poisons himself in prison. = 1946 +Name The Year: "I Love Lucy" premiers. = 1951 +Name The Year: Princess Sarah 'Fergie' Ferguson, the Duchess of York, born. = 1959 +Name The Year: "The Untouchables" premiers. = 1959 +Name The Year: Kosygin and Brezhnev replace Soviet premier Nikita Krushchev. = 1964 +Name The Year: Albrecht von Haller, the father of experimental physiology = 1708 +Name The Year: Noah Webster, lexicographer = 1758 +Name The Year: Marie Antoinette beheaded in France. = 1793 +Name The Year: Dentist William T. Morton demonstrated the effectiveness of ether. = 1846 +Name The Year: Oscar (Fingal O'Flahertie Wills) Wilde (Dublin, Ireland), author (Picure of Dorian Gray), wit, dandy. = 1854 +Name The Year: Sir Austen Chamberlain, British foreign secretary (Nobel 1925) = 1863 +Name The Year: A hotel in Boston becomes the first to have indoor plumbing. = 1869 +Name The Year: Eugene O'Neill, playwright (Desire Under the Elms) (Nobel 1936) = 1888 +Name The Year: Enver Hoxha, post-war leader of Albania = 1908 +Name The Year: Margaret Sanger opens the first public birth control clinic (Brooklyn, NY). = 1916 +Name The Year: Disney Co. founded. = 1923 +Name The Year: Angela Lansbury, actor (Sweeney Todd; Murder, She Wrote) = 1925 +Name The Year: Gunter Grass, German novelist, poet (The Tin Drum) = 1927 +Name The Year: World Food Day. = 1945 +Name The Year: Ten Nazi leaders hanged as war criminals after Nuremberg trials. = 1946 +Name The Year: Cuban missile crisis began as JFK becomes aware of missiles in Cuba. = 1962 +Name The Year: China becomes world's 5th nuclear power. = 1964 +Name The Year: Anwar Sadat elected president of Egypt, succeeding Gamal Abdel Nasser. = 1970 +Name The Year: Kissinger and Le Duc Tho jointly awarded Nobel peace prize. = 1973 +Name The Year: Soyuz 23 returns to Earth. = 1976 +Name The Year: Polish Cardinal Karol Wojtyla elected supreme pontiff-Pope John Paul II. = 1978 +Name The Year: Israel's General Moshe Dayan dies at 66. = 1981 +Name The Year: Mt Palomar Observatory first to detect Halley's comet on 13th return. = 1982 +Name The Year: Shultz warns US will withdraw from UN if they vote to exclude Israel. = 1982 +Name The Year: Anglican Bishop Desmond Tutu named Nobel Peace Prize winner. = 1984 +Name The Year: Intel introduces 32-bit 80386 microcomputer chip. = 1985 +Name The Year: 18-month-old Jessica McClure is rescued 58 hours after she fell 22 feet into a well shaft in Midland, TX. = 1987 +Name The Year: 175-kph winds cause blackout in London, much of southern England. = 1987 +Name The Year: Jazz drummer Art Blakey dies. = 1990 +Name The Year: Columbus sights the isle of San Salvador. = 1492 +Name The Year: Marie Antoinette executed. = 1793 +Name The Year: Alexandrine-Pieternella-Franoise Tinn, explored the White Nile, born. = 1835 +Name The Year: Gustav Kirchoff, discoverer of the laws of spectroscopy, dies. = 1887 +Name The Year: Arthur Miller, playwright (Death of a Salesman, The Crucible), born. = 1915 +Name The Year: Rita Hayworth (in New York), actor, alzheimer victim, born. = 1919 +Name The Year: Tom Poston, comedian, actor (Newhart), born. = 1921 +Name The Year: Al Capone convicted of tax evasion, sentenced to 11 years in prison. = 1931 +Name The Year: Albert Einstein arrives in the US, a refugee from Nazi Germany. = 1933 +Name The Year: William A. Anders, astronaut (Apollo 8), born. = 1933 +Name The Year: Robert 'Evel' Knievel, motorcycle daredevil, born. = 1938 +Name The Year: Juan Peron becomes dictator of Argentina. = 1945 +Name The Year: Margot Kidder (in Yellowknife), actor (Superman), born. = 1948 +Name The Year: George Wendt, actor (Cheers), born. = 1949 +Name The Year: Britain's Queen Elizabeth and Prince Philip visit the White House. = 1957 +Name The Year: Pete Knight in X-15 reaches 85 km about Earth. = 1967 +Name The Year: Soyuz 7 returns to Earth. = 1969 +Name The Year: The Arab oil embargo begins. It will last until March, 1974. = 1973 +Name The Year: Mother Teresa of India was awarded the Nobel Peace Prize. = 1979 +Name The Year: Danes defeat Saxons at Battle of Assandun (Ashingdon). = 1016 +Name The Year: Louis XIV revokes Edict of Nantes, outlaws Protestantism, hastens onset of French Revolution. = 1685 +Name The Year: Treaty of Aix-la-Chapelle, ends War of Austrian Succession. = 1748 +Name The Year: In a NY bar decorated with bird tail, customer orders "cock tail". = 1776 +Name The Year: US takes formal possession of Alaska from Russia ($7.2 million). = 1867 +Name The Year: Belgium annexes Congo Free State. = 1908 +Name The Year: Comte de Lambert of France sets airplane altitude record of 300 m. = 1909 +Name The Year: British Broadcasting Corporation (BBC) established. = 1922 +Name The Year: Chuck Berry, St Louis, USA, rocker (Roll over Beethoven), born. = 1926 +Name The Year: Thomas Alva Edison inventor, dies in West Orange, NJ, at 84. = 1931 +Name The Year: Lee Harvey Oswald, JFK's assassin, born. = 1939 +Name The Year: Soviet troops invade Czechoslovakia during WW II. = 1944 +Name The Year: Pam Dawber Detroit, actress (Mindy-Mork and Mindy), born. = 1951 +Name The Year: Martina Navratilova, Prague, Czech Republic, tennis champion (Wimbeldon 1989,79,82-87), born. = 1956 +Name The Year: Jean-Claude Van Damme, Belgium, actor (Kickboxer, No Retreat) = 1958 +Name The Year: Wynton Marsalis, New Orleans La, jazz trumpeter (Grammy 1983), born. = 1961 +Name The Year: I.O.C. votes Mexico City to host 1968 Olympics. = 1963 +Name The Year: Soviet Venera 4 becomes the 1st probe to send data back from Venus. = 1967 +Name The Year: Walt Disney's "Jungle Book" is released. = 1967 +Name The Year: Police find 219 grains of cannabis resin in John and Yoko's apartment. = 1968 +Name The Year: US Olympic Committee suspends Tommie Smith and John Carlos for giving "black power" salute as a protest during victory ceremony. = 1968 +Name The Year: Napoleon begins his retreat from Moscow. = 1812 +Name The Year: Wagner's opera Tannhauser performed for 1st time. = 1845 +Name The Year: Auguste Lumiere, made 1st movie (Workers Leaving Lumiere Factory), born. = 1862 +Name The Year: World's largest gold nugget (215 kg) found in New South Wales. = 1872 +Name The Year: Tripoli (Libya) passes from Turkish to Italian control. = 1912 +Name The Year: Divine (Harris Glenn Milstead) film actor, born. = 1945 +Name The Year: John Lithgow, actor (Harry and the Hendersons, 3rd Rock From The Sun), born. = 1945 +Name The Year: UN forces entered Pyongyang, the capital of North Korea. = 1950 +Name The Year: Pres Harry S Truman formally ends state of war with Germany. = 1951 +Name The Year: France grants Mauritania independence. = 1960 +Name The Year: Martin Luther King Jr arrested in Atlanta sit-in. = 1960 +Name The Year: The US imposes an embargo on exports to Cuba. = 1960 +Name The Year: Evander Hollyfield, 2-time Heavyweight boxing champ, born. = 1962 +Name The Year: Beatles record "I Want to Hold Your Hand". = 1963 +Name The Year: Mariner 5 makes fly-by of Venus. = 1967 +Name The Year: US warships destroy 2 Iranian oil platforms in Persian Gulf. = 1987 +Name The Year: Britain bans broadcast interviews with IRA members. = 1988 +Name The Year: Battle of Sekigahara sets Tokugawa clan as Japan's rulers (shoguns). = 1600 +Name The Year: Sir Christopher Wren, England, astronomer/great architect, born. = 1632 +Name The Year: Maria Theresa became ruler of Austria, Hungary and Bohemia. = 1740 +Name The Year: German Kingdom of Westphalia abolished. = 1813 +Name The Year: Arthur Rimbaud, France, poet/adventurer (Illuminations), born. = 1854 +Name The Year: Margaret Dumont, actress-Marx Brothers' foil, born. = 1889 +Name The Year: Mickey Mantle, NY Yankee home run slugger, born. = 1931 +Name The Year: William Christopher, actor (Father Mulcahy-M = A = S = H), born. = 1932 +Name The Year: Martin Landau, actor (Mission Impossible, Space 1999, Tucker), born. = 1934 +Name The Year: Revolution by workers and students in Guatemala. = 1944 +Name The Year: Tom Petty, Florida, USA, singer, born. = 1953 +Name The Year: South Africa begins trial of Nelson Mandela and 8 others on conspiracy. = 1963 +Name The Year: Herbert Hoover 31st president of US, dies in NY at 90. = 1964 +Name The Year: Jacqueline Kennedy marries Aristotle Onassis. = 1968 +Name The Year: Harlow Shapley discoverer of the Sun's position in the galaxy, dies. = 1972 +Name The Year: Britain ends suspects right to remain silent in crackdown on IRA. = 1988 +Name The Year: 3 members of 2 Live Crew acquitted on obsenity charges in Florida. = 1990 +Name The Year: Antiwar protest marches begin in 20 US cities (US-Iraq). = 1990 +Name The Year: Samuel Taylor Coleridge (in England), poet, born. = 1772 +Name The Year: U.S. Navy frigate USS Constitution, Old Ironsides, launched in Boston. = 1797 +Name The Year: Alfred Bernhard Nobel (in Stockholm, Sweden), created dynamite and Peace Prizes, born. = 1833 +Name The Year: Severe earthquake at 7:53 a.m., centered in Hayward, Calif. = 1868 +Name The Year: Thomas Edison commercially perfects the light bulb. = 1879 +Name The Year: Sir Georg Solti, conductor, born. = 1912 +Name The Year: Martin Gardner, Scientific American math and puzzles columnist, born. = 1914 +Name The Year: Dizzy Gillespie, trumpeter, a creator of modern jazz, born. = 1917 +Name The Year: Margaret Owen sets world typing speed record of 170 wpm for 1 min. = 1918 +Name The Year: Deutsches Museum, Munich, first Walther Bauersfeld's Zeiss Planetarium. = 1923 +Name The Year: Manfred Mann, musician, born. = 1940 +Name The Year: US troops captured Aachen, first large German city to fall (WW II). = 1944 +Name The Year: Women in France allowed to vote for the first time. = 1945 +Name The Year: Facsimile high-speed radio transmission demonstrated, Washington DC. = 1948 +Name The Year: Carrie Fisher (in Beverly Hills), actor (Star Wars, Blues Brothers), born. = 1956 +Name The Year: Guggenheim Museum, designed by Frank Lloyd Wright, opens in New York. = 1959 +Name The Year: JFK and Nixon clashed in 4th and final pres debate. = 1960 +Name The Year: Ejnar Hertzsprung, Danish astrophysicist dies at 94. = 1967 +Name The Year: Thousands opposing Vietnam War tried to storm the Pentagon. = 1967 +Name The Year: Venera 9, first craft to orbit the planet Venus launched. = 1975 +Name The Year: US recalls William Bowdler, ambassador to South Africa. = 1977 +Name The Year: Steve Jones runs Chicago Marathon in world record 2 h 8 m 5 s. = 1984 +Name The Year: B.C. Universe created at 8:00 PM, according to the 1650 pronouncement of Anglican archbishop James Usher. = 4004 +Name The Year: Andre-Jacques Garnerin makes the first parachute jump from a balloon (Paris, France). = 1797 +Name The Year: Franz Liszt (in Hungary), Romantic composer, virtuoso pianist, born. = 1811 +Name The Year: John Reed, journalist who reported on Mexican, Russian revolutions, born. = 1887 +Name The Year: Timothy Leary, psychologist, drug testing advocate, born. = 1920 +Name The Year: Charles "Pretty Boy" Floyd shot dead by FBI in Ohio. = 1934 +Name The Year: Christopher Lloyd, actor (Taxi, Star Trek III, Back to the Future, Addams Family), born. = 1938 +Name The Year: Annette Funichello (in Utica, NY), mouseketeer, actor, born. = 1942 +Name The Year: Catherine Deneuve (in Paris, France), (Repulsion), born. = 1943 +Name The Year: Jeff Goldblum, actor (The Fly, Silverado, Buckaroo Bonzai, ID4), born. = 1952 +Name The Year: Laos gains full independence from France. = 1953 +Name The Year: West Germany joins North Atlantic Treaty Organization (NATO). = 1954 +Name The Year: JFK imposes naval blockade on Cuba, beginning missile crisis. = 1962 +Name The Year: Apollo 7 returns to Earth. = 1968 +Name The Year: Security Council Resol 338 - a cease fire to the Yom Kippur War. = 1973 +Name The Year: Soviet spacecraft Venera 9 lands on Venus. = 1975 +Name The Year: Deposed Shah of Iran arrived in NY for medical treatment. = 1979 +Name The Year: Walt Disney World's 100-millionth guest. = 1979 +Name The Year: Nicolas Appert, inventor of food canning, bouillon tablet, born. = 1752 +Name The Year: Slaves revolt in Haiti (later suppressed). = 1790 +Name The Year: Robert Bridges, poet laureate of England (The Testament of Beauty), born. = 1844 +Name The Year: Felix Bloch, U.S. physicist (Nobel 1952), born. = 1905 +Name The Year: Karl Jansky, discoverer of cosmic radio emissions in 1932, born. = 1905 +Name The Year: 25,000 women marched in NYC, demanding the right to vote. = 1915 +Name The Year: Johnny Carson, pundit (Tonight Show), born. = 1925 +Name The Year: Edison Pele, soccer player extraordinaire, born. = 1940 +Name The Year: Walt Disney's "Dumbo" is released. = 1941 +Name The Year: Michael Crichton, author (Andromeda Strain, Jurrasic Park, Rising Sun), born. = 1942 +Name The Year: During WW II, Britain launches major offensive at El Alamein, Egypt. = 1942 +Name The Year: United Nations General Assembly convenes in New York for first time in Flushing Meadow. = 1946 +Name The Year: First video recording on magnetic tape televised coast-to-coast. = 1956 +Name The Year: The ill-fated revolt in Communist Hungary starts -- The Prague Spring. It was later crushed by Soviet tanks. = 1956 +Name The Year: Soviet novelist Boris Pasternak, wins Nobel Prize for Literature. = 1958 +Name The Year: President Nixon agrees to turn over White House tape recordings. = 1973 +Name The Year: By 2/3 majority, Panamanians vote to approve the new Canal treaties. = 1977 +Name The Year: Soviet Premier Alexei Kosygin resigns, due to illness. = 1980 +Name The Year: 241 US Marines and sailors die in a terrorist suicide attack on their barracks in Beriut. = 1983 +Name The Year: 33 years after Soviet tanks crushed the Prague Spring, Hungary declares itself a republic. = 1989 +Name The Year: Jane Seymour, third wife of Henry VIII, dies. = 1537 +Name The Year: Third partition of Poland, between Austria, Prussia and Russia. = 1795 +Name The Year: The match is patented. = 1836 +Name The Year: William Lassell discovers Ariel and Umbriel, satellites of Unranus. = 1851 +Name The Year: First transcontinental telegram sent. = 1861 +Name The Year: Anna Taylor, first to go over Niagara Falls in a barrel and live. = 1901 +Name The Year: Moss Hart, playwright, born. = 1904 +Name The Year: "Black Thursday", the beginning of the stock market crash. = 1929 +Name The Year: F. Murray Abraham, actor (Amadeus, Name of the Rose), born. = 1940 +Name The Year: United Nations Charter goes into effect. = 1945 +Name The Year: Kevin Kline, actor, born. = 1947 +Name The Year: Disaster on USSR launch pad killed missle expert Nedelin and team (unconfirmed); USSR claims he was killed in plane crash. = 1960 +Name The Year: Zambia (N. Rhodesia) gains independence from Britain (National Day). = 1964 +Name The Year: Salvador Allende Gossens elected president of Chile. = 1970 +Name The Year: Yom Kippur War ends - Israel 65 miles from Cairo, 26 from Damascus. = 1973 +Name The Year: The first Jewish film and TV festival. = 1976 +Name The Year: Author Geoffrey Chaucer dies in London. = 1400 +Name The Year: Battle of Agincourt, Welsh longbow defeats the armored knight. = 1415 +Name The Year: Giovanni Cassini discovers Iapetus, satellite of Saturn. = 1671 +Name The Year: George III ascends the British throne. = 1760 +Name The Year: Johann Strauss the Younger, composer, Waltz King = 1825 +Name The Year: Georges Bizet, composer = 1838 +Name The Year: Henry Norris Russell, astronomer (Hertzsprung-Russell diagram) = 1877 +Name The Year: Pablo Picasso, doodler (Guernica) (or 10-05) = 1881 +Name The Year: Eduardo Barrios, Chilean novelist (The Love-Crazed Boy) = 1884 +Name The Year: Richard E. Byrd, polar explorer = 1888 +Name The Year: Marion Ross (in Minnesota), actor (Played Mrs. Cunningham in Happy Days) = 1928 +Name The Year: Russell L. (Rusty) Schweickart, astronaut (Apollo 9) = 1935 +Name The Year: Nylon stockings go on sale in the U.S. for the first time. = 1939 +Name The Year: Helen Reddy (in Melbourne, Australia), singer (I am Woman) = 1941 +Name The Year: First electronic wrist watch placed on sale, NY city. = 1960 +Name The Year: UN General Assembly admits Mainland China and expels Taiwan. = 1971 +Name The Year: USSR Venera 10 made day Venus landing. = 1975 +Name The Year: US invades Grenada, a country with 1/2000 its population. = 1983 +Name The Year: King Alfred the Great, dies. = 901 +Name The Year: Worldwide Red Cross organized in Geneva. = 1863 +Name The Year: Football Association forms in England, standardizing soccer. = 1863 +Name The Year: Leon Trotsky, Russian revolutionary (pres of 1st Soviet), born. = 1879 +Name The Year: Prince Ito of Japan is assassinated by a Korean. = 1909 +Name The Year: Felix the Cat, cartoon character, born. = 1917 +Name The Year: Mohammad Reza Pahlavi Aryamehr, Shah of Iran (1941-79), born. = 1919 +Name The Year: Bob Hoskins, Suffolk, England, actor (Brazil, Who Framed Roger Rabbit?), born. = 1942 +Name The Year: Jaclyn Smith, actress (Charlie's Angel, Nightkill), born. = 1947 +Name The Year: Ngo Dinh Diem proclaims Vietnam a republic with himself as president. = 1955 +Name The Year: USSR fires defense minister, Marshal Georgi Zhukov (Zhukov lead USSR into Berlin during WW2). = 1957 +Name The Year: Cary Elwes, actor (Glory, Princess Bride, Robin Hood - Men In Tights), born. = 1962 +Name The Year: Shah of Iran crowns himself after 26 years on Peacock Throne. = 1967 +Name The Year: Guided tours of Alcatraz (by Park Service) begin. = 1972 +Name The Year: Anwar Sadat became 1st Egyptian president to officially visit the US. = 1975 +Name The Year: Transkei gains independence, not recognized outside of South Africa. = 1976 +Name The Year: Trinidad and Tobago becomes a republic. = 1976 +Name The Year: Park Chung-hee South Korean President is assassinated. = 1979 +Name The Year: Head of El Salvadoran Human Rights Comm assassinated by death squads. = 1987 +Name The Year: US-Soviet effort free 2 grey whales from frozen Arctic. = 1988 +Name The Year: James Cook, captain/explorer, discovered Sandwich Islands and led First Fleet to Australia, born. = 1728 +Name The Year: Niccolo Paganini, Genoa, Italy, composer/violin virtuoso (Princess Lucca), born. = 1782 +Name The Year: Theodore Roosevelt 26th President of US (1901-09) (Nobel 1906), born. = 1858 +Name The Year: Emily Post authority on social behavior, writer (Etiquette), born. = 1872 +Name The Year: Dylan Thomas, Swansea, Wales, poet (Child's Christmas in Wales), born. = 1914 +Name The Year: Roy Lichtenstein, Pop art painter; painted comic book panels, born. = 1923 +Name The Year: The Uzbek SSR forms. = 1924 +Name The Year: DuPont announces its new synthetic fiber will be called "nylon". = 1938 +Name The Year: John Cleese comedian/actor (Monty Python, Fawlty Towers), born. = 1939 +Name The Year: "You Bet Your Life", with Groucho Marx, premieres on American ABC radio. = 1947 +Name The Year: Simon Le Bon, rocker (Duran Duran), born. = 1958 +Name The Year: Outer Mongolia and Mauritania become the 102nd and 103rd members of UN. = 1961 +Name The Year: St Vincent and the Grenadines gains associated status with Britain. = 1969 +Name The Year: Republic of the Congo becomes Republic of Zaire. = 1971 +Name The Year: St Vincent and the Grenadines becomes independent of UK (Nat'l Day). = 1979 +Name The Year: Voluntary Euthanasia Society publishes how-to-do-it suicide guide. = 1979 +Name The Year: China announces its population at 1 billion people plus. = 1982 +Name The Year: South Korean voters overwhelmingly approved a new constitution. = 1987 +Name The Year: Larry Flynt paid hitman $1M to kill Hefner, Guccione and Sinatra. = 1988 +Name The Year: Henry III, Holy Roman emperor (1046-56) = 1017 +Name The Year: Columbus arrives in Cuba. = 1492 +Name The Year: Cornelius Otto Jansen of France, Roman Catholic reform leader = 1585 +Name The Year: Harvard College, first US college founded. = 1636 +Name The Year: Eli Whitney applies for patent for the cotton gin. = 1793 +Name The Year: Cornelius Otto Jansen of France, Roman Catholic reform leader = 1585 +Name The Year: St. Louis Police try a new investigation method - fingerprints. = 1904 +Name The Year: Dr. Jonas Salk, who made polio a fear of the past = 1914 +Name The Year: Czechoslovakia declares independence from Austria. = 1918 +Name The Year: Walther Bauersfeld, invented first modern projection planetarium = 1919 +Name The Year: Volstead Act passed by U.S. Congress, starting Prohibition. = 1919 +Name The Year: Benito Mussolini takes control of Italy's government. = 1922 +Name The Year: First child born in aircraft, Miami, Fl. = 1929 +Name The Year: Gennadi M. Strekalov, Soviet cosmonaut (Soyuz T-3, T-8, T-11) = 1940 +Name The Year: German rocket engineers begin work in USSR. = 1946 +Name The Year: The flag of Israel is adopted. = 1948 +Name The Year: Pope Paul VI proclaims Jews not collectively guilty for crucifixion. = 1965 +Name The Year: US/USSR signed an agreement to discuss joint space efforts. = 1970 +Name The Year: England becomes 6th nation to have a satellite (Prospero) in orbit. = 1971 +Name The Year: BC Babylon falls to Cyrus the Great of Persia. = 539 +Name The Year: Sir Walter Raleigh is executed in London. = 1618 +Name The Year: Edmund Halley (in London), sky watcher, namesake of Halley's Comet, born. = 1656 +Name The Year: Pennsylvania granted to William Penn by King Charles II. = 1682 +Name The Year: Severe earthquake in New England. = 1727 +Name The Year: James Boswell (in Scotland), Samuel Johnson's biographer, born. = 1740 +Name The Year: International Committee of the Red Cross is founded (Nobel 1917, 1944, 1963). = 1863 +Name The Year: Guillermo Valencia, Colombian poet, translator, statesman, born. = 1873 +Name The Year: Marie, queen consort of Ferdinand I of Rumania, born. = 1875 +Name The Year: Bela Lugosi, horror actor (Dracula, Body Snatcher), born. = 1884 +Name The Year: Paul Joseph Goebbels, Nazi propagandist, born. = 1897 +Name The Year: Turkey is proclaimed to have a republican government. = 1923 +Name The Year: "Black Tuesday", the Stock Market crash. = 1929 +Name The Year: Golden Gate International Exposition closes (first closure). = 1939 +Name The Year: Israeli paratroopers drop into the Sinai to open Straits of Tiran. = 1956 +Name The Year: Richard Dreyfuss, actor (Jaws, Close Encounters of the Third Kind), born. = 1947 +Name The Year: Kate Jackson (in Alabama), actor (Charley's Angels, Making Love), born. = 1948 +Name The Year: Star of India and other jewels are stolen in NY. = 1964 +Name The Year: 8th and last crusade is launched. = 1270 +Name The Year: Richard Brinsley Sheridan, playwright (Rivals, School for Scandal) = 1632 +Name The Year: US Navy is created. = 1775 +Name The Year: Francisco Madero, Mexican revolutionary, president (1911-13) = 1873 +Name The Year: Ezra Pound (in Hailey, Idaho) = 1885 +Name The Year: Ruth Gordon (in Mass.), actor (Rosemary's Baby, Harold and Maude) = 1896 +Name The Year: Tsar Nicholas II grants Russia a constitution. = 1905 +Name The Year: Fyodor Dostoevsky, author = 1918 +Name The Year: Mussolini forms cabinet in Italy. = 1922 +Name The Year: Orson Welles panics a nation with his broadcast of H. G. Wells' "War of the Worlds". = 1938 +Name The Year: Grace Slick (in Chicago, IL), singer (Jefferson Airplane/Starship) = 1939 +Name The Year: Talia Shire, actor (Rocky (as Adrian)) = 1943 +Name The Year: Henry Winkler, actor (Happy Days as the Fonz) = 1945 +Name The Year: Dr. Albert Schweitzer received Nobel Peace Prize for 1952. = 1953 +Name The Year: Soviet Party Congress unanimously approves a resolution removing Josef Stalin's body from Lenin's tomb in Red Square. = 1961 +Name The Year: USSR Kosmos 186 and 188 make first automatic docking. Also, Venera 13 is launched. = 1967 +Name The Year: Muhammad Ali KOs George Foreman in 8th round in Kinshasa, Zaire. = 1974 +Name The Year: 22nd Space Shuttle Mission, Challenger 9, is launched carrying eight crewmen (2 Germans, 1 Dutch). = 1985 +Name The Year: Martin Luther posts his 95 Theses, begins Protestant Reformation. = 1517 +Name The Year: Jan Vermeer (in Holland), painter (Procuress, The Astronomer) = 1632 +Name The Year: John Keats, Romantic poet = 1795 +Name The Year: Sir Humphrey Davy of London patents the miner's safety lamp. = 1815 +Name The Year: William Parson, third Earl of Rosse and maker of large telescopes dies. = 1865 +Name The Year: Benito Mussolini (Il Duce) becomes premier of Italy. = 1922 +Name The Year: Erich Weiss, better known as Magician Harry Houdini, dies. = 1926 +Name The Year: Michael Collins, astronaut (Gemini 10, Apollo 11) = 1930 +Name The Year: Michael Landon, actor = 1936 +Name The Year: Jane Pauley (in Indianapolis, IN), newcaster for CNN = 1950 +Name The Year: John Candy, actor (Second City TV, Splash, Blues Brothers) = 1950 +Name The Year: First thermonuclear bomb detonated - Marshall Islands. = 1952 +Name The Year: Lee Harvey Oswald announces in Moscow he will never return to U.S. = 1959 +Name The Year: U.S. President Johnson orders a halt to all bombing of North Vietnam. = 1968 +Name The Year: Adrian IV only English pope (1154-59), dies (birth date unknown). = 1159 +Name The Year: Jacques Cartier French explorer, dies (birth date unknown). = 1557 +Name The Year: Great London Fire begins in Pudding Lane. 80% of London is destroyed. = 1666 +Name The Year: Louis XIV the great, king of France (1643-1715), dies at 76. = 1715 +Name The Year: RC Carrington and R Hodgson make 1st observation of solar flare. = 1859 +Name The Year: Napoleon III captured at Sedan. = 1870 +Name The Year: Sydney General Post Office opens. = 1874 +Name The Year: Edgar Rice Burroughs, novelist (Tarzan, John Carter Of Mars Saga), born. = 1875 +Name The Year: St Petersburg, Russia changes name to Petrograd. = 1914 +Name The Year: Yvonne De Carlo, Vancouver BC, actress (Lily Munster in the Munsters), born. = 1922 +Name The Year: Rocky Marciano, heavyweight champion boxer (1952-56), born. = 1923 +Name The Year: Albania becomes a kingdom, with Zogu I as king. = 1928 +Name The Year: Physical Review publishes 1st paper to deal with black holes. = 1939 +Name The Year: WW II starts, Germany invades Poland, takes Danzig. = 1939 +Name The Year: Japan surrenders ending WW II (US date, 9/2 in Japan). = 1945 +Name The Year: UN's World Health Organization forms. = 1948 +Name The Year: US, Australia and New Zealand sign ANZUS treaty. = 1951 +Name The Year: Gloria Estefan, Cuba, singer, born. = 1957 +Name The Year: 10,000 die in an earthquake in western Iran. = 1962 +Name The Year: UN announces Earth population has hit 3 billion. = 1962 +Name The Year: Libyan revolution, Col Moammar Gadhafi deposes King Idris. = 1969 +Name The Year: Qatar declares independence from Britain. = 1971 +Name The Year: Pioneer 11 makes 1st fly-by of Saturn, discovers new moon, rings. = 1979 +Name The Year: Palestinian Liberation Organization leaves Lebanon. = 1982 +Name The Year: Korean Boeing 747 strays into Siberia and is shot down by a Soviet jet. = 1983 +Name The Year: BC Phidippides runs first marathon, to announce the victory of Sparta over Persia. = 490 +Name The Year: C Battle of Actium; Octavian defeats Mark Antony and becomes Emperor Augustus. = 31 B +Name The Year: The Mayflower sets sail from Plymouth with 102 Pilgrims. = 1620 +Name The Year: Great Fire of London starts; destroys St. Paul's Church. = 1666 +Name The Year: Last day of Julian calendar in Britain, British colonies. = 1752 +Name The Year: K. L. Harding discovers Juno, third known asteroid. = 1804 +Name The Year: Queen Liliuokalani, last queen of Hawaii (1891-93) = 1838 +Name The Year: Wilhelm Ostwald, German physical chemist (Nobel 1909) = 1853 +Name The Year: Lord Kitchener retakes Sudan for Britain. = 1898 +Name The Year: First transatlantic round-trip air flight. = 1936 +Name The Year: Vietnam declares independence from France (National Day). = 1945 +Name The Year: V-J Day; formal surrender of Japan aboard USS Missouri. = 1945 +Name The Year: Jimmy Connors, tennis player = 1952 +Name The Year: St Gregory I begins his reign as Catholic Pope. = 590 +Name The Year: England's King Richard I (the Lion-Hearted) crowned in Westminster. = 1189 +Name The Year: Nicolo Amati, Italy, violin maker (Stradivari and Guarneri), born. = 1596 +Name The Year: James I king of England (1603-25), dies at 92. = 1658 +Name The Year: Lord Oliver Cromwell British king (1653-58), dies at 59. = 1658 +Name The Year: Charles X, Versailles, France, Duke of Prussia, born. = 1757 +Name The Year: British annex Natal (South Africa). = 1900 +Name The Year: Cardinal Giacome della Chiesa becomes Pope Benedict XV. = 1914 +Name The Year: Allies turned back Germans in WW I's Battle of Verdun. = 1916 +Name The Year: Britain declares war on Germany. France follows 6 hours later quickly joined by Australia, New Zealand, South Africa and Canada. = 1939 +Name The Year: Pauline Collins, London England, actress (Shirley Valentine), born. = 1940 +Name The Year: US gives Britain 50 destroyers in exchange for Newfoundland base lease. = 1940 +Name The Year: Allies invade Italy. = 1943 +Name The Year: Japanese forces in the Philippines surrender to Allies. = 1945 +Name The Year: Pope Pius X canonized a saint. = 1954 +Name The Year: e. e. cummings poet, dies at 67. = 1962 +Name The Year: Charlie Sheen, actor (Wall St, Platoon), born. = 1965 +Name The Year: Ho Chi Minh North Vietnamese president, dies. = 1969 +Name The Year: Qatar regains complete independence from Britain. = 1971 +Name The Year: Viking 2 soft lands on Mars (Utopia), returns photos. = 1976 +Name The Year: Crew of Soyuz 31 returns to Earth aboard Soyuz 29. = 1978 +Name The Year: Frank Capra director (It's a Wonderful Life), dies at 94. = 1991 +Name The Year: Romulus Augustulus, last Roman emperor in west, is deposed. = 476 +Name The Year: Navigator Henry Hudson discovered the island of Manhattan. = 1609 +Name The Year: Francois Ren, de Chateaubriand, French poet, novelist, statesman = 1768 +Name The Year: Los Angeles founded in the Valley of Smokes (Indian Name). = 1781 +Name The Year: Marcus Whitman, missionary = 1802 +Name The Year: Anton Bruckner (in Austria), Wagner disciple = 1824 +Name The Year: The first newsboy in the US hired (Barney Flaherty), by the NY Sun. = 1833 +Name The Year: Daniel Burnham, American architect, built skyscrapers = 1846 +Name The Year: French republic proclaimed. = 1870 +Name The Year: Darius Milhaud, composer = 1872 +Name The Year: Geronimo, Apache indian, finally surrenders ending last major US-Indian war. = 1886 +Name The Year: George Eastman patents first rollfilm camera and registers Kodak. = 1888 +Name The Year: Paul Osborn, playwright = 1901 +Name The Year: Richard Wright, American author (Native Son, Uncle Tom's Children) = 1908 +Name The Year: Garros sets world altitude record of 4,250 m (13,944 ft). = 1911 +Name The Year: Henry Ford II, businessman = 1917 +Name The Year: Last day of Julian civil calendar (in parts of Bulgaria). = 1920 +Name The Year: Tom Watson, Golfer = 1949 +Name The Year: Ford Motor Co. introduced the Edsel! (Oh boy !) = 1957 +Name The Year: NASA launches its first Orbital Geophysical Observatory (OGO-1) = 1964 +Name The Year: George Harrison releases "My Sweet Lord" single. = 1970 +Name The Year: American swimmer Mark Spitz becomes the first athlete to win seven olympic gold medals. = 1972 +Name The Year: Iraqi troops seized Iranian territory in a border dispute. = 1980 +Name The Year: Louis VIII [Coeur-de-Lion] king of France (1223-26), born. = 1187 +Name The Year: Louis XIV the great, king of France (1643-1715), born. = 1638 +Name The Year: Jesse James Missouri, outlaw, born. = 1847 +Name The Year: Sam Houston elected president of the Republic of Texas. = 1836 +Name The Year: France proclaims a protectorate over Chad. = 1900 +Name The Year: Raquel Welch Chic (Myra Breckenridge, 1,000,000 BC, 100 Rifles), born. = 1940 +Name The Year: Freddie Mercury, singer, born. = 1946 +Name The Year: 1st color video recording on magnetic tape presented, Charlotte North Carolina, USA. = 1958 +Name The Year: Cassius Clay captures the olympic light heavyweight gold medal. = 1960 +Name The Year: 11 Israeli athletes are slain at Munich Olympics. = 1972 +Name The Year: Iraqi Pres Saddam Hussein urges Arabs to rise against the West. = 1990 +Name The Year: US trial of former Panamanian leader Manuel Noriega begins. = 1991 +Name The Year: Pilgrims set sail from Plymouth England to the New World. = 1620 +Name The Year: James II king of England (1685-88), dies at 68. = 1701 +Name The Year: Pres William McKinley assassinated by Leon Czologosz in Buffalo, New York. = 1901 +Name The Year: Roger Waters, singer (Pink Floyd), born. = 1947 +Name The Year: Juliana becomes queen of the Netherlands. = 1948 +Name The Year: Michael Winslow, actor/comedian (Police Academy), born. = 1960 +Name The Year: "Star Trek" premiers on NBC TV. = 1966 +Name The Year: Dr Verwoerd South African PM, assassinated in assembly. = 1966 +Name The Year: Swaziland gains independence from Britain (National Day). = 1968 +Name The Year: USSR recognizes independence of the 3 Baltic republics (Estonia, Lithuania and Latvia). = 1991 +Name The Year: Queen Elizabeth I England, (1558-1603) daughter of Henry VIII, born. = 1533 +Name The Year: Treaty of Baden-French retain Alsace, Austria gets right bank of Rhine. = 1714 +Name The Year: Francois-Andre Philidor, France, chess champion/musician, born. = 1726 +Name The Year: Brazil declares independence from Portugal (National Day). = 1822 +Name The Year: Geo Ligowsky patents device to throw clay pigeons for trapshooters. = 1880 +Name The Year: Anthony Quayle England, actor (Anne of 1000 Days, Lawrence of Arabia), born. = 1913 +Name The Year: James Van Allen, discovered Van Allen radiation belts, born. = 1914 +Name The Year: Buddy Holly singer (Peggy Sue, That'll Be the Day), born. = 1936 +Name The Year: Gloria Gaynor Newark NJ, disco singer (I Will Survive), born. = 1949 +Name The Year: Chrissie Hynde, rocker (Pretenders), born. = 1950 +Name The Year: Corbin Bernsen North Hollywood Calif, actor (Arnie Becker-LA Law), born. = 1954 +Name The Year: Desmond Tutu installed to lead south African Anglican Church. = 1986 +Name The Year: Monica Seles wins the US Open. = 1991 +Name The Year: Clement III 1st antipope (1084-1100), dies (birth date unknown). = 1100 +Name The Year: Richard I [Richard the Lion Hearted], King of England (1189-99), born. = 1157 +Name The Year: Spanish navigator Juan de Elcano returns to Spain, completes 1st circumnavigation of globe, expedition begins under Ferdinand Magellan. = 1522 +Name The Year: City of Lichfield, England established. = 1553 +Name The Year: 1st permanent settlement in US forms (St Augustine, Florida). = 1565 +Name The Year: Turkish siege of Malta broken by Maltese and Knights of St John. = 1565 +Name The Year: Antonin Dvorak, Nelahozeves, Czechoslovakia, composer (New World Symphony), born. = 1841 +Name The Year: Peter Sellers England, actor (Pink Panther, Being There, Goon Show), born. = 1925 +Name The Year: 1st Miss America crowned (Margaret Gorman of Washington DC). = 1921 +Name The Year: Alexandra Kollontai of Russia becomes 1st woman ambassador. = 1924 +Name The Year: 1st appearance of the comic strip "Blondie". = 1930 +Name The Year: Patsy Cline Va, country singer (Walkin' After Midnight), born. = 1932 +Name The Year: Franklin D. Roooseveldt declares "limited national emergency" due to war in Europe. = 1939 +Name The Year: Italy surrenders to the allies in WW II. = 1943 +Name The Year: Ernest Hemmingway's "Old Man and the Sea" published. = 1952 +Name The Year: NASA's Marshall Space Flight Center in Huntsville, Ala., dedicated by President Dwight D. Eisenhower. = 1960 +Name The Year: "Star Trek" premiers on NBC-TV. = 1966 +Name The Year: Uganda abolishes traditional tribal kingdoms, becomes a republic. = 1967 +Name The Year: 1st all Australian women's US Open final, (Margaret Court beats Yvonne Goolagong). = 1973 +Name The Year: Ellis Island Historical Site opens on Eliis Island, NYC. = 1990 +Name The Year: St Sergius I ends his reign as Catholic Pope. = 701 +Name The Year: William I The Conqueror, King of England and Duke of Normandy, dies. = 1087 +Name The Year: Battle of Flodden Fields; English defeat James IV of Scotland. = 1513 +Name The Year: Cardinal A Jean de Plessicide de Richelieu, King Louis XIII of France's chief minister, born. = 1585 +Name The Year: William Bligh nasty ship's captain and New South Wales governor (HMS Bounty), born. = 1754 +Name The Year: Continental Congress renames "United Colonies", "United States". = 1776 +Name The Year: Leo Tolstoy Russia, novelist (War and Peace, Anna Karenina), born. = 1828 +Name The Year: Frederick R Spofforth Australia, cricketer (Demon), born. = 1853 +Name The Year: Luxembourg gains independence. = 1867 +Name The Year: Harland Sanders, Kentucky Fried Chicken founder/colonel, born. = 1890 +Name The Year: EE Barnard at Lick discovers Amalthea, 5th Jupiter moon. = 1892 +Name The Year: James Hilton, hotel magnate (Hilton Hotels), born. = 1900 +Name The Year: Otis Redding, Georgia, rocker (Sitting on the Dock of the Bay), born. = 1941 +Name The Year: Roger Waters, (Pink Floyd-The Wall), born. = 1943 +Name The Year: Allied forces liberate Luxembourg from Nazis. = 1944 +Name The Year: Bulgaria liberated from Nazi control (National Day). = 1944 +Name The Year: Japanese in S Korea, Taiwan, China, Indochina surrender to Allies. = 1945 +Name The Year: People's Democratic Republic of Korea proclaimed. = 1948 +Name The Year: Michael Keaton, actor (Pacific Heights, Batman, Multiplicity), born. = 1951 +Name The Year: Dave Stewart, rocker (Eurythmics-Here Comes the Rain Again), born. = 1952 +Name The Year: Elvis Presley appears on national TV for 1st time (Ed Sullivan). = 1956 +Name The Year: Tibet is made an autonomous region of China. = 1965 +Name The Year: 1st successful test flight of a Saturn V. = 1967 +Name The Year: John Lennon releases the "Imagine" album. = 1971 +Name The Year: Viking 2 launched toward orbit around Mars, soft landing. = 1975 +Name The Year: Mao Tse-Tung, Chinese communist party chairman (1949-76), dies at 82. = 1976 +Name The Year: 1st TRS-80 computer sold. = 1977 +Name The Year: Radio Shack announces their color computer 2 (the Coco2). = 1983 +Name The Year: Bush and Gorbachev meet in Helsinki and urge Iraq to leave Kuwait. = 1990 +Name The Year: Julius III Counter-Reformation pope (1550-55), born. = 1487 +Name The Year: Simon Bolivar named president of Peru. = 1823 +Name The Year: Isaac Kauffman Funk US, publisher (Funk and Wagnalls), born. = 1839 +Name The Year: Elias Howe patents the sewing machine. = 1846 +Name The Year: Ranjitsinhji Vibhaji India, cricketer/politician, born. = 1872 +Name The Year: Fay Wray Alberta Canada, actress-King Kong's main squeeze, born. = 1907 +Name The Year: NYC welcomes home Gen John J Pershing and 25,000 WW I soldiers. = 1919 +Name The Year: Arnold Palmer golfer (PGA Golfer of the Year 1960, 1962), born. = 1929 +Name The Year: Yevgeny V Khrunov USSR, cosmonaut (Soyuz 5), born. = 1933 +Name The Year: Jose Feliciano, singer/songwriter (Light my Fire), born. = 1945 +Name The Year: Siobhan Fahey rocker (Bananarama), born. = 1957 +Name The Year: Gibraltar votes 12,138 to 44 to remain British. = 1967 +Name The Year: Guinea-Bissau gains independence from Portugal. = 1974 +Name The Year: East Germans begin their flight to the west (via Hungary and Czech). = 1989 +Name The Year: 19 year old Pete Sampras beats Andre Agassi to win the US Open. = 1990 +Name The Year: Hard Rock Cafe opens in Las Vegas Nevada. = 1990 +Name The Year: Samuel Kanyon Doe president of Liberia, assassinated. = 1990 +Name The Year: Iran agrees to resume dimplomatic ties with Iraq. = 1990 +Name The Year: Yves Montand actor (Lets Make Love, Z), dies at 70. = 1991 +Name The Year: Henry Hudson discovers Manhattan island. = 1609 +Name The Year: English, Dutch and Austrians defeat French in Battle of Malplaquet. = 1709 +Name The Year: 1st newspaper cartoon strip. = 1875 +Name The Year: David Herbert "DH" Lawrence England, writer (Lady Chatterly's Lover), born. = 1885 +Name The Year: Ferdinand Marcos Philippines Pres (1965-86), born. = 1917 +Name The Year: Valentino, Milan Italy, fashion designer (Jacquline Kennedy Onasis), born. = 1932 +Name The Year: Gherman Titov USSR, 1st man to spend a day in space (Vostok 2), born. = 1935 +Name The Year: FDR orders any Axis ship found in American waters be shot on sight. = 1941 +Name The Year: The 17th Olympic games close in Rome. = 1960 +Name The Year: Virginia Madsen Chicago Ill, actress (Dune, Highlander, Class), born. = 1961 +Name The Year: Bob Dylan's 1st NY performance. = 1961 +Name The Year: Beatles' "Help!", album goes #1 and stays #1 for 9 weeks. = 1965 +Name The Year: Nikita Khrushchev dies of a heart attack at 77. = 1971 +Name The Year: Chile's President, Salvador Allende, deposed in a military coup. = 1973 +Name The Year: Lorne Greene actor (Bonanza, Battlestar Galactica), dies at 72. = 1987 +Name The Year: Peter Tosh reggae singer shot dead at 43 in Jamacia. = 1988 +Name The Year: B.C. Athenians defeat second Persian invasion of Greece at Marathon. = 490 +Name The Year: English explorer Henry Hudson enters the Hudson River = 1609 +Name The Year: Drogheda, Ireland falls to Puritan troops; inhabitants massacred. = 1649 +Name The Year: Charles Messier observes the Crab Nebula and begins catalog. = 1758 +Name The Year: Richard Jordan Gatling, US inventor of hand-cranked machine gun, born. = 1818 +Name The Year: Charles Dudley Warner, US newspaperman, author, born. = 1829 +Name The Year: H.H. Asquith (Liberal), British prime minister (1908-16), born. = 1852 +Name The Year: Henry L. Mencken, newspaperman, critic, Baltimore's son, born. = 1880 +Name The Year: Maurice Chevalier, actor, singer (Gigi), ultimate Frenchman, born. = 1888 +Name The Year: Margaret Hamilton, actor (Wizard of Oz), played Wicked Witch of the West, born. = 1902 +Name The Year: Jesse Owens, athlete, spoiled Hitler's Olympic plans in 1936, born. = 1913 +Name The Year: Amilcar Cabral, worked for independence of Portuguese Africa, born. = 1921 +Name The Year: Stanislaw Lem, Polish science-fiction writer, born. = 1921 +Name The Year: Katharine Hepburn makes her New York stage debut in "Night Hostess." = 1928 +Name The Year: First German ship in WW2 captured by US ship (Busko). = 1941 +Name The Year: Barry White, singer, born. = 1944 +Name The Year: Khrushchev becomes First Secretary of the Communist Party. = 1953 +Name The Year: "Bonanza" premieres -- in Color. = 1959 +Name The Year: Luna 1 launched by USSR; first spacecraft to impact on the moon. = 1959 +Name The Year: "The Monkees" premieres. = 1966 +Name The Year: Gemini XI is launched. = 1966 +Name The Year: USSR launches Luna 16; returns samples from lunar Sea of Fertility. = 1970 +Name The Year: Coup overthrows Emperor Haile Selassie in Ethiopia (National Day). = 1974 +Name The Year: Death of Dante Alighieri, author of the Divine Comedy. = 1321 +Name The Year: Dante Alighieri Day. = 1583 +Name The Year: Oliver Evans, pioneered the high-pressure steam engine, born. = 1755 +Name The Year: Wolfe defeats Montcalm on Plains of Abraham; Canada becomes English. = 1759 +Name The Year: New York City becomes the capitol of the United States. = 1788 +Name The Year: Clara Wieck Schumann, German pianist, composer, born. = 1819 +Name The Year: Walter Reed, who proved mosquitoes transmit yellow fever, born. = 1851 +Name The Year: Milton S. Hershey, US chocolate manufacturer, philanthropist, born. = 1857 +Name The Year: Arnold Schoenberg, composer, born. = 1874 +Name The Year: Britain invades Egypt. = 1882 +Name The Year: First airplane flight in Europe. = 1906 +Name The Year: Barbara Bain (in Chicago, IL), actor (Mission Impossible, Space: 1999), born. = 1934 +Name The Year: Judith Martin, etiquet authority, "Miss Manners", born. = 1938 +Name The Year: Jaqueline Bisset (in England), actor (Deep), born. = 1941 +Name The Year: Oscar Arias Sanchez, president of Costa Rica (1986- ) (Nobel 1987), born. = 1941 +Name The Year: Soviet Lunik 2 becomes first human-made object to crash on moon. = 1959 +Name The Year: "Car 54 Where are You?" premieres. = 1961 +Name The Year: "The Outer Limits" premieres. = 1963 +Name The Year: Beatles release "Yesterday." = 1965 +Name The Year: IBM announces System 370 computer. = 1970 +Name The Year: 9 hostages and 28 prisoners die in take over a Attica State Prison. = 1971 +Name The Year: First TV viewer discretion warning - "Soap". = 1977 +Name The Year: Second test of the Space Shuttle Enterprise. = 1977 +Name The Year: According to South Africa, Venda gains independence. Not recognized as an independent country outside of South Africa. = 1979 +Name The Year: Princess Grace of Monaco dies at 52 in a car crash. = 1982 +Name The Year: England and colonies adopt Gregorian calendar, 11 days disappear, rioting ensues. = 1752 +Name The Year: Napoleon occupies Moscow. = 1812 +Name The Year: Ivan Pavlov, Russia, physiologist/pioneer in psychology, born. = 1849 +Name The Year: Arthur Wellesley General/Duke of Wellington, dies at 83. = 1852 +Name The Year: Lord Cecil of Chelwood, UK, helped form League of Nations (early version of the UN), born. = 1864 +Name The Year: Hal Wallis movie producer (Maltese Falcon, Barefoot in the Park), born. = 1899 +Name The Year: Henry Bliss becomes 1st automobile fatality. = 1899 +Name The Year: Provisional government of Russia established, Republic proclaimed. = 1917 +Name The Year: Graf Zeppelin II, world's largest airship, makes maiden flight. = 1938 +Name The Year: Walter Koenig Chicago Ill, actor (Chekov-Star Trek), born. = 1938 +Name The Year: Israel shoots down 13 Syrian MIG-21s. = 1973 +Name The Year: Charles Kowal discovers Leda, 13th satellite of Jupiter. = 1974 +Name The Year: Grace Kelly princess of Monaco, dies at 52 in a car crash. = 1982 +Name The Year: Calagary Flames become 1st NHL team to play in USSR, win 4-2. = 1989 +Name The Year: rajan, 13th Roman emperor (98-117), conqueror of Ctesiphon, born. = 53 T +Name The Year: Francoise duc de la Rochefoucald Paris France, writer (Memoires), born. = 1613 +Name The Year: Mayflower departs from Plymouth, England with 102 pilgrims. = 1620 +Name The Year: Costa Rica, El Salvador, Guatemala, Honduras and Nicaragua gain independence. = 1821 +Name The Year: Dame Agatha Christie mystery writer (Murder on the Orient Express), born. = 1890 +Name The Year: Japan defeats China in Battle of Ping Yang. = 1894 +Name The Year: Umberto II king of Italy (1946), born. = 1904 +Name The Year: Fay Wray, actress (King Kong), born. = 1907 +Name The Year: Battle of Aisne begins between Germans and French during WW I. = 1914 +Name The Year: Margaret Lockwood actress (Lady Vanishes), born. = 1916 +Name The Year: Russia proclaimed a republic by Alexander Kerensky. = 1917 +Name The Year: Nuremberg Laws deprives German Jews of citizenship and makes the swastika the official symbol of Nazi Germany. = 1935 +Name The Year: British PM Chamberlain visits Hitler at Berchtesgarden. = 1938 +Name The Year: Tide turns in Battle of Britain in WW II, RAF beats Luftwaffe. = 1940 +Name The Year: Oliver Stone NYC, director (Wall St, Good Morning Vietnam, Platoon), born. = 1946 +Name The Year: Tommy Lee Jones actor (Volcano, Batman Forever, Under Siege), born. = 1946 +Name The Year: UN turns over Eritrea to Ethiopia. = 1952 +Name The Year: Soviet Premier Khrushchev arrives in US to begin a 13-day visit. = 1959 +Name The Year: Dan Marino NFL quarterback (Miami Dolphins), born. = 1961 +Name The Year: "Lost in Space" premiers. = 1965 +Name The Year: Gemini XI returns to Earth. = 1966 +Name The Year: Decca awards Bing Crosby a 2nd platinum disc for selling 300 million. = 1970 +Name The Year: Muhammad Ali beats WBA heavyweight champion Leon Spinks. = 1978 +Name The Year: Israeli forces began pouring into west Beirut. = 1982 +Name The Year: Prince Henry Charles Albert David of Wales, 3rd in British sucession, born. = 1984 +Name The Year: Lillehammer, Norway upsets Anchorage to host 1994 Winter olympics. = 1988 +Name The Year: France announce it will send 4,000 troops to the Persian Gulf. = 1990 +Name The Year: Henry V, king of England (1413-22), born. = 1387 +Name The Year: Death of Tomas de Torquemada, inquisitor who burned 10,000 people. = 1498 +Name The Year: The Mayflower departs from Plymouth, England with 102 pilgrims headed for the 'New World'. = 1620 +Name The Year: Flamsteed sees solar eclipse, first known astronomical observation. = 1662 +Name The Year: Mexico first declares independence from Spain (National Day). = 1810 +Name The Year: Fire of Moscow. = 1812 +Name The Year: A. Bonar Law (C), British prime minister (1922-23), born. = 1858 +Name The Year: James J. Jeans, cosmologist and astrophysicist, born. = 1877 +Name The Year: William Crapo Durant incorporates General Motors. = 1908 +Name The Year: Wilfred Burchett, Australian Communist, journalist, writer, born. = 1911 +Name The Year: Allen Funt, voyuer, 'Candid Camera' creator, born. = 1914 +Name The Year: Lauren Bacall (in Staten Island, NY), actor, whistler (Dark Passage, Key Largo, Always), born. = 1924 +Name The Year: B. B. King, singer, musician, born. = 1925 +Name The Year: Charlie Byrd, guitarist, born. = 1925 +Name The Year: Peter Falk, actor (Colombo, Princess Bride, In-Laws), born. = 1927 +Name The Year: Barometric pressure at 856 mb (25.55") off Okinawa (record low). = 1945 +Name The Year: James J. Jeans, astrophysicist, dies on his 69th birthday. = 1946 +Name The Year: First automobile to exceed 400 mph, John Cobb, Bonneville Salt Flats. = 1947 +Name The Year: Ed Begley, Jr., actor (St. Elsewhere, Real Genius, Spinal Tap), born. = 1949 +Name The Year: Richard Nixon appears on "Laugh-in". = 1968 +Name The Year: Papua New Guinea gains independence from Australia (National Day). = 1975 +Name The Year: Episcopal Church approves ordination of women as priests and bishop. = 1976 +Name The Year: Maria Callas American-born prima donna dies in Paris at 53. = 1977 +Name The Year: "Miami Vice" premieres. = 1984 +Name The Year: Charles III [The Simple], king of France (893-923), born. = 879 +Name The Year: Wenceslas II king of Bohemia and Poland (1278-1305), born. = 1271 +Name The Year: Joseph Caspar Mezzofanti, Cardinal/linguist (understood 70 languages), born. = 1774 +Name The Year: William Herschel discovers Mimas, satellite of Saturn. = 1789 +Name The Year: Konstantin Tsiolkovsky, pioneer in rocket and space research, born. = 1857 +Name The Year: Thomas Selfridge becomes 1st fatality of powered flight. = 1908 +Name The Year: Anne Bancroft AKA Mrs Mel Brooks, Bronx, actress (Graduate), born. = 1931 +Name The Year: 1st 33 1/3 rpm recording released (Beethoven's 5th). = 1934 +Name The Year: Soviet Union invades Poland during WW II. = 1939 +Name The Year: 1st successful separation of Siamese twins. = 1953 +Name The Year: Rita Rudner comedienne, born. = 1955 +Name The Year: "The Fugitive" premiers on TV in the USA. = 1963 +Name The Year: "Bewitched" premiers on TV in the USA. = 1964 +Name The Year: Supremes release "Baby Love". = 1964 +Name The Year: "Mission Impossible" premieres on TV in the USA. = 1967 +Name The Year: "M = A = S = H" premiers on TV. = 1972 +Name The Year: Soviet Union and Saudi Arabia restore diplomatic ties. = 1990 +Name The Year: North and South Korea joins the UN. = 1991 +Name The Year: Chile declares independence from Spain (National Day). = 1810 +Name The Year: "The New York Times" goes on sale at 2 cents a copy. = 1851 +Name The Year: Pacific Stock Exchange opens (as the Local Security Board). = 1882 +Name The Year: D.D. Palmer of Davenport, Iowa, becomes the first Chiropractor. = 1895 +Name The Year: Greta Garbo (in Stockholm, Sweden), actor (Ninotchka, Grand Hotel), born. = 1905 +Name The Year: Jack Warden, actor (Verdict, Brian's Song), born. = 1920 +Name The Year: Nikolai N. Rukavishnikov, Soviet cosmonaut (Soyuz 10, 16, 33), born. = 1932 +Name The Year: Robert Blake, actor (Little Rascals, Baretta), born. = 1933 +Name The Year: Frankie Avalon, singer (Four Seasons), born. = 1940 +Name The Year: "Get Smart" premiers. = 1965 +Name The Year: U.S. Voyager I takes the first space photograph of the earth and moon together. = 1977 +Name The Year: Soyuz 38 carries 2 cosmonauts (1 Cuban) to Salyut 6 space station. = 1980 +Name The Year: Joe Kittinger completes first solo balloon crossing of Atlantic. = 1984 +Name The Year: English defeat French at Battle of Poitiers. = 1356 +Name The Year: Jan Luyts, Dutch scholar, physicist, mathematician, astronomer, born. = 1655 +Name The Year: Napoleon's retreat from Russia begins. = 1812 +Name The Year: Bond (U.S.) and Lassell (England) independently discover Hyperion. = 1848 +Name The Year: William Golding, English novelist (Lord of the Flies) (Nobel 1983), born. = 1911 +Name The Year: Mickey Mouse makes his screen debut in "Steamboat Willie." = 1928 +Name The Year: David McCallum, actor (Ilya Kuryakin in Man from U.N.C.L.E.), born. = 1933 +Name The Year: Al Oerter, US discus thrower, born. = 1936 +Name The Year: Paul Williams, singer, composer, actor, born. = 1940 +Name The Year: Jeremy Irons, English actor (French Lieutenant's Woman), born. = 1948 +Name The Year: Twiggy (Leslie Hornby) (in England), model, actor (Blues Brothers), born. = 1949 +Name The Year: "Mary Tyler Moore Show" premiers. = 1970 +Name The Year: St Christopher-Nevis gains independence from Britain (Nat'l Day). = 1983 +Name The Year: Antoninus Pius, Roman Emperor = 0086 +Name The Year: Alexander III the Great, king of Macedonia, emperor = 0357 +Name The Year: Magellan starts first successful circumnavigation of the world. = 1519 +Name The Year: Ernesto Teodoro Moneta, Italian journalist (Nobel Peace Prize 1907) = 1833 +Name The Year: Slave trade abolished in DC, but slavery allowed to continue. = 1850 +Name The Year: British and French defeat Russians at Alma, in the Crimea. = 1854 +Name The Year: Patent granted on the electric range. = 1859 +Name The Year: The Prince of Wales, later to become King Edward VII, becomes the first British royalty to visit the United States. = 1860 +Name The Year: Civil War Battle of Chickamauga, near Chattanooga, Tenn, ended. = 1863 +Name The Year: Ferdinand "Jelly Roll" Morton, jazz pianist, composer, singer = 1885 +Name The Year: Sophia Loren (in Rome, Italy), actor (Desire Under the Elms, Black Orchid) = 1934 +Name The Year: German rocket engineers begin work in U.S. = 1945 +Name The Year: First North Pole jet crossing = 1951 +Name The Year: First FORTRAN computer program run. = 1954 +Name The Year: Luna 16 lands on Moon's Mare Fecunditatis, drills core sample. = 1970 +Name The Year: Billy Jean King beats Bobby Riggs in battle-of-sexes tennis match. = 1973 +Name The Year: Walt Disney World's 200-millonth guest. = 1985 +Name The Year: Edward II king of England (1307-1327), dies at 43. = 1327 +Name The Year: Frederick III Innsbruck Austria, German Emperor (1440-1493), born. = 1415 +Name The Year: John Loudon McAdam created macadam road surface (asphalt), born. = 1756 +Name The Year: 1st French Republic declared. = 1792 +Name The Year: H(erbert) G(eorge) Wells Bromley, England (War of the Worlds), born. = 1866 +Name The Year: Teiichi Igarashi Japan, climed Mt Fuji at age 99, born. = 1886 +Name The Year: NY Sun runs famous "Yes, Virginia there is a Santa Claus," editorial. = 1897 +Name The Year: Chuck Jones animator (Bugs Bunny, Daffy Duck), born. = 1912 +Name The Year: Larry Hagman Fort Worth Tx, actor (I Dream of Jeannie, JR-Dallas), born. = 1931 +Name The Year: Stones at Stonehenge, England, sold at auction for 6,600. = 1915 +Name The Year: Leonard Cohen, Montreal, singer/songwriter (Death of Ladies Man), born. = 1934 +Name The Year: J.R.R. Tolkein, publishes "The Hobbit". = 1937 +Name The Year: Stephen King suspense writer (Shining, Kujo), born. = 1947 +Name The Year: Federal Republic of [West] Germany created under 3-power occupation. = 1949 +Name The Year: Peoples Rebulic of China proclaimed. = 1949 +Name The Year: Bill Murray Evanston Ill, comedian (SNL, What About Bob, Stripes), born. = 1950 +Name The Year: Nuclear submarine "Nautilus" is commissioned. = 1954 +Name The Year: Haakon VII king of Norway, dies, Olaf succeeds him. = 1957 +Name The Year: Malta gains independence from Britain. = 1964 +Name The Year: Ricki Lake actress (Hairspray, Ricki Lake Show), born. = 1968 +Name The Year: Luna 16 leaves the Moon. = 1970 +Name The Year: Belize gains independence from Britain (National Day). = 1981 +Name The Year: Armenia votes on whether to remain in the Soviet Union. = 1991 +Name The Year: Bilbo Baggins (in Shire Reconning), born. = 1290 +Name The Year: Lord Chesterfield letter writer; introduced Gregorian calendar (1752), born. = 1694 +Name The Year: Michael Faraday discovered principle of electric motor, born. = 1791 +Name The Year: Shigeru Yoshida Japanese PM (most of 1946-54), born. = 1878 +Name The Year: Italo Marchiony granted patent for the ice cream cone. = 1903 +Name The Year: Junko Tabei Japan, 1st woman to climb Mount Everest, born. = 1939 +Name The Year: USSR detonates its 1st atomic bomb. = 1949 +Name The Year: Commercial TV begins in England. = 1955 +Name The Year: Mali (without Senegal) gains independence from France (National Day). = 1960 +Name The Year: Iraqi troops seize part of Iran in a border dispute; war begins. = 1980 +Name The Year: California University makes the Dead Sea Scrolls public. = 1991 +Name The Year: BC Euripides, ancient Greek playwright (Trojan Women) (or 480 BC), born. = 484 +Name The Year: C Octavian (Augustus Caesar), first Roman emperor, born. = 63 B +Name The Year: Ferdinand VI, king of Spain (1746-59), born. = 1713 +Name The Year: Johann Galle and Heinrich d'Arrest find the planet Neptune. = 1846 +Name The Year: Urbain J.J. Leverrier, codiscoverer of Neptune, dies. = 1877 +Name The Year: First Mack Sennett "Keystone Comedy" movie is released. = 1912 +Name The Year: Mickey Rooney, actor (too many credits to mention), born. = 1920 +Name The Year: Gene Tunney defeats Jack Dempsey for world heavyweight boxing title. = 1926 +Name The Year: John Coltrane, saxophonist, born. = 1926 +Name The Year: Ray Charles, entertainer extraordinaire, born. = 1930 +Name The Year: Kingdom of Saudi Arabia formed (National Day). = 1932 +Name The Year: Bruce "The Boss" Springsteen, rock musician (Born in the USA), born. = 1949 +Name The Year: Jason Alexander (George in Seinfeld), born. = 1959 +Name The Year: First movie to become a TV series -- "How to Marry a Millionaire". = 1961 +Name The Year: ABC's first color TV series -- "The Jetsons". = 1962 +Name The Year: Soyuz 22 returns to Earth. = 1976 +Name The Year: Cheryl Ladd replaces Farrah Fawcett on "Charlie's Angels". = 1977 +Name The Year: Third test of the Space Shuttle Enterprise. = 1977 +Name The Year: First round-the-world trip by yacht (Cornelius Vanderbilt). = 1853 +Name The Year: Black Friday -- Wall Street panics after Gould and Fisk attempt to corner gold. = 1869 +Name The Year: Georges Claude, inventor of the neon light, born. = 1870 +Name The Year: First round-the-world trip by a woman on a bicycle (took 15 months). = 1895 +Name The Year: F. Scott Fitzgerald (in St. Paul, MN), writer (Great Gatsby), born. = 1896 +Name The Year: John W. Young, astronaut (Gemini 3, 10, Apollo 10, 16, STS-1, 9), born. = 1930 +Name The Year: John Brunner, British sci-fi author (Sheep Look Up), born. = 1934 +Name The Year: Jim Henson, creater of the Muppets, "our era's Charlie Chaplin, Mae West, W. C. Fields, and Marx Brothers", born. = 1936 +Name The Year: Linda Eastman McCartney, singer, born. = 1942 +Name The Year: Pres Eisenhower suffered a heart attack on vacation in Denver. = 1955 +Name The Year: Eisenhower orders US troops to desegregate Little Rock schools. = 1957 +Name The Year: First atomic aircraft carrier, the "USS Enterprise", is launched. = 1960 +Name The Year: "The Munsters" premier. = 1964 +Name The Year: "60 Minutes" premiers. = 1968 +Name The Year: First Automated return of lunar sample by Luna 16. = 1970 +Name The Year: Guinea-Bissau gains independence from Portugal. = 1974 +Name The Year: Vasco Nuez de Balboa is the first European to see the Pacific Ocean. = 1513 +Name The Year: First printing press in America. = 1639 +Name The Year: Olaus Roemer, first to accurately measured speed of light, born. = 1644 +Name The Year: Jean Phillippe Rameau, French composer (baptized), born. = 1683 +Name The Year: Nicolas-Joseph Cugnot, designed and built first automobile, born. = 1725 +Name The Year: Mark Rothko, painter, born. = 1903 +Name The Year: Dmitri Shostakovich, Russian composer, born. = 1906 +Name The Year: Henry Ford announces the five day work week. = 1926 +Name The Year: Michael Douglas, actor, producer, born. = 1944 +Name The Year: Christopher Reeve, actor (Superman, Somewhere in Time), born. = 1952 +Name The Year: Mark Hamill, actor (Star Wars), born. = 1952 +Name The Year: First transatlantic telephone cable goes into operation. = 1956 +Name The Year: Heather Locklear, actor, born.. = 1961 +Name The Year: Three-man crew of Skylab II make safe splashdown in Pacific after 59 days. = 1973 +Name The Year: Pacific SW Airlines Boeing 727 and a Cessna private plane collide. = 1978 +Name The Year: Parthenon destroyed in war between Turks and Venetians. = 1687 +Name The Year: Moses Mendelssohn, philosopher, critic, Bible translator, born. = 1729 +Name The Year: John Chapman, alias Johnny Appleseed, born. = 1774 +Name The Year: Frontiersman Daniel Boone died in Missouri at the age of 85. = 1820 +Name The Year: Kapiolani defies Pele (Hawaiian volcano goddess) and lives. = 1824 +Name The Year: T.S. Eliot, Anglican, playwright (Waste Land) (Nobel 1948), born. = 1888 +Name The Year: Paul VI, 262nd Roman Catholic pope (1963-78), born. = 1897 +Name The Year: George Gershwin, (in Brooklyn, NY), composer (Rhapsody in Blue), born. = 1898 +Name The Year: Meuse-Argonne offensive against the Germans began during WWI. = 1918 +Name The Year: Julio Iglesias, singer, born. = 1941 +Name The Year: Olivia Newton-John (in Cambridge, England), singer, born. = 1948 +Name The Year: Vladimir Remek, first Czechoslovakian space traveler (Soyuz 28), born. = 1948 +Name The Year: UN troops in Korean War recaptured South Korean capital of Seoul. = 1950 +Name The Year: Musical "West Side Story", opened on Broadway. = 1957 +Name The Year: TV comedy "The Beverly Hillbillies" premiered on CBS. = 1962 +Name The Year: Yemen Arab Republic proclaimed (National Day). = 1962 +Name The Year: Japan launches its first satellite in to space. = 1966 +Name The Year: Beatles release "Abbey Road" album. = 1969 +Name The Year: Soyuz 38 returns to Earth. = 1980 +Name The Year: Australia II won the America's Cup yacht race. = 1983 +Name The Year: Cosmonauts Titov and Strekalov are saved from exploding Soyuz T-10. = 1983 +Name The Year: Society of Jesus (Jesuits) founded by Ignatius Loyola. = 1540 +Name The Year: Louis XIII, king of France (1610-43), born. = 1601 +Name The Year: Sophia, regent of Russia (1682-89), born. = 1657 +Name The Year: Agustin I de Iturbide, emperor of Mexico (1822-23), born. = 1783 +Name The Year: Railroad transportation is born with first track in England. = 1825 +Name The Year: Sir Martin Ryle, British radio astronomer, astronomer royal 1972-82, born. = 1918 +Name The Year: Arthur Penn, stage and film director, born. = 1922 +Name The Year: The ocean liner Queen Elizabeth was launched at Glasgow. = 1938 +Name The Year: Actors Hume Cronyn and Jessica Tandy are married. = 1942 +Name The Year: Dumitru Prunariu, first Rumanian space traveler (on board Soyuz 40), born. = 1952 +Name The Year: Cheryl Tiegs (in Minnesota), model and actor, born. = 1957 +Name The Year: Shaun Cassidy, singer, born. = 1958 +Name The Year: US sells Hawk anti-aircraft missiles to Israel. = 1962 +Name The Year: Warren Commission finds that Lee Harvey Oswald acted alone. = 1964 +Name The Year: Soyuz 12 is launched. = 1973 +Name The Year: B.C. Pompey (Gnaeus Pompeius Magnus) Rome, warrior, born. = 106 +Name The Year: B.C. Confucius (as celebrated in Taiwan), born. = 551 +Name The Year: William the Conqueror lands in England. = 1066 +Name The Year: Caravaggio Italy, painter (or 1573), born. = 1573 +Name The Year: Edward Thompson US archeologist who explored Mayan ruins, born. = 1856 +Name The Year: Donati's comet becomes the 1st to be photographed. = 1858 +Name The Year: Battle of Alcolea, causes Queen Isabella II of Spain to flee to France. = 1868 +Name The Year: The city of Sydney inaugurates steam motor tram route. = 1879 +Name The Year: Marcello Mastroianni actor (La Dolce Vita), born. = 1924 +Name The Year: Seymour Cray inventor (Cray I computer), born. = 1925 +Name The Year: Soviet-German treaty agree on 4th partition of Poland (WW II) and gives Lithuania to the USSR. = 1939 +Name The Year: Phil Hartman comedian (SNL, Newsradio, Simpsons (Voice of Troy McLure)), born. = 1948 +Name The Year: Albert Ascoli Italian developed anti-tuberculosis vaccine, dies. = 1957 +Name The Year: Guinea votes for independence from France. = 1958 +Name The Year: Explorer VI reveals an intense radation belt around the Earth. = 1959 +Name The Year: Harpo Marx comedian (Marx Bros), dies at 75. = 1964 +Name The Year: Beatles' "Hey Jude", single goes #1 and stays #1 for 9 weeks = 1968 +Name The Year: Pope John Paul I dies after 33 days as pope. = 1978 +Name The Year: Record 23,000 start in a marathon (Mexico City). = 1986 +Name The Year: Ferdinand Marcos deposed president of Phillipines, dies. = 1989 +Name The Year: Marvin Gaye gets a star on Hollywood's walk of fame. = 1990 +Name The Year: Miles Davis jazz musician, dies at 65 from pneumonia. = 1991 +Name The Year: Battle of Auray, English forces defeat French at Brittany. = 1364 +Name The Year: Robert Lord Clive, founded British empire in India, born. = 1755 +Name The Year: Horatio Nelson Burnham Thorpe, Britain, naval hero at Trafalgar, born. = 1758 +Name The Year: Tennis is 1st mentioned in an English sporting magazine. = 1793 +Name The Year: Scotland Yard formed in London. = 1829 +Name The Year: Louis Pasteur dies. = 1895 +Name The Year: Enrico Fermi, Italy, nuclear physicist, born. = 1901 +Name The Year: Gene Autry, singer/actor/Calif Angels owner, born. = 1907 +Name The Year: Bob Newhart Oak Park Ill, actor/comedian (Bob Newhart Show), born. = 1929 +Name The Year: Richard Bonynge, Sydney Australia, conductor (Australian Orchestra Sydney-1976), born. = 1930 +Name The Year: Anita Ekberg, Sweden, actress (La Dolce Vita, War and Peace), born. = 1931 +Name The Year: Jerry Lee Lewis, singer (Great Balls of Fire, Breathless), born. = 1935 +Name The Year: Lech Walesa, Popowo Poland, leads Polish Solidarity (Nobel 1983), born. = 1943 +Name The Year: Eisenhower and Italian Marshal Pietro Badoglio sign an armistice. = 1943 +Name The Year: Soviet troops invade Yugoslavia. = 1944 +Name The Year: Sultan of Brunei promulgates a constitution. = 1959 +Name The Year: Rolling Stones 1st tour (opening act for Bo Diddley and Everly Bros). = 1963 +Name The Year: Bechuanaland gains independence from England, becomes Botswana. = 1966 +Name The Year: Erika Eleniak, actress (Under Siege, Beverly Hillbillies), born. = 1969 +Name The Year: Soviet space station Salyut 6 launched into Earth orbit. = 1977 +Name The Year: Pope John Paul II becomes 1st pope to visit Ireland. = 1979 +Name The Year: USSR releases US journalist Nicholas Daniloff confined on spy charges. = 1986 +Name The Year: Charles Addams cartoonist (Addams Family), dies at 76 of heart attack. = 1988 +Name The Year: 26th Space Shuttle mission, Discovery 7 launched. = 1988 +Name The Year: First book published, Johann Guttenberg's Bible. = 1452 +Name The Year: Robinson Crusoe, according to Daniel Defoe = 1627 +Name The Year: Robinson Crusoe is shipwrecked (according to Defoe). = 1659 +Name The Year: William Morris first uses ether in the first tooth extraction under anesthesia at Charlestown, Mass. = 1846 +Name The Year: Jean Perrin, French physicist, studied Brownian motion (Nobel 1926) = 1870 +Name The Year: Deborah Kerr (in Helensburg, Scotland), actor (King and I, Night of the Iguana) = 1921 +Name The Year: Truman Capote, a short short story writer (In Cold Blood) = 1924 +Name The Year: Elie Wiesel, author (Souls on Fire), Nazi hunter (Nobel 1986) = 1928 +Name The Year: Angie Dickinson (in Kulm, ND), actor = 1931 +Name The Year: Johnny Mathis, singer = 1935 +Name The Year: Munich Agreement-forces Czechoslovakia to give territory to Germany. = 1938 +Name The Year: First manned rocket flight (by auto maker Fritz von Opel). = 1939 +Name The Year: Calais reoccupied by Allies. = 1944 +Name The Year: James Dean, actor, died in a car crash (born Feb 08, 1931) = 1955 +Name The Year: "The Flintstones" premieres. Yabba Dabba Doo! = 1960 +Name The Year: Botswana gains independence from Britain (National Day). = 1966 +Name The Year: USSR's Kosmos 186 and 188 complete the 1st automatic docking. = 1967 \ No newline at end of file diff --git a/lua/quiz/questions/warcraft.txt b/lua/quiz/questions/warcraft.txt new file mode 100644 index 000000000..36a83e96f --- /dev/null +++ b/lua/quiz/questions/warcraft.txt @@ -0,0 +1,42 @@ +************************************************** +Category: Warcraft +Author: Blizzard +************************************************** + +This Horde ship was crafted by goblins. Originally intended to bring Thrall and Aggra to the Maelstrom, the ship was destroyed in a surprise attack by the Alliance. = Draka's Fury +What are undead murlocs called? = Murghouls +What is the name of Tirion Fordring's gray stallion? = Mirador +Which of these is the correct name for King Varian Wrynn's first wife? = Tiffin Ellerlan Wrynn +Who was the first satyr to be created? = Xavius +Before Ripsnarl became a worgen, he had a family. What was his wife's name? = Calissa Harrington +This structure, located in Zangarmarsh was controlled by naga who sought to drain a precious and limited resource: the water of Outland. = Coilfang Reservoir +One name for this loa is "Night's Friend" = Mueh'zala +This defender of the Scarlet Crusade was killed while slaying the dreadlord Beltheris = Holia Sunshield +Brown-skinned orcs first began showing up on Azeroth several years after the Third War, when the Dark Portal was reactivated. What are these orcs called? = Mag'har +Succubus demons revel in causing anguish, and they serve the Legion by conducting nightmarish interrogations. What species is the succubus? = Sayaad +While working as a tutor, Stalvan Mistmantle became obsessed with one of his students, a young woman named Tilloa. What was the name of her younger brother? = Giles +Who was the mighty proto-dragon captured by Loken and tranformed into Razorscale? = Veranus +This emissary of the Horde felt that Silvermoon City was a little too bright and clean. = Tatal +This queen oversaw the evacuation of her people after the Cataclysm struck and the Forsaken attacked her nation. = Mia Greymane +Not long ago, this frail Zandalari troll sought to tame a direhorn. Although he journeyed to the Isle of Giants, he was slain in his quest. What was his name? = Talak +Arthas's death knights were trained in a floating citadel that was taken by force when many of them rebelled against the Lich King. What was the fortress's name? = Acherus +White wolves were once the favored mounts of which orc clan? = Frostwolf Clan +In Taur-ahe, the language of the tauren, what does lar'korwi mean? = Sharp claw +Name the homeworld of the ethereals. = K'aresh +Who was the first death knight to be created on Azeroth? = Teron Gorefiend +In the assault on Icecrown, Horde forces dishonorably attacked Alliance soldiers who were busy fighting Scourge and trying to capture this gate. = Mord'rethar +What evidence drove Prince Arthas to slaughter the people in Stratholme during the Third War? = Grain +Who is the current leader of the gnomish people? = Gelbin Mekkatorque +Malfurion Stormrage helped found this group which is the primary druidic organization of Azeroth = Cenarion Circle +The draenei like to joke that in the language of the naaru, the word Exodar has this meaning = Defective elekk turd +Thane Kurdran Wildhammer recently suffered a tragic loss when his valiant gryphon was killed in a fire. What was this gryphon's name? = Sky'ree +Before she was raised from the dead by Arthas to serve the Scourge, Sindragosa was a part of what dragonflight? = Blue +The Ironforge library features a replica of an unusually large ram's skeleton. What was the name of this legendary ram? = Toothgnasher +Name the titan lore-keeper who was a member of the elite Pantheon = Norgannon +What did the dragon aspects give the night elves after the War of the Ancients? = Nordrassil +Formerly a healthy paladin, this draenei fell ill after fighting the Burning Legion and becoming one of the Broken. He later became a powerful shaman. = Nobundo +Who were the three young twilight drakes guarding the twilight dragon eggs in the Obsidian Sanctum? = Shadron Tenebron Vesperon +What phrase means "Thank you" in Draconic, the language of the dragons? = Belan Shi +Before the original Horde formed, a highly contagious sickness began spreading rapidly among the orcs. What did the orcs call it? = Red pox +What is the highest rank bestowed on a druid? = Archdruid +Whose tomb includes the inscription "May the bloodied crown stay lost and forgotten"? = Terenas Menethil 2 diff --git a/lua/quiz/quiz.lua b/lua/quiz/quiz.lua new file mode 100644 index 000000000..b585f7a5a --- /dev/null +++ b/lua/quiz/quiz.lua @@ -0,0 +1,274 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +quiz = {} -- object +q_dictionary = {} -- dictionary word=question +q_records_current = { } -- table with current player records +q_records_total = {} -- table with total player records +q_records_diff = {} -- table with current diffs + +-- counter of questions +local _q_question_counter = 0 +-- count of current question's hints +local _q_hint_counter = 0 +-- count of current question's hints +local _q_current_index = 0 +-- current hint +local _q_hint = nil +-- time when question was shown +local _q_time_start = 0 +-- last user streaks +local _q_streak = { username = nil, count = 0 } + +-- delay flag for next_question timer +local _q_next_question_skip_first = false + +function quiz:start(channelname, quizname) + local filename = q_directory() .. "/questions/" .. string.lower(quizname) .. ".txt" + + if not file_exists(filename) then + channel_send_message(config.quiz_channel, filename, message_type_error) + return false + end + + config.quiz_channel = channelname + + -- reset + _q_question_counter = 0 + _q_streak.username = nil + _q_streak.count = 0 + -- clear tables + table.clear(q_dictionary) + table.clear(q_records_current) + table.clear(q_records_diff) + -- table.clear(q_records_total) -- do not clear it, it should be cached + + -- load records (if it was not loaded yet) + q_load_records() + + -- fill dictionary from file + if file_load(filename, file_load_dictionary_callback, q_read_dictionary_callback) then + channel_send_message(config.quiz_channel, string.format("Quiz \"%s\" started!", quizname), message_type_error) + q_next_question() + end +end +function q_read_dictionary_callback(a, b) + table.insert(q_dictionary, { question = a, word = b }) +end + + +function quiz:stop(username) + + timer_del("q_hint") + timer_del("q_question") + + local output = nil + if username then + output = "Quiz stopped by "..username + else + output = "Quiz finished!" + end + channel_send_message(config.quiz_channel, output, message_type_error) + + -- display current records + if (q_records_current) and next(q_records_current) then + table.sort(q_records_current, q_compare_desc) + + channel_send_message(config.quiz_channel, "Records of this game:", message_type_info) + for i,t in pairs(q_records_current) do + channel_send_message(config.quiz_channel, string.format(" %d. %s [%d points]", i, t.username, t.points), message_type_info) + end + end + + -- merge current with total records + if (q_records_total) and next(q_records_total) then + for i,t in pairs(q_records_current) do + + -- steal points from players in total table accordingly with half points of current table players + if (config.quiz_competitive_mode) then + if q_records_total[i] and not (q_records_total[i].username == t.username) then + -- remove half points + local points = math.floor(t.points / 2) + q_records_diff[q_records_total[i].username] = points * -1 + q_records_total[i].points = q_records_total[i].points - points + -- avoid negative value + if q_records_total[i].points <= 0 then + q_records_total[i].points = 0 + end + end + end + + -- add non exist users from current to total table + -- and increase total users points + local idx = q_records_total_find(t.username) + -- set diff as winned points + local tusername = q_records_total[idx].username + q_records_diff[tusername] = t.points + + -- if user not found (new user with 0 points) + if q_records_total[idx].points == 0 then + q_records_total[idx].points = t.points + else + -- update diff if it was changed to negative + if q_records_diff[tusername] < 0 then + q_records_diff[tusername] = q_records_diff[tusername] + t.points + end + q_records_total[idx].points = q_records_total[idx].points + t.points + end + end + + -- sort by points + table.sort(q_records_total, q_compare_desc) + + quiz_display_top_players() + else + -- if records.txt is empty then save first records + q_records_total = q_records_current + end + q_save_records() + + config.quiz_channel = nil +end + + + + + +-- handle channel message +function quiz_handle_message(username, text) + + local q = q_dictionary[_q_current_index] + + if string.upper(q.word) == string.upper(text) then + -- time from question to unswer + local time_diff = os.clock() - _q_time_start + + local points, total = 0,0 + -- calc points + points = 1+(#q.word - _q_hint_counter) - math.floor(time_diff / config.quiz_hint_delay) + -- avoid negative value + if (points <= 0) then points = 1 end + + -- remember previous streak + local prev_streak = _q_streak + -- increase streaks + if (_q_streak.username == username) then + _q_streak.count = _q_streak.count + 1 + else + _q_streak.username = username + _q_streak.count = 0 + end + + local bonus = "" + -- add bonus points for streaks + if (_q_streak.count > 0) then + points = points + _q_streak.count + bonus = string.format(" +%s streak bonus", _q_streak.count) + end + + local idx = q_records_current_find(username) + total = q_records_current[idx].points + points + q_records_current[idx].points = total + + -- lose half points for previous user + if config.quiz_competitive_mode and not (prev_streak.username == username) then + local lose_points = math.floor(total / 2) + local idx = q_records_current_find(prev_streak.username) + q_records_current[idx].points = q_records_current[idx].points - lose_points + -- avoid negative value + if q_records_current[idx].points <= 0 then + q_records_current[idx].points = 0 + end + end + + channel_send_message(config.quiz_channel, string.format("%s is correct! The unswer is: %s (+%d points%s, %d total) [%d sec]", username, q.word, (points-_q_streak.count), bonus, total, time_diff), message_type_info) + + q_next_question() + end + +end + +-- go to next question +function q_next_question() + _q_question_counter = _q_question_counter + 1 + if (_q_question_counter > config.quiz_max_questions) then + quiz:stop() + return 0 + end + + timer_del("q_hint") + + _q_next_question_skip_first = false + timer_add("q_question", config.quiz_question_delay, q_tick_next_question) +end + +-- write random question +function q_tick_next_question(options) + -- skip first tick + if not _q_next_question_skip_first then + _q_next_question_skip_first = true + return 0 + end + _q_time_start = os.clock() + _q_current_index = math.random(#q_dictionary) + + local q = q_dictionary[_q_current_index] + -- send question + channel_send_message(config.quiz_channel, "--------------------------------------------------------", message_type_info) + channel_send_message(config.quiz_channel, string.format(" %s (%d letters)", q.question, #q.word), message_type_info) + + -- hide hint + _q_hint = q_hide_unswer(q.word) + + -- stop this timer + timer_del(options.id) + + _q_hint_counter = 0 + -- start timer to hint unswer + timer_add("q_hint", config.quiz_hint_delay, q_tick_hint_unswer) +end + +-- write hint for unswer +function q_tick_hint_unswer(options) + -- skip first tick + if _q_hint_counter == 0 then + _q_hint_counter = _q_hint_counter + 1 + return 0 + end + _q_hint_counter = _q_hint_counter + 1 + + local q = q_dictionary[_q_current_index] + -- update hint + _q_hint = q_show_next_symbol(_q_hint, q.word) + + if not (_q_hint == q.word) then + -- show hint + channel_send_message(config.quiz_channel, "Hint: ".._q_hint, message_type_info) + else + -- reset counter + _q_hint_counter = 0 + + -- show unswer + q_nounswer(nil) + end + +end + +-- nobody unswered +function q_nounswer(username) + channel_send_message(config.quiz_channel, 'Nobody unswered. The unswer was: '.._q_hint, message_type_info) + + -- decrease streaks + if (_q_streak.count > 0) then + _q_streak.count = _q_streak.count - 1 + end + + q_next_question() +end + + diff --git a/lua/quiz/records.lua b/lua/quiz/records.lua new file mode 100644 index 000000000..42d4948b8 --- /dev/null +++ b/lua/quiz/records.lua @@ -0,0 +1,87 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + +-- Load total records from records.txt to table +function q_load_records() + local filename = q_directory() .. "/records.txt" + if not q_records_total or not next(q_records_total) then + -- fill records table + return file_load(filename, file_load_dictionary_callback, q_read_records_callback) + end + return true +end +function q_read_records_callback(a, b) + table.insert(q_records_total, { username = a, points = b }) +end + +-- Save total records from table to records.txt +function q_save_records() + local filename = q_directory() .. "/records.txt" + file_save2(filename, q_save_records_callback) +end +function q_save_records_callback(file) + if (q_records_total) and next(q_records_total) then + for i,t in pairs(q_records_total) do + file:write(t.username .. " = " .. t.points) + file:write("\n") + end + end +end + + +-- Print Top X players records +function quiz_display_top_players() + + local output = "Top " .. config.quiz_users_in_top .. " Quiz players:" + channel_send_message(config.quiz_channel, output, message_type_info) + + -- display TOP of total records + for i,t in pairs(q_records_total) do + if (i > config.quiz_users_in_top) then break end + + local diff = "" + if q_records_diff[t.username] then + if q_records_diff[t.username] < 0 then + diff = "(" .. q_records_diff[t.username] .. ")" -- minus points + elseif q_records_diff[t.username] > 0 then + diff = "(+" .. q_records_diff[t.username] .. ")" -- plus points + end + end + + local output = string.format(" %d. %s [%d points] %s", i, t.username, t.points, diff) + channel_send_message(config.quiz_channel, output, message_type_info) + end +end + +-- find username and return table index +-- preventnew - do not add user in table if it is not found +function q_records_current_find(username, preventnew) + -- find username + for i,t in pairs(q_records_current) do + if (t.username == username) then return i end + end + if preventnew then return nil end + + -- if not found then insert + table.insert(q_records_current, {username = username, points = 0}) + return #q_records_current +end + +-- find username and return table index +-- prevent_new = do not add user in table if it is not found +function q_records_total_find(username, prevent_new) + for i,t in pairs(q_records_total) do + if (t.username == username) then return i end + end + if prevent_new then return nil end + + -- if not found then insert + table.insert(q_records_total, {username = username, points = 0}) + return #q_records_total +end + + diff --git a/lua/quiz/records.txt b/lua/quiz/records.txt new file mode 100644 index 000000000..e69de29bb From 397c6b286d2c20276584a09be19cea68fec90c1a Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 27 May 2014 05:25:54 +0400 Subject: [PATCH 032/144] Change version https://github.com/HarpyWar/pvpgn/issues/21 --- src/common/setup_before.h | 2 +- src/common/version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/setup_before.h b/src/common/setup_before.h index b830533d2..bf37070bf 100644 --- a/src/common/setup_before.h +++ b/src/common/setup_before.h @@ -126,7 +126,7 @@ const bool BNETD_CHANLOG = false; # define BNETD_DEFAULT_CONF_FILE "conf/bnetd.conf" #endif const char * const BNETD_FILE_DIR = "files"; -const char * const BNETD_SCRIPT_DIR = "script"; +const char * const BNETD_SCRIPT_DIR = "lua"; const char * const BNETD_STORAGE_PATH = ""; const char * const BNETD_REPORT_DIR = "reports"; const char * const BNETD_LOG_FILE = "logs/bnetd.log"; diff --git a/src/common/version.h b/src/common/version.h index 9d0fd5a83..6c80bf1f6 100644 --- a/src/common/version.h +++ b/src/common/version.h @@ -14,7 +14,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef PVPGN_VERSION -#define PVPGN_VERSION "1.99.0-GIT" +#define PVPGN_VERSION "1.99.5-PRO" #endif #ifndef PVPGN_SOFTWARE #define PVPGN_SOFTWARE "PvPGN" From a90d3c385f58e6344e6e4d57dc4e7ebb184a9691 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 27 May 2014 10:31:41 +0400 Subject: [PATCH 033/144] Update README.md --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 547e40485..b37379a4e 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,11 @@ Player versus Player Gaming Network Original PvPGN 1.99 source code with tweaks. + Source Code changes -- -* add display custom icons depends on a user rating, custom output for command `/stats`; works with Warcraft and Starcraft (see [icons.conf](https://github.com/HarpyWar/pvpgn/blob/master/conf/icons.conf.in)) commits [1](https://github.com/HarpyWar/pvpgn/commit/c11af352603e18acc52102ba8574776425248331), [2](https://github.com/HarpyWar/pvpgn/commit/368c4b9296d18a515af746b65fe69054ab6f4236), [3](https://github.com/HarpyWar/pvpgn/commit/f1a96c392055a777b48dc4d77631c5e906161e28) +* Lua scripting support (WITH_LUA cmake directive) +* Add display custom icons depends on a user rating, custom output for command `/stats`; works with Warcraft and Starcraft (see [icons.conf](https://github.com/HarpyWar/pvpgn/blob/master/conf/icons.conf.in)) commits [1](https://github.com/HarpyWar/pvpgn/commit/c11af352603e18acc52102ba8574776425248331), [2](https://github.com/HarpyWar/pvpgn/commit/368c4b9296d18a515af746b65fe69054ab6f4236), [3](https://github.com/HarpyWar/pvpgn/commit/f1a96c392055a777b48dc4d77631c5e906161e28) * fix command send flooding [commit](https://github.com/HarpyWar/pvpgn/commit/74f9e4faafe24699597e4be5bfda83bf255ba72e) * fix compile error when pointer size is larger than int [commit](https://github.com/HarpyWar/pvpgn/commit/1ea116434ce009bad4903ff72bd69bbb8987ce06) * fix Warcraft 3 ICON SWITCH hack [commit](https://github.com/HarpyWar/pvpgn/commit/84811bcfe875d6c42cd8271bbdae757f0b5d445b) @@ -14,13 +16,16 @@ Source Code changes * add game id field in status.xml output [commit](https://github.com/HarpyWar/pvpgn/commit/b989d26e1182a3ee8cf62f3ee79dfb231fd66e23) * add game id field and user game version in status.dat output (the same as status.xml) [commit](https://github.com/HarpyWar/pvpgn/commit/39d0b2be71c7ddd808a20f97fe6ac17078ce013f) * welcome text for Warcraft 3 is moved from the code into a new file `bnmotd_w3.txt` ([example](http://img21.imageshack.us/img21/1808/j2py.png) with colored text is included) - [commit](https://github.com/HarpyWar/pvpgn/commit/ff8ca941cd7942bab201607fbc31382837a35617) + [commit](https://github.com/HarpyWar/pvpgn/commit/ff8ca941cd7942bab201607fbc31382837a35617) +* Feature to use d2s character as a template for a new character in newbie.save; each character class can have it's own template [issue](https://github.com/HarpyWar/pvpgn/issues/20) + New commands -- * `/save` immediately save changes of accounts and clans from the cache to a storage (useful for testing) [commit](https://github.com/HarpyWar/pvpgn/commit/be8d65d16f910b2090b0db9e7eb2c043b816dae7) -* `/icon [CODE]` set userselected_icon for a user, works with Warcraft and Starcraft [commit](https://github.com/HarpyWar/pvpgn/commit/1ade081c6b10a3e710130b88613b71b880ba0cd7) +* `/icon ` icon stash implementation - each user has it's own stash with icons, admin/operator can add icon to user's stash, you can set aliases for icons in config; works with Warcraft and Starcraft commits [1](https://github.com/HarpyWar/pvpgn/commit/1ade081c6b10a3e710130b88613b71b880ba0cd7), [2](https://github.com/HarpyWar/pvpgn/commit/36deb1179bca931bd6585c2b6dbf7d8ade08bc8e) * `/find ` search account by part of the name - [patch #1526](http://developer.berlios.de/patch/?func=detailpatch&patch_id=1526&group_id=2291) from berlios [commit](https://github.com/HarpyWar/pvpgn/commit/c229c6693b3dd55f02fe3a81403870044c0786b2) +* `/quiz` Trivia Quiz Game (implemented in Lua) [commit](https://github.com/HarpyWar/pvpgn/commit/ee04fdd23dfef90f0b852a6e90df23c7f5edc08e) Modified commands -- @@ -28,6 +33,10 @@ Modified commands * `/finger` more info in the command output - [patch #2859](http://developer.berlios.de/patch/?func=detailpatch&patch_id=2859&group_id=2291) from berlios [commit](https://github.com/HarpyWar/pvpgn/commit/bdb450084704da1f33e28c9edd3d2d16b720a946) * `/games lobby` show games in lobby only - [patch #3235](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3235&group_id=2291) from berlios [commit](https://github.com/HarpyWar/pvpgn/commit/5d27cece2c24b5fe779f1560162a31442bf02617) * `/friends online` show online friends only - [patch #3236](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3236&group_id=2291) from berlios [commit](https://github.com/HarpyWar/pvpgn/commit/8762667276b535d3385d51941d41d780089a7049) +* `/topic` feature to set text on a new line [issue](https://github.com/HarpyWar/pvpgn/issues/6) +* `/alert ` like /announce but message box shows instead of a text [issue](https://github.com/HarpyWar/pvpgn/issues/15) +* `/rehash ` feature to rehash configs separately [commit](https://github.com/HarpyWar/pvpgn/commit/ee04fdd23dfef90f0b852a6e90df23c7f5edc08e) + Minor changes -- @@ -38,10 +47,12 @@ Minor changes * skip_versioncheck, allow_bad_version are enabled by default in bnetd.conf - for easy start * source code is formatted for better reading * unused files are removed, only pvpgn source here -* move directory `files` to `var\files` on Windows (like Unix) * unknown udp packets are logged with enabled debug mode only (it always chokes a log file before) [commit](https://github.com/HarpyWar/pvpgn/commit/c39f9f03159b2edc8d2457d8134d84486378f9b1) * add a file location for all the text files like MOTD (often a server admin doesn't know where a file is located) * add option ignore-version for programs **bnchat** and **bnstat** - [patch #3184](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3184&group_id=2291) from berlios [commit](https://github.com/HarpyWar/pvpgn/commit/a1fb914c30d9d69d062e8f698f7d0e9bacf41367) +* help for all commands is displayed from bnhelp.conf and format changed for better reading, updated more help messages [issue](https://github.com/HarpyWar/pvpgn/issues/5) +* fix error in log when user sends a message with text length of 255 symbols [commit](https://github.com/HarpyWar/pvpgn/commit/af2baccdb8a2b624627caa94eac5595ac8f76e07) +* update tracker servers in config, track is enabled by default Build source code From 8fa63b578f7b0035a839a24a476c28b00860ab06 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 27 May 2014 10:41:28 +0400 Subject: [PATCH 034/144] Update README.md --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b37379a4e..60d7764ce 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Source Code changes New commands -- * `/save` immediately save changes of accounts and clans from the cache to a storage (useful for testing) [commit](https://github.com/HarpyWar/pvpgn/commit/be8d65d16f910b2090b0db9e7eb2c043b816dae7) -* `/icon ` icon stash implementation - each user has it's own stash with icons, admin/operator can add icon to user's stash, you can set aliases for icons in config; works with Warcraft and Starcraft commits [1](https://github.com/HarpyWar/pvpgn/commit/1ade081c6b10a3e710130b88613b71b880ba0cd7), [2](https://github.com/HarpyWar/pvpgn/commit/36deb1179bca931bd6585c2b6dbf7d8ade08bc8e) +* `/icon ` icon stash implementation - each user has it's own stash with icons, admin/operator can add icon to user's stash, you can set aliases for icons in config; works with Warcraft and Starcraft commits [1](https://github.com/HarpyWar/pvpgn/commit/1ade081c6b10a3e710130b88613b71b880ba0cd7), [2](https://github.com/HarpyWar/pvpgn/commit/36deb1179bca931bd6585c2b6dbf7d8ade08bc8e) * `/find ` search account by part of the name - [patch #1526](http://developer.berlios.de/patch/?func=detailpatch&patch_id=1526&group_id=2291) from berlios [commit](https://github.com/HarpyWar/pvpgn/commit/c229c6693b3dd55f02fe3a81403870044c0786b2) * `/quiz` Trivia Quiz Game (implemented in Lua) [commit](https://github.com/HarpyWar/pvpgn/commit/ee04fdd23dfef90f0b852a6e90df23c7f5edc08e) @@ -52,16 +52,14 @@ Minor changes * add option ignore-version for programs **bnchat** and **bnstat** - [patch #3184](http://developer.berlios.de/patch/?func=detailpatch&patch_id=3184&group_id=2291) from berlios [commit](https://github.com/HarpyWar/pvpgn/commit/a1fb914c30d9d69d062e8f698f7d0e9bacf41367) * help for all commands is displayed from bnhelp.conf and format changed for better reading, updated more help messages [issue](https://github.com/HarpyWar/pvpgn/issues/5) * fix error in log when user sends a message with text length of 255 symbols [commit](https://github.com/HarpyWar/pvpgn/commit/af2baccdb8a2b624627caa94eac5595ac8f76e07) -* update tracker servers in config, track is enabled by default +* update default tracker servers in config, track is enabled by default issues [1](https://github.com/HarpyWar/pvpgn/issues/7), [2](https://github.com/HarpyWar/pvpgn/issues/18) Build source code -- #### Windows -Use [Magic Builder](http://code.google.com/p/pvpgn-magic-builder/). - -Download code manually and put into `source` directory (button [Download ZIP](https://github.com/HarpyWar/pvpgn/archive/master.zip) on the right side of this repository page) +Use [Magic Builder](https://github.com/HarpyWar/pvpgn-magic-builder). #### Linux [Русский](http://harpywar.com/?a=articles&b=2&c=1&d=74) | [English](http://harpywar.com/?a=articles&b=2&c=1&d=74&lang=en) From 11fc7760a05d1a48cc60b506960c429cd944e78e Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 27 May 2014 14:12:12 +0400 Subject: [PATCH 035/144] * send notification message to user after /rehash * move command_split() into command.cpp * fix compile errors on linux --- src/bnetd/command.cpp | 73 ++++++++++++++++++++++++++++++++------ src/bnetd/command.h | 3 ++ src/bnetd/helpfile.cpp | 2 +- src/bnetd/icons.cpp | 10 +++--- src/bnetd/ipban.cpp | 1 + src/bnetd/mail.cpp | 1 + src/bnetd/sql_odbc.cpp | 3 +- src/bnetd/topic.cpp | 4 +-- src/bnetd/versioncheck.cpp | 2 +- src/common/bnetsrp3.cpp | 5 +-- src/common/tag.cpp | 6 ++-- src/common/xstring.cpp | 50 +------------------------- src/common/xstring.h | 6 ++-- 13 files changed, 90 insertions(+), 76 deletions(-) diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 77e28e3bd..3bffe54d3 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -117,6 +117,52 @@ namespace pvpgn } } + /* + * Split text by spaces and return array of arguments. + * First text argument is a command name (index = 0) + * Last text argument always reads to end + */ + extern std::vector split_command(char const * text, int args_count) + { + std::vector result(args_count + 1); + + std::string s(text); + // remove slash from the command + if (!s.empty()) + s.erase(0, 1); + + std::istringstream iss(s); + + int i = 0; + std::string tmp = std::string(); // to end + do + { + std::string sub; + iss >> sub; + + if (sub.empty()) + continue; + + if (i < args_count) + { + result[i] = sub; + i++; + } + else + { + if (!tmp.empty()) + tmp += " "; + tmp += sub; + } + + } while (iss); + + // push remaining text at the end + if (tmp.length() > 0) + result[args_count] = tmp; + + return result; + } static void do_whisper(t_connection * user_c, char const * dest, char const * text) { @@ -540,6 +586,10 @@ namespace pvpgn return 0; } + + + + // +++++++++++++++++++++++++++++++++ command implementations +++++++++++++++++++++++++++++++++++++++ static int _handle_clan_command(t_connection * c, char const * text) @@ -3755,6 +3805,8 @@ namespace pvpgn } server_restart_wraper(mode); + std::sprintf(msgtemp, "Rehash [%s] is complete!", mode_str.c_str()); + message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -4753,17 +4805,18 @@ namespace pvpgn return 0; } - for (char& g : args[3]) { - if (g == '1') groups |= 1; - else if (g == '2') groups |= 2; - else if (g == '3') groups |= 4; - else if (g == '4') groups |= 8; - else if (g == '5') groups |= 16; - else if (g == '6') groups |= 32; - else if (g == '7') groups |= 64; - else if (g == '8') groups |= 128; + // iterate chars in string + for (std::string::iterator g = args[3].begin(); g != args[3].end(); ++g) { + if (*g == '1') groups |= 1; + else if (*g == '2') groups |= 2; + else if (*g == '3') groups |= 4; + else if (*g == '4') groups |= 8; + else if (*g == '5') groups |= 16; + else if (*g == '6') groups |= 32; + else if (*g == '7') groups |= 64; + else if (*g == '8') groups |= 128; else { - snprintf(msgtemp, sizeof(msgtemp), "Got bad group: %c", g); + snprintf(msgtemp, sizeof(msgtemp), "Got bad group: %c", *g); message_send_text(c, message_type_info, c, msgtemp); return 0; } diff --git a/src/bnetd/command.h b/src/bnetd/command.h index 31fa6aef2..2ecf52e91 100644 --- a/src/bnetd/command.h +++ b/src/bnetd/command.h @@ -21,6 +21,8 @@ #define INCLUDED_COMMAND_PROTOS #define JUST_NEED_TYPES +#include +#include #include "connection.h" #undef JUST_NEED_TYPES @@ -31,6 +33,7 @@ namespace pvpgn { extern int handle_command(t_connection * c, char const * text); + extern std::vector split_command(char const * text, int args_count); } diff --git a/src/bnetd/helpfile.cpp b/src/bnetd/helpfile.cpp index 48de29c6d..81d77fc7a 100644 --- a/src/bnetd/helpfile.cpp +++ b/src/bnetd/helpfile.cpp @@ -199,7 +199,7 @@ namespace pvpgn if (line[i] == '#') line[i] = '\0'; // replace tabs with 3 spaces - line = (char*)str_replace(line, "\t", " "); + line = str_replace(line, "\t", " "); // if text starts with slash then make it colored int j = 0; for (; line[j] == ' ' || line[j] == '\t'; j++); if (line[j] == '/') diff --git a/src/bnetd/icons.cpp b/src/bnetd/icons.cpp index 4f6e42ec1..9b541c018 100644 --- a/src/bnetd/icons.cpp +++ b/src/bnetd/icons.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include "compat/strcasecmp.h" #include "compat/snprintf.h" @@ -47,6 +48,7 @@ #include "message.h" #include "helpfile.h" #include "channel.h" +#include "command.h" namespace pvpgn { @@ -111,7 +113,7 @@ namespace pvpgn // get current user icon if (usericon = account_get_user_icon(account, clienttag)) - usericon = strrev(xstrdup(usericon)); + usericon = strreverse(xstrdup(usericon)); bool is_found = false; // get user stash @@ -170,7 +172,7 @@ namespace pvpgn if (!(iconcode = customicons_stash_find(clienttag, iconname))) { // set icon code from args - std::transform(args[1].begin(), args[1].end(), args[1].begin(), std::toupper); // to upper + std::transform(args[1].begin(), args[1].end(), args[1].begin(), ::toupper); // to upper iconcode = args[1].c_str(); } if (!is_found || strlen(iconcode) != 4) @@ -282,7 +284,7 @@ namespace pvpgn case 'l': // get current user icon if (usericon = account_get_user_icon(account, clienttag)) - usericon = strrev(xstrdup(usericon)); + usericon = strreverse(xstrdup(usericon)); // get user stash if (char const * iconstash = account_get_user_iconstash(account, clienttag)) @@ -393,7 +395,7 @@ namespace pvpgn { // get current user icon if (usericon = account_get_user_icon(account, clienttag)) - usericon = strrev(xstrdup(usericon)); + usericon = strreverse(xstrdup(usericon)); std::string s(iconstash); std::istringstream iss(s); diff --git a/src/bnetd/ipban.cpp b/src/bnetd/ipban.cpp index 80ef4b8f8..a62625269 100644 --- a/src/bnetd/ipban.cpp +++ b/src/bnetd/ipban.cpp @@ -43,6 +43,7 @@ #include "connection.h" #include "common/setup_after.h" #include "helpfile.h" +#include "command.h" namespace pvpgn { diff --git a/src/bnetd/mail.cpp b/src/bnetd/mail.cpp index 9e2f700e6..58f8ef556 100644 --- a/src/bnetd/mail.cpp +++ b/src/bnetd/mail.cpp @@ -41,6 +41,7 @@ #include "connection.h" #include "common/setup_after.h" #include "helpfile.h" +#include "command.h" namespace pvpgn diff --git a/src/bnetd/sql_odbc.cpp b/src/bnetd/sql_odbc.cpp index 6566eb21e..2e2e639f2 100644 --- a/src/bnetd/sql_odbc.cpp +++ b/src/bnetd/sql_odbc.cpp @@ -24,6 +24,7 @@ #include #include "common/eventlog.h" #include "common/xalloc.h" +#include "common/xstring.h" #include "storage_sql.h" #include "sql_odbc.h" #include "common/setup_after.h" @@ -397,7 +398,7 @@ namespace pvpgn } p_SQLColAttribute(res->stmt, i + 1, SQL_DESC_NAME, fName, fNameSz, &fNameSz, NULL); tmp = fName; - for (; *tmp; ++tmp) *tmp = std::toupper(*tmp); + for (; *tmp; ++tmp) *tmp = safe_toupper(*tmp); fields[i] = fName; } return fields; diff --git a/src/bnetd/topic.cpp b/src/bnetd/topic.cpp index 9dcc3dda8..6f7a8b49b 100644 --- a/src/bnetd/topic.cpp +++ b/src/bnetd/topic.cpp @@ -216,7 +216,7 @@ namespace pvpgn { char msgtemp[MAX_MESSAGE_LEN]; char *topic, *tmp, *token; - char * delim = "\\"; + const char * delim = "\\"; if (!(topic = channel_get_topic(channel_name))) return -1; @@ -246,7 +246,7 @@ namespace pvpgn message_send_text(c, message_type_info, c, msgtemp); - token = strtok(NULL, delim); + token = strtok(NULL, (const char*)delim); first = false; } xfree((void *)tmp); diff --git a/src/bnetd/versioncheck.cpp b/src/bnetd/versioncheck.cpp index f377e0e70..b2a3f5ac6 100644 --- a/src/bnetd/versioncheck.cpp +++ b/src/bnetd/versioncheck.cpp @@ -38,6 +38,7 @@ #include "common/field_sizes.h" #include "common/token.h" #include "common/proginfo.h" +#include "common/xstring.h" #include "prefs.h" #include "common/setup_after.h" @@ -272,7 +273,6 @@ namespace pvpgn return parsed_exeinfo; } -#define safe_toupper(X) (std::islower((int)X)?std::toupper((int)X):(X)) /* This implements some dumb kind of pattern matching. Any '?' * signs in the pattern are treated as "don't care" signs. This diff --git a/src/common/bnetsrp3.cpp b/src/common/bnetsrp3.cpp index aaf43b3cc..6d88f4424 100644 --- a/src/common/bnetsrp3.cpp +++ b/src/common/bnetsrp3.cpp @@ -35,6 +35,7 @@ #include "common/util.h" #include "common/xalloc.h" #include "compat/uint.h" +#include "common/xstring.h" #include "common/setup_after.h" @@ -78,7 +79,7 @@ namespace pvpgn symbol = username; for (i = 0; i < username_length; i++) { - *(symbol++) = std::toupper(*(source++)); + *(symbol++) = safe_toupper(*(source++)); } if (!((password_ == NULL) ^ (salt_ == NULL))) { @@ -93,7 +94,7 @@ namespace pvpgn symbol = password; for (i = 0; i < password_length; i++) { - *(symbol++) = std::toupper(*(source++)); + *(symbol++) = safe_toupper(*(source++)); } a = BigInt::random(32) % N; s = BigInt::random(32); diff --git a/src/common/tag.cpp b/src/common/tag.cpp index e32bed797..44f42e700 100644 --- a/src/common/tag.cpp +++ b/src/common/tag.cpp @@ -27,6 +27,7 @@ #include "common/eventlog.h" #include "common/xalloc.h" +#include "common/xstring.h" #include "common/setup_after.h" namespace pvpgn @@ -122,10 +123,7 @@ namespace pvpgn eventlog(eventlog_level_warn, __FUNCTION__, "got unusual sized clienttag '%s'", tag_str); for (i = 0; i < len && i < 4; i++) - if (std::islower((int)tag_str[i])) - temp_str[i] = std::toupper((int)tag_str[i]); - else - temp_str[i] = tag_str[i]; + temp_str[i] = safe_toupper(tag_str[i]); temp_str[4] = '\0'; diff --git a/src/common/xstring.cpp b/src/common/xstring.cpp index 992a7a8a3..1f1670d93 100644 --- a/src/common/xstring.cpp +++ b/src/common/xstring.cpp @@ -273,7 +273,7 @@ namespace pvpgn // You must free the result if result is non-NULL. - extern const char *str_replace(char *orig, char *rep, char *with) + extern char *str_replace(char *orig, char *rep, char *with) { char *result; // the return string char *ins; // the next insert point @@ -319,54 +319,6 @@ namespace pvpgn } - /* - * Split text by spaces and return array of arguments. - * First text argument is a command name (index = 0) - * Last text argument always reads to end - */ - extern std::vector split_command(char const * text, int args_count) - { - int count = 1 + args_count; - std::vector result(count); - - std::string s(text); - std::istringstream iss(s); - - int i = 0; - std::string tmp = std::string(); // to end - do - { - std::string sub; - iss >> sub; - - if (sub.empty()) - continue; - - // remove slash from the command - if (i == 0) - sub.erase(0, 1); - - if (i < args_count) - { - result[i] = sub; - i++; - } - else - { - if (!tmp.empty()) - tmp += " "; - tmp += sub; - } - - } while (iss); - - // push remaining text at the end - if (tmp.length() > 0) - result[count - 1] = tmp; - - return result; - } - /* Replace "\n" in string to a new line character '\n' */ extern std::string str_replace_nl(char const * text) { diff --git a/src/common/xstring.h b/src/common/xstring.h index 6c7821081..01c4d112e 100644 --- a/src/common/xstring.h +++ b/src/common/xstring.h @@ -20,6 +20,7 @@ #include +#include #include namespace pvpgn @@ -32,10 +33,11 @@ namespace pvpgn extern char * * strtoargv(char const * str, unsigned int * count); extern char * arraytostr(char * * array, char const * delim, int count); extern char * str_strip_affix(char * str, char const * affix); - extern const char *str_replace(char *orig, char *rep, char *with); - extern std::vector split_command(char const * text, int args_count); + extern char *str_replace(char *orig, char *rep, char *with); extern std::string str_replace_nl(char const * text); + #define safe_toupper(X) (std::islower((int)X)?std::toupper((int)X):(X)) + /* Fix for std::string for some unix compilers http://stackoverflow.com/a/20861692/701779 From 9895a040304f97887bc71a1d9e7b1c983e27de44 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 27 May 2014 14:46:02 +0400 Subject: [PATCH 036/144] set different config path for Windows and Linux --- cmake/Modules/DefineInstallationPaths.cmake | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/cmake/Modules/DefineInstallationPaths.cmake b/cmake/Modules/DefineInstallationPaths.cmake index bcff17e5d..e7d99d855 100644 --- a/cmake/Modules/DefineInstallationPaths.cmake +++ b/cmake/Modules/DefineInstallationPaths.cmake @@ -81,12 +81,20 @@ SET(LOCALE_INSTALL_DIR FORCE ) +if(WIN32) + SET(SYSCONF_INSTALL_DIR + "${EXEC_INSTALL_PREFIX}conf" + CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default conf)" + FORCE + ) +else(WIN32) + SET(SYSCONF_INSTALL_DIR + "${EXEC_INSTALL_PREFIX}/etc" + CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default prefix/etc)" + FORCE + ) +endif(WIN32) -SET(SYSCONF_INSTALL_DIR - "${EXEC_INSTALL_PREFIX}/etc" - CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default prefix/etc)" - FORCE -) SET(MAN_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/man" CACHE PATH "The ${APPLICATION_NAME} man install dir (default prefix/man)" From e5493046a266a24305b387a6d01497425945aa13 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 27 May 2014 14:51:06 +0400 Subject: [PATCH 037/144] update several Lua api functions (return object(table) instead of name(string) is more convenient) --- lua/extend/account.lua | 4 +-- lua/extend/channel.lua | 8 +++--- lua/extend/game.lua | 2 +- lua/extend/message.lua | 4 +-- src/bnetd/luafunctions.cpp | 50 ++++++++++++++++++++++++++++++++------ src/bnetd/luafunctions.h | 1 + src/bnetd/luainterface.cpp | 1 + src/bnetd/luaobjects.cpp | 19 +++++++++++---- src/bnetd/luaobjects.h | 1 + 9 files changed, 68 insertions(+), 22 deletions(-) diff --git a/lua/extend/account.lua b/lua/extend/account.lua index f04e6a673..dbd549cc7 100644 --- a/lua/extend/account.lua +++ b/lua/extend/account.lua @@ -9,7 +9,7 @@ -- Get count of all online users function users_get_count() local count = 0 - for id,username in pairs(api.server_get_users()) do + for i,account in pairs(api.server_get_users()) do count = count + 1 end return count @@ -18,7 +18,7 @@ end -- Get count of all server account function accounts_get_count() local count = 0 - for id,username in pairs(api.server_get_users(true)) do + for i,account in pairs(api.server_get_users(true)) do count = count + 1 end return count diff --git a/lua/extend/channel.lua b/lua/extend/channel.lua index 48300aa8e..8b5443ffb 100644 --- a/lua/extend/channel.lua +++ b/lua/extend/channel.lua @@ -8,9 +8,9 @@ -- Return channel id by name (if channel not found then return -1) function channel_get_id_by_name(channel_name) - for id,name in pairs(api.server_get_channels()) do - if name == channel_name then - return id + for i,channel in pairs(api.server_get_channels()) do + if channel.name == channel_name then + return channel.id end end return -1 @@ -36,7 +36,7 @@ end -- Get count of all channels function channels_get_count() local count = 0 - for id,channelname in pairs(api.server_get_channels()) do + for i,channel in pairs(api.server_get_channels()) do count = count + 1 end return count diff --git a/lua/extend/game.lua b/lua/extend/game.lua index 19855ba91..059a1b200 100644 --- a/lua/extend/game.lua +++ b/lua/extend/game.lua @@ -9,7 +9,7 @@ -- Get count of all games function games_get_count() local count = 0 - for id,gamename in pairs(api.server_get_games()) do + for i,game in pairs(api.server_get_games()) do count = count + 1 end return count diff --git a/lua/extend/message.lua b/lua/extend/message.lua index 1eeb303c8..62767b3cd 100644 --- a/lua/extend/message.lua +++ b/lua/extend/message.lua @@ -8,8 +8,8 @@ -- Send announce to all connected users function message_send_all(text) - for id,username in pairs(api.server_get_users()) do - api.message_send_text(username, message_type_broadcast, nil, text) + for i,account in pairs(api.server_get_users()) do + api.message_send_text(account.name, message_type_broadcast, nil, text) end end diff --git a/src/bnetd/luafunctions.cpp b/src/bnetd/luafunctions.cpp index b05949aba..3d42927c7 100644 --- a/src/bnetd/luafunctions.cpp +++ b/src/bnetd/luafunctions.cpp @@ -104,9 +104,14 @@ namespace pvpgn c_src = account_get_conn(account); // send message - // (source can be NULL, but destination cant) if (c_dst) + { + // assign the same src connection, if it null + if (!c_src) + c_src = c_dst; + message_send_text(c_dst, (t_message_type)message_type, c_src, text); + } return 0; } @@ -165,6 +170,34 @@ namespace pvpgn return 1; } + + /* Get one account table object */ + extern int __account_get_by_id(lua_State* L) + { + unsigned int userid; + std::map o_account; + + try + { + lua::stack st(L); + // get args + st.at(1, userid); + o_account = get_account_object(userid); + + st.push(o_account); + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + + return 1; + } + /* Get account attribute value */ extern int __account_get_attr(lua_State* L) { @@ -465,7 +498,7 @@ namespace pvpgn { bool allaccounts = false; const char *username; - std::map users; + std::vector > users; t_connection * conn; t_account * account; @@ -481,7 +514,7 @@ namespace pvpgn HASHTABLE_TRAVERSE(accountlist(), curr) { if (account = (t_account*)entry_get_data(curr)) - users[account_get_uid(account)] = account_get_name(account); + users.push_back(get_account_object(account)); } } else @@ -490,7 +523,8 @@ namespace pvpgn LIST_TRAVERSE_CONST(connlist(), curr) { if (conn = (t_connection*)elem_get_data(curr)) - users[conn_get_userid(conn)] = conn_get_username(conn); + if (account = conn_get_account(conn)) + users.push_back(get_account_object(account)); } } st.push(users); @@ -508,7 +542,7 @@ namespace pvpgn /* Get game list table (id => name) */ extern int __server_get_games(lua_State* L) { - std::map games; + std::vector > games; t_game * game; try @@ -519,7 +553,7 @@ namespace pvpgn elist_for_each(curr, gamelist()) { if (game = elist_entry(curr, t_game, glist_link)) - games[game_get_id(game)] = game_get_name(game); + games.push_back(get_game_object(game)); } st.push(games); } @@ -537,7 +571,7 @@ namespace pvpgn /* Get channel list (id => name) */ extern int __server_get_channels(lua_State* L) { - std::map channels; + std::vector > channels; t_channel * channel; try @@ -548,7 +582,7 @@ namespace pvpgn LIST_TRAVERSE(channellist(), curr) { if (channel = (t_channel*)elem_get_data(curr)) - channels[channel_get_channelid(channel)] = channel_get_name(channel); + channels.push_back(get_channel_object(channel)); } st.push(channels); } diff --git a/src/bnetd/luafunctions.h b/src/bnetd/luafunctions.h index eab410122..dfcb1631d 100644 --- a/src/bnetd/luafunctions.h +++ b/src/bnetd/luafunctions.h @@ -35,6 +35,7 @@ namespace pvpgn extern int __eventlog(lua_State* L); extern int __account_get_by_name(lua_State* L); + extern int __account_get_by_id(lua_State* L); extern int __account_get_attr(lua_State* L); extern int __account_set_attr(lua_State* L); extern int __account_get_friends(lua_State* L); diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 0f27b9c07..9f574fcfd 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -124,6 +124,7 @@ namespace pvpgn { { "message_send_text", __message_send_text }, { "eventlog", __eventlog }, + { "account_get_by_id", __account_get_by_id }, { "account_get_by_name", __account_get_by_name }, { "account_get_attr", __account_get_attr }, { "account_set_attr", __account_set_attr }, diff --git a/src/bnetd/luaobjects.cpp b/src/bnetd/luaobjects.cpp index d073eca2c..51fdadfc8 100644 --- a/src/bnetd/luaobjects.cpp +++ b/src/bnetd/luaobjects.cpp @@ -66,6 +66,17 @@ namespace pvpgn template T join(const A &begin, const A &end, const T &t); + extern std::map get_account_object(unsigned int userid) + { + std::map o_account; + + if (userid == 0) + return o_account; + + if (t_account * account = accountlist_find_account_by_uid(userid)) + o_account = get_account_object(account); + return o_account; + } extern std::map get_account_object(const char * username) { std::map o_account; @@ -265,7 +276,7 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "found NULL name in banlist"); continue; } - members.push_back(b); + bans.push_back(b); } } o_channel["banlist"] = join(bans.begin(), bans.end(), std::string(",")); @@ -289,7 +300,7 @@ namespace pvpgn o_clan["clan_motd"] = clan->clan_motd; o_clan["channel_type"] = std_to_string(clan->channel_type); // 0--public 1--private - // - clanmembers can be get from lua_clan_get_members + // clanmembers can be get from api.clan_get_members return o_clan; } @@ -347,9 +358,7 @@ namespace pvpgn if (!f) return o_friend; - o_friend["username"] = account_get_name(f->friendacc); - o_friend["mutual"] = std_to_string(f->mutual); // -1 - unloaded(used to remove deleted elems when reload); 0 - not mutual ; 1 - is mutual - + o_friend = get_account_object(f->friendacc); return o_friend; } diff --git a/src/bnetd/luaobjects.h b/src/bnetd/luaobjects.h index 309afb4b6..48debad29 100644 --- a/src/bnetd/luaobjects.h +++ b/src/bnetd/luaobjects.h @@ -37,6 +37,7 @@ namespace pvpgn namespace bnetd { + extern std::map get_account_object(unsigned int userid); extern std::map get_account_object(const char *username); extern std::map get_account_object(t_account *account); extern std::map get_game_object(unsigned int gameid); From b5a7d5562248617d5d4d9467002c2fc00032bfe3 Mon Sep 17 00:00:00 2001 From: xboi209 Date: Thu, 5 Jun 2014 12:16:53 -0700 Subject: [PATCH 038/144] Packet 0x17 support --- src/common/bnet_protocol.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/common/bnet_protocol.h b/src/common/bnet_protocol.h index 8e275cb74..464157a12 100644 --- a/src/common/bnet_protocol.h +++ b/src/common/bnet_protocol.h @@ -3270,13 +3270,22 @@ namespace pvpgn /******************************************************/ /* seen in SC107a */ -#define CLIENT_UNKNOWN_17 0x17ff +#define CLIENT_READMEMORY 0x17ff typedef struct { t_bnet_header h; - /* FIXME: what is in here... is there a cooresponding - server packet? */ - } PACKED_ATTR() t_client_unknown_17; + bn_int request_id; + bn_byte memory; + } PACKED_ATTR() t_client_readmemory; + +#define SERVER_READMEMORY 0x17ff + typedef struct + { + t_bnet_header h; + bn_int request_id; + bn_int address; + bn_int length; + } PACKED_ATTR() t_server_readmemory; /******************************************************/ From f098dceb5f50897d20b693ee8f884b5f47014c87 Mon Sep 17 00:00:00 2001 From: xboi209 Date: Thu, 5 Jun 2014 12:25:37 -0700 Subject: [PATCH 039/144] Update packet.cpp --- src/common/packet.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/packet.cpp b/src/common/packet.cpp index 33fec355f..a34631b35 100644 --- a/src/common/packet.cpp +++ b/src/common/packet.cpp @@ -431,8 +431,8 @@ namespace pvpgn return "CLIENT_ADCLICK"; case CLIENT_ADCLICK2: return "CLIENT_ADCLICK2"; - case CLIENT_UNKNOWN_17: - return "CLIENT_UNKNOWN_17"; + case CLIENT_READMEMORY: + return "CLIENT_READMEMORY"; case CLIENT_UNKNOWN_24: return "CLIENT_UNKNOWN_24"; case CLIENT_LADDERREQ: @@ -684,6 +684,8 @@ namespace pvpgn return "SERVER_ADREPLY"; case SERVER_ADCLICKREPLY2: return "SERVER_ADCLICKREPLY2"; + case SERVER_READMEMORY: + return "SERVER_READMEMORY"; case SERVER_LADDERREPLY: return "SERVER_LADDERREPLY"; case SERVER_ECHOREQ: From be43779622fa0c133f4d5e0161f18702c5bd116e Mon Sep 17 00:00:00 2001 From: xboi209 Date: Thu, 5 Jun 2014 12:39:40 -0700 Subject: [PATCH 040/144] Update handle_bnet.cpp --- src/bnetd/handle_bnet.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/bnetd/handle_bnet.cpp b/src/bnetd/handle_bnet.cpp index 160941643..78fdd301f 100644 --- a/src/bnetd/handle_bnet.cpp +++ b/src/bnetd/handle_bnet.cpp @@ -136,6 +136,7 @@ namespace pvpgn static int _client_adack(t_connection * c, t_packet const *const packet); static int _client_adclick(t_connection * c, t_packet const *const packet); static int _client_adclick2(t_connection * c, t_packet const *const packet); + static int _client_readmemory(t_connection * c, t_packet const *const packet); static int _client_statsupdate(t_connection * c, t_packet const *const packet); static int _client_playerinforeq(t_connection * c, t_packet const *const packet); static int _client_progident2(t_connection * c, t_packet const *const packet); @@ -236,6 +237,7 @@ namespace pvpgn { CLIENT_ADACK, _client_adack }, { CLIENT_ADCLICK, _client_adclick }, { CLIENT_ADCLICK2, _client_adclick2 }, + { CLIENT_READMEMORY, _client_readmemory }, { CLIENT_STATSREQ, _client_statsreq }, { CLIENT_STATSUPDATE, _client_statsupdate }, { CLIENT_PLAYERINFOREQ, _client_playerinforeq }, @@ -3293,6 +3295,18 @@ namespace pvpgn return 0; } + + static int _client_readmemory(t_connection * c, t_packet const *const packet) + { + if (packet_get_size(packet) < sizeof(t_client_readmemory)) { + eventlog(eventlog_level_error, __FUNCTION__, "[%d] got bad READMEMORY packet (expected %lu bytes, got %u)", conn_get_socket(c), sizeof(t_client_readmemory), packet_get_size(packet)); + return -1; + } + + eventlog(eventlog_level_debug, __FUNCTION__, "[%d] Received READMEMORY packet with Request ID: %d and Memory: %d", conn_get_socket(c), bn_int_get(packet->u.client_readmemory.request_id), bn_int_get(packet->u.client_readmemory.memory)); + + return 0; + } static int _client_statsupdate(t_connection * c, t_packet const *const packet) { From 8f27283fb5eaf89569766aeb01f4ae7e84c381cd Mon Sep 17 00:00:00 2001 From: xboi209 Date: Thu, 5 Jun 2014 12:41:49 -0700 Subject: [PATCH 041/144] Update packet.h --- src/common/packet.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/packet.h b/src/common/packet.h index e3c21b318..f3741ae6b 100644 --- a/src/common/packet.h +++ b/src/common/packet.h @@ -147,6 +147,8 @@ namespace pvpgn t_client_adclick client_adclick; t_client_adclick2 client_adclick2; t_server_adclickreply2 server_adclickreply2; + t_client_readmemory client_readmemory; + t_server_readmemory server_readmemory; t_client_game_report client_gamerep; t_server_sessionkey1 server_sessionkey1; t_server_sessionkey2 server_sessionkey2; From 7c40b0d10cd2090bbf342b2434e62e4ec83d75c0 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 15 Jun 2014 22:04:14 +0400 Subject: [PATCH 042/144] Fix automatic unban when user login with Warcraft 3 https://github.com/HarpyWar/pvpgn/issues/27 Extract duplicated code for output author, time, reason into a function --- src/bnetd/account_wrap.cpp | 38 +++++++++++++++++++++++++++++ src/bnetd/account_wrap.h | 1 + src/bnetd/channel.cpp | 28 ++------------------- src/bnetd/command.cpp | 50 +++++++++++--------------------------- src/bnetd/handle_bnet.cpp | 34 ++++---------------------- 5 files changed, 60 insertions(+), 91 deletions(-) diff --git a/src/bnetd/account_wrap.cpp b/src/bnetd/account_wrap.cpp index 46bb0fa67..60f4dc2d3 100644 --- a/src/bnetd/account_wrap.cpp +++ b/src/bnetd/account_wrap.cpp @@ -39,6 +39,8 @@ #include "clan.h" #include "anongame_infos.h" #include "team.h" +#include "server.h" +#include "compat/snprintf.h" #include "common/setup_after.h" namespace pvpgn @@ -450,6 +452,42 @@ namespace pvpgn return account_set_strattr(account, "BNET\\auth\\muteby", val); } + + /* Return text with account lock */ + extern char * account_get_locktext(t_account * account, bool with_author) + { + char msgtemp[MAX_MESSAGE_LEN], msgtemp2[MAX_MESSAGE_LEN]; + snprintf(msgtemp, sizeof(msgtemp), ""); + + // append author of ban + if (with_author) + { + if (char const * author = account_get_auth_lockby(account)) + if (author && author[0] != '\0') + { + snprintf(msgtemp2, sizeof(msgtemp2), " by %s", author); + std::strcat(msgtemp, msgtemp2); + } + } + + // append remaining time + if (unsigned int locktime = account_get_auth_locktime(account)) + snprintf(msgtemp2, sizeof(msgtemp2), " for %.48s", seconds_to_timestr(locktime - now)); + else + snprintf(msgtemp2, sizeof(msgtemp2), " permanently"); + std::strcat(msgtemp, msgtemp2); + + // append reason + char const * reason = account_get_auth_lockreason(account); + if (reason && reason[0] != '\0') + { + snprintf(msgtemp2, sizeof(msgtemp2), " with a reason \"%s\"", reason); + std::strcat(msgtemp, msgtemp2); + } + return msgtemp; + } + + /****************************************************************/ diff --git a/src/bnetd/account_wrap.h b/src/bnetd/account_wrap.h index 63d7671e0..4d12245dc 100644 --- a/src/bnetd/account_wrap.h +++ b/src/bnetd/account_wrap.h @@ -93,6 +93,7 @@ namespace pvpgn extern int account_set_auth_mutetime(t_account * account, unsigned int val); extern int account_set_auth_mutereason(t_account * account, char const * val); extern int account_set_auth_muteby(t_account * account, char const * val); + extern char * account_get_locktext(t_account * account, bool with_author = true); /* profile */ extern char const * account_get_sex(t_account * account); /* the profile attributes are updated directly in bnetd.c */ diff --git a/src/bnetd/channel.cpp b/src/bnetd/channel.cpp index 39cc8ba40..46690a19a 100644 --- a/src/bnetd/channel.cpp +++ b/src/bnetd/channel.cpp @@ -681,36 +681,12 @@ namespace pvpgn if (type != message_type_join && type != message_type_part) return; - // if user muted + // if user is muted if (account_get_auth_mute(acc) == 1) { char msgtemp[MAX_MESSAGE_LEN], msgtemp2[MAX_MESSAGE_LEN]; - snprintf(msgtemp, sizeof(msgtemp), "You can't talk on the channel. Your account has been muted"); - - // append author of ban - char const * author = account_get_auth_muteby(acc); - if (author && author[0] != '\0') - { - snprintf(msgtemp2, sizeof(msgtemp2), " by %s", author); - std::strcat(msgtemp, msgtemp2); - } - - // append remaining time - if (unsigned int locktime = account_get_auth_mutetime(acc)) - snprintf(msgtemp2, sizeof(msgtemp2), " for %.48s", seconds_to_timestr(locktime - std::time(NULL))); - else - snprintf(msgtemp2, sizeof(msgtemp2), " permanently"); - std::strcat(msgtemp, msgtemp2); - - // append reason - char const * reason = account_get_auth_mutereason(acc); - if (reason && reason[0] != '\0') - { - snprintf(msgtemp2, sizeof(msgtemp2), " with a reason \"%s\"", reason); - std::strcat(msgtemp, msgtemp2); - } - + snprintf(msgtemp, sizeof(msgtemp), "You can't talk on the channel. Your account has been muted%s", account_get_locktext(acc, true)); message_send_text(me, message_type_error, me, msgtemp); return; } diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 3bffe54d3..e3d3b613c 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -4298,7 +4298,6 @@ namespace pvpgn t_account * account; char const * username, *reason = "", *hours = "24"; // default time 24 hours unsigned int sectime; - char msgtemp3[MAX_MESSAGE_LEN]; std::vector args = split_command(text, 3); if (args[1].empty()) @@ -4325,28 +4324,15 @@ namespace pvpgn account_set_auth_lockby(account, conn_get_username(c)); - // append remaining time - if (sectime == 0) - snprintf(msgtemp3, sizeof(msgtemp3), " permanently"); - else - snprintf(msgtemp3, sizeof(msgtemp3), " for %.48s", seconds_to_timestr(sectime - now)); - - // append reason - if (reason[0] != '\0') - { - snprintf(msgtemp2, sizeof(msgtemp2), " with a reason \"%s\"", reason); - std::strcat(msgtemp3, msgtemp2); - } - // send message to author - snprintf(msgtemp, sizeof(msgtemp), "Account %s is now locked%s", account_get_name(account), msgtemp3); + snprintf(msgtemp, sizeof(msgtemp), "Account %s is now locked%s", account_get_name(account), account_get_locktext(account, false)); message_send_text(c, message_type_error, c, msgtemp); // send message to locked user if ((user = connlist_find_connection_by_accountname(username))) { - snprintf(msgtemp, sizeof(msgtemp), "Your account has just been locked by %s%s", conn_get_username(c), msgtemp3); - message_send_text(user, message_type_info, user, msgtemp); + snprintf(msgtemp, sizeof(msgtemp), "Your account has just been locked%s", account_get_locktext(account, true)); + message_send_text(user, message_type_error, user, msgtemp); } return 0; @@ -4372,7 +4358,10 @@ namespace pvpgn } if ((user = connlist_find_connection_by_accountname(text))) - message_send_text(user, message_type_info, user, "Your account has just been unlocked by an admin."); + { + snprintf(msgtemp, sizeof(msgtemp), "Your account has just been unlocked by %s", conn_get_username(c)); + message_send_text(user, message_type_info, user, msgtemp); + } account_set_auth_lock(account, 0); message_send_text(c, message_type_error, c, "That user's account is now unlocked."); @@ -4386,7 +4375,6 @@ namespace pvpgn t_account * account; char const * username, *reason = "", *hours = "1"; // default time 1 hour unsigned int sectime; - char msgtemp3[MAX_MESSAGE_LEN]; std::vector args = split_command(text, 3); if (args[1].empty()) @@ -4413,28 +4401,15 @@ namespace pvpgn account_set_auth_mutereason(account, reason); account_set_auth_muteby(account, conn_get_username(c)); - // append remaining time - if (sectime == 0) - snprintf(msgtemp3, sizeof(msgtemp3), " permanently"); - else - snprintf(msgtemp3, sizeof(msgtemp3), " for %.48s", seconds_to_timestr(sectime - now)); - - // append reason - if (reason[0] != '\0') - { - snprintf(msgtemp2, sizeof(msgtemp2), " with a reason \"%s\"", reason); - std::strcat(msgtemp3, msgtemp2); - } - // send message to author - snprintf(msgtemp, sizeof(msgtemp), "Account %s is now muted%s", account_get_name(account), msgtemp3); + snprintf(msgtemp, sizeof(msgtemp), "Account %s is now muted%s", account_get_name(account), account_get_locktext(account, false)); message_send_text(c, message_type_error, c, msgtemp); // send message to muted user if ((user = connlist_find_connection_by_accountname(username))) { - snprintf(msgtemp, sizeof(msgtemp), "Your account has just been muted by %s%s", conn_get_username(c), msgtemp3); - message_send_text(user, message_type_info, user, msgtemp); + snprintf(msgtemp, sizeof(msgtemp), "Your account has just been muted%s", account_get_locktext(account, true)); + message_send_text(user, message_type_error, user, msgtemp); } return 0; @@ -4460,7 +4435,10 @@ namespace pvpgn } if ((user = connlist_find_connection_by_accountname(text))) - message_send_text(user, message_type_info, user, "Your account has just been unmuted by an admin."); + { + snprintf(msgtemp, sizeof(msgtemp), "Your account has just been unmuted by %s", conn_get_username(c)); + message_send_text(user, message_type_info, user, msgtemp); + } account_set_auth_mute(account, 0); message_send_text(c, message_type_error, c, "That user's account is now unmuted."); diff --git a/src/bnetd/handle_bnet.cpp b/src/bnetd/handle_bnet.cpp index 160941643..1b712c534 100644 --- a/src/bnetd/handle_bnet.cpp +++ b/src/bnetd/handle_bnet.cpp @@ -1687,34 +1687,9 @@ namespace pvpgn eventlog(eventlog_level_info, __FUNCTION__, "[%d] login for \"%s\" refused (this account is locked)", conn_get_socket(c), username); if (supports_locked_reply) { - char msgtemp[MAX_MESSAGE_LEN], msgtemp2[MAX_MESSAGE_LEN]; - snprintf(msgtemp, sizeof(msgtemp), "This account has been locked"); - - // append author of ban - if (char const * author = account_get_auth_lockby(account)) - if (author && author[0] != '\0') - { - snprintf(msgtemp2, sizeof(msgtemp2), " by %s", author); - std::strcat(msgtemp, msgtemp2); - } - - // append remaining time - if (unsigned int locktime = account_get_auth_locktime(account)) - snprintf(msgtemp2, sizeof(msgtemp2), " for %.48s", seconds_to_timestr(locktime - now)); - else - snprintf(msgtemp2, sizeof(msgtemp2), " permanently"); - std::strcat(msgtemp, msgtemp2); - - // append reason - char const * reason = account_get_auth_lockreason(account); - if (reason && reason[0] != '\0') - { - snprintf(msgtemp2, sizeof(msgtemp2), " with a reason \"%s\"", reason); - std::strcat(msgtemp, msgtemp2); - } - - bn_int_set(&rpacket->u.server_loginreply1.message, SERVER_LOGINREPLY2_MESSAGE_LOCKED); + char msgtemp[MAX_MESSAGE_LEN]; + snprintf(msgtemp, sizeof(msgtemp), "This account has been locked%s", account_get_locktext(account, true)); packet_append_string(rpacket, msgtemp); } else { @@ -2137,7 +2112,9 @@ namespace pvpgn else if (account_get_auth_lock(account) == 1) { /* default to false */ eventlog(eventlog_level_info, __FUNCTION__, "[%d] login for \"%s\" refused (this account is locked)", conn_get_socket(c), username); bn_int_set(&rpacket->u.server_logonproofreply.response, SERVER_LOGONPROOFREPLY_RESPONSE_CUSTOM); - packet_append_string(rpacket, "This account has been locked."); + char msgtemp[MAX_MESSAGE_LEN]; + snprintf(msgtemp, sizeof(msgtemp), "This account has been locked%s", account_get_locktext(account, true)); + packet_append_string(rpacket, msgtemp); } else { t_hash serverhash; @@ -5329,7 +5306,6 @@ namespace pvpgn eventlog(eventlog_level_info, __FUNCTION__, "[%d] get password for account \"%s\" to email \"%s\"", conn_get_socket(c), account_get_name(account), email); return 0; } - } } From fe552e627014d07b7f65fe5e38655be814d31185 Mon Sep 17 00:00:00 2001 From: xboi209 Date: Mon, 16 Jun 2014 12:58:49 -0700 Subject: [PATCH 043/144] update trackers --- conf/bnetd.conf.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/bnetd.conf.in b/conf/bnetd.conf.in index f797ccb48..e5887ba23 100644 --- a/conf/bnetd.conf.in +++ b/conf/bnetd.conf.in @@ -444,7 +444,7 @@ track = 60 # Use a comma delimited list of hostnames with optional UDP port numbers # after colons. (port 6114 is the default for the newer tracking protocol) #trackaddrs = "track.pvpgn.org,localhost:9999" -trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net" +trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net,bnet.mivabe.nl" # Change these to match your system, for example: location = "unknown" From d51534d27e5c7ea087fac8d65ae027a5a39a9ae7 Mon Sep 17 00:00:00 2001 From: xboi209 Date: Mon, 16 Jun 2014 12:59:35 -0700 Subject: [PATCH 044/144] update trackers --- conf/bnetd.conf.win32 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/bnetd.conf.win32 b/conf/bnetd.conf.win32 index b5ede90ce..7927a2512 100644 --- a/conf/bnetd.conf.win32 +++ b/conf/bnetd.conf.win32 @@ -421,7 +421,7 @@ track = 60 # Use a comma delimited list of hostnames with optional UDP port numbers # after colons. (port 6114 is the default for the newer tracking protocol) #trackaddrs = "track.pvpgn.org,localhost:9999" -trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net" +trackaddrs = "track.pvpgn.org,track.dreaming-bg.com,bntrack.darkwings.org,track.muleslow.net,bnet.mivabe.nl" # Change these to match your system, for example: location = "unknown" From 9bd578c64d0abcf1c2b66d174bc2ab710262d610 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 17 Jun 2014 11:35:06 +0400 Subject: [PATCH 045/144] add client_readmemory function, and make it available to call/handle from Lua --- lua/handle_client.lua | 17 +++++++++++++++++ src/bnetd/connection.cpp | 37 +++++++++++++++++++++++++++++++++++++ src/bnetd/connection.h | 1 + src/bnetd/handle_bnet.cpp | 24 +++++++++++++++++++++--- src/bnetd/luafunctions.cpp | 33 +++++++++++++++++++++++++++++++++ src/bnetd/luafunctions.h | 2 ++ src/bnetd/luainterface.cpp | 33 +++++++++++++++++++++++++++++++++ src/bnetd/luainterface.h | 5 ++++- src/common/bnet_protocol.h | 2 +- 9 files changed, 149 insertions(+), 5 deletions(-) create mode 100644 lua/handle_client.lua diff --git a/lua/handle_client.lua b/lua/handle_client.lua new file mode 100644 index 000000000..71de22564 --- /dev/null +++ b/lua/handle_client.lua @@ -0,0 +1,17 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +function handle_client_readmemory(account, request_id, data) + + TRACE("Read memory request Id: " .. request_id) + + -- display memory bytes + DEBUG(data) + +end + diff --git a/src/bnetd/connection.cpp b/src/bnetd/connection.cpp index 123caa027..a37462a56 100644 --- a/src/bnetd/connection.cpp +++ b/src/bnetd/connection.cpp @@ -4193,6 +4193,43 @@ namespace pvpgn return c->protocol.wol.anongame_player; } + + + extern int conn_client_readmemory(t_connection * c, unsigned int request_id, unsigned int offset, unsigned int length) + { + t_packet * rpacket; + t_clienttag clienttag; + + if (!c) + { + eventlog(eventlog_level_error, __FUNCTION__, "got NULL conn"); + return -1; + } + clienttag = conn_get_clienttag(c); + + // disallow clients that doesn't support SID_READMEMORY + if (clienttag != CLIENTTAG_STARCRAFT_UINT && clienttag != CLIENTTAG_BROODWARS_UINT && clienttag != CLIENTTAG_STARJAPAN_UINT && clienttag != CLIENTTAG_SHAREWARE_UINT && + clienttag != CLIENTTAG_DIABLORTL_UINT && clienttag != CLIENTTAG_DIABLOSHR_UINT && clienttag != CLIENTTAG_WARCIIBNE_UINT) + { + return -1; + } + + if (!(rpacket = packet_create(packet_class_bnet))) + return -1; + + packet_set_size(rpacket, sizeof(t_server_readmemory)); + packet_set_type(rpacket, SERVER_READMEMORY); + + bn_int_set(&rpacket->u.server_readmemory.request_id, request_id); + bn_int_set(&rpacket->u.server_readmemory.address, offset); + bn_int_set(&rpacket->u.server_readmemory.length, length); + + conn_push_outqueue(c, rpacket); + packet_del_ref(rpacket); + + return 0; + } + } } diff --git a/src/bnetd/connection.h b/src/bnetd/connection.h index 8b21c36c8..fecff19cc 100644 --- a/src/bnetd/connection.h +++ b/src/bnetd/connection.h @@ -465,6 +465,7 @@ namespace pvpgn extern void conn_wol_set_anongame_player(t_connection * c, t_anongame_wol_player * anongame_player); extern t_anongame_wol_player * conn_wol_get_anongame_player(t_connection * c); + extern int conn_client_readmemory(t_connection * c, unsigned int request_id, unsigned int offset, unsigned int length); } } diff --git a/src/bnetd/handle_bnet.cpp b/src/bnetd/handle_bnet.cpp index 7dc8f21b7..bd6611ea0 100644 --- a/src/bnetd/handle_bnet.cpp +++ b/src/bnetd/handle_bnet.cpp @@ -45,6 +45,7 @@ #include "common/proginfo.h" #include "common/util.h" #include "common/bnetsrp3.h" +#include "common/xstring.h" #include "handlers.h" #include "connection.h" @@ -3275,13 +3276,30 @@ namespace pvpgn static int _client_readmemory(t_connection * c, t_packet const *const packet) { + char * memory; + unsigned int size, offset, request_id; + if (packet_get_size(packet) < sizeof(t_client_readmemory)) { eventlog(eventlog_level_error, __FUNCTION__, "[%d] got bad READMEMORY packet (expected %lu bytes, got %u)", conn_get_socket(c), sizeof(t_client_readmemory), packet_get_size(packet)); return -1; } - - eventlog(eventlog_level_debug, __FUNCTION__, "[%d] Received READMEMORY packet with Request ID: %d and Memory: %d", conn_get_socket(c), bn_int_get(packet->u.client_readmemory.request_id), bn_int_get(packet->u.client_readmemory.memory)); - + + request_id = bn_int_get(packet->u.client_readmemory.request_id); + + size = (unsigned int)packet_get_size(packet); + offset = sizeof(t_client_readmemory); + + eventlog(eventlog_level_debug, __FUNCTION__, "[%d] Received READMEMORY packet with Request ID: %d and Memory size: %d", conn_get_socket(c), request_id, size - offset); + +#ifdef WITH_LUA + std::vector _data; + for (int i = offset; i < size; i++) + { + _data.push_back(packet->u.data[i]); + } + lua_handle_client(c, request_id, _data, luaevent_client_readmemory); +#endif + return 0; } diff --git a/src/bnetd/luafunctions.cpp b/src/bnetd/luafunctions.cpp index 3d42927c7..1661cb2f5 100644 --- a/src/bnetd/luafunctions.cpp +++ b/src/bnetd/luafunctions.cpp @@ -707,6 +707,39 @@ namespace pvpgn } return 0; } + + /* Read memory of game client */ + extern int __client_readmemory(lua_State* L) + { + const char * username; + unsigned int request_id, offset, length; + int messagebox_type; + try + { + lua::stack st(L); + // get args + st.at(1, username); + st.at(2, request_id); + st.at(3, offset); + st.at(4, length); + + if (t_account * account = accountlist_find_account(username)) + { + if (t_connection * c = account_get_conn(account)) + conn_client_readmemory(c, request_id, offset, length); + } + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 0; + } + } } #endif \ No newline at end of file diff --git a/src/bnetd/luafunctions.h b/src/bnetd/luafunctions.h index dfcb1631d..2532c6bec 100644 --- a/src/bnetd/luafunctions.h +++ b/src/bnetd/luafunctions.h @@ -51,6 +51,8 @@ namespace pvpgn extern int __server_get_games(lua_State* L); extern int __server_get_channels(lua_State* L); + extern int __client_readmemory(lua_State* L); + extern int __command_get_group(lua_State* L); extern int __icon_get_rank(lua_State* L); extern int __describe_command(lua_State* L); diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 9f574fcfd..a0c2ad44a 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -139,6 +139,8 @@ namespace pvpgn { "server_get_games", __server_get_games }, { "server_get_channels", __server_get_channels }, + { "client_readmemory", __client_readmemory }, + { "command_get_group", __command_get_group }, { "icon_get_rank", __icon_get_rank }, { "describe_command", __describe_command }, @@ -509,6 +511,37 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); } } + + extern void lua_handle_client(t_connection * c, int request_id, std::vector data, t_luaevent_type luaevent) + { + t_account * account; + const char * func_name; + switch (luaevent) + { + case luaevent_client_readmemory: + func_name = "handle_client_readmemory"; + break; + default: + return; + } + try + { + if (!(account = conn_get_account(c))) + return; + + std::map o_account = get_account_object(account); + + lua::transaction(vm) << lua::lookup(func_name) << o_account << request_id << data << lua::invoke << lua::end; // invoke lua function + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + } #endif diff --git a/src/bnetd/luainterface.h b/src/bnetd/luainterface.h index cbb6d50e2..250e57303 100644 --- a/src/bnetd/luainterface.h +++ b/src/bnetd/luainterface.h @@ -54,7 +54,9 @@ namespace pvpgn luaevent_user_disconnect, luaevent_server_start, - luaevent_server_mainloop + luaevent_server_mainloop, + + luaevent_client_readmemory } t_luaevent_type; @@ -67,6 +69,7 @@ namespace pvpgn extern int lua_handle_channel(t_channel * channel, t_connection * c, char const * message_text, t_message_type message_type, t_luaevent_type luaevent); extern int lua_handle_user(t_connection * c, t_connection * c_dst, char const * message_text, t_luaevent_type luaevent); extern void lua_handle_server(t_luaevent_type luaevent); + extern void lua_handle_client(t_connection * c, int request_id, std::vector data, t_luaevent_type luaevent); } diff --git a/src/common/bnet_protocol.h b/src/common/bnet_protocol.h index 464157a12..af0185a41 100644 --- a/src/common/bnet_protocol.h +++ b/src/common/bnet_protocol.h @@ -3275,7 +3275,7 @@ namespace pvpgn { t_bnet_header h; bn_int request_id; - bn_byte memory; + /* Memory */ } PACKED_ATTR() t_client_readmemory; #define SERVER_READMEMORY 0x17ff From 3ed0b3542db5cc20b27e4e08c9565f44794117e5 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 17 Jun 2014 12:53:49 +0400 Subject: [PATCH 046/144] Lua various changes --- lua/extend/account.lua | 4 ++-- lua/extend/channel.lua | 2 +- lua/extend/enum/tag.lua | 43 +++++++++++++++++++++++++++++++++++++++++ lua/extend/eventlog.lua | 42 ++++++++++++++++++++++++++++++++++++++++ lua/extend/game.lua | 2 +- lua/handle_channel.lua | 6 +++--- lua/handle_server.lua | 2 +- lua/handle_user.lua | 6 +++--- lua/include/common.lua | 8 +++++++- lua/include/convert.lua | 32 ++++++++++++++++++++++++++++++ lua/include/file.lua | 4 ++-- lua/include/table.lua | 40 ++++++++++++++++++++++++++++++++++++++ lua/include/timer.lua | 2 +- 13 files changed, 178 insertions(+), 15 deletions(-) create mode 100644 lua/extend/enum/tag.lua create mode 100644 lua/extend/eventlog.lua create mode 100644 lua/include/convert.lua diff --git a/lua/extend/account.lua b/lua/extend/account.lua index dbd549cc7..05bdb5e3e 100644 --- a/lua/extend/account.lua +++ b/lua/extend/account.lua @@ -7,7 +7,7 @@ -- Get count of all online users -function users_get_count() +function users_count() local count = 0 for i,account in pairs(api.server_get_users()) do count = count + 1 @@ -16,7 +16,7 @@ function users_get_count() end -- Get count of all server account -function accounts_get_count() +function accounts_count() local count = 0 for i,account in pairs(api.server_get_users(true)) do count = count + 1 diff --git a/lua/extend/channel.lua b/lua/extend/channel.lua index 8b5443ffb..3f3faa9b8 100644 --- a/lua/extend/channel.lua +++ b/lua/extend/channel.lua @@ -34,7 +34,7 @@ end -- Get count of all channels -function channels_get_count() +function channels_count() local count = 0 for i,channel in pairs(api.server_get_channels()) do count = count + 1 diff --git a/lua/extend/enum/tag.lua b/lua/extend/enum/tag.lua new file mode 100644 index 000000000..9f183178c --- /dev/null +++ b/lua/extend/enum/tag.lua @@ -0,0 +1,43 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- Software tags +CLIENTTAG_BNCHATBOT, -- CHAT bot +CLIENTTAG_STARCRAFT, -- Starcraft (original) +CLIENTTAG_BROODWARS, -- Starcraft EXpansion Pack +CLIENTTAG_SHAREWARE, -- Starcraft Shareware +CLIENTTAG_DIABLORTL, -- Diablo ReTaiL +CLIENTTAG_DIABLOSHR, -- Diablo SHaReware +CLIENTTAG_WARCIIBNE, -- WarCraft II Battle.net Edition +CLIENTTAG_DIABLO2DV, -- Diablo II Diablo's Victory +CLIENTTAG_STARJAPAN, -- Starcraft (Japan) +CLIENTTAG_DIABLO2ST, -- Diablo II Stress Test +CLIENTTAG_DIABLO2XP, -- Diablo II Extension Pack +CLIENTTAG_WARCRAFT3, -- WarCraft III +CLIENTTAG_WAR3XP, -- WarCraft III Expansion +CLIENTTAG_IIRC, -- IRC + +-- Westwood Online tags +CLIENTTAG_WCHAT, -- Westwood Chat +CLIENTTAG_TIBERNSUN, -- Tiberian Sun +CLIENTTAG_TIBSUNXP, -- Tiberian Sun Extension Pack +CLIENTTAG_REDALERT, -- Red Alert 1 +CLIENTTAG_REDALERT2, -- Red Alert 2 +CLIENTTAG_DUNE2000, -- Dune 2000 +CLIENTTAG_NOX, -- NOX +CLIENTTAG_NOXQUEST, -- NOX Quest +CLIENTTAG_RENEGADE, -- Renegade +CLIENTTAG_RENGDFDS, -- Renegade Free Dedicated Server +CLIENTTAG_YURISREV, -- Yuri's Revenge +CLIENTTAG_EMPERORBD, -- Emperor: Battle for Dune +CLIENTTAG_LOFLORE3, -- Lands of Lore 3 +CLIENTTAG_WWOL, -- Other Westwood Online games + +CLIENTTAG_UNKNOWN + += "CHAT","STAR","SEXP","SSHR","DRTL","DSHR","W2BN","D2DV","JSTR","D2ST","D2XP","WAR3","W3XP","IIRC","WCHT","TSUN","TSXP","RALT","RAL2","DN2K","NOXX","NOXQ","RNGD","RFDS","YURI","EBFD","LOR3","WWOL","UNKN" \ No newline at end of file diff --git a/lua/extend/eventlog.lua b/lua/extend/eventlog.lua new file mode 100644 index 000000000..3ea0892c1 --- /dev/null +++ b/lua/extend/eventlog.lua @@ -0,0 +1,42 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + +-- Log event wrappers + +function FATAL(text) + api.eventlog(eventlog_level_fatal, __function__, text) +end + +function ERROR(text) + api.eventlog(eventlog_level_error, __function__, text) +end + +function WARN(text) + api.eventlog(eventlog_level_warn, __function__, text) +end + +function INFO(text) + api.eventlog(eventlog_level_info, __function__, text) +end + +function DEBUG(text) + if (type(text) == "table") then + table.print(text) + return + end + api.eventlog(eventlog_level_debug, __function__, text) +end + +function TRACE(text) + api.eventlog(eventlog_level_trace, __function__, text) +end + +function GUI(text) + api.eventlog(eventlog_level_gui, __function__, text) +end + + diff --git a/lua/extend/game.lua b/lua/extend/game.lua index 059a1b200..43a3d8925 100644 --- a/lua/extend/game.lua +++ b/lua/extend/game.lua @@ -7,7 +7,7 @@ -- Get count of all games -function games_get_count() +function games_count() local count = 0 for i,game in pairs(api.server_get_games()) do count = count + 1 diff --git a/lua/handle_channel.lua b/lua/handle_channel.lua index d54260bd8..261c27ee1 100644 --- a/lua/handle_channel.lua +++ b/lua/handle_channel.lua @@ -11,12 +11,12 @@ function handle_channel_message(channel, account, text, message_type) quiz_handle_message(account.name, text) end - --api.eventlog(eventlog_level_gui, __FUNCTION__, text) + --DEBUG(text) --return 1 end function handle_channel_userjoin(channel, account) - --api.eventlog(eventlog_level_gui, __FUNCTION__, account.name.." joined "..channel.name) + --DEBUG(account.name.." joined "..channel.name) end function handle_channel_userleft(channel, account) - --api.eventlog(eventlog_level_gui, __FUNCTION__, account.name.." left "..channel.name) + --DEBUG(account.name.." left "..channel.name) end diff --git a/lua/handle_server.lua b/lua/handle_server.lua index 8028314c0..6e5cf7519 100644 --- a/lua/handle_server.lua +++ b/lua/handle_server.lua @@ -13,5 +13,5 @@ function handle_server_mainloop() __timers[t]:tick() end - -- api.eventlog(eventlog_level_gui, __FUNCTION__, os.time()) + -- DEBUG(os.time()) end diff --git a/lua/handle_user.lua b/lua/handle_user.lua index 62e63aee3..4b10d4041 100644 --- a/lua/handle_user.lua +++ b/lua/handle_user.lua @@ -7,14 +7,14 @@ function handle_user_whisper(account_src, account_dst, text) - --api.eventlog(eventlog_level_gui, __FUNCTION__, account_src.name.."->"..account_dst.name.. ": ".. text) + --DEBUG(account_src.name.."->"..account_dst.name.. ": ".. text) --return 1; end function handle_user_login(account) - --api.eventlog(eventlog_level_gui, __FUNCTION__, account.name.." logged in") + --DEBUG(account.name.." logged in") --return 1; end function handle_user_disconnect(account) - --api.eventlog(eventlog_level_gui, __FUNCTION__, account.name.." disconnected") + --DEBUG(account.name.." disconnected") end diff --git a/lua/include/common.lua b/lua/include/common.lua index a4eaa7696..6573656c6 100644 --- a/lua/include/common.lua +++ b/lua/include/common.lua @@ -6,13 +6,19 @@ ]]-- --- Return the script path and line of the function where it is executed +-- Return the script path and line of the CURRENT function where it is executed __FUNCTION__ = nil +-- Return the script path and line of the PARENT function where it is executed +__function__ = nil + setmetatable(_G, {__index = function(t, k) if k == '__FUNCTION__' then local w = debug.getinfo(2, "S") return w.short_src..":"..w.linedefined + elseif k == '__function__' then + local w = debug.getinfo(2, "S") + return w.short_src..":"..w.linedefined end end }) diff --git a/lua/include/convert.lua b/lua/include/convert.lua new file mode 100644 index 000000000..123dcd6a5 --- /dev/null +++ b/lua/include/convert.lua @@ -0,0 +1,32 @@ +--[[ + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + +-- Convert bytes table to integer +function bytes_to_int(bytes, offset, length) + + local t = table.slice(bytes, offset, length) + local n = 0 + for k = 0, #t do + n = n + byte_to_utf8(t[k]) * 2^((k)*8) + end + return n +end + +-- Convert bytes table to string +function bytes_to_string(bytes) + local t = bytes; + local bytearr = {} + for k = 0, #t do + table.insert( bytearr, string.char(byte_to_utf8(t[k])) ) + end + return string:trim( table.concat(bytearr) ) +end + +-- Convert C byte to Dec +function byte_to_utf8(v) + return v < 0 and (0xff + v + 1) or v +end \ No newline at end of file diff --git a/lua/include/file.lua b/lua/include/file.lua index 80fac0c0d..6e7bd6235 100644 --- a/lua/include/file.lua +++ b/lua/include/file.lua @@ -20,9 +20,9 @@ function file_load(filename, callback1, callback2) end end file.close(file) - api.eventlog(eventlog_level_trace, __FUNCTION__, "File readed " .. filename) + TRACE("File read " .. filename) else - api.eventlog(eventlog_level_error, __FUNCTION__, "Could not open file " .. filename) + ERROR("Could not open file " .. filename) return false end return true diff --git a/lua/include/table.lua b/lua/include/table.lua index 0ebe8c4ae..da06d763e 100644 --- a/lua/include/table.lua +++ b/lua/include/table.lua @@ -22,6 +22,46 @@ function table.count(T) return count end +-- Get table slice from offset to length +function table.slice(values, offset, length) + local res = {} + local n = #values + -- default values for range + offset = offset or 0 + if offset < 0 or offset > n then + return {} + end + length = length or n-offset + if length < 1 then + length = 1 + elseif length > n-offset then + length = n-offset + end + + for i = offset,offset+length-1 do + res[i-offset] = values[i] + end + return res +end + + +-- (Debug) Print contents of `tbl`, with indentation. +-- `indent` sets the initial level of indentation. +function table.print (tbl, indent) + if not indent then indent = 0 end + for k, v in pairs(tbl) do + formatting = string.rep(" ", indent) .. k .. ": " + if type(v) == "table" then + DEBUG(formatting) + table.print(v, indent+1) + elseif type(v) == 'boolean' then + DEBUG(formatting .. tostring(v)) + else + DEBUG(formatting .. v) + end + end +end + --[[ Save Table to File diff --git a/lua/include/timer.lua b/lua/include/timer.lua index 25ac0fc52..b9e3c024c 100644 --- a/lua/include/timer.lua +++ b/lua/include/timer.lua @@ -56,7 +56,7 @@ function timer:tick() self.prev_time = os.time() -- Debug: display time when the timer ticks - -- api.eventlog(eventlog_level_gui, __FUNCTION__, self.interval .. ": " .. os.time()) + -- TRACE(self.interval .. ": " .. os.time()) -- execute callback function return self.callback(self) From c7a5ccabf91b8e191c428dd3c43afbbb6ec526c3 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 17 Jun 2014 12:55:19 +0400 Subject: [PATCH 047/144] * fix command groups permission in lua https://github.com/HarpyWar/pvpgn/issues/32 * move /quiz command to command group=2 --- lua/handle_command.lua | 7 ++++--- lua/quiz/command.lua | 5 ----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lua/handle_command.lua b/lua/handle_command.lua index 60cd8ba38..43c5a4b55 100644 --- a/lua/handle_command.lua +++ b/lua/handle_command.lua @@ -11,10 +11,11 @@ local lua_command_table = { [1] = { ["/w3motd"] = command_w3motd, - + }, + [2] = { -- Quiz ["/quiz"] = command_quiz, - }, + } [8] = { ["/redirect"] = command_redirect, }, @@ -30,7 +31,7 @@ function handle_command(account, text) if string.starts(text, cmd) then -- check if command group is in account.commandgroups - if not math_and(account.commandgroups, cg) then + if math_and(account.commandgroups, cg) == 0 then api.message_send_text(account.name, message_type_error, account.name, "This command is reserved for admins.") return 1 end diff --git a/lua/quiz/command.lua b/lua/quiz/command.lua index d333e6643..270af1b07 100644 --- a/lua/quiz/command.lua +++ b/lua/quiz/command.lua @@ -41,11 +41,6 @@ function q_command_start(account, filename) api.message_send_text(account.name, message_type_error, account.name, "This command can only be used inside a channel.") return 1 end - - if not account_is_operator_or_admin(account.name, channel.name) then - api.message_send_text(account.name, message_type_error, account.name, "You must be at least a Channel Operator to use this command.") - return 1 - end if config.quiz_channel then api.message_send_text(account.name, message_type_error, account.name, 'Quiz has already ran in channel "'..config.quiz_channel..'". Use /qstop to force finish.') From d65dc73dfefab3b5b7b19d3842d6e0780a25a3cf Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 17 Jun 2014 15:02:55 +0400 Subject: [PATCH 048/144] * fix lua function identification when output log * better table view output in log --- conf/icons.conf.in | 3 +++ lua/extend/eventlog.lua | 3 +-- lua/include/common.lua | 2 +- lua/include/table.lua | 51 ++++++++++++++++++++++++++++++----------- 4 files changed, 43 insertions(+), 16 deletions(-) diff --git a/conf/icons.conf.in b/conf/icons.conf.in index ef5e825b8..4cb467ea2 100644 --- a/conf/icons.conf.in +++ b/conf/icons.conf.in @@ -34,6 +34,7 @@ custom_icons = true ############################################################################## # Warcraft 3 icon set # +# Use MPQ editor to edit icons-WAR3.bni (just change extension bni->mpq) # #----------------------------------------------------------------------------# [W3XP] @@ -78,6 +79,8 @@ diablo DRTL ############################################################################## # Starcraft icon set # +# Use Bni Icon Builder to edit icons.bni (icons_STAR.bni is not used) # +# https://github.com/HarpyWar/bni-icon-builder # #----------------------------------------------------------------------------# [SEXP] diff --git a/lua/extend/eventlog.lua b/lua/extend/eventlog.lua index 3ea0892c1..ece3c53c6 100644 --- a/lua/extend/eventlog.lua +++ b/lua/extend/eventlog.lua @@ -25,8 +25,7 @@ end function DEBUG(text) if (type(text) == "table") then - table.print(text) - return + text = table.dump(text) end api.eventlog(eventlog_level_debug, __function__, text) end diff --git a/lua/include/common.lua b/lua/include/common.lua index 6573656c6..3918ede0b 100644 --- a/lua/include/common.lua +++ b/lua/include/common.lua @@ -17,7 +17,7 @@ setmetatable(_G, {__index = local w = debug.getinfo(2, "S") return w.short_src..":"..w.linedefined elseif k == '__function__' then - local w = debug.getinfo(2, "S") + local w = debug.getinfo(3, "S") return w.short_src..":"..w.linedefined end end diff --git a/lua/include/table.lua b/lua/include/table.lua index da06d763e..48479b8d8 100644 --- a/lua/include/table.lua +++ b/lua/include/table.lua @@ -47,21 +47,46 @@ end -- (Debug) Print contents of `tbl`, with indentation. -- `indent` sets the initial level of indentation. -function table.print (tbl, indent) - if not indent then indent = 0 end - for k, v in pairs(tbl) do - formatting = string.rep(" ", indent) .. k .. ": " - if type(v) == "table" then - DEBUG(formatting) - table.print(v, indent+1) - elseif type(v) == 'boolean' then - DEBUG(formatting .. tostring(v)) - else - DEBUG(formatting .. v) - end - end +function table.dump(t, ident) + local output = "" + if not indent then indent = 0 end + + -- if table has 0 index then display this key at start + if not (t[0] == nil) then + for k=0, #t do + local formatting = "\n" .. string.rep(" ", indent) .. k .. ": " + local v = t[k] + if type(v) == "table" then + v = "[" .. table.print(v, indent+1) .. "]" + elseif type(v) == 'boolean' then + v = tostring(v) + end + + output = output .. formatting .. v + end + else + for k,v in pairs(t) do + local formatting = "\n" .. k .. ": " + local v = t[k] + if type(v) == "table" then + v = "[" .. table.print(v, indent+1) .. "]" + elseif type(v) == 'boolean' then + v = tostring(v) + end + + output = output .. formatting .. v + end + end + return output end +-- Find table key by value +function get_key_for_value( t, value ) + for k,v in pairs(t) do + if v==value then return k end + end + return nil +end --[[ Save Table to File From 7af51a1f88533afcfcdc221b7788f5d7eca06476 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Thu, 19 Jun 2014 21:16:24 +0400 Subject: [PATCH 049/144] Lua api function client_kill --- src/bnetd/luafunctions.cpp | 29 ++++++++++++++++++++++++++++- src/bnetd/luafunctions.h | 1 + src/bnetd/luainterface.cpp | 1 + 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/bnetd/luafunctions.cpp b/src/bnetd/luafunctions.cpp index 1661cb2f5..b2a4362d1 100644 --- a/src/bnetd/luafunctions.cpp +++ b/src/bnetd/luafunctions.cpp @@ -713,7 +713,6 @@ namespace pvpgn { const char * username; unsigned int request_id, offset, length; - int messagebox_type; try { lua::stack st(L); @@ -740,6 +739,34 @@ namespace pvpgn return 0; } + /* Destroy client connection */ + extern int __client_kill(lua_State* L) + { + const char * username; + try + { + lua::stack st(L); + // get args + st.at(1, username); + + if (t_account * account = accountlist_find_account(username)) + { + if (t_connection * c = account_get_conn(account)) + conn_set_state(c, conn_state_destroy); + } + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 0; + } + + } } #endif \ No newline at end of file diff --git a/src/bnetd/luafunctions.h b/src/bnetd/luafunctions.h index 2532c6bec..0b81605cf 100644 --- a/src/bnetd/luafunctions.h +++ b/src/bnetd/luafunctions.h @@ -51,6 +51,7 @@ namespace pvpgn extern int __server_get_games(lua_State* L); extern int __server_get_channels(lua_State* L); + extern int __client_kill(lua_State* L); extern int __client_readmemory(lua_State* L); extern int __command_get_group(lua_State* L); diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index a0c2ad44a..718a42460 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -139,6 +139,7 @@ namespace pvpgn { "server_get_games", __server_get_games }, { "server_get_channels", __server_get_channels }, + { "client_kill", __client_kill }, { "client_readmemory", __client_readmemory }, { "command_get_group", __command_get_group }, From c0263d3f7e8f6a6d273cba2c85a57c8ae96a758b Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Thu, 19 Jun 2014 21:16:57 +0400 Subject: [PATCH 050/144] Simple antihack implementation example for Starcraft maphack, based on SID_READMEMORY https://github.com/HarpyWar/pvpgn/pull/26 --- lua/antihack/starcraft.lua | 83 +++++++++++++++++++++++++++++++++++++ lua/config.lua | 4 ++ lua/extend/account_wrap.lua | 4 +- lua/handle_client.lua | 9 ++-- lua/handle_game.lua | 2 +- lua/include/string.lua | 6 ++- lua/main.lua | 6 ++- 7 files changed, 106 insertions(+), 8 deletions(-) create mode 100644 lua/antihack/starcraft.lua diff --git a/lua/antihack/starcraft.lua b/lua/antihack/starcraft.lua new file mode 100644 index 000000000..fb7cdfefc --- /dev/null +++ b/lua/antihack/starcraft.lua @@ -0,0 +1,83 @@ +--[[ + Simple Anti MapHack for Starcraft: BroodWar 1.16.1 + + + Copyright (C) 2014 HarpyWar (harpywar@gmail.com) + + This file is a part of the PvPGN Project http://pvpgn.pro + Licensed under the same terms as Lua itself. +]]-- + + +-- just unique request id for maphack +ah_mh_request_id = 99 +-- map visible offset +ah_mh_offset = 0x0047FD12 +-- map visible normal value (without maphack) +ah_mh_value = 139 + + +function ah_init() + timer_add("ah_timer", config.ah_interval, ah_timer_tick) + TRACE("Antihack activated") +end + +-- send memory check request to all players in games +function ah_timer_tick(options) + -- iterate all games + for i,game in pairs(api.server_get_games()) do + -- check only Starcraft: BroodWar + if game.clienttag and (game.clienttag == CLIENTTAG_BROODWARS) then + -- check only games where count of players > 1 + if game.players and (substr_count(game.players, ",") > -1) then + --DEBUG(game.players) + -- check every player in the game + for username in string.split(game.players,",") do + api.client_readmemory(username, ah_mh_request_id, ah_mh_offset, 2) + -- HINT: place here more readmemory requests + + end + end + end + end +end + +-- handle response from the client +function ah_handle_client(account, request_id, data) + local is_cheater = false + + -- maphack + if (request_id == ah_mh_request_id) then + -- read value from the memory + local value = bytes_to_int(data, 0, 2) + DEBUG(account.name .. " memory value: " .. value) + + if not (value == ah_mh_value) then + is_cheater = true + end + + -- process another hack check + --elseif (request_id == ...) then + + end + + + if (is_cheater) then + -- lock cheater account + account_set_auth_lock(account.name, true) + account_set_auth_lockreason(account.name, "we do not like cheaters") + + -- notify all players in the game about cheater + local game = api.game_get_by_id(account.game_id) + if game then + for username in string.split(game.players,",") do + api.message_send_text(username, message_type_error, nil, account.name .. " was banned by the antihack system.") + end + end + + -- kick cheater + api.client_kill(account.name) + + INFO(account.name .. " was banned by the antihack system.") + end +end diff --git a/lua/config.lua b/lua/config.lua index c74266d11..c4dfcd5e6 100644 --- a/lua/config.lua +++ b/lua/config.lua @@ -19,5 +19,9 @@ config = { quiz_users_in_top = 15, -- how many users display in TOP list quiz_channel = nil, -- (do not modify!) channel when quiz has started (it assigned with start) + -- AntiHack (Starcraft) + ah = true, + ah_interval = 60, -- interval for send memory request to all players in games + } diff --git a/lua/extend/account_wrap.lua b/lua/extend/account_wrap.lua index 6fde66af7..de1ce248f 100644 --- a/lua/extend/account_wrap.lua +++ b/lua/extend/account_wrap.lua @@ -84,10 +84,10 @@ function account_set_auth_botlogin(username, value) end function account_get_auth_lock(username) - return api.account_get_attr(username, "BNET\\auth\\lockk", attr_type_bool) + return api.account_get_attr(username, "BNET\\auth\\lock", attr_type_bool) end function account_set_auth_lock(username, value) - return api.account_set_attr(username, "BNET\\auth\\lockk", attr_type_bool, value) + return api.account_set_attr(username, "BNET\\auth\\lock", attr_type_bool, value) end function account_get_auth_locktime(username) diff --git a/lua/handle_client.lua b/lua/handle_client.lua index 71de22564..454bc0abe 100644 --- a/lua/handle_client.lua +++ b/lua/handle_client.lua @@ -8,10 +8,13 @@ function handle_client_readmemory(account, request_id, data) - TRACE("Read memory request Id: " .. request_id) - + --TRACE("Read memory request Id: " .. request_id) + -- display memory bytes DEBUG(data) + + if (config.ah) then + ah_handle_client(account, request_id, data) + end end - diff --git a/lua/handle_game.lua b/lua/handle_game.lua index fb25cff4f..70a8f3479 100644 --- a/lua/handle_game.lua +++ b/lua/handle_game.lua @@ -46,7 +46,7 @@ function handle_game_report(game) -- api.message_send_text(game.owner, message_type_info, game.owner, i.." = "..j) --end - --api.eventlog(eventlog_level_gui, __FUNCTION__, game.last_access) + --DEBUG(game.last_access) end diff --git a/lua/include/string.lua b/lua/include/string.lua index 0ad2bc798..d1d47145e 100644 --- a/lua/include/string.lua +++ b/lua/include/string.lua @@ -56,4 +56,8 @@ function replace_char(pos, str, replacement) return str:sub(1, pos-1) .. replacement .. str:sub(pos+1) end - +-- return count of substr in str +function substr_count(str, substr) + local _, count = string.gsub(str, substr, "") + return count +end \ No newline at end of file diff --git a/lua/main.lua b/lua/main.lua index c6dd3cba8..f1840979e 100644 --- a/lua/main.lua +++ b/lua/main.lua @@ -8,6 +8,10 @@ -- this function executes after preload all the lua scripts function main() - + + -- start antihack + if (config.ah) then + ah_init() + end end From 109deedae0e7d0704e08842dd3ae963334935f80 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Thu, 19 Jun 2014 21:41:30 +0400 Subject: [PATCH 051/144] Fix crash when login with chat clients https://github.com/HarpyWar/pvpgn/issues/33 --- src/bnetd/luaobjects.cpp | 5 ++++- src/bnetd/mail.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bnetd/luaobjects.cpp b/src/bnetd/luaobjects.cpp index 51fdadfc8..4f621be58 100644 --- a/src/bnetd/luaobjects.cpp +++ b/src/bnetd/luaobjects.cpp @@ -110,9 +110,12 @@ namespace pvpgn { o_account["online"] = "true"; - o_account["country"] = conn_get_country(c); o_account["clientver"] = conn_get_clientver(c); o_account["latency"] = std_to_string(conn_get_latency(c)); + + // non-game clients doesn't provide a country + if (const char * country = conn_get_country(c)) + o_account["country"] = country; if (t_clienttag clienttag = conn_get_clienttag(c)) o_account["clienttag"] = clienttag_uint_to_str(clienttag); if (t_game *game = conn_get_game(c)) diff --git a/src/bnetd/mail.cpp b/src/bnetd/mail.cpp index 58f8ef556..44180d690 100644 --- a/src/bnetd/mail.cpp +++ b/src/bnetd/mail.cpp @@ -455,7 +455,10 @@ namespace pvpgn return 0; } - return Mailbox(account_get_uid(conn_get_account(c))).size(); + if (t_account * account = conn_get_account(c)) + return Mailbox(account_get_uid(account)).size(); + + return 0; } } From a1163af7a2b118ce78f0fe6e048831c67f6575ff Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 21 Jun 2014 16:07:15 +0400 Subject: [PATCH 052/144] Fix multiple correct unswers in Lua Quiz https://github.com/HarpyWar/pvpgn/issues/34 --- lua/quiz/quiz.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/quiz/quiz.lua b/lua/quiz/quiz.lua index b585f7a5a..0b0bce014 100644 --- a/lua/quiz/quiz.lua +++ b/lua/quiz/quiz.lua @@ -27,6 +27,8 @@ local _q_streak = { username = nil, count = 0 } -- delay flag for next_question timer local _q_next_question_skip_first = false +-- is question unswered? +local q_unswered = true function quiz:start(channelname, quizname) local filename = q_directory() .. "/questions/" .. string.lower(quizname) .. ".txt" @@ -141,6 +143,7 @@ end -- handle channel message function quiz_handle_message(username, text) + if q_unswered then return end local q = q_dictionary[_q_current_index] @@ -195,6 +198,8 @@ end -- go to next question function q_next_question() + q_unswered = true + _q_question_counter = _q_question_counter + 1 if (_q_question_counter > config.quiz_max_questions) then quiz:stop() @@ -208,7 +213,7 @@ function q_next_question() end -- write random question -function q_tick_next_question(options) +function q_tick_next_question(options) -- skip first tick if not _q_next_question_skip_first then _q_next_question_skip_first = true @@ -231,6 +236,8 @@ function q_tick_next_question(options) _q_hint_counter = 0 -- start timer to hint unswer timer_add("q_hint", config.quiz_hint_delay, q_tick_hint_unswer) + + q_unswered = false end -- write hint for unswer From 61d9c413cfa49ed82351ce647daa2e7a225dfcf4 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 22 Jun 2014 17:14:21 +0400 Subject: [PATCH 053/144] add libraries pugixml https://github.com/zeux/pugixml and cppformat https://github.com/cppformat/cppformat to support localization --- src/common/CMakeLists.txt | 4 +- src/common/format.cpp | 919 ++++ src/common/format.h | 1870 +++++++ src/common/pugiconfig.h | 72 + src/common/pugixml.cpp | 10638 ++++++++++++++++++++++++++++++++++++ src/common/pugixml.h | 1332 +++++ 6 files changed, 14833 insertions(+), 2 deletions(-) create mode 100644 src/common/format.cpp create mode 100644 src/common/format.h create mode 100644 src/common/pugiconfig.h create mode 100644 src/common/pugixml.cpp create mode 100644 src/common/pugixml.h diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 6c3e1d537..555f8d303 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -19,8 +19,8 @@ set(COMMON_SOURCES version.h wolhash.cpp wolhash.h xalloc.cpp xalloc.h xstr.cpp xstr.h xstring.cpp xstring.h gui_printf.h gui_printf.cpp bigint.cpp bigint.h bnetsrp3.cpp bnetsrp3.h peerchat.cpp peerchat.h - wol_gameres_protocol.h) - + wol_gameres_protocol.h + format.cpp format.h pugiconfig.h pugixml.cpp pugixml.h) add_library(common ${COMMON_SOURCES} ) diff --git a/src/common/format.cpp b/src/common/format.cpp new file mode 100644 index 000000000..1776456fd --- /dev/null +++ b/src/common/format.cpp @@ -0,0 +1,919 @@ +/* + Formatting library for C++ + + Copyright (c) 2012, Victor Zverovich + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +// Disable useless MSVC warnings. +#undef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS +#undef _SCL_SECURE_NO_WARNINGS +#define _SCL_SECURE_NO_WARNINGS + +#include "format.h" + +#include + +#include +#include +#include +#include + +#ifdef _WIN32 +# define WIN32_LEAN_AND_MEAN +# include +# undef ERROR +#endif + +using fmt::ULongLong; + +#if _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4127) // conditional expression is constant +#endif + +namespace { + +#ifndef _MSC_VER + +inline int SignBit(double value) { + // When compiled in C++11 mode signbit is no longer a macro but a function + // defined in namespace std and the macro is undefined. +#ifdef signbit + return signbit(value); +#else + return std::signbit(value); +#endif +} + +inline int IsInf(double x) { +#ifdef isinf + return isinf(x); +#else + return std::isinf(x); +#endif +} + +#define FMT_SNPRINTF snprintf + +#else // _MSC_VER + +inline int SignBit(double value) { + if (value < 0) return 1; + if (value == value) return 0; + int dec = 0, sign = 0; + char buffer[2]; // The buffer size must be >= 2 or _ecvt_s will fail. + _ecvt_s(buffer, sizeof(buffer), value, 0, &dec, &sign); + return sign; +} + +inline int IsInf(double x) { return !_finite(x); } + +inline int FMT_SNPRINTF(char *buffer, size_t size, const char *format, ...) { + va_list args; + va_start(args, format); + int result = vsnprintf_s(buffer, size, _TRUNCATE, format, args); + va_end(args); + return result; +} + +#endif // _MSC_VER + +const char RESET_COLOR[] = "\x1b[0m"; + +typedef void (*FormatFunc)(fmt::Writer &, int , fmt::StringRef); + +void ReportError(FormatFunc func, + int error_code, fmt::StringRef message) FMT_NOEXCEPT(true) { + try { + fmt::Writer full_message; + func(full_message, error_code, message); // TODO: this may throw? + std::fwrite(full_message.c_str(), full_message.size(), 1, stderr); + std::fputc('\n', stderr); + } catch (...) {} +} +} // namespace + +template +int fmt::internal::CharTraits::FormatFloat( + char *buffer, std::size_t size, const char *format, + unsigned width, int precision, T value) { + if (width == 0) { + return precision < 0 ? + FMT_SNPRINTF(buffer, size, format, value) : + FMT_SNPRINTF(buffer, size, format, precision, value); + } + return precision < 0 ? + FMT_SNPRINTF(buffer, size, format, width, value) : + FMT_SNPRINTF(buffer, size, format, width, precision, value); +} + +template +int fmt::internal::CharTraits::FormatFloat( + wchar_t *buffer, std::size_t size, const wchar_t *format, + unsigned width, int precision, T value) { + if (width == 0) { + return precision < 0 ? + swprintf(buffer, size, format, value) : + swprintf(buffer, size, format, precision, value); + } + return precision < 0 ? + swprintf(buffer, size, format, width, value) : + swprintf(buffer, size, format, width, precision, value); +} + +const char fmt::internal::DIGITS[] = + "0001020304050607080910111213141516171819" + "2021222324252627282930313233343536373839" + "4041424344454647484950515253545556575859" + "6061626364656667686970717273747576777879" + "8081828384858687888990919293949596979899"; + +#define FMT_POWERS_OF_10(factor) \ + factor * 10, \ + factor * 100, \ + factor * 1000, \ + factor * 10000, \ + factor * 100000, \ + factor * 1000000, \ + factor * 10000000, \ + factor * 100000000, \ + factor * 1000000000 + +const uint32_t fmt::internal::POWERS_OF_10_32[] = {0, FMT_POWERS_OF_10(1)}; +const uint64_t fmt::internal::POWERS_OF_10_64[] = { + 0, + FMT_POWERS_OF_10(1), + FMT_POWERS_OF_10(ULongLong(1000000000)), + // Multiply several constants instead of using a single long long constants + // to avoid warnings about C++98 not supporting long long. + ULongLong(1000000000) * ULongLong(1000000000) * 10 +}; + +void fmt::internal::ReportUnknownType(char code, const char *type) { + if (std::isprint(static_cast(code))) { + throw fmt::FormatError(fmt::str( + fmt::Format("unknown format code '{}' for {}") << code << type)); + } + throw fmt::FormatError( + fmt::str(fmt::Format("unknown format code '\\x{:02x}' for {}") + << static_cast(code) << type)); +} + +#ifdef _WIN32 + +fmt::internal::UTF8ToUTF16::UTF8ToUTF16(fmt::StringRef s) { + int length = MultiByteToWideChar( + CP_UTF8, MB_ERR_INVALID_CHARS, s.c_str(), -1, 0, 0); + static const char ERROR[] = "cannot convert string from UTF-8 to UTF-16"; + if (length == 0) + ThrowWinError(GetLastError(), ERROR); + buffer_.resize(length); + length = MultiByteToWideChar( + CP_UTF8, MB_ERR_INVALID_CHARS, s.c_str(), -1, &buffer_[0], length); + if (length == 0) + ThrowWinError(GetLastError(), ERROR); +} + +fmt::internal::UTF16ToUTF8::UTF16ToUTF8(fmt::WStringRef s) { + if (int error_code = Convert(s)) { + ThrowWinError(GetLastError(), + "cannot convert string from UTF-16 to UTF-8"); + } +} + +int fmt::internal::UTF16ToUTF8::Convert(fmt::WStringRef s) { + int length = WideCharToMultiByte(CP_UTF8, 0, s.c_str(), -1, 0, 0, 0, 0); + if (length == 0) + return GetLastError(); + buffer_.resize(length); + length = WideCharToMultiByte( + CP_UTF8, 0, s.c_str(), -1, &buffer_[0], length, 0, 0); + if (length == 0) + return GetLastError(); + return 0; +} + +#endif + +int fmt::internal::StrError( + int error_code, char *&buffer, std::size_t buffer_size) FMT_NOEXCEPT(true) { + assert(buffer != 0 && buffer_size != 0); + int result = 0; +#ifdef _GNU_SOURCE + char *message = strerror_r(error_code, buffer, buffer_size); + // If the buffer is full then the message is probably truncated. + if (message == buffer && strlen(buffer) == buffer_size - 1) + result = ERANGE; + buffer = message; +#elif _WIN32 + result = strerror_s(buffer, buffer_size, error_code); + // If the buffer is full then the message is probably truncated. + if (result == 0 && std::strlen(buffer) == buffer_size - 1) + result = ERANGE; +#else + result = strerror_r(error_code, buffer, buffer_size); + if (result == -1) + result = errno; // glibc versions before 2.13 return result in errno. +#endif + return result; +} + +void fmt::internal::FormatSystemErrorMessage( + fmt::Writer &out, int error_code, fmt::StringRef message) { + Array buffer; + buffer.resize(INLINE_BUFFER_SIZE); + char *system_message = 0; + for (;;) { + system_message = &buffer[0]; + int result = StrError(error_code, system_message, buffer.size()); + if (result == 0) + break; + if (result != ERANGE) { + // Can't get error message, report error code instead. + out << message << ": error code = " << error_code; + return; + } + buffer.resize(buffer.size() * 2); + } + out << message << ": " << system_message; +} + +#ifdef _WIN32 +void fmt::internal::FormatWinErrorMessage( + fmt::Writer &out, int error_code, fmt::StringRef message) { + class String { + private: + LPWSTR str_; + + public: + String() : str_() {} + ~String() { LocalFree(str_); } + LPWSTR *ptr() { return &str_; } + LPCWSTR c_str() const { return str_; } + }; + String system_message; + if (FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 0, + error_code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + reinterpret_cast(system_message.ptr()), 0, 0)) { + UTF16ToUTF8 utf8_message; + if (!utf8_message.Convert(system_message.c_str())) { + out << message << ": " << c_str(utf8_message); + return; + } + } + // Can't get error message, report error code instead. + out << message << ": error code = " << error_code; +} +#endif + +// Fills the padding around the content and returns the pointer to the +// content area. +template +typename fmt::BasicWriter::CharPtr + fmt::BasicWriter::FillPadding(CharPtr buffer, + unsigned total_size, std::size_t content_size, wchar_t fill) { + std::size_t padding = total_size - content_size; + std::size_t left_padding = padding / 2; + Char fill_char = static_cast(fill); + std::fill_n(buffer, left_padding, fill_char); + buffer += left_padding; + CharPtr content = buffer; + std::fill_n(buffer + content_size, padding - left_padding, fill_char); + return content; +} + +template +typename fmt::BasicWriter::CharPtr + fmt::BasicWriter::PrepareFilledBuffer( + unsigned size, const AlignSpec &spec, char sign) { + unsigned width = spec.width(); + if (width <= size) { + CharPtr p = GrowBuffer(size); + *p = sign; + return p + size - 1; + } + CharPtr p = GrowBuffer(width); + CharPtr end = p + width; + Alignment align = spec.align(); + // TODO: error if fill is not convertible to Char + Char fill = static_cast(spec.fill()); + if (align == ALIGN_LEFT) { + *p = sign; + p += size; + std::fill(p, end, fill); + } else if (align == ALIGN_CENTER) { + p = FillPadding(p, width, size, fill); + *p = sign; + p += size; + } else { + if (align == ALIGN_NUMERIC) { + if (sign) { + *p++ = sign; + --size; + } + } else { + *(end - size) = sign; + } + std::fill(p, end - size, fill); + p = end; + } + return p - 1; +} + +template +template +void fmt::BasicWriter::FormatDouble( + T value, const FormatSpec &spec, int precision) { + // Check type. + char type = spec.type(); + bool upper = false; + switch (type) { + case 0: + type = 'g'; + break; + case 'e': case 'f': case 'g': + break; + case 'F': +#ifdef _MSC_VER + // MSVC's printf doesn't support 'F'. + type = 'f'; +#endif + // Fall through. + case 'E': case 'G': + upper = true; + break; + default: + internal::ReportUnknownType(type, "double"); + break; + } + + char sign = 0; + // Use SignBit instead of value < 0 because the latter is always + // false for NaN. + if (SignBit(static_cast(value))) { + sign = '-'; + value = -value; + } else if (spec.sign_flag()) { + sign = spec.plus_flag() ? '+' : ' '; + } + + if (value != value) { + // Format NaN ourselves because sprintf's output is not consistent + // across platforms. + std::size_t size = 4; + const char *nan = upper ? " NAN" : " nan"; + if (!sign) { + --size; + ++nan; + } + CharPtr out = FormatString(nan, size, spec); + if (sign) + *out = sign; + return; + } + + if (IsInf(static_cast(value))) { + // Format infinity ourselves because sprintf's output is not consistent + // across platforms. + std::size_t size = 4; + const char *inf = upper ? " INF" : " inf"; + if (!sign) { + --size; + ++inf; + } + CharPtr out = FormatString(inf, size, spec); + if (sign) + *out = sign; + return; + } + + std::size_t offset = buffer_.size(); + unsigned width = spec.width(); + if (sign) { + buffer_.reserve(buffer_.size() + (std::max)(width, 1u)); + if (width > 0) + --width; + ++offset; + } + + // Build format string. + enum { MAX_FORMAT_SIZE = 10}; // longest format: %#-*.*Lg + Char format[MAX_FORMAT_SIZE]; + Char *format_ptr = format; + *format_ptr++ = '%'; + unsigned width_for_sprintf = width; + if (spec.hash_flag()) + *format_ptr++ = '#'; + if (spec.align() == ALIGN_CENTER) { + width_for_sprintf = 0; + } else { + if (spec.align() == ALIGN_LEFT) + *format_ptr++ = '-'; + if (width != 0) + *format_ptr++ = '*'; + } + if (precision >= 0) { + *format_ptr++ = '.'; + *format_ptr++ = '*'; + } + if (internal::IsLongDouble::VALUE) + *format_ptr++ = 'L'; + *format_ptr++ = type; + *format_ptr = '\0'; + + // Format using snprintf. + Char fill = static_cast(spec.fill()); + for (;;) { + std::size_t size = buffer_.capacity() - offset; +#if _MSC_VER + // MSVC's vsnprintf_s doesn't work with zero size, so reserve + // space for at least one extra character to make the size non-zero. + // Note that the buffer's capacity will increase by more than 1. + if (size == 0) { + buffer_.reserve(offset + 1); + size = buffer_.capacity() - offset; + } +#endif + Char *start = &buffer_[offset]; + int n = internal::CharTraits::FormatFloat( + start, size, format, width_for_sprintf, precision, value); + if (n >= 0 && offset + n < buffer_.capacity()) { + if (sign) { + if ((spec.align() != ALIGN_RIGHT && spec.align() != ALIGN_DEFAULT) || + *start != ' ') { + *(start - 1) = sign; + sign = 0; + } else { + *(start - 1) = fill; + } + ++n; + } + if (spec.align() == ALIGN_CENTER && + spec.width() > static_cast(n)) { + unsigned width = spec.width(); + CharPtr p = GrowBuffer(width); + std::copy(p, p + n, p + (width - n) / 2); + FillPadding(p, spec.width(), n, fill); + return; + } + if (spec.fill() != ' ' || sign) { + while (*start == ' ') + *start++ = fill; + if (sign) + *(start - 1) = sign; + } + GrowBuffer(n); + return; + } + // If n is negative we ask to increase the capacity by at least 1, + // but as std::vector, the buffer grows exponentially. + buffer_.reserve(n >= 0 ? offset + n + 1 : buffer_.capacity() + 1); + } +} + +// Throws Exception(message) if format contains '}', otherwise throws +// FormatError reporting unmatched '{'. The idea is that unmatched '{' +// should override other errors. +template +void fmt::BasicWriter::FormatParser::ReportError( + const Char *s, StringRef message) const { + for (int num_open_braces = num_open_braces_; *s; ++s) { + if (*s == '{') { + ++num_open_braces; + } else if (*s == '}') { + if (--num_open_braces == 0) + throw fmt::FormatError(message); + } + } + throw fmt::FormatError("unmatched '{' in format"); +} + +// Parses an unsigned integer advancing s to the end of the parsed input. +// This function assumes that the first character of s is a digit. +template +unsigned fmt::BasicWriter::FormatParser::ParseUInt(const Char *&s) const { + assert('0' <= *s && *s <= '9'); + unsigned value = 0; + do { + unsigned new_value = value * 10 + (*s++ - '0'); + if (new_value < value) // Check if value wrapped around. + ReportError(s, "number is too big in format"); + value = new_value; + } while ('0' <= *s && *s <= '9'); + return value; +} + +template +inline const typename fmt::BasicWriter::ArgInfo + &fmt::BasicWriter::FormatParser::ParseArgIndex(const Char *&s) { + unsigned arg_index = 0; + if (*s < '0' || *s > '9') { + if (*s != '}' && *s != ':') + ReportError(s, "invalid argument index in format string"); + if (next_arg_index_ < 0) { + ReportError(s, + "cannot switch from manual to automatic argument indexing"); + } + arg_index = next_arg_index_++; + } else { + if (next_arg_index_ > 0) { + ReportError(s, + "cannot switch from automatic to manual argument indexing"); + } + next_arg_index_ = -1; + arg_index = ParseUInt(s); + } + if (arg_index >= num_args_) + ReportError(s, "argument index is out of range in format"); + return args_[arg_index]; +} + +template +void fmt::BasicWriter::FormatParser::CheckSign( + const Char *&s, const ArgInfo &arg) { + char sign = static_cast(*s); + if (arg.type > LAST_NUMERIC_TYPE) { + ReportError(s, + fmt::Format("format specifier '{}' requires numeric argument") << sign); + } + if (arg.type == UINT || arg.type == ULONG || arg.type == ULONG_LONG) { + ReportError(s, + fmt::Format("format specifier '{}' requires signed argument") << sign); + } + ++s; +} + +template +void fmt::BasicWriter::FormatParser::Format( + BasicWriter &writer, BasicStringRef format, + std::size_t num_args, const ArgInfo *args) { + const Char *start = format.c_str(); + num_args_ = num_args; + args_ = args; + next_arg_index_ = 0; + const Char *s = start; + while (*s) { + Char c = *s++; + if (c != '{' && c != '}') continue; + if (*s == c) { + writer.buffer_.append(start, s); + start = ++s; + continue; + } + if (c == '}') + throw FormatError("unmatched '}' in format"); + num_open_braces_= 1; + writer.buffer_.append(start, s - 1); + + const ArgInfo &arg = ParseArgIndex(s); + + FormatSpec spec; + int precision = -1; + if (*s == ':') { + ++s; + + // Parse fill and alignment. + if (Char c = *s) { + const Char *p = s + 1; + spec.align_ = ALIGN_DEFAULT; + do { + switch (*p) { + case '<': + spec.align_ = ALIGN_LEFT; + break; + case '>': + spec.align_ = ALIGN_RIGHT; + break; + case '=': + spec.align_ = ALIGN_NUMERIC; + break; + case '^': + spec.align_ = ALIGN_CENTER; + break; + } + if (spec.align_ != ALIGN_DEFAULT) { + if (p != s) { + if (c == '}') break; + if (c == '{') + ReportError(s, "invalid fill character '{'"); + s += 2; + spec.fill_ = c; + } else ++s; + if (spec.align_ == ALIGN_NUMERIC && arg.type > LAST_NUMERIC_TYPE) + ReportError(s, "format specifier '=' requires numeric argument"); + break; + } + } while (--p >= s); + } + + // Parse sign. + switch (*s) { + case '+': + CheckSign(s, arg); + spec.flags_ |= SIGN_FLAG | PLUS_FLAG; + break; + case '-': + CheckSign(s, arg); + break; + case ' ': + CheckSign(s, arg); + spec.flags_ |= SIGN_FLAG; + break; + } + + if (*s == '#') { + if (arg.type > LAST_NUMERIC_TYPE) + ReportError(s, "format specifier '#' requires numeric argument"); + spec.flags_ |= HASH_FLAG; + ++s; + } + + // Parse width and zero flag. + if ('0' <= *s && *s <= '9') { + if (*s == '0') { + if (arg.type > LAST_NUMERIC_TYPE) + ReportError(s, "format specifier '0' requires numeric argument"); + spec.align_ = ALIGN_NUMERIC; + spec.fill_ = '0'; + } + // Zero may be parsed again as a part of the width, but it is simpler + // and more efficient than checking if the next char is a digit. + unsigned value = ParseUInt(s); + if (value > INT_MAX) + ReportError(s, "number is too big in format"); + spec.width_ = value; + } + + // Parse precision. + if (*s == '.') { + ++s; + precision = 0; + if ('0' <= *s && *s <= '9') { + unsigned value = ParseUInt(s); + if (value > INT_MAX) + ReportError(s, "number is too big in format"); + precision = value; + } else if (*s == '{') { + ++s; + ++num_open_braces_; + const ArgInfo &precision_arg = ParseArgIndex(s); + ULongLong value = 0; + switch (precision_arg.type) { + case INT: + if (precision_arg.int_value < 0) + ReportError(s, "negative precision in format"); + value = precision_arg.int_value; + break; + case UINT: + value = precision_arg.uint_value; + break; + case LONG: + if (precision_arg.long_value < 0) + ReportError(s, "negative precision in format"); + value = precision_arg.long_value; + break; + case ULONG: + value = precision_arg.ulong_value; + break; + case LONG_LONG: + if (precision_arg.long_long_value < 0) + ReportError(s, "negative precision in format"); + value = precision_arg.long_long_value; + break; + case ULONG_LONG: + value = precision_arg.ulong_long_value; + break; + default: + ReportError(s, "precision is not integer"); + } + if (value > INT_MAX) + ReportError(s, "number is too big in format"); + precision = static_cast(value); + if (*s++ != '}') + throw FormatError("unmatched '{' in format"); + --num_open_braces_; + } else { + ReportError(s, "missing precision in format"); + } + if (arg.type != DOUBLE && arg.type != LONG_DOUBLE) { + ReportError(s, + "precision specifier requires floating-point argument"); + } + } + + // Parse type. + if (*s != '}' && *s) + spec.type_ = static_cast(*s++); + } + + if (*s++ != '}') + throw FormatError("unmatched '{' in format"); + start = s; + + // Format argument. + switch (arg.type) { + case INT: + writer.FormatInt(arg.int_value, spec); + break; + case UINT: + writer.FormatInt(arg.uint_value, spec); + break; + case LONG: + writer.FormatInt(arg.long_value, spec); + break; + case ULONG: + writer.FormatInt(arg.ulong_value, spec); + break; + case LONG_LONG: + writer.FormatInt(arg.long_long_value, spec); + break; + case ULONG_LONG: + writer.FormatInt(arg.ulong_long_value, spec); + break; + case DOUBLE: + writer.FormatDouble(arg.double_value, spec, precision); + break; + case LONG_DOUBLE: + writer.FormatDouble(arg.long_double_value, spec, precision); + break; + case CHAR: { + if (spec.type_ && spec.type_ != 'c') + internal::ReportUnknownType(spec.type_, "char"); + typedef typename BasicWriter::CharPtr CharPtr; + CharPtr out = CharPtr(); + if (spec.width_ > 1) { + Char fill = static_cast(spec.fill()); + out = writer.GrowBuffer(spec.width_); + if (spec.align_ == ALIGN_RIGHT) { + std::fill_n(out, spec.width_ - 1, fill); + out += spec.width_ - 1; + } else if (spec.align_ == ALIGN_CENTER) { + out = writer.FillPadding(out, spec.width_, 1, fill); + } else { + std::fill_n(out + 1, spec.width_ - 1, fill); + } + } else { + out = writer.GrowBuffer(1); + } + *out = static_cast(arg.int_value); + break; + } + case STRING: { + if (spec.type_ && spec.type_ != 's') + internal::ReportUnknownType(spec.type_, "string"); + const Char *str = arg.string.value; + std::size_t size = arg.string.size; + if (size == 0) { + if (!str) + throw FormatError("string pointer is null"); + if (*str) + size = std::char_traits::length(str); + } + writer.FormatString(str, size, spec); + break; + } + case POINTER: + if (spec.type_ && spec.type_ != 'p') + internal::ReportUnknownType(spec.type_, "pointer"); + spec.flags_= HASH_FLAG; + spec.type_ = 'x'; + writer.FormatInt(reinterpret_cast(arg.pointer_value), spec); + break; + case CUSTOM: + if (spec.type_) + internal::ReportUnknownType(spec.type_, "object"); + arg.custom.format(writer, arg.custom.value, spec); + break; + default: + assert(false); + break; + } + } + writer.buffer_.append(start, s); +} + +void fmt::SystemErrorSink::operator()(const fmt::Writer &w) const { + Writer message; + internal::FormatSystemErrorMessage(message, error_code_, w.c_str()); + throw SystemError(message.c_str(), error_code_); +} + +void fmt::ReportSystemError( + int error_code, fmt::StringRef message) FMT_NOEXCEPT(true) { + // FIXME: FormatSystemErrorMessage may throw + ReportError(internal::FormatSystemErrorMessage, error_code, message); +} + +#ifdef _WIN32 +void fmt::WinErrorSink::operator()(const Writer &w) const { + Writer message; + internal::FormatWinErrorMessage(message, error_code_, w.c_str()); + throw SystemError(message.c_str(), error_code_); +} + +void fmt::ReportWinError( + int error_code, fmt::StringRef message) FMT_NOEXCEPT(true) { + // FIXME: FormatWinErrorMessage may throw + ReportError(internal::FormatWinErrorMessage, error_code, message); +} +#endif + +void fmt::ANSITerminalSink::operator()( + const fmt::BasicWriter &w) const { + char escape[] = "\x1b[30m"; + escape[3] = '0' + static_cast(color_); + std::fputs(escape, file_); + std::fwrite(w.data(), 1, w.size(), file_); + std::fputs(RESET_COLOR, file_); +} + +// Explicit instantiations for char. + +template void fmt::BasicWriter::FormatDouble( + double value, const FormatSpec &spec, int precision); + +template void fmt::BasicWriter::FormatDouble( + long double value, const FormatSpec &spec, int precision); + +template fmt::BasicWriter::CharPtr + fmt::BasicWriter::FillPadding(CharPtr buffer, + unsigned total_size, std::size_t content_size, wchar_t fill); + +template fmt::BasicWriter::CharPtr + fmt::BasicWriter::PrepareFilledBuffer( + unsigned size, const AlignSpec &spec, char sign); + +template void fmt::BasicWriter::FormatParser::ReportError( + const char *s, StringRef message) const; + +template unsigned fmt::BasicWriter::FormatParser::ParseUInt( + const char *&s) const; + +template const fmt::BasicWriter::ArgInfo + &fmt::BasicWriter::FormatParser::ParseArgIndex(const char *&s); + +template void fmt::BasicWriter::FormatParser::CheckSign( + const char *&s, const ArgInfo &arg); + +template void fmt::BasicWriter::FormatParser::Format( + BasicWriter &writer, BasicStringRef format, + std::size_t num_args, const ArgInfo *args); + +// Explicit instantiations for wchar_t. + +template void fmt::BasicWriter::FormatDouble( + double value, const FormatSpec &spec, int precision); + +template void fmt::BasicWriter::FormatDouble( + long double value, const FormatSpec &spec, int precision); + +template fmt::BasicWriter::CharPtr + fmt::BasicWriter::FillPadding(CharPtr buffer, + unsigned total_size, std::size_t content_size, wchar_t fill); + +template fmt::BasicWriter::CharPtr + fmt::BasicWriter::PrepareFilledBuffer( + unsigned size, const AlignSpec &spec, char sign); + +template void fmt::BasicWriter::FormatParser::ReportError( + const wchar_t *s, StringRef message) const; + +template unsigned fmt::BasicWriter::FormatParser::ParseUInt( + const wchar_t *&s) const; + +template const fmt::BasicWriter::ArgInfo + &fmt::BasicWriter::FormatParser::ParseArgIndex(const wchar_t *&s); + +template void fmt::BasicWriter::FormatParser::CheckSign( + const wchar_t *&s, const ArgInfo &arg); + +template void fmt::BasicWriter::FormatParser::Format( + BasicWriter &writer, BasicStringRef format, + std::size_t num_args, const ArgInfo *args); + +#if _MSC_VER +# pragma warning(pop) +#endif diff --git a/src/common/format.h b/src/common/format.h new file mode 100644 index 000000000..27c700513 --- /dev/null +++ b/src/common/format.h @@ -0,0 +1,1870 @@ +/* + Formatting library for C++ + + Copyright (c) 2012, Victor Zverovich + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef FMT_FORMAT_H_ +#define FMT_FORMAT_H_ + +#include + +#include +#include +#include // for std::ptrdiff_t +#include +#include +#include +#include +#include +#include +#include + +#ifdef __GNUC__ +# define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) +# define FMT_GCC_EXTENSION __extension__ +// Disable warning about "long long" which is sometimes reported even +// when using __extension__. +# if FMT_GCC_VERSION >= 406 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +#else +# define FMT_GCC_EXTENSION +#endif + +#if defined(__GNUC_LIBSTD__) && defined (__GNUC_LIBSTD_MINOR__) +# define FMT_GNUC_LIBSTD_VERSION (__GNUC_LIBSTD__ * 100 + __GNUC_LIBSTD_MINOR__) +#endif + +// Compatibility with compilers other than clang. +#ifdef __has_feature +# define FMT_HAS_FEATURE(x) __has_feature(x) +# define FMT_HAS_BUILTIN(x) __has_builtin(x) +#else +# define FMT_HAS_FEATURE(x) 0 +# define FMT_HAS_BUILTIN(x) 0 +#endif + +#ifndef FMT_USE_VARIADIC_TEMPLATES +// Variadic templates are available in GCC since version 4.4 +// (http://gcc.gnu.org/projects/cxx0x.html) and in Visual C++ +// since version 2013. +# define FMT_USE_VARIADIC_TEMPLATES \ + (FMT_HAS_FEATURE(cxx_variadic_templates) || \ + (FMT_GCC_VERSION >= 404 && __cplusplus >= 201103) || _MSC_VER >= 1800) +#endif + +#ifndef FMT_USE_RVALUE_REFERENCES +// Don't use rvalue references when compiling with clang and an old libstdc++ +// as the latter doesn't provide std::move. +# if defined(FMT_GNUC_LIBSTD_VERSION) && FMT_GNUC_LIBSTD_VERSION <= 402 +# define FMT_USE_RVALUE_REFERENCES 0 +# else +# define FMT_USE_RVALUE_REFERENCES \ + (FMT_HAS_FEATURE(cxx_rvalue_references) || \ + (FMT_GCC_VERSION >= 403 && __cplusplus >= 201103) || _MSC_VER >= 1600) +# endif +#endif + +#if FMT_USE_RVALUE_REFERENCES +# include // for std::move +#endif + +// Define FMT_USE_NOEXCEPT to make format use noexcept (C++11 feature). +#if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \ + (FMT_GCC_VERSION >= 408 && __cplusplus >= 201103) +# define FMT_NOEXCEPT(expr) noexcept(expr) +#else +# define FMT_NOEXCEPT(expr) +#endif + +// A macro to disallow the copy constructor and operator= functions +// This should be used in the private: declarations for a class +#define FMT_DISALLOW_COPY_AND_ASSIGN(TypeName) \ + TypeName(const TypeName&); \ + void operator=(const TypeName&) + +#if _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4521) // 'class' : multiple copy constructors specified +#endif + +namespace fmt { + +// Fix the warning about long long on older versions of GCC +// that don't support the diagnostic pragma. +FMT_GCC_EXTENSION typedef long long LongLong; +FMT_GCC_EXTENSION typedef unsigned long long ULongLong; + +template +class BasicWriter; + +typedef BasicWriter Writer; +typedef BasicWriter WWriter; + +template +class BasicFormatter; + +struct FormatSpec; + +/** + \rst + A string reference. It can be constructed from a C string, ``std::string`` + or as a result of a formatting operation. It is most useful as a parameter + type to allow passing different types of strings in a function, for example:: + + Formatter<> Format(StringRef format); + + Format("{}") << 42; + Format(std::string("{}")) << 42; + Format(Format("{{}}")) << 42; + \endrst + */ +template +class BasicStringRef { + private: + const Char *data_; + mutable std::size_t size_; + + public: + /** + Constructs a string reference object from a C string and a size. + If *size* is zero, which is the default, the size is computed with + `strlen`. + */ + BasicStringRef(const Char *s, std::size_t size = 0) : data_(s), size_(size) {} + + /** + Constructs a string reference from an `std::string` object. + */ + BasicStringRef(const std::basic_string &s) + : data_(s.c_str()), size_(s.size()) {} + + /** + Converts a string reference to an `std::string` object. + */ + operator std::basic_string() const { + return std::basic_string(data_, size()); + } + + /** + Returns the pointer to a C string. + */ + const Char *c_str() const { return data_; } + + /** + Returns the string size. + */ + std::size_t size() const { + if (size_ == 0) size_ = std::char_traits::length(data_); + return size_; + } +}; + +typedef BasicStringRef StringRef; +typedef BasicStringRef WStringRef; + +namespace internal { + +// The number of characters to store in the Array object, representing the +// output buffer, itself to avoid dynamic memory allocation. +enum { INLINE_BUFFER_SIZE = 500 }; + +#if _SECURE_SCL +// Use checked iterator to avoid warnings on MSVC. +template +inline stdext::checked_array_iterator CheckPtr(T *ptr, std::size_t size) { + return stdext::checked_array_iterator(ptr, size); +} +#else +template +inline T *CheckPtr(T *ptr, std::size_t) { return ptr; } +#endif + +// A simple array for POD types with the first SIZE elements stored in +// the object itself. It supports a subset of std::vector's operations. +template +class Array { + private: + std::size_t size_; + std::size_t capacity_; + T *ptr_; + T data_[SIZE]; + + void Grow(std::size_t size); + + // Free memory allocated by the array. + void Free() { + if (ptr_ != data_) delete [] ptr_; + } + + // Move data from other to this array. + void Move(Array &other) { + size_ = other.size_; + capacity_ = other.capacity_; + if (other.ptr_ == other.data_) { + ptr_ = data_; + std::copy(other.data_, other.data_ + size_, CheckPtr(data_, capacity_)); + } else { + ptr_ = other.ptr_; + // Set pointer to the inline array so that delete is not called + // when freeing. + other.ptr_ = other.data_; + } + } + + FMT_DISALLOW_COPY_AND_ASSIGN(Array); + + public: + Array() : size_(0), capacity_(SIZE), ptr_(data_) {} + ~Array() { Free(); } + +#if FMT_USE_RVALUE_REFERENCES + Array(Array &&other) { + Move(other); + } + + Array& operator=(Array &&other) { + assert(this != &other); + Free(); + Move(other); + return *this; + } +#endif + + // Returns the size of this array. + std::size_t size() const { return size_; } + + // Returns the capacity of this array. + std::size_t capacity() const { return capacity_; } + + // Resizes the array. If T is a POD type new elements are not initialized. + void resize(std::size_t new_size) { + if (new_size > capacity_) + Grow(new_size); + size_ = new_size; + } + + // Reserves space to store at least capacity elements. + void reserve(std::size_t capacity) { + if (capacity > capacity_) + Grow(capacity); + } + + void clear() { size_ = 0; } + + void push_back(const T &value) { + if (size_ == capacity_) + Grow(size_ + 1); + ptr_[size_++] = value; + } + + // Appends data to the end of the array. + void append(const T *begin, const T *end); + + T &operator[](std::size_t index) { return ptr_[index]; } + const T &operator[](std::size_t index) const { return ptr_[index]; } +}; + +template +void Array::Grow(std::size_t size) { + capacity_ = (std::max)(size, capacity_ + capacity_ / 2); + T *p = new T[capacity_]; + std::copy(ptr_, ptr_ + size_, CheckPtr(p, capacity_)); + if (ptr_ != data_) + delete [] ptr_; + ptr_ = p; +} + +template +void Array::append(const T *begin, const T *end) { + std::ptrdiff_t num_elements = end - begin; + if (size_ + num_elements > capacity_) + Grow(num_elements); + std::copy(begin, end, CheckPtr(ptr_, capacity_) + size_); + size_ += num_elements; +} + +template +class CharTraits; + +template +class BasicCharTraits { + public: +#if _SECURE_SCL + typedef stdext::checked_array_iterator CharPtr; +#else + typedef Char *CharPtr; +#endif +}; + +template <> +class CharTraits : public BasicCharTraits { + private: + // Conversion from wchar_t to char is not supported. + static char ConvertChar(wchar_t); + + public: + typedef const wchar_t *UnsupportedStrType; + + static char ConvertChar(char value) { return value; } + + template + static int FormatFloat(char *buffer, std::size_t size, + const char *format, unsigned width, int precision, T value); +}; + +template <> +class CharTraits : public BasicCharTraits { + public: + typedef const char *UnsupportedStrType; + + static wchar_t ConvertChar(char value) { return value; } + static wchar_t ConvertChar(wchar_t value) { return value; } + + template + static int FormatFloat(wchar_t *buffer, std::size_t size, + const wchar_t *format, unsigned width, int precision, T value); +}; + +// Selects uint32_t if FitsIn32Bits is true, uint64_t otherwise. +template +struct TypeSelector { typedef uint32_t Type; }; + +template <> +struct TypeSelector { typedef uint64_t Type; }; + +// Checks if a number is negative - used to avoid warnings. +template +struct SignChecker { + template + static bool IsNegative(T) { return false; } +}; + +template <> +struct SignChecker { + template + static bool IsNegative(T value) { return value < 0; } +}; + +// Returns true if value is negative, false otherwise. +// Same as (value < 0) but doesn't produce warnings if T is an unsigned type. +template +inline bool IsNegative(T value) { + return SignChecker::is_signed>::IsNegative(value); +} + +template +struct IntTraits { + // Smallest of uint32_t and uint64_t that is large enough to represent + // all values of T. + typedef typename + TypeSelector::digits <= 32>::Type MainType; +}; + +template +struct IsLongDouble { enum {VALUE = 0}; }; + +template <> +struct IsLongDouble { enum {VALUE = 1}; }; + +void ReportUnknownType(char code, const char *type); + +extern const uint32_t POWERS_OF_10_32[]; +extern const uint64_t POWERS_OF_10_64[]; + +#if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clzll) +// Returns the number of decimal digits in n. Leading zeros are not counted +// except for n == 0 in which case CountDigits returns 1. +inline unsigned CountDigits(uint64_t n) { + // Based on http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10 + // and the benchmark https://github.com/localvoid/cxx-benchmark-count-digits. + uint64_t t = (64 - __builtin_clzll(n | 1)) * 1233 >> 12; + return t - (n < POWERS_OF_10_64[t]) + 1; +} +# if FMT_GCC_VERSION >= 400 || FMT_HAS_BUILTIN(__builtin_clz) +// Optional version of CountDigits for better performance on 32-bit platforms. +inline unsigned CountDigits(uint32_t n) { + uint32_t t = (32 - __builtin_clz(n | 1)) * 1233 >> 12; + return t - (n < POWERS_OF_10_32[t]) + 1; +} +# endif +#else +// Slower version of CountDigits used when __builtin_clz is not available. +inline unsigned CountDigits(uint64_t n) { + unsigned count = 1; + for (;;) { + // Integer division is slow so do it for a group of four digits instead + // of for every digit. The idea comes from the talk by Alexandrescu + // "Three Optimization Tips for C++". See speed-test for a comparison. + if (n < 10) return count; + if (n < 100) return count + 1; + if (n < 1000) return count + 2; + if (n < 10000) return count + 3; + n /= 10000u; + count += 4; + } +} +#endif + +extern const char DIGITS[]; + +// Formats a decimal unsigned integer value writing into buffer. +template +void FormatDecimal(Char *buffer, UInt value, unsigned num_digits) { + --num_digits; + while (value >= 100) { + // Integer division is slow so do it for a group of two digits instead + // of for every digit. The idea comes from the talk by Alexandrescu + // "Three Optimization Tips for C++". See speed-test for a comparison. + unsigned index = (value % 100) * 2; + value /= 100; + buffer[num_digits] = internal::DIGITS[index + 1]; + buffer[num_digits - 1] = internal::DIGITS[index]; + num_digits -= 2; + } + if (value < 10) { + *buffer = static_cast('0' + value); + return; + } + unsigned index = static_cast(value * 2); + buffer[1] = internal::DIGITS[index + 1]; + buffer[0] = internal::DIGITS[index]; +} + +template +void FormatCustomArg( + BasicWriter &w, const void *arg, const FormatSpec &spec); + +#ifdef _WIN32 +// A converter from UTF-8 to UTF-16. +// It is only provided for Windows since other systems use UTF-8. +class UTF8ToUTF16 { + private: + Array buffer_; + + public: + explicit UTF8ToUTF16(StringRef s); + operator WStringRef() const { return WStringRef(&buffer_[0], size()); } + size_t size() const { return buffer_.size() - 1; } +}; + +// A converter from UTF-16 to UTF-8. +// It is only provided for Windows since other systems use UTF-8. +class UTF16ToUTF8 { + private: + Array buffer_; + + public: + UTF16ToUTF8() {} + explicit UTF16ToUTF8(WStringRef s); + operator StringRef() const { return StringRef(&buffer_[0], size()); } + size_t size() const { return buffer_.size() - 1; } + + // Performs conversion returning a system error code instead of + // throwing exception on error. + int Convert(WStringRef s); +}; +#endif + +// Portable thread-safe version of strerror. +// Sets buffer to point to a string describing the error code. +// This can be either a pointer to a string stored in buffer, +// or a pointer to some static immutable string. +// Returns one of the following values: +// 0 - success +// ERANGE - buffer is not large enough to store the error message +// other - failure +// Buffer should be at least of size 1. +int StrError(int error_code, + char *&buffer, std::size_t buffer_size) FMT_NOEXCEPT(true); + +void FormatSystemErrorMessage( + fmt::Writer &out, int error_code, fmt::StringRef message); + +#ifdef _WIN32 +void FormatWinErrorMessage( + fmt::Writer &out, int error_code, fmt::StringRef message); +#endif + +} // namespace internal + +/** + A formatting error such as invalid format string. + */ +class FormatError : public std::runtime_error { + public: + explicit FormatError(const std::string &message) + : std::runtime_error(message) {} +}; + +/** + An error returned by the operating system or the language runtime, + for example a file opening error. + */ +class SystemError : public std::runtime_error { + private: + int error_code_; + + public: + SystemError(StringRef message, int error_code) + : std::runtime_error(message), error_code_(error_code) {} + + int error_code() const { return error_code_; } +}; + +enum Alignment { + ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, ALIGN_NUMERIC +}; + +// Flags. +enum { SIGN_FLAG = 1, PLUS_FLAG = 2, HASH_FLAG = 4 }; + +// An empty format specifier. +struct EmptySpec {}; + +// A type specifier. +template +struct TypeSpec : EmptySpec { + Alignment align() const { return ALIGN_DEFAULT; } + unsigned width() const { return 0; } + + bool sign_flag() const { return false; } + bool plus_flag() const { return false; } + bool hash_flag() const { return false; } + + char type() const { return TYPE; } + char fill() const { return ' '; } +}; + +// A width specifier. +struct WidthSpec { + unsigned width_; + // Fill is always wchar_t and cast to char if necessary to avoid having + // two specialization of WidthSpec and its subclasses. + wchar_t fill_; + + WidthSpec(unsigned width, wchar_t fill) : width_(width), fill_(fill) {} + + unsigned width() const { return width_; } + wchar_t fill() const { return fill_; } +}; + +// An alignment specifier. +struct AlignSpec : WidthSpec { + Alignment align_; + + AlignSpec(unsigned width, wchar_t fill, Alignment align = ALIGN_DEFAULT) + : WidthSpec(width, fill), align_(align) {} + + Alignment align() const { return align_; } +}; + +// An alignment and type specifier. +template +struct AlignTypeSpec : AlignSpec { + AlignTypeSpec(unsigned width, wchar_t fill) : AlignSpec(width, fill) {} + + bool sign_flag() const { return false; } + bool plus_flag() const { return false; } + bool hash_flag() const { return false; } + + char type() const { return TYPE; } +}; + +// A full format specifier. +struct FormatSpec : AlignSpec { + unsigned flags_; + char type_; + + FormatSpec(unsigned width = 0, char type = 0, wchar_t fill = ' ') + : AlignSpec(width, fill), flags_(0), type_(type) {} + + bool sign_flag() const { return (flags_ & SIGN_FLAG) != 0; } + bool plus_flag() const { return (flags_ & PLUS_FLAG) != 0; } + bool hash_flag() const { return (flags_ & HASH_FLAG) != 0; } + + char type() const { return type_; } +}; + +// An integer format specifier. +template , typename Char = char> +class IntFormatSpec : public SpecT { + private: + T value_; + + public: + IntFormatSpec(T value, const SpecT &spec = SpecT()) + : SpecT(spec), value_(value) {} + + T value() const { return value_; } +}; + +// A string format specifier. +template +class StrFormatSpec : public AlignSpec { + private: + const T *str_; + + public: + StrFormatSpec(const T *str, unsigned width, wchar_t fill) + : AlignSpec(width, fill), str_(str) {} + + const T *str() const { return str_; } +}; + +/** + Returns an integer format specifier to format the value in base 2. + */ +IntFormatSpec > bin(int value); + +/** + Returns an integer format specifier to format the value in base 8. + */ +IntFormatSpec > oct(int value); + +/** + Returns an integer format specifier to format the value in base 16 using + lower-case letters for the digits above 9. + */ +IntFormatSpec > hex(int value); + +/** + Returns an integer formatter format specifier to format in base 16 using + upper-case letters for the digits above 9. + */ +IntFormatSpec > hexu(int value); + +/** + \rst + Returns an integer format specifier to pad the formatted argument with the + fill character to the specified width using the default (right) numeric + alignment. + + **Example**:: + + Writer out; + out << pad(hex(0xcafe), 8, '0'); + // out.str() == "0000cafe" + + \endrst + */ +template +IntFormatSpec, Char> pad( + int value, unsigned width, Char fill = ' '); + +#define FMT_DEFINE_INT_FORMATTERS(TYPE) \ +inline IntFormatSpec > bin(TYPE value) { \ + return IntFormatSpec >(value, TypeSpec<'b'>()); \ +} \ + \ +inline IntFormatSpec > oct(TYPE value) { \ + return IntFormatSpec >(value, TypeSpec<'o'>()); \ +} \ + \ +inline IntFormatSpec > hex(TYPE value) { \ + return IntFormatSpec >(value, TypeSpec<'x'>()); \ +} \ + \ +inline IntFormatSpec > hexu(TYPE value) { \ + return IntFormatSpec >(value, TypeSpec<'X'>()); \ +} \ + \ +template \ +inline IntFormatSpec > pad( \ + IntFormatSpec > f, unsigned width) { \ + return IntFormatSpec >( \ + f.value(), AlignTypeSpec(width, ' ')); \ +} \ + \ +/* For compatibility with older compilers we provide two overloads for pad, */ \ +/* one that takes a fill character and one that doesn't. In the future this */ \ +/* can be replaced with one overload making the template argument Char */ \ +/* default to char (C++11). */ \ +template \ +inline IntFormatSpec, Char> pad( \ + IntFormatSpec, Char> f, \ + unsigned width, Char fill) { \ + return IntFormatSpec, Char>( \ + f.value(), AlignTypeSpec(width, fill)); \ +} \ + \ +inline IntFormatSpec > pad( \ + TYPE value, unsigned width) { \ + return IntFormatSpec >( \ + value, AlignTypeSpec<0>(width, ' ')); \ +} \ + \ +template \ +inline IntFormatSpec, Char> pad( \ + TYPE value, unsigned width, Char fill) { \ + return IntFormatSpec, Char>( \ + value, AlignTypeSpec<0>(width, fill)); \ +} + +FMT_DEFINE_INT_FORMATTERS(int) +FMT_DEFINE_INT_FORMATTERS(long) +FMT_DEFINE_INT_FORMATTERS(unsigned) +FMT_DEFINE_INT_FORMATTERS(unsigned long) +FMT_DEFINE_INT_FORMATTERS(LongLong) +FMT_DEFINE_INT_FORMATTERS(ULongLong) + +/** + \rst + Returns a string formatter that pads the formatted argument with the fill + character to the specified width using the default (left) string alignment. + + **Example**:: + + std::string s = str(Writer() << pad("abc", 8)); + // s == "abc " + + \endrst + */ +template +inline StrFormatSpec pad( + const Char *str, unsigned width, Char fill = ' ') { + return StrFormatSpec(str, width, fill); +} + +inline StrFormatSpec pad( + const wchar_t *str, unsigned width, char fill = ' ') { + return StrFormatSpec(str, width, fill); +} + +/** + \rst + This template provides operations for formatting and writing data into + a character stream. The output is stored in a memory buffer that grows + dynamically. + + You can use one of the following typedefs for common character types: + + +---------+----------------------+ + | Type | Definition | + +=========+======================+ + | Writer | BasicWriter | + +---------+----------------------+ + | WWriter | BasicWriter | + +---------+----------------------+ + + **Example**:: + + Writer out; + out << "The answer is " << 42 << "\n"; + out.Format("({:+f}, {:+f})") << -3.14 << 3.14; + + This will write the following output to the ``out`` object: + + .. code-block:: none + + The answer is 42 + (-3.140000, +3.140000) + + The output can be converted to an ``std::string`` with ``out.str()`` or + accessed as a C string with ``out.c_str()``. + \endrst + */ +template +class BasicWriter { + private: + // Output buffer. + mutable internal::Array buffer_; + + // Make BasicFormatter a friend so that it can access ArgInfo and Arg. + friend class BasicFormatter; + + typedef typename internal::CharTraits::CharPtr CharPtr; + +#if _SECURE_SCL + static Char *GetBase(CharPtr p) { return p.base(); } +#else + static Char *GetBase(Char *p) { return p; } +#endif + + static CharPtr FillPadding(CharPtr buffer, + unsigned total_size, std::size_t content_size, wchar_t fill); + + // Grows the buffer by n characters and returns a pointer to the newly + // allocated area. + CharPtr GrowBuffer(std::size_t n) { + std::size_t size = buffer_.size(); + buffer_.resize(size + n); + return internal::CheckPtr(&buffer_[size], n); + } + + CharPtr PrepareFilledBuffer(unsigned size, const EmptySpec &, char sign) { + CharPtr p = GrowBuffer(size); + *p = sign; + return p + size - 1; + } + + CharPtr PrepareFilledBuffer(unsigned size, const AlignSpec &spec, char sign); + + // Formats an integer. + template + void FormatInt(T value, const Spec &spec); + + // Formats a floating-point number (double or long double). + template + void FormatDouble(T value, const FormatSpec &spec, int precision); + + // Formats a string. + template + CharPtr FormatString( + const StringChar *s, std::size_t size, const AlignSpec &spec); + + // This method is private to disallow writing a wide string to a + // char stream and vice versa. If you want to print a wide string + // as a pointer as std::ostream does, cast it to const void*. + // Do not implement! + void operator<<(typename internal::CharTraits::UnsupportedStrType); + + enum Type { + // Numeric types should go first. + INT, UINT, LONG, ULONG, LONG_LONG, ULONG_LONG, DOUBLE, LONG_DOUBLE, + LAST_NUMERIC_TYPE = LONG_DOUBLE, + CHAR, STRING, WSTRING, POINTER, CUSTOM + }; + + struct StringValue { + const Char *value; + std::size_t size; + }; + + typedef void (*FormatFunc)( + BasicWriter &w, const void *arg, const FormatSpec &spec); + + struct CustomValue { + const void *value; + FormatFunc format; + }; + + // Information about a format argument. It is a POD type to allow + // storage in internal::Array. + struct ArgInfo { + Type type; + union { + int int_value; + unsigned uint_value; + double double_value; + long long_value; + unsigned long ulong_value; + LongLong long_long_value; + ULongLong ulong_long_value; + long double long_double_value; + const void *pointer_value; + StringValue string; + CustomValue custom; + }; + }; + + // An argument action that does nothing. + struct NullArgAction { + void operator()() const {} + }; + + // A wrapper around a format argument. + template + class BasicArg : public Action, public ArgInfo { + private: + // This method is private to disallow formatting of arbitrary pointers. + // If you want to output a pointer cast it to const void*. Do not implement! + template + BasicArg(const T *value); + + // This method is private to disallow formatting of arbitrary pointers. + // If you want to output a pointer cast it to void*. Do not implement! + template + BasicArg(T *value); + + public: + using ArgInfo::type; + + BasicArg(short value) { type = INT; this->int_value = value; } + BasicArg(unsigned short value) { type = UINT; this->int_value = value; } + BasicArg(int value) { type = INT; this->int_value = value; } + BasicArg(unsigned value) { type = UINT; this->uint_value = value; } + BasicArg(long value) { type = LONG; this->long_value = value; } + BasicArg(unsigned long value) { type = ULONG; this->ulong_value = value; } + BasicArg(LongLong value) { + type = LONG_LONG; + this->long_long_value = value; + } + BasicArg(ULongLong value) { + type = ULONG_LONG; + this->ulong_long_value = value; + } + BasicArg(float value) { type = DOUBLE; this->double_value = value; } + BasicArg(double value) { type = DOUBLE; this->double_value = value; } + BasicArg(long double value) { + type = LONG_DOUBLE; + this->long_double_value = value; + } + BasicArg(char value) { type = CHAR; this->int_value = value; } + BasicArg(wchar_t value) { + type = CHAR; + this->int_value = internal::CharTraits::ConvertChar(value); + } + + BasicArg(const Char *value) { + type = STRING; + this->string.value = value; + this->string.size = 0; + } + + BasicArg(Char *value) { + type = STRING; + this->string.value = value; + this->string.size = 0; + } + + BasicArg(const void *value) { type = POINTER; this->pointer_value = value; } + BasicArg(void *value) { type = POINTER; this->pointer_value = value; } + + BasicArg(const std::basic_string &value) { + type = STRING; + this->string.value = value.c_str(); + this->string.size = value.size(); + } + + BasicArg(BasicStringRef value) { + type = STRING; + this->string.value = value.c_str(); + this->string.size = value.size(); + } + + template + BasicArg(const T &value) { + type = CUSTOM; + this->custom.value = &value; + this->custom.format = &internal::FormatCustomArg; + } + + // The destructor is declared noexcept(false) because the action may throw + // an exception. + ~BasicArg() FMT_NOEXCEPT(false) { + // Invoke the action. + (*this)(); + } + }; + + typedef BasicArg<> Arg; + + // Format string parser. + class FormatParser { + private: + std::size_t num_args_; + const ArgInfo *args_; + int num_open_braces_; + int next_arg_index_; + + void ReportError(const Char *s, StringRef message) const; + + unsigned ParseUInt(const Char *&s) const; + + // Parses argument index and returns an argument with this index. + const ArgInfo &ParseArgIndex(const Char *&s); + + void CheckSign(const Char *&s, const ArgInfo &arg); + + public: + void Format(BasicWriter &writer, + BasicStringRef format, std::size_t num_args, const ArgInfo *args); + }; + + public: + /** + Constructs a ``BasicWriter`` object. + */ + BasicWriter() {} + +#if FMT_USE_RVALUE_REFERENCES + /** + Constructs a ``BasicWriter`` object moving the content of the other + object to it. + */ + BasicWriter(BasicWriter &&other) : buffer_(std::move(other.buffer_)) {} + + /** + Moves the content of the other ``BasicWriter`` object to this one. + */ + BasicWriter& operator=(BasicWriter &&other) { + assert(this != &other); + buffer_ = std::move(other.buffer_); + return *this; + } +#endif + + /** + Returns the total number of characters written. + */ + std::size_t size() const { return buffer_.size(); } + + /** + Returns a pointer to the output buffer content. No terminating null + character is appended. + */ + const Char *data() const { return &buffer_[0]; } + + /** + Returns a pointer to the output buffer content with terminating null + character appended. + */ + const Char *c_str() const { + std::size_t size = buffer_.size(); + buffer_.reserve(size + 1); + buffer_[size] = '\0'; + return &buffer_[0]; + } + + /** + Returns the content of the output buffer as an `std::string`. + */ + std::basic_string str() const { + return std::basic_string(&buffer_[0], buffer_.size()); + } + + inline void VFormat(BasicStringRef format, + std::size_t num_args, const ArgInfo *args) { + FormatParser().Format(*this, format, num_args, args); + } + + /** + \rst + Formats a string sending the output to the writer. Arguments are + accepted through the returned :cpp:class:`fmt::BasicFormatter` object + using operator ``<<``. + + **Example**:: + + Writer out; + out.Format("Current point:\n"); + out.Format("({:+f}, {:+f})") << -3.14 << 3.14; + + This will write the following output to the ``out`` object: + + .. code-block:: none + + Current point: + (-3.140000, +3.140000) + + The output can be accessed using :meth:`data`, :meth:`c_str` or :meth:`str` + methods. + + See also `Format String Syntax`_. + \endrst + */ + BasicFormatter Format(StringRef format); + +#if FMT_USE_VARIADIC_TEMPLATES + /** + \rst + Formats a string sending the output to the writer. + + This version of the Format method uses C++11 features such as + variadic templates and rvalue references. For C++98 version, see + the overload taking a single ``StringRef`` argument above. + + **Example**:: + + Writer out; + out.Format("Current point:\n"); + out.Format("({:+f}, {:+f})", -3.14, 3.14); + + This will write the following output to the ``out`` object: + + .. code-block:: none + + Current point: + (-3.140000, +3.140000) + + The output can be accessed using :meth:`data`, :meth:`c_str` or :meth:`str` + methods. + + See also `Format String Syntax`_. + \endrst + */ + template + void Format(BasicStringRef format, const Args & ... args) { + Arg arg_array[] = {args...}; + VFormat(format, sizeof...(Args), arg_array); + } +#endif + + BasicWriter &operator<<(int value) { + return *this << IntFormatSpec(value); + } + BasicWriter &operator<<(unsigned value) { + return *this << IntFormatSpec(value); + } + BasicWriter &operator<<(long value) { + return *this << IntFormatSpec(value); + } + BasicWriter &operator<<(unsigned long value) { + return *this << IntFormatSpec(value); + } + BasicWriter &operator<<(LongLong value) { + return *this << IntFormatSpec(value); + } + + /** + Formats *value* and writes it to the stream. + */ + BasicWriter &operator<<(ULongLong value) { + return *this << IntFormatSpec(value); + } + + BasicWriter &operator<<(double value) { + FormatDouble(value, FormatSpec(), -1); + return *this; + } + + /** + Formats *value* using the general format for floating-point numbers + (``'g'``) and writes it to the stream. + */ + BasicWriter &operator<<(long double value) { + FormatDouble(value, FormatSpec(), -1); + return *this; + } + + /** + Writes a character to the stream. + */ + BasicWriter &operator<<(char value) { + *GrowBuffer(1) = value; + return *this; + } + + BasicWriter &operator<<(wchar_t value) { + *GrowBuffer(1) = internal::CharTraits::ConvertChar(value); + return *this; + } + + /** + Writes *value* to the stream. + */ + BasicWriter &operator<<(const fmt::BasicStringRef value) { + const Char *str = value.c_str(); + std::size_t size = value.size(); + std::copy(str, str + size, GrowBuffer(size)); + return *this; + } + + template + BasicWriter &operator<<(const IntFormatSpec &spec) { + internal::CharTraits::ConvertChar(FillChar()); + FormatInt(spec.value(), spec); + return *this; + } + + template + BasicWriter &operator<<(const StrFormatSpec &spec) { + const StringChar *s = spec.str(); + FormatString(s, std::char_traits::length(s), spec); + return *this; + } + + void Write(const std::basic_string &s, const FormatSpec &spec) { + FormatString(s.data(), s.size(), spec); + } + + void Clear() { + buffer_.clear(); + } +}; + +template +template +typename BasicWriter::CharPtr BasicWriter::FormatString( + const StringChar *s, std::size_t size, const AlignSpec &spec) { + CharPtr out = CharPtr(); + if (spec.width() > size) { + out = GrowBuffer(spec.width()); + Char fill = static_cast(spec.fill()); + if (spec.align() == ALIGN_RIGHT) { + std::fill_n(out, spec.width() - size, fill); + out += spec.width() - size; + } else if (spec.align() == ALIGN_CENTER) { + out = FillPadding(out, spec.width(), size, fill); + } else { + std::fill_n(out + size, spec.width() - size, fill); + } + } else { + out = GrowBuffer(size); + } + std::copy(s, s + size, out); + return out; +} + +template +template +void BasicWriter::FormatInt(T value, const Spec &spec) { + unsigned size = 0; + char sign = 0; + typedef typename internal::IntTraits::MainType UnsignedType; + UnsignedType abs_value = value; + if (internal::IsNegative(value)) { + sign = '-'; + ++size; + abs_value = 0 - abs_value; + } else if (spec.sign_flag()) { + sign = spec.plus_flag() ? '+' : ' '; + ++size; + } + switch (spec.type()) { + case 0: case 'd': { + unsigned num_digits = internal::CountDigits(abs_value); + CharPtr p = + PrepareFilledBuffer(size + num_digits, spec, sign) + 1 - num_digits; + internal::FormatDecimal(GetBase(p), abs_value, num_digits); + break; + } + case 'x': case 'X': { + UnsignedType n = abs_value; + bool print_prefix = spec.hash_flag(); + if (print_prefix) size += 2; + do { + ++size; + } while ((n >>= 4) != 0); + Char *p = GetBase(PrepareFilledBuffer(size, spec, sign)); + n = abs_value; + const char *digits = spec.type() == 'x' ? + "0123456789abcdef" : "0123456789ABCDEF"; + do { + *p-- = digits[n & 0xf]; + } while ((n >>= 4) != 0); + if (print_prefix) { + *p-- = spec.type(); + *p = '0'; + } + break; + } + case 'b': case 'B': { + UnsignedType n = abs_value; + bool print_prefix = spec.hash_flag(); + if (print_prefix) size += 2; + do { + ++size; + } while ((n >>= 1) != 0); + Char *p = GetBase(PrepareFilledBuffer(size, spec, sign)); + n = abs_value; + do { + *p-- = '0' + (n & 1); + } while ((n >>= 1) != 0); + if (print_prefix) { + *p-- = spec.type(); + *p = '0'; + } + break; + } + case 'o': { + UnsignedType n = abs_value; + bool print_prefix = spec.hash_flag(); + if (print_prefix) ++size; + do { + ++size; + } while ((n >>= 3) != 0); + Char *p = GetBase(PrepareFilledBuffer(size, spec, sign)); + n = abs_value; + do { + *p-- = '0' + (n & 7); + } while ((n >>= 3) != 0); + if (print_prefix) + *p = '0'; + break; + } + default: + internal::ReportUnknownType(spec.type(), "integer"); + break; + } +} + +template +BasicFormatter BasicWriter::Format(StringRef format) { + BasicFormatter f(*this, format.c_str()); + return f; +} + +// The default formatting function. +template +void Format(BasicWriter &w, const FormatSpec &spec, const T &value) { + std::basic_ostringstream os; + os << value; + w.Write(os.str(), spec); +} + +namespace internal { +// Formats an argument of a custom type, such as a user-defined class. +template +void FormatCustomArg( + BasicWriter &w, const void *arg, const FormatSpec &spec) { + Format(w, spec, *static_cast(arg)); +} +} + +/** + \rst + The :cpp:class:`fmt::BasicFormatter` template provides operator<< for + feeding arbitrary arguments to the :cpp:func:`fmt::Format()` function. + \endrst + */ +template +class BasicFormatter { + private: + BasicWriter *writer_; + + // An action used to ensure that formatting is performed before the + // argument is destroyed. + // Example: + // + // Format("{}") << std::string("test"); + // + // Here an Arg object wraps a temporary std::string which is destroyed at + // the end of the full expression. Since the string object is constructed + // before the Arg object, it will be destroyed after, so it will be alive + // in the Arg's destructor where the action is invoked. + // Note that the string object will not necessarily be alive when the + // destructor of BasicFormatter is called. Otherwise we wouldn't need + // this class. + struct ArgAction { + mutable BasicFormatter *formatter; + + ArgAction() : formatter(0) {} + + void operator()() const { + if (formatter) + formatter->CompleteFormatting(); + } + }; + + typedef typename BasicWriter::ArgInfo ArgInfo; + typedef typename BasicWriter::template BasicArg Arg; + + enum { NUM_INLINE_ARGS = 10 }; + internal::Array args_; // Format arguments. + + const Char *format_; // Format string. + + // Forbid copying from a temporary as in the following example: + // + // fmt::Formatter<> f = Format("test"); // not allowed + // + // This is done because BasicFormatter objects should normally exist + // only as temporaries returned by one of the formatting functions. + FMT_DISALLOW_COPY_AND_ASSIGN(BasicFormatter); + + protected: + const Char *TakeFormatString() { + const Char *format = this->format_; + this->format_ = 0; + return format; + } + + void CompleteFormatting() { + if (!format_) return; + const Char *format = format_; + format_ = 0; + writer_->VFormat(format, args_.size(), &args_[0]); + } + + public: + // Constructs a formatter with a writer to be used for output and a format + // string. + BasicFormatter(BasicWriter &w, const Char *format = 0) + : writer_(&w), format_(format) {} + + // Performs formatting if the format string is non-null. The format string + // can be null if its ownership has been transferred to another formatter. + ~BasicFormatter() { + CompleteFormatting(); + } + + BasicFormatter(BasicFormatter &f) : writer_(f.writer_), format_(f.format_) { + f.format_ = 0; + } + + // Feeds an argument to a formatter. + BasicFormatter &operator<<(const Arg &arg) { + arg.formatter = this; + args_.push_back(arg); + return *this; + } + + operator BasicStringRef() { + CompleteFormatting(); + return BasicStringRef(writer_->c_str(), writer_->size()); + } +}; + +template +inline std::basic_string str(const BasicWriter &f) { + return f.str(); +} + +template +inline const Char *c_str(const BasicWriter &f) { return f.c_str(); } + +/** + Converts a string reference to `std::string`. + */ +inline std::string str(StringRef s) { + return std::string(s.c_str(), s.size()); +} + +/** + Returns the pointer to a C string. + */ +inline const char *c_str(StringRef s) { + return s.c_str(); +} + +inline std::wstring str(WStringRef s) { + return std::wstring(s.c_str(), s.size()); +} + +inline const wchar_t *c_str(WStringRef s) { + return s.c_str(); +} + +/** + A sink that discards all output written to it. + */ +class NullSink { + public: + /** Discards the output. */ + template + void operator()(const BasicWriter &) const {} +}; + +/** + \rst + A formatter that sends output to a sink. Objects of this class normally + exist only as temporaries returned by one of the formatting functions. + You can use this class to create your own functions similar to + :cpp:func:`fmt::Format()`. + + **Example**:: + + struct ErrorSink { + void operator()(const fmt::Writer &w) const { + fmt::Print("Error: {}\n") << w.str(); + } + }; + + // Formats an error message and prints it to stdout. + fmt::Formatter ReportError(const char *format) { + fmt::Formatter f(format); + return f; + } + + ReportError("File not found: {}") << path; + \endrst + */ +template +class Formatter : private Sink, public BasicFormatter { + private: + BasicWriter writer_; + bool inactive_; + + FMT_DISALLOW_COPY_AND_ASSIGN(Formatter); + + public: + /** + \rst + Constructs a formatter with a format string and a sink. + The sink should be an unary function object that takes a const + reference to :cpp:class:`fmt::BasicWriter`, representing the + formatting output, as an argument. See :cpp:class:`fmt::NullSink` + and :cpp:class:`fmt::FileSink` for examples of sink classes. + \endrst + */ + explicit Formatter(BasicStringRef format, Sink s = Sink()) + : Sink(s), BasicFormatter(writer_, format.c_str()), + inactive_(false) { + } + + /** + \rst + A "move" constructor. Constructs a formatter transferring the format + string from other to this object. This constructor is used to return + a formatter object from a formatting function since the copy constructor + taking a const reference is disabled to prevent misuse of the API. + It is not implemented as a move constructor for compatibility with + pre-C++11 compilers, but should be treated as such. + + **Example**:: + + fmt::Formatter<> Format(fmt::StringRef format) { + fmt::Formatter<> f(format); + return f; + } + \endrst + */ + Formatter(Formatter &other) + : Sink(other), BasicFormatter(writer_, other.TakeFormatString()), + inactive_(false) { + other.inactive_ = true; + } + + /** + Performs the formatting, sends the output to the sink and destroys + the object. + */ + ~Formatter() FMT_NOEXCEPT(false) { + if (!inactive_) { + this->CompleteFormatting(); + (*this)(writer_); + } + } +}; + +/** + \rst + Formats a string similarly to Python's `str.format + `__ function. + Returns a temporary :cpp:class:`fmt::Formatter` object that accepts arguments + via operator ``<<``. + + *format* is a format string that contains literal text and replacement + fields surrounded by braces ``{}``. The formatter object replaces the + fields with formatted arguments and stores the output in a memory buffer. + The content of the buffer can be converted to ``std::string`` with + :cpp:func:`fmt::str()` or accessed as a C string with + :cpp:func:`fmt::c_str()`. + + **Example**:: + + std::string message = str(Format("The answer is {}") << 42); + + See also `Format String Syntax`_. + \endrst + */ +inline Formatter<> Format(StringRef format) { + Formatter<> f(format); + return f; +} + +inline Formatter Format(WStringRef format) { + Formatter f(format); + return f; +} + +/** + A sink that gets the error message corresponding to a system error code + as given by errno and throws SystemError. + */ +class SystemErrorSink { + private: + int error_code_; + + public: + explicit SystemErrorSink(int error_code) : error_code_(error_code) {} + + void operator()(const Writer &w) const; +}; + +/** + \rst + Formats a message and throws SystemError with the description of the form + ": ", where is the formatted message and + is the system message corresponding to the error code. + error_code is a system error code as given by errno. + \endrst + */ +inline Formatter ThrowSystemError( + int error_code, StringRef format) { + Formatter f(format, SystemErrorSink(error_code)); + return f; +} + +// Reports a system error without throwing an exception. +// Can be used to report errors from destructors. +void ReportSystemError(int error_code, StringRef message) FMT_NOEXCEPT(true); + +#ifdef _WIN32 + +/** + A sink that gets the error message corresponding to a Windows error code + as given by GetLastError and throws SystemError. + */ +class WinErrorSink { + private: + int error_code_; + + public: + explicit WinErrorSink(int error_code) : error_code_(error_code) {} + + void operator()(const Writer &w) const; +}; + +/** + Formats a message and throws SystemError with the description of the form + ": ", where is the formatted message and + is the system message corresponding to the error code. + error_code is a Windows error code as given by GetLastError. + */ +inline Formatter ThrowWinError(int error_code, StringRef format) { + Formatter f(format, WinErrorSink(error_code)); + return f; +} + +// Reports a Windows error without throwing an exception. +// Can be used to report errors from destructors. +void ReportWinError(int error_code, StringRef message) FMT_NOEXCEPT(true); + +#endif + +/** A sink that writes output to a file. */ +class FileSink { + private: + std::FILE *file_; + + public: + explicit FileSink(std::FILE *f) : file_(f) {} + + /** Writes the output to a file. */ + void operator()(const BasicWriter &w) const { + if (std::fwrite(w.data(), w.size(), 1, file_) == 0) + ThrowSystemError(errno, "cannot write to file"); + } +}; + +// Formats a string and prints it to stdout. +// Example: +// Print("Elapsed time: {0:.2f} seconds") << 1.23; +inline Formatter Print(StringRef format) { + Formatter f(format, FileSink(stdout)); + return f; +} + +// Formats a string and prints it to a file. +// Example: +// Print(stderr, "Don't {}!") << "panic"; +inline Formatter Print(std::FILE *file, StringRef format) { + Formatter f(format, FileSink(file)); + return f; +} + +enum Color { BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE }; + +/** + A sink that writes output to a terminal using ANSI escape sequences + to specify color. + */ +class ANSITerminalSink { + private: + std::FILE *file_; + Color color_; + + public: + ANSITerminalSink(std::FILE *f, Color c) : file_(f), color_(c) {} + + /** + Writes the output to a terminal using ANSI escape sequences to + specify color. + */ + void operator()(const BasicWriter &w) const; +}; + +/** + Formats a string and prints it to stdout using ANSI escape sequences + to specify color (experimental). + Example: + PrintColored(fmt::RED, "Elapsed time: {0:.2f} seconds") << 1.23; + */ +inline Formatter PrintColored(Color c, StringRef format) { + Formatter f(format, ANSITerminalSink(stdout, c)); + return f; +} + +#if FMT_USE_VARIADIC_TEMPLATES && FMT_USE_RVALUE_REFERENCES + +/** + \rst + Formats a string similarly to Python's `str.format + `__ function + and returns an :cpp:class:`fmt::BasicWriter` object containing the output. + + This version of the Format function uses C++11 features such as + variadic templates and rvalue references. For C++98 version, see + the :cpp:func:`fmt::Format()` overload above. + + *format* is a format string that contains literal text and replacement + fields surrounded by braces ``{}``. The formatter object replaces the + fields with formatted arguments and stores the output in a memory buffer. + The content of the buffer can be converted to ``std::string`` with + :cpp:func:`fmt::str()` or accessed as a C string with + :cpp:func:`fmt::c_str()`. + + **Example**:: + + std::string message = str(Format("The answer is {}", 42); + + See also `Format String Syntax`_. + \endrst + */ +template +inline Writer Format(StringRef format, const Args & ... args) { + Writer w; + w.Format(format, args...); + return std::move(w); +} + +template +inline WWriter Format(WStringRef format, const Args & ... args) { + WWriter w; + w.Format(format, args...); + return std::move(w); +} + +template +void Print(StringRef format, const Args & ... args) { + Writer w; + w.Format(format, args...); + std::fwrite(w.data(), 1, w.size(), stdout); +} + +template +void Print(std::FILE *f, StringRef format, const Args & ... args) { + Writer w; + w.Format(format, args...); + std::fwrite(w.data(), 1, w.size(), f); +} + +#endif // FMT_USE_VARIADIC_TEMPLATES && FMT_USE_RVALUE_REFERENCES + +/** + Fast integer formatter. + */ +class FormatInt { + private: + // Buffer should be large enough to hold all digits (digits10 + 1), + // a sign and a null character. + enum {BUFFER_SIZE = std::numeric_limits::digits10 + 3}; + mutable char buffer_[BUFFER_SIZE]; + char *str_; + + // Formats value in reverse and returns the number of digits. + char *FormatDecimal(ULongLong value) { + char *buffer_end = buffer_ + BUFFER_SIZE - 1; + while (value >= 100) { + // Integer division is slow so do it for a group of two digits instead + // of for every digit. The idea comes from the talk by Alexandrescu + // "Three Optimization Tips for C++". See speed-test for a comparison. + unsigned index = (value % 100) * 2; + value /= 100; + *--buffer_end = internal::DIGITS[index + 1]; + *--buffer_end = internal::DIGITS[index]; + } + if (value < 10) { + *--buffer_end = static_cast('0' + value); + return buffer_end; + } + unsigned index = static_cast(value * 2); + *--buffer_end = internal::DIGITS[index + 1]; + *--buffer_end = internal::DIGITS[index]; + return buffer_end; + } + + void FormatSigned(LongLong value) { + ULongLong abs_value = value; + bool negative = value < 0; + if (negative) + abs_value = 0 - value; + str_ = FormatDecimal(abs_value); + if (negative) + *--str_ = '-'; + } + + public: + explicit FormatInt(int value) { FormatSigned(value); } + explicit FormatInt(long value) { FormatSigned(value); } + explicit FormatInt(LongLong value) { FormatSigned(value); } + explicit FormatInt(unsigned value) : str_(FormatDecimal(value)) {} + explicit FormatInt(unsigned long value) : str_(FormatDecimal(value)) {} + explicit FormatInt(ULongLong value) : str_(FormatDecimal(value)) {} + + /** + Returns the number of characters written to the output buffer. + */ + std::size_t size() const { return buffer_ - str_ + BUFFER_SIZE - 1; } + + /** + Returns a pointer to the output buffer content. No terminating null + character is appended. + */ + const char *data() const { return str_; } + + /** + Returns a pointer to the output buffer content with terminating null + character appended. + */ + const char *c_str() const { + buffer_[BUFFER_SIZE - 1] = '\0'; + return str_; + } + + /** + Returns the content of the output buffer as an `std::string`. + */ + std::string str() const { return std::string(str_, size()); } +}; + +// Formats a decimal integer value writing into buffer and returns +// a pointer to the end of the formatted string. This function doesn't +// write a terminating null character. +template +inline void FormatDec(char *&buffer, T value) { + typename internal::IntTraits::MainType abs_value = value; + if (internal::IsNegative(value)) { + *buffer++ = '-'; + abs_value = 0 - abs_value; + } + if (abs_value < 100) { + if (abs_value < 10) { + *buffer++ = static_cast('0' + abs_value); + return; + } + unsigned index = static_cast(abs_value * 2); + *buffer++ = internal::DIGITS[index]; + *buffer++ = internal::DIGITS[index + 1]; + return; + } + unsigned num_digits = internal::CountDigits(abs_value); + internal::FormatDecimal(buffer, abs_value, num_digits); + buffer += num_digits; +} +} + +// Restore warnings. +#if FMT_GCC_VERSION >= 406 +# pragma GCC diagnostic pop +#elif _MSC_VER +# pragma warning(pop) +#endif + +#endif // FMT_FORMAT_H_ diff --git a/src/common/pugiconfig.h b/src/common/pugiconfig.h new file mode 100644 index 000000000..d05425aff --- /dev/null +++ b/src/common/pugiconfig.h @@ -0,0 +1,72 @@ +/** + * pugixml parser - version 1.4 + * -------------------------------------------------------- + * Copyright (C) 2006-2014, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com) + * Report bugs and download new versions at http://pugixml.org/ + * + * This library is distributed under the MIT License. See notice at the end + * of this file. + * + * This work is based on the pugxml parser, which is: + * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net) + */ + +#ifndef HEADER_PUGICONFIG_HPP +#define HEADER_PUGICONFIG_HPP + +// Uncomment this to enable wchar_t mode +//#define PUGIXML_WCHAR_MODE + +// Uncomment this to disable XPath +// #define PUGIXML_NO_XPATH + +// Uncomment this to disable STL +// #define PUGIXML_NO_STL + +// Uncomment this to disable exceptions +// #define PUGIXML_NO_EXCEPTIONS + +// Set this to control attributes for public classes/functions, i.e.: +// #define PUGIXML_API __declspec(dllexport) // to export all public symbols from DLL +// #define PUGIXML_CLASS __declspec(dllimport) // to import all classes from DLL +// #define PUGIXML_FUNCTION __fastcall // to set calling conventions to all public functions to fastcall +// In absence of PUGIXML_CLASS/PUGIXML_FUNCTION definitions PUGIXML_API is used instead + +// Tune these constants to adjust memory-related behavior +// #define PUGIXML_MEMORY_PAGE_SIZE 32768 +// #define PUGIXML_MEMORY_OUTPUT_STACK 10240 +// #define PUGIXML_MEMORY_XPATH_PAGE_SIZE 4096 + +// Uncomment this to switch to header-only version +// #define PUGIXML_HEADER_ONLY +// #include "pugixml.cpp" + +// Uncomment this to enable long long support +// #define PUGIXML_HAS_LONG_LONG + +#endif + +/** + * Copyright (c) 2006-2014 Arseny Kapoulkine + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ diff --git a/src/common/pugixml.cpp b/src/common/pugixml.cpp new file mode 100644 index 000000000..bcd2e935f --- /dev/null +++ b/src/common/pugixml.cpp @@ -0,0 +1,10638 @@ +/** + * pugixml parser - version 1.4 + * -------------------------------------------------------- + * Copyright (C) 2006-2014, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com) + * Report bugs and download new versions at http://pugixml.org/ + * + * This library is distributed under the MIT License. See notice at the end + * of this file. + * + * This work is based on the pugxml parser, which is: + * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net) + */ +#ifndef SOURCE_PUGIXML_CPP +#define SOURCE_PUGIXML_CPP + +#include "pugixml.h" + +#include +#include +#include +#include + +#ifdef PUGIXML_WCHAR_MODE +# include +#endif + +#ifndef PUGIXML_NO_XPATH +# include +# include +# ifdef PUGIXML_NO_EXCEPTIONS +# include +# endif +#endif + +#ifndef PUGIXML_NO_STL +# include +# include +# include +#endif + +// For placement new +#include + +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4127) // conditional expression is constant +# pragma warning(disable: 4324) // structure was padded due to __declspec(align()) +# pragma warning(disable: 4611) // interaction between '_setjmp' and C++ object destruction is non-portable +# pragma warning(disable: 4702) // unreachable code +# pragma warning(disable: 4996) // this function or variable may be unsafe +# pragma warning(disable: 4793) // function compiled as native: presence of '_setjmp' makes a function unmanaged +#endif + +#ifdef __INTEL_COMPILER +# pragma warning(disable: 177) // function was declared but never referenced +# pragma warning(disable: 279) // controlling expression is constant +# pragma warning(disable: 1478 1786) // function was declared "deprecated" +# pragma warning(disable: 1684) // conversion from pointer to same-sized integral type +#endif + +#if defined(__BORLANDC__) && defined(PUGIXML_HEADER_ONLY) +# pragma warn -8080 // symbol is declared but never used; disabling this inside push/pop bracket does not make the warning go away +#endif + +#ifdef __BORLANDC__ +# pragma option push +# pragma warn -8008 // condition is always false +# pragma warn -8066 // unreachable code +#endif + +#ifdef __SNC__ +// Using diag_push/diag_pop does not disable the warnings inside templates due to a compiler bug +# pragma diag_suppress=178 // function was declared but never referenced +# pragma diag_suppress=237 // controlling expression is constant +#endif + +// Inlining controls +#if defined(_MSC_VER) && _MSC_VER >= 1300 +# define PUGI__NO_INLINE __declspec(noinline) +#elif defined(__GNUC__) +# define PUGI__NO_INLINE __attribute__((noinline)) +#else +# define PUGI__NO_INLINE +#endif + +// Simple static assertion +#define PUGI__STATIC_ASSERT(cond) { static const char condition_failed[(cond) ? 1 : -1] = {0}; (void)condition_failed[0]; } + +// Digital Mars C++ bug workaround for passing char loaded from memory via stack +#ifdef __DMC__ +# define PUGI__DMC_VOLATILE volatile +#else +# define PUGI__DMC_VOLATILE +#endif + +// Borland C++ bug workaround for not defining ::memcpy depending on header include order (can't always use std::memcpy because some compilers don't have it at all) +#if defined(__BORLANDC__) && !defined(__MEM_H_USING_LIST) +using std::memcpy; +using std::memmove; +#endif + +// In some environments MSVC is a compiler but the CRT lacks certain MSVC-specific features +#if defined(_MSC_VER) && !defined(__S3E__) +# define PUGI__MSVC_CRT_VERSION _MSC_VER +#endif + +#ifdef PUGIXML_HEADER_ONLY +# define PUGI__NS_BEGIN namespace pugi { namespace impl { +# define PUGI__NS_END } } +# define PUGI__FN inline +# define PUGI__FN_NO_INLINE inline +#else +# if defined(_MSC_VER) && _MSC_VER < 1300 // MSVC6 seems to have an amusing bug with anonymous namespaces inside namespaces +# define PUGI__NS_BEGIN namespace pugi { namespace impl { +# define PUGI__NS_END } } +# else +# define PUGI__NS_BEGIN namespace pugi { namespace impl { namespace { +# define PUGI__NS_END } } } +# endif +# define PUGI__FN +# define PUGI__FN_NO_INLINE PUGI__NO_INLINE +#endif + +// uintptr_t +#if !defined(_MSC_VER) || _MSC_VER >= 1600 +# include +#else +# ifndef _UINTPTR_T_DEFINED +// No native uintptr_t in MSVC6 and in some WinCE versions +typedef size_t uintptr_t; +#define _UINTPTR_T_DEFINED +# endif +PUGI__NS_BEGIN + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; +PUGI__NS_END +#endif + +// Memory allocation +PUGI__NS_BEGIN + PUGI__FN void* default_allocate(size_t size) + { + return malloc(size); + } + + PUGI__FN void default_deallocate(void* ptr) + { + free(ptr); + } + + template + struct xml_memory_management_function_storage + { + static allocation_function allocate; + static deallocation_function deallocate; + }; + + template allocation_function xml_memory_management_function_storage::allocate = default_allocate; + template deallocation_function xml_memory_management_function_storage::deallocate = default_deallocate; + + typedef xml_memory_management_function_storage xml_memory; +PUGI__NS_END + +// String utilities +PUGI__NS_BEGIN + // Get string length + PUGI__FN size_t strlength(const char_t* s) + { + assert(s); + + #ifdef PUGIXML_WCHAR_MODE + return wcslen(s); + #else + return strlen(s); + #endif + } + + // Compare two strings + PUGI__FN bool strequal(const char_t* src, const char_t* dst) + { + assert(src && dst); + + #ifdef PUGIXML_WCHAR_MODE + return wcscmp(src, dst) == 0; + #else + return strcmp(src, dst) == 0; + #endif + } + + // Compare lhs with [rhs_begin, rhs_end) + PUGI__FN bool strequalrange(const char_t* lhs, const char_t* rhs, size_t count) + { + for (size_t i = 0; i < count; ++i) + if (lhs[i] != rhs[i]) + return false; + + return lhs[count] == 0; + } + + // Get length of wide string, even if CRT lacks wide character support + PUGI__FN size_t strlength_wide(const wchar_t* s) + { + assert(s); + + #ifdef PUGIXML_WCHAR_MODE + return wcslen(s); + #else + const wchar_t* end = s; + while (*end) end++; + return static_cast(end - s); + #endif + } + +#ifdef PUGIXML_WCHAR_MODE + // Convert string to wide string, assuming all symbols are ASCII + PUGI__FN void widen_ascii(wchar_t* dest, const char* source) + { + for (const char* i = source; *i; ++i) *dest++ = *i; + *dest = 0; + } +#endif +PUGI__NS_END + +#if !defined(PUGIXML_NO_STL) || !defined(PUGIXML_NO_XPATH) +// auto_ptr-like buffer holder for exception recovery +PUGI__NS_BEGIN + struct buffer_holder + { + void* data; + void (*deleter)(void*); + + buffer_holder(void* data_, void (*deleter_)(void*)): data(data_), deleter(deleter_) + { + } + + ~buffer_holder() + { + if (data) deleter(data); + } + + void* release() + { + void* result = data; + data = 0; + return result; + } + }; +PUGI__NS_END +#endif + +PUGI__NS_BEGIN + static const size_t xml_memory_page_size = + #ifdef PUGIXML_MEMORY_PAGE_SIZE + PUGIXML_MEMORY_PAGE_SIZE + #else + 32768 + #endif + ; + + static const uintptr_t xml_memory_page_alignment = 32; + static const uintptr_t xml_memory_page_pointer_mask = ~(xml_memory_page_alignment - 1); + static const uintptr_t xml_memory_page_name_allocated_mask = 16; + static const uintptr_t xml_memory_page_value_allocated_mask = 8; + static const uintptr_t xml_memory_page_type_mask = 7; + + struct xml_allocator; + + struct xml_memory_page + { + static xml_memory_page* construct(void* memory) + { + if (!memory) return 0; //$ redundant, left for performance + + xml_memory_page* result = static_cast(memory); + + result->allocator = 0; + result->memory = 0; + result->prev = 0; + result->next = 0; + result->busy_size = 0; + result->freed_size = 0; + + return result; + } + + xml_allocator* allocator; + + void* memory; + + xml_memory_page* prev; + xml_memory_page* next; + + size_t busy_size; + size_t freed_size; + + char data[1]; + }; + + struct xml_memory_string_header + { + uint16_t page_offset; // offset from page->data + uint16_t full_size; // 0 if string occupies whole page + }; + + struct xml_allocator + { + xml_allocator(xml_memory_page* root): _root(root), _busy_size(root->busy_size) + { + } + + xml_memory_page* allocate_page(size_t data_size) + { + size_t size = offsetof(xml_memory_page, data) + data_size; + + // allocate block with some alignment, leaving memory for worst-case padding + void* memory = xml_memory::allocate(size + xml_memory_page_alignment); + if (!memory) return 0; + + // align upwards to page boundary + void* page_memory = reinterpret_cast((reinterpret_cast(memory) + (xml_memory_page_alignment - 1)) & ~(xml_memory_page_alignment - 1)); + + // prepare page structure + xml_memory_page* page = xml_memory_page::construct(page_memory); + assert(page); + + page->memory = memory; + page->allocator = _root->allocator; + + return page; + } + + static void deallocate_page(xml_memory_page* page) + { + xml_memory::deallocate(page->memory); + } + + void* allocate_memory_oob(size_t size, xml_memory_page*& out_page); + + void* allocate_memory(size_t size, xml_memory_page*& out_page) + { + if (_busy_size + size > xml_memory_page_size) return allocate_memory_oob(size, out_page); + + void* buf = _root->data + _busy_size; + + _busy_size += size; + + out_page = _root; + + return buf; + } + + void deallocate_memory(void* ptr, size_t size, xml_memory_page* page) + { + if (page == _root) page->busy_size = _busy_size; + + assert(ptr >= page->data && ptr < page->data + page->busy_size); + (void)!ptr; + + page->freed_size += size; + assert(page->freed_size <= page->busy_size); + + if (page->freed_size == page->busy_size) + { + if (page->next == 0) + { + assert(_root == page); + + // top page freed, just reset sizes + page->busy_size = page->freed_size = 0; + _busy_size = 0; + } + else + { + assert(_root != page); + assert(page->prev); + + // remove from the list + page->prev->next = page->next; + page->next->prev = page->prev; + + // deallocate + deallocate_page(page); + } + } + } + + char_t* allocate_string(size_t length) + { + // allocate memory for string and header block + size_t size = sizeof(xml_memory_string_header) + length * sizeof(char_t); + + // round size up to pointer alignment boundary + size_t full_size = (size + (sizeof(void*) - 1)) & ~(sizeof(void*) - 1); + + xml_memory_page* page; + xml_memory_string_header* header = static_cast(allocate_memory(full_size, page)); + + if (!header) return 0; + + // setup header + ptrdiff_t page_offset = reinterpret_cast(header) - page->data; + + assert(page_offset >= 0 && page_offset < (1 << 16)); + header->page_offset = static_cast(page_offset); + + // full_size == 0 for large strings that occupy the whole page + assert(full_size < (1 << 16) || (page->busy_size == full_size && page_offset == 0)); + header->full_size = static_cast(full_size < (1 << 16) ? full_size : 0); + + // round-trip through void* to avoid 'cast increases required alignment of target type' warning + // header is guaranteed a pointer-sized alignment, which should be enough for char_t + return static_cast(static_cast(header + 1)); + } + + void deallocate_string(char_t* string) + { + // this function casts pointers through void* to avoid 'cast increases required alignment of target type' warnings + // we're guaranteed the proper (pointer-sized) alignment on the input string if it was allocated via allocate_string + + // get header + xml_memory_string_header* header = static_cast(static_cast(string)) - 1; + + // deallocate + size_t page_offset = offsetof(xml_memory_page, data) + header->page_offset; + xml_memory_page* page = reinterpret_cast(static_cast(reinterpret_cast(header) - page_offset)); + + // if full_size == 0 then this string occupies the whole page + size_t full_size = header->full_size == 0 ? page->busy_size : header->full_size; + + deallocate_memory(header, full_size, page); + } + + xml_memory_page* _root; + size_t _busy_size; + }; + + PUGI__FN_NO_INLINE void* xml_allocator::allocate_memory_oob(size_t size, xml_memory_page*& out_page) + { + const size_t large_allocation_threshold = xml_memory_page_size / 4; + + xml_memory_page* page = allocate_page(size <= large_allocation_threshold ? xml_memory_page_size : size); + out_page = page; + + if (!page) return 0; + + if (size <= large_allocation_threshold) + { + _root->busy_size = _busy_size; + + // insert page at the end of linked list + page->prev = _root; + _root->next = page; + _root = page; + + _busy_size = size; + } + else + { + // insert page before the end of linked list, so that it is deleted as soon as possible + // the last page is not deleted even if it's empty (see deallocate_memory) + assert(_root->prev); + + page->prev = _root->prev; + page->next = _root; + + _root->prev->next = page; + _root->prev = page; + } + + // allocate inside page + page->busy_size = size; + + return page->data; + } +PUGI__NS_END + +namespace pugi +{ + /// A 'name=value' XML attribute structure. + struct xml_attribute_struct + { + /// Default ctor + xml_attribute_struct(impl::xml_memory_page* page): header(reinterpret_cast(page)), name(0), value(0), prev_attribute_c(0), next_attribute(0) + { + } + + uintptr_t header; + + char_t* name; ///< Pointer to attribute name. + char_t* value; ///< Pointer to attribute value. + + xml_attribute_struct* prev_attribute_c; ///< Previous attribute (cyclic list) + xml_attribute_struct* next_attribute; ///< Next attribute + }; + + /// An XML document tree node. + struct xml_node_struct + { + /// Default ctor + /// \param type - node type + xml_node_struct(impl::xml_memory_page* page, xml_node_type type): header(reinterpret_cast(page) | (type - 1)), parent(0), name(0), value(0), first_child(0), prev_sibling_c(0), next_sibling(0), first_attribute(0) + { + } + + uintptr_t header; + + xml_node_struct* parent; ///< Pointer to parent + + char_t* name; ///< Pointer to element name. + char_t* value; ///< Pointer to any associated string data. + + xml_node_struct* first_child; ///< First child + + xml_node_struct* prev_sibling_c; ///< Left brother (cyclic list) + xml_node_struct* next_sibling; ///< Right brother + + xml_attribute_struct* first_attribute; ///< First attribute + }; +} + +PUGI__NS_BEGIN + struct xml_extra_buffer + { + char_t* buffer; + xml_extra_buffer* next; + }; + + struct xml_document_struct: public xml_node_struct, public xml_allocator + { + xml_document_struct(xml_memory_page* page): xml_node_struct(page, node_document), xml_allocator(page), buffer(0), extra_buffers(0) + { + } + + const char_t* buffer; + + xml_extra_buffer* extra_buffers; + }; + + inline xml_allocator& get_allocator(const xml_node_struct* node) + { + assert(node); + + return *reinterpret_cast(node->header & xml_memory_page_pointer_mask)->allocator; + } +PUGI__NS_END + +// Low-level DOM operations +PUGI__NS_BEGIN + inline xml_attribute_struct* allocate_attribute(xml_allocator& alloc) + { + xml_memory_page* page; + void* memory = alloc.allocate_memory(sizeof(xml_attribute_struct), page); + + return new (memory) xml_attribute_struct(page); + } + + inline xml_node_struct* allocate_node(xml_allocator& alloc, xml_node_type type) + { + xml_memory_page* page; + void* memory = alloc.allocate_memory(sizeof(xml_node_struct), page); + + return new (memory) xml_node_struct(page, type); + } + + inline void destroy_attribute(xml_attribute_struct* a, xml_allocator& alloc) + { + uintptr_t header = a->header; + + if (header & impl::xml_memory_page_name_allocated_mask) alloc.deallocate_string(a->name); + if (header & impl::xml_memory_page_value_allocated_mask) alloc.deallocate_string(a->value); + + alloc.deallocate_memory(a, sizeof(xml_attribute_struct), reinterpret_cast(header & xml_memory_page_pointer_mask)); + } + + inline void destroy_node(xml_node_struct* n, xml_allocator& alloc) + { + uintptr_t header = n->header; + + if (header & impl::xml_memory_page_name_allocated_mask) alloc.deallocate_string(n->name); + if (header & impl::xml_memory_page_value_allocated_mask) alloc.deallocate_string(n->value); + + for (xml_attribute_struct* attr = n->first_attribute; attr; ) + { + xml_attribute_struct* next = attr->next_attribute; + + destroy_attribute(attr, alloc); + + attr = next; + } + + for (xml_node_struct* child = n->first_child; child; ) + { + xml_node_struct* next = child->next_sibling; + + destroy_node(child, alloc); + + child = next; + } + + alloc.deallocate_memory(n, sizeof(xml_node_struct), reinterpret_cast(header & xml_memory_page_pointer_mask)); + } + + PUGI__FN_NO_INLINE xml_node_struct* append_node(xml_node_struct* node, xml_allocator& alloc, xml_node_type type = node_element) + { + xml_node_struct* child = allocate_node(alloc, type); + if (!child) return 0; + + child->parent = node; + + xml_node_struct* first_child = node->first_child; + + if (first_child) + { + xml_node_struct* last_child = first_child->prev_sibling_c; + + last_child->next_sibling = child; + child->prev_sibling_c = last_child; + first_child->prev_sibling_c = child; + } + else + { + node->first_child = child; + child->prev_sibling_c = child; + } + + return child; + } + + PUGI__FN_NO_INLINE xml_attribute_struct* append_attribute_ll(xml_node_struct* node, xml_allocator& alloc) + { + xml_attribute_struct* a = allocate_attribute(alloc); + if (!a) return 0; + + xml_attribute_struct* first_attribute = node->first_attribute; + + if (first_attribute) + { + xml_attribute_struct* last_attribute = first_attribute->prev_attribute_c; + + last_attribute->next_attribute = a; + a->prev_attribute_c = last_attribute; + first_attribute->prev_attribute_c = a; + } + else + { + node->first_attribute = a; + a->prev_attribute_c = a; + } + + return a; + } +PUGI__NS_END + +// Helper classes for code generation +PUGI__NS_BEGIN + struct opt_false + { + enum { value = 0 }; + }; + + struct opt_true + { + enum { value = 1 }; + }; +PUGI__NS_END + +// Unicode utilities +PUGI__NS_BEGIN + inline uint16_t endian_swap(uint16_t value) + { + return static_cast(((value & 0xff) << 8) | (value >> 8)); + } + + inline uint32_t endian_swap(uint32_t value) + { + return ((value & 0xff) << 24) | ((value & 0xff00) << 8) | ((value & 0xff0000) >> 8) | (value >> 24); + } + + struct utf8_counter + { + typedef size_t value_type; + + static value_type low(value_type result, uint32_t ch) + { + // U+0000..U+007F + if (ch < 0x80) return result + 1; + // U+0080..U+07FF + else if (ch < 0x800) return result + 2; + // U+0800..U+FFFF + else return result + 3; + } + + static value_type high(value_type result, uint32_t) + { + // U+10000..U+10FFFF + return result + 4; + } + }; + + struct utf8_writer + { + typedef uint8_t* value_type; + + static value_type low(value_type result, uint32_t ch) + { + // U+0000..U+007F + if (ch < 0x80) + { + *result = static_cast(ch); + return result + 1; + } + // U+0080..U+07FF + else if (ch < 0x800) + { + result[0] = static_cast(0xC0 | (ch >> 6)); + result[1] = static_cast(0x80 | (ch & 0x3F)); + return result + 2; + } + // U+0800..U+FFFF + else + { + result[0] = static_cast(0xE0 | (ch >> 12)); + result[1] = static_cast(0x80 | ((ch >> 6) & 0x3F)); + result[2] = static_cast(0x80 | (ch & 0x3F)); + return result + 3; + } + } + + static value_type high(value_type result, uint32_t ch) + { + // U+10000..U+10FFFF + result[0] = static_cast(0xF0 | (ch >> 18)); + result[1] = static_cast(0x80 | ((ch >> 12) & 0x3F)); + result[2] = static_cast(0x80 | ((ch >> 6) & 0x3F)); + result[3] = static_cast(0x80 | (ch & 0x3F)); + return result + 4; + } + + static value_type any(value_type result, uint32_t ch) + { + return (ch < 0x10000) ? low(result, ch) : high(result, ch); + } + }; + + struct utf16_counter + { + typedef size_t value_type; + + static value_type low(value_type result, uint32_t) + { + return result + 1; + } + + static value_type high(value_type result, uint32_t) + { + return result + 2; + } + }; + + struct utf16_writer + { + typedef uint16_t* value_type; + + static value_type low(value_type result, uint32_t ch) + { + *result = static_cast(ch); + + return result + 1; + } + + static value_type high(value_type result, uint32_t ch) + { + uint32_t msh = static_cast(ch - 0x10000) >> 10; + uint32_t lsh = static_cast(ch - 0x10000) & 0x3ff; + + result[0] = static_cast(0xD800 + msh); + result[1] = static_cast(0xDC00 + lsh); + + return result + 2; + } + + static value_type any(value_type result, uint32_t ch) + { + return (ch < 0x10000) ? low(result, ch) : high(result, ch); + } + }; + + struct utf32_counter + { + typedef size_t value_type; + + static value_type low(value_type result, uint32_t) + { + return result + 1; + } + + static value_type high(value_type result, uint32_t) + { + return result + 1; + } + }; + + struct utf32_writer + { + typedef uint32_t* value_type; + + static value_type low(value_type result, uint32_t ch) + { + *result = ch; + + return result + 1; + } + + static value_type high(value_type result, uint32_t ch) + { + *result = ch; + + return result + 1; + } + + static value_type any(value_type result, uint32_t ch) + { + *result = ch; + + return result + 1; + } + }; + + struct latin1_writer + { + typedef uint8_t* value_type; + + static value_type low(value_type result, uint32_t ch) + { + *result = static_cast(ch > 255 ? '?' : ch); + + return result + 1; + } + + static value_type high(value_type result, uint32_t ch) + { + (void)ch; + + *result = '?'; + + return result + 1; + } + }; + + template struct wchar_selector; + + template <> struct wchar_selector<2> + { + typedef uint16_t type; + typedef utf16_counter counter; + typedef utf16_writer writer; + }; + + template <> struct wchar_selector<4> + { + typedef uint32_t type; + typedef utf32_counter counter; + typedef utf32_writer writer; + }; + + typedef wchar_selector::counter wchar_counter; + typedef wchar_selector::writer wchar_writer; + + template struct utf_decoder + { + static inline typename Traits::value_type decode_utf8_block(const uint8_t* data, size_t size, typename Traits::value_type result) + { + const uint8_t utf8_byte_mask = 0x3f; + + while (size) + { + uint8_t lead = *data; + + // 0xxxxxxx -> U+0000..U+007F + if (lead < 0x80) + { + result = Traits::low(result, lead); + data += 1; + size -= 1; + + // process aligned single-byte (ascii) blocks + if ((reinterpret_cast(data) & 3) == 0) + { + // round-trip through void* to silence 'cast increases required alignment of target type' warnings + while (size >= 4 && (*static_cast(static_cast(data)) & 0x80808080) == 0) + { + result = Traits::low(result, data[0]); + result = Traits::low(result, data[1]); + result = Traits::low(result, data[2]); + result = Traits::low(result, data[3]); + data += 4; + size -= 4; + } + } + } + // 110xxxxx -> U+0080..U+07FF + else if (static_cast(lead - 0xC0) < 0x20 && size >= 2 && (data[1] & 0xc0) == 0x80) + { + result = Traits::low(result, ((lead & ~0xC0) << 6) | (data[1] & utf8_byte_mask)); + data += 2; + size -= 2; + } + // 1110xxxx -> U+0800-U+FFFF + else if (static_cast(lead - 0xE0) < 0x10 && size >= 3 && (data[1] & 0xc0) == 0x80 && (data[2] & 0xc0) == 0x80) + { + result = Traits::low(result, ((lead & ~0xE0) << 12) | ((data[1] & utf8_byte_mask) << 6) | (data[2] & utf8_byte_mask)); + data += 3; + size -= 3; + } + // 11110xxx -> U+10000..U+10FFFF + else if (static_cast(lead - 0xF0) < 0x08 && size >= 4 && (data[1] & 0xc0) == 0x80 && (data[2] & 0xc0) == 0x80 && (data[3] & 0xc0) == 0x80) + { + result = Traits::high(result, ((lead & ~0xF0) << 18) | ((data[1] & utf8_byte_mask) << 12) | ((data[2] & utf8_byte_mask) << 6) | (data[3] & utf8_byte_mask)); + data += 4; + size -= 4; + } + // 10xxxxxx or 11111xxx -> invalid + else + { + data += 1; + size -= 1; + } + } + + return result; + } + + static inline typename Traits::value_type decode_utf16_block(const uint16_t* data, size_t size, typename Traits::value_type result) + { + const uint16_t* end = data + size; + + while (data < end) + { + unsigned int lead = opt_swap::value ? endian_swap(*data) : *data; + + // U+0000..U+D7FF + if (lead < 0xD800) + { + result = Traits::low(result, lead); + data += 1; + } + // U+E000..U+FFFF + else if (static_cast(lead - 0xE000) < 0x2000) + { + result = Traits::low(result, lead); + data += 1; + } + // surrogate pair lead + else if (static_cast(lead - 0xD800) < 0x400 && data + 1 < end) + { + uint16_t next = opt_swap::value ? endian_swap(data[1]) : data[1]; + + if (static_cast(next - 0xDC00) < 0x400) + { + result = Traits::high(result, 0x10000 + ((lead & 0x3ff) << 10) + (next & 0x3ff)); + data += 2; + } + else + { + data += 1; + } + } + else + { + data += 1; + } + } + + return result; + } + + static inline typename Traits::value_type decode_utf32_block(const uint32_t* data, size_t size, typename Traits::value_type result) + { + const uint32_t* end = data + size; + + while (data < end) + { + uint32_t lead = opt_swap::value ? endian_swap(*data) : *data; + + // U+0000..U+FFFF + if (lead < 0x10000) + { + result = Traits::low(result, lead); + data += 1; + } + // U+10000..U+10FFFF + else + { + result = Traits::high(result, lead); + data += 1; + } + } + + return result; + } + + static inline typename Traits::value_type decode_latin1_block(const uint8_t* data, size_t size, typename Traits::value_type result) + { + for (size_t i = 0; i < size; ++i) + { + result = Traits::low(result, data[i]); + } + + return result; + } + + static inline typename Traits::value_type decode_wchar_block_impl(const uint16_t* data, size_t size, typename Traits::value_type result) + { + return decode_utf16_block(data, size, result); + } + + static inline typename Traits::value_type decode_wchar_block_impl(const uint32_t* data, size_t size, typename Traits::value_type result) + { + return decode_utf32_block(data, size, result); + } + + static inline typename Traits::value_type decode_wchar_block(const wchar_t* data, size_t size, typename Traits::value_type result) + { + return decode_wchar_block_impl(reinterpret_cast::type*>(data), size, result); + } + }; + + template PUGI__FN void convert_utf_endian_swap(T* result, const T* data, size_t length) + { + for (size_t i = 0; i < length; ++i) result[i] = endian_swap(data[i]); + } + +#ifdef PUGIXML_WCHAR_MODE + PUGI__FN void convert_wchar_endian_swap(wchar_t* result, const wchar_t* data, size_t length) + { + for (size_t i = 0; i < length; ++i) result[i] = static_cast(endian_swap(static_cast::type>(data[i]))); + } +#endif +PUGI__NS_END + +PUGI__NS_BEGIN + enum chartype_t + { + ct_parse_pcdata = 1, // \0, &, \r, < + ct_parse_attr = 2, // \0, &, \r, ', " + ct_parse_attr_ws = 4, // \0, &, \r, ', ", \n, tab + ct_space = 8, // \r, \n, space, tab + ct_parse_cdata = 16, // \0, ], >, \r + ct_parse_comment = 32, // \0, -, >, \r + ct_symbol = 64, // Any symbol > 127, a-z, A-Z, 0-9, _, :, -, . + ct_start_symbol = 128 // Any symbol > 127, a-z, A-Z, _, : + }; + + static const unsigned char chartype_table[256] = + { + 55, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 63, 0, 0, // 0-15 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16-31 + 8, 0, 6, 0, 0, 0, 7, 6, 0, 0, 0, 0, 0, 96, 64, 0, // 32-47 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 192, 0, 1, 0, 48, 0, // 48-63 + 0, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, // 64-79 + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 0, 0, 16, 0, 192, // 80-95 + 0, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, // 96-111 + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 0, 0, 0, 0, 0, // 112-127 + + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, // 128+ + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192 + }; + + enum chartypex_t + { + ctx_special_pcdata = 1, // Any symbol >= 0 and < 32 (except \t, \r, \n), &, <, > + ctx_special_attr = 2, // Any symbol >= 0 and < 32 (except \t), &, <, >, " + ctx_start_symbol = 4, // Any symbol > 127, a-z, A-Z, _ + ctx_digit = 8, // 0-9 + ctx_symbol = 16 // Any symbol > 127, a-z, A-Z, 0-9, _, -, . + }; + + static const unsigned char chartypex_table[256] = + { + 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 2, 3, 3, 2, 3, 3, // 0-15 + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 16-31 + 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 16, 16, 0, // 32-47 + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0, 3, 0, 3, 0, // 48-63 + + 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, // 64-79 + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 0, 0, 0, 0, 20, // 80-95 + 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, // 96-111 + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 0, 0, 0, 0, 0, // 112-127 + + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, // 128+ + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 + }; + +#ifdef PUGIXML_WCHAR_MODE + #define PUGI__IS_CHARTYPE_IMPL(c, ct, table) ((static_cast(c) < 128 ? table[static_cast(c)] : table[128]) & (ct)) +#else + #define PUGI__IS_CHARTYPE_IMPL(c, ct, table) (table[static_cast(c)] & (ct)) +#endif + + #define PUGI__IS_CHARTYPE(c, ct) PUGI__IS_CHARTYPE_IMPL(c, ct, chartype_table) + #define PUGI__IS_CHARTYPEX(c, ct) PUGI__IS_CHARTYPE_IMPL(c, ct, chartypex_table) + + PUGI__FN bool is_little_endian() + { + unsigned int ui = 1; + + return *reinterpret_cast(&ui) == 1; + } + + PUGI__FN xml_encoding get_wchar_encoding() + { + PUGI__STATIC_ASSERT(sizeof(wchar_t) == 2 || sizeof(wchar_t) == 4); + + if (sizeof(wchar_t) == 2) + return is_little_endian() ? encoding_utf16_le : encoding_utf16_be; + else + return is_little_endian() ? encoding_utf32_le : encoding_utf32_be; + } + + PUGI__FN xml_encoding guess_buffer_encoding(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3) + { + // look for BOM in first few bytes + if (d0 == 0 && d1 == 0 && d2 == 0xfe && d3 == 0xff) return encoding_utf32_be; + if (d0 == 0xff && d1 == 0xfe && d2 == 0 && d3 == 0) return encoding_utf32_le; + if (d0 == 0xfe && d1 == 0xff) return encoding_utf16_be; + if (d0 == 0xff && d1 == 0xfe) return encoding_utf16_le; + if (d0 == 0xef && d1 == 0xbb && d2 == 0xbf) return encoding_utf8; + + // look for <, (contents); + + PUGI__DMC_VOLATILE uint8_t d0 = data[0], d1 = data[1], d2 = data[2], d3 = data[3]; + + return guess_buffer_encoding(d0, d1, d2, d3); + } + + PUGI__FN bool get_mutable_buffer(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable) + { + size_t length = size / sizeof(char_t); + + if (is_mutable) + { + out_buffer = static_cast(const_cast(contents)); + out_length = length; + } + else + { + char_t* buffer = static_cast(xml_memory::allocate((length + 1) * sizeof(char_t))); + if (!buffer) return false; + + memcpy(buffer, contents, length * sizeof(char_t)); + buffer[length] = 0; + + out_buffer = buffer; + out_length = length + 1; + } + + return true; + } + +#ifdef PUGIXML_WCHAR_MODE + PUGI__FN bool need_endian_swap_utf(xml_encoding le, xml_encoding re) + { + return (le == encoding_utf16_be && re == encoding_utf16_le) || (le == encoding_utf16_le && re == encoding_utf16_be) || + (le == encoding_utf32_be && re == encoding_utf32_le) || (le == encoding_utf32_le && re == encoding_utf32_be); + } + + PUGI__FN bool convert_buffer_endian_swap(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable) + { + const char_t* data = static_cast(contents); + size_t length = size / sizeof(char_t); + + if (is_mutable) + { + char_t* buffer = const_cast(data); + + convert_wchar_endian_swap(buffer, data, length); + + out_buffer = buffer; + out_length = length; + } + else + { + char_t* buffer = static_cast(xml_memory::allocate((length + 1) * sizeof(char_t))); + if (!buffer) return false; + + convert_wchar_endian_swap(buffer, data, length); + buffer[length] = 0; + + out_buffer = buffer; + out_length = length + 1; + } + + return true; + } + + PUGI__FN bool convert_buffer_utf8(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size) + { + const uint8_t* data = static_cast(contents); + size_t data_length = size; + + // first pass: get length in wchar_t units + size_t length = utf_decoder::decode_utf8_block(data, data_length, 0); + + // allocate buffer of suitable length + char_t* buffer = static_cast(xml_memory::allocate((length + 1) * sizeof(char_t))); + if (!buffer) return false; + + // second pass: convert utf8 input to wchar_t + wchar_writer::value_type obegin = reinterpret_cast(buffer); + wchar_writer::value_type oend = utf_decoder::decode_utf8_block(data, data_length, obegin); + + assert(oend == obegin + length); + *oend = 0; + + out_buffer = buffer; + out_length = length + 1; + + return true; + } + + template PUGI__FN bool convert_buffer_utf16(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap) + { + const uint16_t* data = static_cast(contents); + size_t data_length = size / sizeof(uint16_t); + + // first pass: get length in wchar_t units + size_t length = utf_decoder::decode_utf16_block(data, data_length, 0); + + // allocate buffer of suitable length + char_t* buffer = static_cast(xml_memory::allocate((length + 1) * sizeof(char_t))); + if (!buffer) return false; + + // second pass: convert utf16 input to wchar_t + wchar_writer::value_type obegin = reinterpret_cast(buffer); + wchar_writer::value_type oend = utf_decoder::decode_utf16_block(data, data_length, obegin); + + assert(oend == obegin + length); + *oend = 0; + + out_buffer = buffer; + out_length = length + 1; + + return true; + } + + template PUGI__FN bool convert_buffer_utf32(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap) + { + const uint32_t* data = static_cast(contents); + size_t data_length = size / sizeof(uint32_t); + + // first pass: get length in wchar_t units + size_t length = utf_decoder::decode_utf32_block(data, data_length, 0); + + // allocate buffer of suitable length + char_t* buffer = static_cast(xml_memory::allocate((length + 1) * sizeof(char_t))); + if (!buffer) return false; + + // second pass: convert utf32 input to wchar_t + wchar_writer::value_type obegin = reinterpret_cast(buffer); + wchar_writer::value_type oend = utf_decoder::decode_utf32_block(data, data_length, obegin); + + assert(oend == obegin + length); + *oend = 0; + + out_buffer = buffer; + out_length = length + 1; + + return true; + } + + PUGI__FN bool convert_buffer_latin1(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size) + { + const uint8_t* data = static_cast(contents); + size_t data_length = size; + + // get length in wchar_t units + size_t length = data_length; + + // allocate buffer of suitable length + char_t* buffer = static_cast(xml_memory::allocate((length + 1) * sizeof(char_t))); + if (!buffer) return false; + + // convert latin1 input to wchar_t + wchar_writer::value_type obegin = reinterpret_cast(buffer); + wchar_writer::value_type oend = utf_decoder::decode_latin1_block(data, data_length, obegin); + + assert(oend == obegin + length); + *oend = 0; + + out_buffer = buffer; + out_length = length + 1; + + return true; + } + + PUGI__FN bool convert_buffer(char_t*& out_buffer, size_t& out_length, xml_encoding encoding, const void* contents, size_t size, bool is_mutable) + { + // get native encoding + xml_encoding wchar_encoding = get_wchar_encoding(); + + // fast path: no conversion required + if (encoding == wchar_encoding) return get_mutable_buffer(out_buffer, out_length, contents, size, is_mutable); + + // only endian-swapping is required + if (need_endian_swap_utf(encoding, wchar_encoding)) return convert_buffer_endian_swap(out_buffer, out_length, contents, size, is_mutable); + + // source encoding is utf8 + if (encoding == encoding_utf8) return convert_buffer_utf8(out_buffer, out_length, contents, size); + + // source encoding is utf16 + if (encoding == encoding_utf16_be || encoding == encoding_utf16_le) + { + xml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be; + + return (native_encoding == encoding) ? + convert_buffer_utf16(out_buffer, out_length, contents, size, opt_false()) : + convert_buffer_utf16(out_buffer, out_length, contents, size, opt_true()); + } + + // source encoding is utf32 + if (encoding == encoding_utf32_be || encoding == encoding_utf32_le) + { + xml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be; + + return (native_encoding == encoding) ? + convert_buffer_utf32(out_buffer, out_length, contents, size, opt_false()) : + convert_buffer_utf32(out_buffer, out_length, contents, size, opt_true()); + } + + // source encoding is latin1 + if (encoding == encoding_latin1) return convert_buffer_latin1(out_buffer, out_length, contents, size); + + assert(!"Invalid encoding"); + return false; + } +#else + template PUGI__FN bool convert_buffer_utf16(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap) + { + const uint16_t* data = static_cast(contents); + size_t data_length = size / sizeof(uint16_t); + + // first pass: get length in utf8 units + size_t length = utf_decoder::decode_utf16_block(data, data_length, 0); + + // allocate buffer of suitable length + char_t* buffer = static_cast(xml_memory::allocate((length + 1) * sizeof(char_t))); + if (!buffer) return false; + + // second pass: convert utf16 input to utf8 + uint8_t* obegin = reinterpret_cast(buffer); + uint8_t* oend = utf_decoder::decode_utf16_block(data, data_length, obegin); + + assert(oend == obegin + length); + *oend = 0; + + out_buffer = buffer; + out_length = length + 1; + + return true; + } + + template PUGI__FN bool convert_buffer_utf32(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, opt_swap) + { + const uint32_t* data = static_cast(contents); + size_t data_length = size / sizeof(uint32_t); + + // first pass: get length in utf8 units + size_t length = utf_decoder::decode_utf32_block(data, data_length, 0); + + // allocate buffer of suitable length + char_t* buffer = static_cast(xml_memory::allocate((length + 1) * sizeof(char_t))); + if (!buffer) return false; + + // second pass: convert utf32 input to utf8 + uint8_t* obegin = reinterpret_cast(buffer); + uint8_t* oend = utf_decoder::decode_utf32_block(data, data_length, obegin); + + assert(oend == obegin + length); + *oend = 0; + + out_buffer = buffer; + out_length = length + 1; + + return true; + } + + PUGI__FN size_t get_latin1_7bit_prefix_length(const uint8_t* data, size_t size) + { + for (size_t i = 0; i < size; ++i) + if (data[i] > 127) + return i; + + return size; + } + + PUGI__FN bool convert_buffer_latin1(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable) + { + const uint8_t* data = static_cast(contents); + size_t data_length = size; + + // get size of prefix that does not need utf8 conversion + size_t prefix_length = get_latin1_7bit_prefix_length(data, data_length); + assert(prefix_length <= data_length); + + const uint8_t* postfix = data + prefix_length; + size_t postfix_length = data_length - prefix_length; + + // if no conversion is needed, just return the original buffer + if (postfix_length == 0) return get_mutable_buffer(out_buffer, out_length, contents, size, is_mutable); + + // first pass: get length in utf8 units + size_t length = prefix_length + utf_decoder::decode_latin1_block(postfix, postfix_length, 0); + + // allocate buffer of suitable length + char_t* buffer = static_cast(xml_memory::allocate((length + 1) * sizeof(char_t))); + if (!buffer) return false; + + // second pass: convert latin1 input to utf8 + memcpy(buffer, data, prefix_length); + + uint8_t* obegin = reinterpret_cast(buffer); + uint8_t* oend = utf_decoder::decode_latin1_block(postfix, postfix_length, obegin + prefix_length); + + assert(oend == obegin + length); + *oend = 0; + + out_buffer = buffer; + out_length = length + 1; + + return true; + } + + PUGI__FN bool convert_buffer(char_t*& out_buffer, size_t& out_length, xml_encoding encoding, const void* contents, size_t size, bool is_mutable) + { + // fast path: no conversion required + if (encoding == encoding_utf8) return get_mutable_buffer(out_buffer, out_length, contents, size, is_mutable); + + // source encoding is utf16 + if (encoding == encoding_utf16_be || encoding == encoding_utf16_le) + { + xml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be; + + return (native_encoding == encoding) ? + convert_buffer_utf16(out_buffer, out_length, contents, size, opt_false()) : + convert_buffer_utf16(out_buffer, out_length, contents, size, opt_true()); + } + + // source encoding is utf32 + if (encoding == encoding_utf32_be || encoding == encoding_utf32_le) + { + xml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be; + + return (native_encoding == encoding) ? + convert_buffer_utf32(out_buffer, out_length, contents, size, opt_false()) : + convert_buffer_utf32(out_buffer, out_length, contents, size, opt_true()); + } + + // source encoding is latin1 + if (encoding == encoding_latin1) return convert_buffer_latin1(out_buffer, out_length, contents, size, is_mutable); + + assert(!"Invalid encoding"); + return false; + } +#endif + + PUGI__FN size_t as_utf8_begin(const wchar_t* str, size_t length) + { + // get length in utf8 characters + return utf_decoder::decode_wchar_block(str, length, 0); + } + + PUGI__FN void as_utf8_end(char* buffer, size_t size, const wchar_t* str, size_t length) + { + // convert to utf8 + uint8_t* begin = reinterpret_cast(buffer); + uint8_t* end = utf_decoder::decode_wchar_block(str, length, begin); + + assert(begin + size == end); + (void)!end; + + // zero-terminate + buffer[size] = 0; + } + +#ifndef PUGIXML_NO_STL + PUGI__FN std::string as_utf8_impl(const wchar_t* str, size_t length) + { + // first pass: get length in utf8 characters + size_t size = as_utf8_begin(str, length); + + // allocate resulting string + std::string result; + result.resize(size); + + // second pass: convert to utf8 + if (size > 0) as_utf8_end(&result[0], size, str, length); + + return result; + } + + PUGI__FN std::basic_string as_wide_impl(const char* str, size_t size) + { + const uint8_t* data = reinterpret_cast(str); + + // first pass: get length in wchar_t units + size_t length = utf_decoder::decode_utf8_block(data, size, 0); + + // allocate resulting string + std::basic_string result; + result.resize(length); + + // second pass: convert to wchar_t + if (length > 0) + { + wchar_writer::value_type begin = reinterpret_cast(&result[0]); + wchar_writer::value_type end = utf_decoder::decode_utf8_block(data, size, begin); + + assert(begin + length == end); + (void)!end; + } + + return result; + } +#endif + + inline bool strcpy_insitu_allow(size_t length, uintptr_t allocated, char_t* target) + { + assert(target); + size_t target_length = strlength(target); + + // always reuse document buffer memory if possible + if (!allocated) return target_length >= length; + + // reuse heap memory if waste is not too great + const size_t reuse_threshold = 32; + + return target_length >= length && (target_length < reuse_threshold || target_length - length < target_length / 2); + } + + PUGI__FN bool strcpy_insitu(char_t*& dest, uintptr_t& header, uintptr_t header_mask, const char_t* source) + { + assert(header); + + size_t source_length = strlength(source); + + if (source_length == 0) + { + // empty string and null pointer are equivalent, so just deallocate old memory + xml_allocator* alloc = reinterpret_cast(header & xml_memory_page_pointer_mask)->allocator; + + if (header & header_mask) alloc->deallocate_string(dest); + + // mark the string as not allocated + dest = 0; + header &= ~header_mask; + + return true; + } + else if (dest && strcpy_insitu_allow(source_length, header & header_mask, dest)) + { + // we can reuse old buffer, so just copy the new data (including zero terminator) + memcpy(dest, source, (source_length + 1) * sizeof(char_t)); + + return true; + } + else + { + xml_allocator* alloc = reinterpret_cast(header & xml_memory_page_pointer_mask)->allocator; + + // allocate new buffer + char_t* buf = alloc->allocate_string(source_length + 1); + if (!buf) return false; + + // copy the string (including zero terminator) + memcpy(buf, source, (source_length + 1) * sizeof(char_t)); + + // deallocate old buffer (*after* the above to protect against overlapping memory and/or allocation failures) + if (header & header_mask) alloc->deallocate_string(dest); + + // the string is now allocated, so set the flag + dest = buf; + header |= header_mask; + + return true; + } + } + + struct gap + { + char_t* end; + size_t size; + + gap(): end(0), size(0) + { + } + + // Push new gap, move s count bytes further (skipping the gap). + // Collapse previous gap. + void push(char_t*& s, size_t count) + { + if (end) // there was a gap already; collapse it + { + // Move [old_gap_end, new_gap_start) to [old_gap_start, ...) + assert(s >= end); + memmove(end - size, end, reinterpret_cast(s) - reinterpret_cast(end)); + } + + s += count; // end of current gap + + // "merge" two gaps + end = s; + size += count; + } + + // Collapse all gaps, return past-the-end pointer + char_t* flush(char_t* s) + { + if (end) + { + // Move [old_gap_end, current_pos) to [old_gap_start, ...) + assert(s >= end); + memmove(end - size, end, reinterpret_cast(s) - reinterpret_cast(end)); + + return s - size; + } + else return s; + } + }; + + PUGI__FN char_t* strconv_escape(char_t* s, gap& g) + { + char_t* stre = s + 1; + + switch (*stre) + { + case '#': // &#... + { + unsigned int ucsc = 0; + + if (stre[1] == 'x') // &#x... (hex code) + { + stre += 2; + + char_t ch = *stre; + + if (ch == ';') return stre; + + for (;;) + { + if (static_cast(ch - '0') <= 9) + ucsc = 16 * ucsc + (ch - '0'); + else if (static_cast((ch | ' ') - 'a') <= 5) + ucsc = 16 * ucsc + ((ch | ' ') - 'a' + 10); + else if (ch == ';') + break; + else // cancel + return stre; + + ch = *++stre; + } + + ++stre; + } + else // &#... (dec code) + { + char_t ch = *++stre; + + if (ch == ';') return stre; + + for (;;) + { + if (static_cast(static_cast(ch) - '0') <= 9) + ucsc = 10 * ucsc + (ch - '0'); + else if (ch == ';') + break; + else // cancel + return stre; + + ch = *++stre; + } + + ++stre; + } + + #ifdef PUGIXML_WCHAR_MODE + s = reinterpret_cast(wchar_writer::any(reinterpret_cast(s), ucsc)); + #else + s = reinterpret_cast(utf8_writer::any(reinterpret_cast(s), ucsc)); + #endif + + g.push(s, stre - s); + return stre; + } + + case 'a': // &a + { + ++stre; + + if (*stre == 'm') // &am + { + if (*++stre == 'p' && *++stre == ';') // & + { + *s++ = '&'; + ++stre; + + g.push(s, stre - s); + return stre; + } + } + else if (*stre == 'p') // &ap + { + if (*++stre == 'o' && *++stre == 's' && *++stre == ';') // ' + { + *s++ = '\''; + ++stre; + + g.push(s, stre - s); + return stre; + } + } + break; + } + + case 'g': // &g + { + if (*++stre == 't' && *++stre == ';') // > + { + *s++ = '>'; + ++stre; + + g.push(s, stre - s); + return stre; + } + break; + } + + case 'l': // &l + { + if (*++stre == 't' && *++stre == ';') // < + { + *s++ = '<'; + ++stre; + + g.push(s, stre - s); + return stre; + } + break; + } + + case 'q': // &q + { + if (*++stre == 'u' && *++stre == 'o' && *++stre == 't' && *++stre == ';') // " + { + *s++ = '"'; + ++stre; + + g.push(s, stre - s); + return stre; + } + break; + } + + default: + break; + } + + return stre; + } + + // Utility macro for last character handling + #define ENDSWITH(c, e) ((c) == (e) || ((c) == 0 && endch == (e))) + + PUGI__FN char_t* strconv_comment(char_t* s, char_t endch) + { + gap g; + + while (true) + { + while (!PUGI__IS_CHARTYPE(*s, ct_parse_comment)) ++s; + + if (*s == '\r') // Either a single 0x0d or 0x0d 0x0a pair + { + *s++ = '\n'; // replace first one with 0x0a + + if (*s == '\n') g.push(s, 1); + } + else if (s[0] == '-' && s[1] == '-' && ENDSWITH(s[2], '>')) // comment ends here + { + *g.flush(s) = 0; + + return s + (s[2] == '>' ? 3 : 2); + } + else if (*s == 0) + { + return 0; + } + else ++s; + } + } + + PUGI__FN char_t* strconv_cdata(char_t* s, char_t endch) + { + gap g; + + while (true) + { + while (!PUGI__IS_CHARTYPE(*s, ct_parse_cdata)) ++s; + + if (*s == '\r') // Either a single 0x0d or 0x0d 0x0a pair + { + *s++ = '\n'; // replace first one with 0x0a + + if (*s == '\n') g.push(s, 1); + } + else if (s[0] == ']' && s[1] == ']' && ENDSWITH(s[2], '>')) // CDATA ends here + { + *g.flush(s) = 0; + + return s + 1; + } + else if (*s == 0) + { + return 0; + } + else ++s; + } + } + + typedef char_t* (*strconv_pcdata_t)(char_t*); + + template struct strconv_pcdata_impl + { + static char_t* parse(char_t* s) + { + gap g; + + char_t* begin = s; + + while (true) + { + while (!PUGI__IS_CHARTYPE(*s, ct_parse_pcdata)) ++s; + + if (*s == '<') // PCDATA ends here + { + char_t* end = g.flush(s); + + if (opt_trim::value) + while (end > begin && PUGI__IS_CHARTYPE(end[-1], ct_space)) + --end; + + *end = 0; + + return s + 1; + } + else if (opt_eol::value && *s == '\r') // Either a single 0x0d or 0x0d 0x0a pair + { + *s++ = '\n'; // replace first one with 0x0a + + if (*s == '\n') g.push(s, 1); + } + else if (opt_escape::value && *s == '&') + { + s = strconv_escape(s, g); + } + else if (*s == 0) + { + char_t* end = g.flush(s); + + if (opt_trim::value) + while (end > begin && PUGI__IS_CHARTYPE(end[-1], ct_space)) + --end; + + *end = 0; + + return s; + } + else ++s; + } + } + }; + + PUGI__FN strconv_pcdata_t get_strconv_pcdata(unsigned int optmask) + { + PUGI__STATIC_ASSERT(parse_escapes == 0x10 && parse_eol == 0x20 && parse_trim_pcdata == 0x0800); + + switch (((optmask >> 4) & 3) | ((optmask >> 9) & 4)) // get bitmask for flags (eol escapes trim) + { + case 0: return strconv_pcdata_impl::parse; + case 1: return strconv_pcdata_impl::parse; + case 2: return strconv_pcdata_impl::parse; + case 3: return strconv_pcdata_impl::parse; + case 4: return strconv_pcdata_impl::parse; + case 5: return strconv_pcdata_impl::parse; + case 6: return strconv_pcdata_impl::parse; + case 7: return strconv_pcdata_impl::parse; + default: assert(false); return 0; // should not get here + } + } + + typedef char_t* (*strconv_attribute_t)(char_t*, char_t); + + template struct strconv_attribute_impl + { + static char_t* parse_wnorm(char_t* s, char_t end_quote) + { + gap g; + + // trim leading whitespaces + if (PUGI__IS_CHARTYPE(*s, ct_space)) + { + char_t* str = s; + + do ++str; + while (PUGI__IS_CHARTYPE(*str, ct_space)); + + g.push(s, str - s); + } + + while (true) + { + while (!PUGI__IS_CHARTYPE(*s, ct_parse_attr_ws | ct_space)) ++s; + + if (*s == end_quote) + { + char_t* str = g.flush(s); + + do *str-- = 0; + while (PUGI__IS_CHARTYPE(*str, ct_space)); + + return s + 1; + } + else if (PUGI__IS_CHARTYPE(*s, ct_space)) + { + *s++ = ' '; + + if (PUGI__IS_CHARTYPE(*s, ct_space)) + { + char_t* str = s + 1; + while (PUGI__IS_CHARTYPE(*str, ct_space)) ++str; + + g.push(s, str - s); + } + } + else if (opt_escape::value && *s == '&') + { + s = strconv_escape(s, g); + } + else if (!*s) + { + return 0; + } + else ++s; + } + } + + static char_t* parse_wconv(char_t* s, char_t end_quote) + { + gap g; + + while (true) + { + while (!PUGI__IS_CHARTYPE(*s, ct_parse_attr_ws)) ++s; + + if (*s == end_quote) + { + *g.flush(s) = 0; + + return s + 1; + } + else if (PUGI__IS_CHARTYPE(*s, ct_space)) + { + if (*s == '\r') + { + *s++ = ' '; + + if (*s == '\n') g.push(s, 1); + } + else *s++ = ' '; + } + else if (opt_escape::value && *s == '&') + { + s = strconv_escape(s, g); + } + else if (!*s) + { + return 0; + } + else ++s; + } + } + + static char_t* parse_eol(char_t* s, char_t end_quote) + { + gap g; + + while (true) + { + while (!PUGI__IS_CHARTYPE(*s, ct_parse_attr)) ++s; + + if (*s == end_quote) + { + *g.flush(s) = 0; + + return s + 1; + } + else if (*s == '\r') + { + *s++ = '\n'; + + if (*s == '\n') g.push(s, 1); + } + else if (opt_escape::value && *s == '&') + { + s = strconv_escape(s, g); + } + else if (!*s) + { + return 0; + } + else ++s; + } + } + + static char_t* parse_simple(char_t* s, char_t end_quote) + { + gap g; + + while (true) + { + while (!PUGI__IS_CHARTYPE(*s, ct_parse_attr)) ++s; + + if (*s == end_quote) + { + *g.flush(s) = 0; + + return s + 1; + } + else if (opt_escape::value && *s == '&') + { + s = strconv_escape(s, g); + } + else if (!*s) + { + return 0; + } + else ++s; + } + } + }; + + PUGI__FN strconv_attribute_t get_strconv_attribute(unsigned int optmask) + { + PUGI__STATIC_ASSERT(parse_escapes == 0x10 && parse_eol == 0x20 && parse_wconv_attribute == 0x40 && parse_wnorm_attribute == 0x80); + + switch ((optmask >> 4) & 15) // get bitmask for flags (wconv wnorm eol escapes) + { + case 0: return strconv_attribute_impl::parse_simple; + case 1: return strconv_attribute_impl::parse_simple; + case 2: return strconv_attribute_impl::parse_eol; + case 3: return strconv_attribute_impl::parse_eol; + case 4: return strconv_attribute_impl::parse_wconv; + case 5: return strconv_attribute_impl::parse_wconv; + case 6: return strconv_attribute_impl::parse_wconv; + case 7: return strconv_attribute_impl::parse_wconv; + case 8: return strconv_attribute_impl::parse_wnorm; + case 9: return strconv_attribute_impl::parse_wnorm; + case 10: return strconv_attribute_impl::parse_wnorm; + case 11: return strconv_attribute_impl::parse_wnorm; + case 12: return strconv_attribute_impl::parse_wnorm; + case 13: return strconv_attribute_impl::parse_wnorm; + case 14: return strconv_attribute_impl::parse_wnorm; + case 15: return strconv_attribute_impl::parse_wnorm; + default: assert(false); return 0; // should not get here + } + } + + inline xml_parse_result make_parse_result(xml_parse_status status, ptrdiff_t offset = 0) + { + xml_parse_result result; + result.status = status; + result.offset = offset; + + return result; + } + + struct xml_parser + { + xml_allocator alloc; + char_t* error_offset; + xml_parse_status error_status; + + // Parser utilities. + #define PUGI__SKIPWS() { while (PUGI__IS_CHARTYPE(*s, ct_space)) ++s; } + #define PUGI__OPTSET(OPT) ( optmsk & (OPT) ) + #define PUGI__PUSHNODE(TYPE) { cursor = append_node(cursor, alloc, TYPE); if (!cursor) PUGI__THROW_ERROR(status_out_of_memory, s); } + #define PUGI__POPNODE() { cursor = cursor->parent; } + #define PUGI__SCANFOR(X) { while (*s != 0 && !(X)) ++s; } + #define PUGI__SCANWHILE(X) { while ((X)) ++s; } + #define PUGI__ENDSEG() { ch = *s; *s = 0; ++s; } + #define PUGI__THROW_ERROR(err, m) return error_offset = m, error_status = err, static_cast(0) + #define PUGI__CHECK_ERROR(err, m) { if (*s == 0) PUGI__THROW_ERROR(err, m); } + + xml_parser(const xml_allocator& alloc_): alloc(alloc_), error_offset(0), error_status(status_ok) + { + } + + // DOCTYPE consists of nested sections of the following possible types: + // , , "...", '...' + // + // + // First group can not contain nested groups + // Second group can contain nested groups of the same type + // Third group can contain all other groups + char_t* parse_doctype_primitive(char_t* s) + { + if (*s == '"' || *s == '\'') + { + // quoted string + char_t ch = *s++; + PUGI__SCANFOR(*s == ch); + if (!*s) PUGI__THROW_ERROR(status_bad_doctype, s); + + s++; + } + else if (s[0] == '<' && s[1] == '?') + { + // + s += 2; + PUGI__SCANFOR(s[0] == '?' && s[1] == '>'); // no need for ENDSWITH because ?> can't terminate proper doctype + if (!*s) PUGI__THROW_ERROR(status_bad_doctype, s); + + s += 2; + } + else if (s[0] == '<' && s[1] == '!' && s[2] == '-' && s[3] == '-') + { + s += 4; + PUGI__SCANFOR(s[0] == '-' && s[1] == '-' && s[2] == '>'); // no need for ENDSWITH because --> can't terminate proper doctype + if (!*s) PUGI__THROW_ERROR(status_bad_doctype, s); + + s += 4; + } + else PUGI__THROW_ERROR(status_bad_doctype, s); + + return s; + } + + char_t* parse_doctype_ignore(char_t* s) + { + assert(s[0] == '<' && s[1] == '!' && s[2] == '['); + s++; + + while (*s) + { + if (s[0] == '<' && s[1] == '!' && s[2] == '[') + { + // nested ignore section + s = parse_doctype_ignore(s); + if (!s) return s; + } + else if (s[0] == ']' && s[1] == ']' && s[2] == '>') + { + // ignore section end + s += 3; + + return s; + } + else s++; + } + + PUGI__THROW_ERROR(status_bad_doctype, s); + } + + char_t* parse_doctype_group(char_t* s, char_t endch, bool toplevel) + { + assert((s[0] == '<' || s[0] == 0) && s[1] == '!'); + s++; + + while (*s) + { + if (s[0] == '<' && s[1] == '!' && s[2] != '-') + { + if (s[2] == '[') + { + // ignore + s = parse_doctype_ignore(s); + if (!s) return s; + } + else + { + // some control group + s = parse_doctype_group(s, endch, false); + if (!s) return s; + + // skip > + assert(*s == '>'); + s++; + } + } + else if (s[0] == '<' || s[0] == '"' || s[0] == '\'') + { + // unknown tag (forbidden), or some primitive group + s = parse_doctype_primitive(s); + if (!s) return s; + } + else if (*s == '>') + { + return s; + } + else s++; + } + + if (!toplevel || endch != '>') PUGI__THROW_ERROR(status_bad_doctype, s); + + return s; + } + + char_t* parse_exclamation(char_t* s, xml_node_struct* cursor, unsigned int optmsk, char_t endch) + { + // parse node contents, starting with exclamation mark + ++s; + + if (*s == '-') // 'value = s; // Save the offset. + } + + if (PUGI__OPTSET(parse_eol) && PUGI__OPTSET(parse_comments)) + { + s = strconv_comment(s, endch); + + if (!s) PUGI__THROW_ERROR(status_bad_comment, cursor->value); + } + else + { + // Scan for terminating '-->'. + PUGI__SCANFOR(s[0] == '-' && s[1] == '-' && ENDSWITH(s[2], '>')); + PUGI__CHECK_ERROR(status_bad_comment, s); + + if (PUGI__OPTSET(parse_comments)) + *s = 0; // Zero-terminate this segment at the first terminating '-'. + + s += (s[2] == '>' ? 3 : 2); // Step over the '\0->'. + } + } + else PUGI__THROW_ERROR(status_bad_comment, s); + } + else if (*s == '[') + { + // 'value = s; // Save the offset. + + if (PUGI__OPTSET(parse_eol)) + { + s = strconv_cdata(s, endch); + + if (!s) PUGI__THROW_ERROR(status_bad_cdata, cursor->value); + } + else + { + // Scan for terminating ']]>'. + PUGI__SCANFOR(s[0] == ']' && s[1] == ']' && ENDSWITH(s[2], '>')); + PUGI__CHECK_ERROR(status_bad_cdata, s); + + *s++ = 0; // Zero-terminate this segment. + } + } + else // Flagged for discard, but we still have to scan for the terminator. + { + // Scan for terminating ']]>'. + PUGI__SCANFOR(s[0] == ']' && s[1] == ']' && ENDSWITH(s[2], '>')); + PUGI__CHECK_ERROR(status_bad_cdata, s); + + ++s; + } + + s += (s[1] == '>' ? 2 : 1); // Step over the last ']>'. + } + else PUGI__THROW_ERROR(status_bad_cdata, s); + } + else if (s[0] == 'D' && s[1] == 'O' && s[2] == 'C' && s[3] == 'T' && s[4] == 'Y' && s[5] == 'P' && ENDSWITH(s[6], 'E')) + { + s -= 2; + + if (cursor->parent) PUGI__THROW_ERROR(status_bad_doctype, s); + + char_t* mark = s + 9; + + s = parse_doctype_group(s, endch, true); + if (!s) return s; + + assert((*s == 0 && endch == '>') || *s == '>'); + if (*s) *s++ = 0; + + if (PUGI__OPTSET(parse_doctype)) + { + while (PUGI__IS_CHARTYPE(*mark, ct_space)) ++mark; + + PUGI__PUSHNODE(node_doctype); + + cursor->value = mark; + + PUGI__POPNODE(); + } + } + else if (*s == 0 && endch == '-') PUGI__THROW_ERROR(status_bad_comment, s); + else if (*s == 0 && endch == '[') PUGI__THROW_ERROR(status_bad_cdata, s); + else PUGI__THROW_ERROR(status_unrecognized_tag, s); + + return s; + } + + char_t* parse_question(char_t* s, xml_node_struct*& ref_cursor, unsigned int optmsk, char_t endch) + { + // load into registers + xml_node_struct* cursor = ref_cursor; + char_t ch = 0; + + // parse node contents, starting with question mark + ++s; + + // read PI target + char_t* target = s; + + if (!PUGI__IS_CHARTYPE(*s, ct_start_symbol)) PUGI__THROW_ERROR(status_bad_pi, s); + + PUGI__SCANWHILE(PUGI__IS_CHARTYPE(*s, ct_symbol)); + PUGI__CHECK_ERROR(status_bad_pi, s); + + // determine node type; stricmp / strcasecmp is not portable + bool declaration = (target[0] | ' ') == 'x' && (target[1] | ' ') == 'm' && (target[2] | ' ') == 'l' && target + 3 == s; + + if (declaration ? PUGI__OPTSET(parse_declaration) : PUGI__OPTSET(parse_pi)) + { + if (declaration) + { + // disallow non top-level declarations + if (cursor->parent) PUGI__THROW_ERROR(status_bad_pi, s); + + PUGI__PUSHNODE(node_declaration); + } + else + { + PUGI__PUSHNODE(node_pi); + } + + cursor->name = target; + + PUGI__ENDSEG(); + + // parse value/attributes + if (ch == '?') + { + // empty node + if (!ENDSWITH(*s, '>')) PUGI__THROW_ERROR(status_bad_pi, s); + s += (*s == '>'); + + PUGI__POPNODE(); + } + else if (PUGI__IS_CHARTYPE(ch, ct_space)) + { + PUGI__SKIPWS(); + + // scan for tag end + char_t* value = s; + + PUGI__SCANFOR(s[0] == '?' && ENDSWITH(s[1], '>')); + PUGI__CHECK_ERROR(status_bad_pi, s); + + if (declaration) + { + // replace ending ? with / so that 'element' terminates properly + *s = '/'; + + // we exit from this function with cursor at node_declaration, which is a signal to parse() to go to LOC_ATTRIBUTES + s = value; + } + else + { + // store value and step over > + cursor->value = value; + PUGI__POPNODE(); + + PUGI__ENDSEG(); + + s += (*s == '>'); + } + } + else PUGI__THROW_ERROR(status_bad_pi, s); + } + else + { + // scan for tag end + PUGI__SCANFOR(s[0] == '?' && ENDSWITH(s[1], '>')); + PUGI__CHECK_ERROR(status_bad_pi, s); + + s += (s[1] == '>' ? 2 : 1); + } + + // store from registers + ref_cursor = cursor; + + return s; + } + + char_t* parse_tree(char_t* s, xml_node_struct* root, unsigned int optmsk, char_t endch) + { + strconv_attribute_t strconv_attribute = get_strconv_attribute(optmsk); + strconv_pcdata_t strconv_pcdata = get_strconv_pcdata(optmsk); + + char_t ch = 0; + xml_node_struct* cursor = root; + char_t* mark = s; + + while (*s != 0) + { + if (*s == '<') + { + ++s; + + LOC_TAG: + if (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) // '<#...' + { + PUGI__PUSHNODE(node_element); // Append a new node to the tree. + + cursor->name = s; + + PUGI__SCANWHILE(PUGI__IS_CHARTYPE(*s, ct_symbol)); // Scan for a terminator. + PUGI__ENDSEG(); // Save char in 'ch', terminate & step over. + + if (ch == '>') + { + // end of tag + } + else if (PUGI__IS_CHARTYPE(ch, ct_space)) + { + LOC_ATTRIBUTES: + while (true) + { + PUGI__SKIPWS(); // Eat any whitespace. + + if (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) // <... #... + { + xml_attribute_struct* a = append_attribute_ll(cursor, alloc); // Make space for this attribute. + if (!a) PUGI__THROW_ERROR(status_out_of_memory, s); + + a->name = s; // Save the offset. + + PUGI__SCANWHILE(PUGI__IS_CHARTYPE(*s, ct_symbol)); // Scan for a terminator. + PUGI__CHECK_ERROR(status_bad_attribute, s); //$ redundant, left for performance + + PUGI__ENDSEG(); // Save char in 'ch', terminate & step over. + PUGI__CHECK_ERROR(status_bad_attribute, s); //$ redundant, left for performance + + if (PUGI__IS_CHARTYPE(ch, ct_space)) + { + PUGI__SKIPWS(); // Eat any whitespace. + PUGI__CHECK_ERROR(status_bad_attribute, s); //$ redundant, left for performance + + ch = *s; + ++s; + } + + if (ch == '=') // '<... #=...' + { + PUGI__SKIPWS(); // Eat any whitespace. + + if (*s == '"' || *s == '\'') // '<... #="...' + { + ch = *s; // Save quote char to avoid breaking on "''" -or- '""'. + ++s; // Step over the quote. + a->value = s; // Save the offset. + + s = strconv_attribute(s, ch); + + if (!s) PUGI__THROW_ERROR(status_bad_attribute, a->value); + + // After this line the loop continues from the start; + // Whitespaces, / and > are ok, symbols and EOF are wrong, + // everything else will be detected + if (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) PUGI__THROW_ERROR(status_bad_attribute, s); + } + else PUGI__THROW_ERROR(status_bad_attribute, s); + } + else PUGI__THROW_ERROR(status_bad_attribute, s); + } + else if (*s == '/') + { + ++s; + + if (*s == '>') + { + PUGI__POPNODE(); + s++; + break; + } + else if (*s == 0 && endch == '>') + { + PUGI__POPNODE(); + break; + } + else PUGI__THROW_ERROR(status_bad_start_element, s); + } + else if (*s == '>') + { + ++s; + + break; + } + else if (*s == 0 && endch == '>') + { + break; + } + else PUGI__THROW_ERROR(status_bad_start_element, s); + } + + // !!! + } + else if (ch == '/') // '<#.../' + { + if (!ENDSWITH(*s, '>')) PUGI__THROW_ERROR(status_bad_start_element, s); + + PUGI__POPNODE(); // Pop. + + s += (*s == '>'); + } + else if (ch == 0) + { + // we stepped over null terminator, backtrack & handle closing tag + --s; + + if (endch != '>') PUGI__THROW_ERROR(status_bad_start_element, s); + } + else PUGI__THROW_ERROR(status_bad_start_element, s); + } + else if (*s == '/') + { + ++s; + + char_t* name = cursor->name; + if (!name) PUGI__THROW_ERROR(status_end_element_mismatch, s); + + while (PUGI__IS_CHARTYPE(*s, ct_symbol)) + { + if (*s++ != *name++) PUGI__THROW_ERROR(status_end_element_mismatch, s); + } + + if (*name) + { + if (*s == 0 && name[0] == endch && name[1] == 0) PUGI__THROW_ERROR(status_bad_end_element, s); + else PUGI__THROW_ERROR(status_end_element_mismatch, s); + } + + PUGI__POPNODE(); // Pop. + + PUGI__SKIPWS(); + + if (*s == 0) + { + if (endch != '>') PUGI__THROW_ERROR(status_bad_end_element, s); + } + else + { + if (*s != '>') PUGI__THROW_ERROR(status_bad_end_element, s); + ++s; + } + } + else if (*s == '?') // 'header & xml_memory_page_type_mask) + 1 == node_declaration) goto LOC_ATTRIBUTES; + } + else if (*s == '!') // 'first_child) continue; + } + } + + if (!PUGI__OPTSET(parse_trim_pcdata)) + s = mark; + + if (cursor->parent || PUGI__OPTSET(parse_fragment)) + { + PUGI__PUSHNODE(node_pcdata); // Append a new node on the tree. + cursor->value = s; // Save the offset. + + s = strconv_pcdata(s); + + PUGI__POPNODE(); // Pop since this is a standalone. + + if (!*s) break; + } + else + { + PUGI__SCANFOR(*s == '<'); // '...<' + if (!*s) break; + + ++s; + } + + // We're after '<' + goto LOC_TAG; + } + } + + // check that last tag is closed + if (cursor != root) PUGI__THROW_ERROR(status_end_element_mismatch, s); + + return s; + } + + #ifdef PUGIXML_WCHAR_MODE + static char_t* parse_skip_bom(char_t* s) + { + unsigned int bom = 0xfeff; + return (s[0] == static_cast(bom)) ? s + 1 : s; + } + #else + static char_t* parse_skip_bom(char_t* s) + { + return (s[0] == '\xef' && s[1] == '\xbb' && s[2] == '\xbf') ? s + 3 : s; + } + #endif + + static bool has_element_node_siblings(xml_node_struct* node) + { + while (node) + { + xml_node_type type = static_cast((node->header & impl::xml_memory_page_type_mask) + 1); + if (type == node_element) return true; + + node = node->next_sibling; + } + + return false; + } + + static xml_parse_result parse(char_t* buffer, size_t length, xml_document_struct* xmldoc, xml_node_struct* root, unsigned int optmsk) + { + // allocator object is a part of document object + xml_allocator& alloc = *static_cast(xmldoc); + + // early-out for empty documents + if (length == 0) + return make_parse_result(PUGI__OPTSET(parse_fragment) ? status_ok : status_no_document_element); + + // get last child of the root before parsing + xml_node_struct* last_root_child = root->first_child ? root->first_child->prev_sibling_c : 0; + + // create parser on stack + xml_parser parser(alloc); + + // save last character and make buffer zero-terminated (speeds up parsing) + char_t endch = buffer[length - 1]; + buffer[length - 1] = 0; + + // skip BOM to make sure it does not end up as part of parse output + char_t* buffer_data = parse_skip_bom(buffer); + + // perform actual parsing + parser.parse_tree(buffer_data, root, optmsk, endch); + + // update allocator state + alloc = parser.alloc; + + xml_parse_result result = make_parse_result(parser.error_status, parser.error_offset ? parser.error_offset - buffer : 0); + assert(result.offset >= 0 && static_cast(result.offset) <= length); + + if (result) + { + // since we removed last character, we have to handle the only possible false positive (stray <) + if (endch == '<') + return make_parse_result(status_unrecognized_tag, length - 1); + + // check if there are any element nodes parsed + xml_node_struct* first_root_child_parsed = last_root_child ? last_root_child->next_sibling : root->first_child; + + if (!PUGI__OPTSET(parse_fragment) && !has_element_node_siblings(first_root_child_parsed)) + return make_parse_result(status_no_document_element, length - 1); + } + else + { + // roll back offset if it occurs on a null terminator in the source buffer + if (result.offset > 0 && static_cast(result.offset) == length - 1 && endch == 0) + result.offset--; + } + + return result; + } + }; + + // Output facilities + PUGI__FN xml_encoding get_write_native_encoding() + { + #ifdef PUGIXML_WCHAR_MODE + return get_wchar_encoding(); + #else + return encoding_utf8; + #endif + } + + PUGI__FN xml_encoding get_write_encoding(xml_encoding encoding) + { + // replace wchar encoding with utf implementation + if (encoding == encoding_wchar) return get_wchar_encoding(); + + // replace utf16 encoding with utf16 with specific endianness + if (encoding == encoding_utf16) return is_little_endian() ? encoding_utf16_le : encoding_utf16_be; + + // replace utf32 encoding with utf32 with specific endianness + if (encoding == encoding_utf32) return is_little_endian() ? encoding_utf32_le : encoding_utf32_be; + + // only do autodetection if no explicit encoding is requested + if (encoding != encoding_auto) return encoding; + + // assume utf8 encoding + return encoding_utf8; + } + +#ifdef PUGIXML_WCHAR_MODE + PUGI__FN size_t get_valid_length(const char_t* data, size_t length) + { + assert(length > 0); + + // discard last character if it's the lead of a surrogate pair + return (sizeof(wchar_t) == 2 && static_cast(static_cast(data[length - 1]) - 0xD800) < 0x400) ? length - 1 : length; + } + + PUGI__FN size_t convert_buffer_output(char_t* r_char, uint8_t* r_u8, uint16_t* r_u16, uint32_t* r_u32, const char_t* data, size_t length, xml_encoding encoding) + { + // only endian-swapping is required + if (need_endian_swap_utf(encoding, get_wchar_encoding())) + { + convert_wchar_endian_swap(r_char, data, length); + + return length * sizeof(char_t); + } + + // convert to utf8 + if (encoding == encoding_utf8) + { + uint8_t* dest = r_u8; + uint8_t* end = utf_decoder::decode_wchar_block(data, length, dest); + + return static_cast(end - dest); + } + + // convert to utf16 + if (encoding == encoding_utf16_be || encoding == encoding_utf16_le) + { + uint16_t* dest = r_u16; + + // convert to native utf16 + uint16_t* end = utf_decoder::decode_wchar_block(data, length, dest); + + // swap if necessary + xml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be; + + if (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast(end - dest)); + + return static_cast(end - dest) * sizeof(uint16_t); + } + + // convert to utf32 + if (encoding == encoding_utf32_be || encoding == encoding_utf32_le) + { + uint32_t* dest = r_u32; + + // convert to native utf32 + uint32_t* end = utf_decoder::decode_wchar_block(data, length, dest); + + // swap if necessary + xml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be; + + if (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast(end - dest)); + + return static_cast(end - dest) * sizeof(uint32_t); + } + + // convert to latin1 + if (encoding == encoding_latin1) + { + uint8_t* dest = r_u8; + uint8_t* end = utf_decoder::decode_wchar_block(data, length, dest); + + return static_cast(end - dest); + } + + assert(!"Invalid encoding"); + return 0; + } +#else + PUGI__FN size_t get_valid_length(const char_t* data, size_t length) + { + assert(length > 4); + + for (size_t i = 1; i <= 4; ++i) + { + uint8_t ch = static_cast(data[length - i]); + + // either a standalone character or a leading one + if ((ch & 0xc0) != 0x80) return length - i; + } + + // there are four non-leading characters at the end, sequence tail is broken so might as well process the whole chunk + return length; + } + + PUGI__FN size_t convert_buffer_output(char_t* /* r_char */, uint8_t* r_u8, uint16_t* r_u16, uint32_t* r_u32, const char_t* data, size_t length, xml_encoding encoding) + { + if (encoding == encoding_utf16_be || encoding == encoding_utf16_le) + { + uint16_t* dest = r_u16; + + // convert to native utf16 + uint16_t* end = utf_decoder::decode_utf8_block(reinterpret_cast(data), length, dest); + + // swap if necessary + xml_encoding native_encoding = is_little_endian() ? encoding_utf16_le : encoding_utf16_be; + + if (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast(end - dest)); + + return static_cast(end - dest) * sizeof(uint16_t); + } + + if (encoding == encoding_utf32_be || encoding == encoding_utf32_le) + { + uint32_t* dest = r_u32; + + // convert to native utf32 + uint32_t* end = utf_decoder::decode_utf8_block(reinterpret_cast(data), length, dest); + + // swap if necessary + xml_encoding native_encoding = is_little_endian() ? encoding_utf32_le : encoding_utf32_be; + + if (native_encoding != encoding) convert_utf_endian_swap(dest, dest, static_cast(end - dest)); + + return static_cast(end - dest) * sizeof(uint32_t); + } + + if (encoding == encoding_latin1) + { + uint8_t* dest = r_u8; + uint8_t* end = utf_decoder::decode_utf8_block(reinterpret_cast(data), length, dest); + + return static_cast(end - dest); + } + + assert(!"Invalid encoding"); + return 0; + } +#endif + + class xml_buffered_writer + { + xml_buffered_writer(const xml_buffered_writer&); + xml_buffered_writer& operator=(const xml_buffered_writer&); + + public: + xml_buffered_writer(xml_writer& writer_, xml_encoding user_encoding): writer(writer_), bufsize(0), encoding(get_write_encoding(user_encoding)) + { + PUGI__STATIC_ASSERT(bufcapacity >= 8); + } + + ~xml_buffered_writer() + { + flush(); + } + + void flush() + { + flush(buffer, bufsize); + bufsize = 0; + } + + void flush(const char_t* data, size_t size) + { + if (size == 0) return; + + // fast path, just write data + if (encoding == get_write_native_encoding()) + writer.write(data, size * sizeof(char_t)); + else + { + // convert chunk + size_t result = convert_buffer_output(scratch.data_char, scratch.data_u8, scratch.data_u16, scratch.data_u32, data, size, encoding); + assert(result <= sizeof(scratch)); + + // write data + writer.write(scratch.data_u8, result); + } + } + + void write(const char_t* data, size_t length) + { + if (bufsize + length > bufcapacity) + { + // flush the remaining buffer contents + flush(); + + // handle large chunks + if (length > bufcapacity) + { + if (encoding == get_write_native_encoding()) + { + // fast path, can just write data chunk + writer.write(data, length * sizeof(char_t)); + return; + } + + // need to convert in suitable chunks + while (length > bufcapacity) + { + // get chunk size by selecting such number of characters that are guaranteed to fit into scratch buffer + // and form a complete codepoint sequence (i.e. discard start of last codepoint if necessary) + size_t chunk_size = get_valid_length(data, bufcapacity); + + // convert chunk and write + flush(data, chunk_size); + + // iterate + data += chunk_size; + length -= chunk_size; + } + + // small tail is copied below + bufsize = 0; + } + } + + memcpy(buffer + bufsize, data, length * sizeof(char_t)); + bufsize += length; + } + + void write(const char_t* data) + { + write(data, strlength(data)); + } + + void write(char_t d0) + { + if (bufsize + 1 > bufcapacity) flush(); + + buffer[bufsize + 0] = d0; + bufsize += 1; + } + + void write(char_t d0, char_t d1) + { + if (bufsize + 2 > bufcapacity) flush(); + + buffer[bufsize + 0] = d0; + buffer[bufsize + 1] = d1; + bufsize += 2; + } + + void write(char_t d0, char_t d1, char_t d2) + { + if (bufsize + 3 > bufcapacity) flush(); + + buffer[bufsize + 0] = d0; + buffer[bufsize + 1] = d1; + buffer[bufsize + 2] = d2; + bufsize += 3; + } + + void write(char_t d0, char_t d1, char_t d2, char_t d3) + { + if (bufsize + 4 > bufcapacity) flush(); + + buffer[bufsize + 0] = d0; + buffer[bufsize + 1] = d1; + buffer[bufsize + 2] = d2; + buffer[bufsize + 3] = d3; + bufsize += 4; + } + + void write(char_t d0, char_t d1, char_t d2, char_t d3, char_t d4) + { + if (bufsize + 5 > bufcapacity) flush(); + + buffer[bufsize + 0] = d0; + buffer[bufsize + 1] = d1; + buffer[bufsize + 2] = d2; + buffer[bufsize + 3] = d3; + buffer[bufsize + 4] = d4; + bufsize += 5; + } + + void write(char_t d0, char_t d1, char_t d2, char_t d3, char_t d4, char_t d5) + { + if (bufsize + 6 > bufcapacity) flush(); + + buffer[bufsize + 0] = d0; + buffer[bufsize + 1] = d1; + buffer[bufsize + 2] = d2; + buffer[bufsize + 3] = d3; + buffer[bufsize + 4] = d4; + buffer[bufsize + 5] = d5; + bufsize += 6; + } + + // utf8 maximum expansion: x4 (-> utf32) + // utf16 maximum expansion: x2 (-> utf32) + // utf32 maximum expansion: x1 + enum + { + bufcapacitybytes = + #ifdef PUGIXML_MEMORY_OUTPUT_STACK + PUGIXML_MEMORY_OUTPUT_STACK + #else + 10240 + #endif + , + bufcapacity = bufcapacitybytes / (sizeof(char_t) + 4) + }; + + char_t buffer[bufcapacity]; + + union + { + uint8_t data_u8[4 * bufcapacity]; + uint16_t data_u16[2 * bufcapacity]; + uint32_t data_u32[bufcapacity]; + char_t data_char[bufcapacity]; + } scratch; + + xml_writer& writer; + size_t bufsize; + xml_encoding encoding; + }; + + PUGI__FN void text_output_escaped(xml_buffered_writer& writer, const char_t* s, chartypex_t type) + { + while (*s) + { + const char_t* prev = s; + + // While *s is a usual symbol + while (!PUGI__IS_CHARTYPEX(*s, type)) ++s; + + writer.write(prev, static_cast(s - prev)); + + switch (*s) + { + case 0: break; + case '&': + writer.write('&', 'a', 'm', 'p', ';'); + ++s; + break; + case '<': + writer.write('&', 'l', 't', ';'); + ++s; + break; + case '>': + writer.write('&', 'g', 't', ';'); + ++s; + break; + case '"': + writer.write('&', 'q', 'u', 'o', 't', ';'); + ++s; + break; + default: // s is not a usual symbol + { + unsigned int ch = static_cast(*s++); + assert(ch < 32); + + writer.write('&', '#', static_cast((ch / 10) + '0'), static_cast((ch % 10) + '0'), ';'); + } + } + } + } + + PUGI__FN void text_output(xml_buffered_writer& writer, const char_t* s, chartypex_t type, unsigned int flags) + { + if (flags & format_no_escapes) + writer.write(s); + else + text_output_escaped(writer, s, type); + } + + PUGI__FN void text_output_cdata(xml_buffered_writer& writer, const char_t* s) + { + do + { + writer.write('<', '!', '[', 'C', 'D'); + writer.write('A', 'T', 'A', '['); + + const char_t* prev = s; + + // look for ]]> sequence - we can't output it as is since it terminates CDATA + while (*s && !(s[0] == ']' && s[1] == ']' && s[2] == '>')) ++s; + + // skip ]] if we stopped at ]]>, > will go to the next CDATA section + if (*s) s += 2; + + writer.write(prev, static_cast(s - prev)); + + writer.write(']', ']', '>'); + } + while (*s); + } + + PUGI__FN void node_output_attributes(xml_buffered_writer& writer, const xml_node& node, unsigned int flags) + { + const char_t* default_name = PUGIXML_TEXT(":anonymous"); + + for (xml_attribute a = node.first_attribute(); a; a = a.next_attribute()) + { + writer.write(' '); + writer.write(a.name()[0] ? a.name() : default_name); + writer.write('=', '"'); + + text_output(writer, a.value(), ctx_special_attr, flags); + + writer.write('"'); + } + } + + PUGI__FN void node_output(xml_buffered_writer& writer, const xml_node& node, const char_t* indent, unsigned int flags, unsigned int depth) + { + const char_t* default_name = PUGIXML_TEXT(":anonymous"); + + if ((flags & format_indent) != 0 && (flags & format_raw) == 0) + for (unsigned int i = 0; i < depth; ++i) writer.write(indent); + + switch (node.type()) + { + case node_document: + { + for (xml_node n = node.first_child(); n; n = n.next_sibling()) + node_output(writer, n, indent, flags, depth); + break; + } + + case node_element: + { + const char_t* name = node.name()[0] ? node.name() : default_name; + + writer.write('<'); + writer.write(name); + + node_output_attributes(writer, node, flags); + + if (flags & format_raw) + { + if (!node.first_child()) + writer.write(' ', '/', '>'); + else + { + writer.write('>'); + + for (xml_node n = node.first_child(); n; n = n.next_sibling()) + node_output(writer, n, indent, flags, depth + 1); + + writer.write('<', '/'); + writer.write(name); + writer.write('>'); + } + } + else if (!node.first_child()) + writer.write(' ', '/', '>', '\n'); + else if (node.first_child() == node.last_child() && (node.first_child().type() == node_pcdata || node.first_child().type() == node_cdata)) + { + writer.write('>'); + + if (node.first_child().type() == node_pcdata) + text_output(writer, node.first_child().value(), ctx_special_pcdata, flags); + else + text_output_cdata(writer, node.first_child().value()); + + writer.write('<', '/'); + writer.write(name); + writer.write('>', '\n'); + } + else + { + writer.write('>', '\n'); + + for (xml_node n = node.first_child(); n; n = n.next_sibling()) + node_output(writer, n, indent, flags, depth + 1); + + if ((flags & format_indent) != 0 && (flags & format_raw) == 0) + for (unsigned int i = 0; i < depth; ++i) writer.write(indent); + + writer.write('<', '/'); + writer.write(name); + writer.write('>', '\n'); + } + + break; + } + + case node_pcdata: + text_output(writer, node.value(), ctx_special_pcdata, flags); + if ((flags & format_raw) == 0) writer.write('\n'); + break; + + case node_cdata: + text_output_cdata(writer, node.value()); + if ((flags & format_raw) == 0) writer.write('\n'); + break; + + case node_comment: + writer.write('<', '!', '-', '-'); + writer.write(node.value()); + writer.write('-', '-', '>'); + if ((flags & format_raw) == 0) writer.write('\n'); + break; + + case node_pi: + case node_declaration: + writer.write('<', '?'); + writer.write(node.name()[0] ? node.name() : default_name); + + if (node.type() == node_declaration) + { + node_output_attributes(writer, node, flags); + } + else if (node.value()[0]) + { + writer.write(' '); + writer.write(node.value()); + } + + writer.write('?', '>'); + if ((flags & format_raw) == 0) writer.write('\n'); + break; + + case node_doctype: + writer.write('<', '!', 'D', 'O', 'C'); + writer.write('T', 'Y', 'P', 'E'); + + if (node.value()[0]) + { + writer.write(' '); + writer.write(node.value()); + } + + writer.write('>'); + if ((flags & format_raw) == 0) writer.write('\n'); + break; + + default: + assert(!"Invalid node type"); + } + } + + inline bool has_declaration(const xml_node& node) + { + for (xml_node child = node.first_child(); child; child = child.next_sibling()) + { + xml_node_type type = child.type(); + + if (type == node_declaration) return true; + if (type == node_element) return false; + } + + return false; + } + + inline bool allow_insert_child(xml_node_type parent, xml_node_type child) + { + if (parent != node_document && parent != node_element) return false; + if (child == node_document || child == node_null) return false; + if (parent != node_document && (child == node_declaration || child == node_doctype)) return false; + + return true; + } + + PUGI__FN void recursive_copy_skip(xml_node& dest, const xml_node& source, const xml_node& skip) + { + assert(dest.type() == source.type()); + + switch (source.type()) + { + case node_element: + { + dest.set_name(source.name()); + + for (xml_attribute a = source.first_attribute(); a; a = a.next_attribute()) + dest.append_attribute(a.name()).set_value(a.value()); + + for (xml_node c = source.first_child(); c; c = c.next_sibling()) + { + if (c == skip) continue; + + xml_node cc = dest.append_child(c.type()); + assert(cc); + + recursive_copy_skip(cc, c, skip); + } + + break; + } + + case node_pcdata: + case node_cdata: + case node_comment: + case node_doctype: + dest.set_value(source.value()); + break; + + case node_pi: + dest.set_name(source.name()); + dest.set_value(source.value()); + break; + + case node_declaration: + { + dest.set_name(source.name()); + + for (xml_attribute a = source.first_attribute(); a; a = a.next_attribute()) + dest.append_attribute(a.name()).set_value(a.value()); + + break; + } + + default: + assert(!"Invalid node type"); + } + } + + inline bool is_text_node(xml_node_struct* node) + { + xml_node_type type = static_cast((node->header & impl::xml_memory_page_type_mask) + 1); + + return type == node_pcdata || type == node_cdata; + } + + // get value with conversion functions + PUGI__FN int get_integer_base(const char_t* value) + { + const char_t* s = value; + + while (PUGI__IS_CHARTYPE(*s, ct_space)) + s++; + + if (*s == '-') + s++; + + return (s[0] == '0' && (s[1] == 'x' || s[1] == 'X')) ? 16 : 10; + } + + PUGI__FN int get_value_int(const char_t* value, int def) + { + if (!value) return def; + + int base = get_integer_base(value); + + #ifdef PUGIXML_WCHAR_MODE + return static_cast(wcstol(value, 0, base)); + #else + return static_cast(strtol(value, 0, base)); + #endif + } + + PUGI__FN unsigned int get_value_uint(const char_t* value, unsigned int def) + { + if (!value) return def; + + int base = get_integer_base(value); + + #ifdef PUGIXML_WCHAR_MODE + return static_cast(wcstoul(value, 0, base)); + #else + return static_cast(strtoul(value, 0, base)); + #endif + } + + PUGI__FN double get_value_double(const char_t* value, double def) + { + if (!value) return def; + + #ifdef PUGIXML_WCHAR_MODE + return wcstod(value, 0); + #else + return strtod(value, 0); + #endif + } + + PUGI__FN float get_value_float(const char_t* value, float def) + { + if (!value) return def; + + #ifdef PUGIXML_WCHAR_MODE + return static_cast(wcstod(value, 0)); + #else + return static_cast(strtod(value, 0)); + #endif + } + + PUGI__FN bool get_value_bool(const char_t* value, bool def) + { + if (!value) return def; + + // only look at first char + char_t first = *value; + + // 1*, t* (true), T* (True), y* (yes), Y* (YES) + return (first == '1' || first == 't' || first == 'T' || first == 'y' || first == 'Y'); + } + +#ifdef PUGIXML_HAS_LONG_LONG + PUGI__FN long long get_value_llong(const char_t* value, long long def) + { + if (!value) return def; + + int base = get_integer_base(value); + + #ifdef PUGIXML_WCHAR_MODE + #ifdef PUGI__MSVC_CRT_VERSION + return _wcstoi64(value, 0, base); + #else + return wcstoll(value, 0, base); + #endif + #else + #ifdef PUGI__MSVC_CRT_VERSION + return _strtoi64(value, 0, base); + #else + return strtoll(value, 0, base); + #endif + #endif + } + + PUGI__FN unsigned long long get_value_ullong(const char_t* value, unsigned long long def) + { + if (!value) return def; + + int base = get_integer_base(value); + + #ifdef PUGIXML_WCHAR_MODE + #ifdef PUGI__MSVC_CRT_VERSION + return _wcstoui64(value, 0, base); + #else + return wcstoull(value, 0, base); + #endif + #else + #ifdef PUGI__MSVC_CRT_VERSION + return _strtoui64(value, 0, base); + #else + return strtoull(value, 0, base); + #endif + #endif + } +#endif + + // set value with conversion functions + PUGI__FN bool set_value_buffer(char_t*& dest, uintptr_t& header, uintptr_t header_mask, char (&buf)[128]) + { + #ifdef PUGIXML_WCHAR_MODE + char_t wbuf[128]; + impl::widen_ascii(wbuf, buf); + + return strcpy_insitu(dest, header, header_mask, wbuf); + #else + return strcpy_insitu(dest, header, header_mask, buf); + #endif + } + + PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, int value) + { + char buf[128]; + sprintf(buf, "%d", value); + + return set_value_buffer(dest, header, header_mask, buf); + } + + PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, unsigned int value) + { + char buf[128]; + sprintf(buf, "%u", value); + + return set_value_buffer(dest, header, header_mask, buf); + } + + PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, double value) + { + char buf[128]; + sprintf(buf, "%g", value); + + return set_value_buffer(dest, header, header_mask, buf); + } + + PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, bool value) + { + return strcpy_insitu(dest, header, header_mask, value ? PUGIXML_TEXT("true") : PUGIXML_TEXT("false")); + } + +#ifdef PUGIXML_HAS_LONG_LONG + PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, long long value) + { + char buf[128]; + sprintf(buf, "%lld", value); + + return set_value_buffer(dest, header, header_mask, buf); + } + + PUGI__FN bool set_value_convert(char_t*& dest, uintptr_t& header, uintptr_t header_mask, unsigned long long value) + { + char buf[128]; + sprintf(buf, "%llu", value); + + return set_value_buffer(dest, header, header_mask, buf); + } +#endif + + // we need to get length of entire file to load it in memory; the only (relatively) sane way to do it is via seek/tell trick + PUGI__FN xml_parse_status get_file_size(FILE* file, size_t& out_result) + { + #if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 && !defined(_WIN32_WCE) + // there are 64-bit versions of fseek/ftell, let's use them + typedef __int64 length_type; + + _fseeki64(file, 0, SEEK_END); + length_type length = _ftelli64(file); + _fseeki64(file, 0, SEEK_SET); + #elif defined(__MINGW32__) && !defined(__NO_MINGW_LFS) && !defined(__STRICT_ANSI__) + // there are 64-bit versions of fseek/ftell, let's use them + typedef off64_t length_type; + + fseeko64(file, 0, SEEK_END); + length_type length = ftello64(file); + fseeko64(file, 0, SEEK_SET); + #else + // if this is a 32-bit OS, long is enough; if this is a unix system, long is 64-bit, which is enough; otherwise we can't do anything anyway. + typedef long length_type; + + fseek(file, 0, SEEK_END); + length_type length = ftell(file); + fseek(file, 0, SEEK_SET); + #endif + + // check for I/O errors + if (length < 0) return status_io_error; + + // check for overflow + size_t result = static_cast(length); + + if (static_cast(result) != length) return status_out_of_memory; + + // finalize + out_result = result; + + return status_ok; + } + + PUGI__FN size_t zero_terminate_buffer(void* buffer, size_t size, xml_encoding encoding) + { + // We only need to zero-terminate if encoding conversion does not do it for us + #ifdef PUGIXML_WCHAR_MODE + xml_encoding wchar_encoding = get_wchar_encoding(); + + if (encoding == wchar_encoding || need_endian_swap_utf(encoding, wchar_encoding)) + { + size_t length = size / sizeof(char_t); + + static_cast(buffer)[length] = 0; + return (length + 1) * sizeof(char_t); + } + #else + if (encoding == encoding_utf8) + { + static_cast(buffer)[size] = 0; + return size + 1; + } + #endif + + return size; + } + + PUGI__FN xml_parse_result load_file_impl(xml_document& doc, FILE* file, unsigned int options, xml_encoding encoding) + { + if (!file) return make_parse_result(status_file_not_found); + + // get file size (can result in I/O errors) + size_t size = 0; + xml_parse_status size_status = get_file_size(file, size); + + if (size_status != status_ok) + { + fclose(file); + return make_parse_result(size_status); + } + + size_t max_suffix_size = sizeof(char_t); + + // allocate buffer for the whole file + char* contents = static_cast(xml_memory::allocate(size + max_suffix_size)); + + if (!contents) + { + fclose(file); + return make_parse_result(status_out_of_memory); + } + + // read file in memory + size_t read_size = fread(contents, 1, size, file); + fclose(file); + + if (read_size != size) + { + xml_memory::deallocate(contents); + return make_parse_result(status_io_error); + } + + xml_encoding real_encoding = get_buffer_encoding(encoding, contents, size); + + return doc.load_buffer_inplace_own(contents, zero_terminate_buffer(contents, size, real_encoding), options, real_encoding); + } + +#ifndef PUGIXML_NO_STL + template struct xml_stream_chunk + { + static xml_stream_chunk* create() + { + void* memory = xml_memory::allocate(sizeof(xml_stream_chunk)); + + return new (memory) xml_stream_chunk(); + } + + static void destroy(void* ptr) + { + xml_stream_chunk* chunk = static_cast(ptr); + + // free chunk chain + while (chunk) + { + xml_stream_chunk* next = chunk->next; + xml_memory::deallocate(chunk); + chunk = next; + } + } + + xml_stream_chunk(): next(0), size(0) + { + } + + xml_stream_chunk* next; + size_t size; + + T data[xml_memory_page_size / sizeof(T)]; + }; + + template PUGI__FN xml_parse_status load_stream_data_noseek(std::basic_istream& stream, void** out_buffer, size_t* out_size) + { + buffer_holder chunks(0, xml_stream_chunk::destroy); + + // read file to a chunk list + size_t total = 0; + xml_stream_chunk* last = 0; + + while (!stream.eof()) + { + // allocate new chunk + xml_stream_chunk* chunk = xml_stream_chunk::create(); + if (!chunk) return status_out_of_memory; + + // append chunk to list + if (last) last = last->next = chunk; + else chunks.data = last = chunk; + + // read data to chunk + stream.read(chunk->data, static_cast(sizeof(chunk->data) / sizeof(T))); + chunk->size = static_cast(stream.gcount()) * sizeof(T); + + // read may set failbit | eofbit in case gcount() is less than read length, so check for other I/O errors + if (stream.bad() || (!stream.eof() && stream.fail())) return status_io_error; + + // guard against huge files (chunk size is small enough to make this overflow check work) + if (total + chunk->size < total) return status_out_of_memory; + total += chunk->size; + } + + size_t max_suffix_size = sizeof(char_t); + + // copy chunk list to a contiguous buffer + char* buffer = static_cast(xml_memory::allocate(total + max_suffix_size)); + if (!buffer) return status_out_of_memory; + + char* write = buffer; + + for (xml_stream_chunk* chunk = static_cast*>(chunks.data); chunk; chunk = chunk->next) + { + assert(write + chunk->size <= buffer + total); + memcpy(write, chunk->data, chunk->size); + write += chunk->size; + } + + assert(write == buffer + total); + + // return buffer + *out_buffer = buffer; + *out_size = total; + + return status_ok; + } + + template PUGI__FN xml_parse_status load_stream_data_seek(std::basic_istream& stream, void** out_buffer, size_t* out_size) + { + // get length of remaining data in stream + typename std::basic_istream::pos_type pos = stream.tellg(); + stream.seekg(0, std::ios::end); + std::streamoff length = stream.tellg() - pos; + stream.seekg(pos); + + if (stream.fail() || pos < 0) return status_io_error; + + // guard against huge files + size_t read_length = static_cast(length); + + if (static_cast(read_length) != length || length < 0) return status_out_of_memory; + + size_t max_suffix_size = sizeof(char_t); + + // read stream data into memory (guard against stream exceptions with buffer holder) + buffer_holder buffer(xml_memory::allocate(read_length * sizeof(T) + max_suffix_size), xml_memory::deallocate); + if (!buffer.data) return status_out_of_memory; + + stream.read(static_cast(buffer.data), static_cast(read_length)); + + // read may set failbit | eofbit in case gcount() is less than read_length (i.e. line ending conversion), so check for other I/O errors + if (stream.bad() || (!stream.eof() && stream.fail())) return status_io_error; + + // return buffer + size_t actual_length = static_cast(stream.gcount()); + assert(actual_length <= read_length); + + *out_buffer = buffer.release(); + *out_size = actual_length * sizeof(T); + + return status_ok; + } + + template PUGI__FN xml_parse_result load_stream_impl(xml_document& doc, std::basic_istream& stream, unsigned int options, xml_encoding encoding) + { + void* buffer = 0; + size_t size = 0; + xml_parse_status status = status_ok; + + // if stream has an error bit set, bail out (otherwise tellg() can fail and we'll clear error bits) + if (stream.fail()) return make_parse_result(status_io_error); + + // load stream to memory (using seek-based implementation if possible, since it's faster and takes less memory) + if (stream.tellg() < 0) + { + stream.clear(); // clear error flags that could be set by a failing tellg + status = load_stream_data_noseek(stream, &buffer, &size); + } + else + status = load_stream_data_seek(stream, &buffer, &size); + + if (status != status_ok) return make_parse_result(status); + + xml_encoding real_encoding = get_buffer_encoding(encoding, buffer, size); + + return doc.load_buffer_inplace_own(buffer, zero_terminate_buffer(buffer, size, real_encoding), options, real_encoding); + } +#endif + +#if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__) || (defined(__MINGW32__) && !defined(__STRICT_ANSI__)) + PUGI__FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode) + { + return _wfopen(path, mode); + } +#else + PUGI__FN char* convert_path_heap(const wchar_t* str) + { + assert(str); + + // first pass: get length in utf8 characters + size_t length = strlength_wide(str); + size_t size = as_utf8_begin(str, length); + + // allocate resulting string + char* result = static_cast(xml_memory::allocate(size + 1)); + if (!result) return 0; + + // second pass: convert to utf8 + as_utf8_end(result, size, str, length); + + return result; + } + + PUGI__FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode) + { + // there is no standard function to open wide paths, so our best bet is to try utf8 path + char* path_utf8 = convert_path_heap(path); + if (!path_utf8) return 0; + + // convert mode to ASCII (we mirror _wfopen interface) + char mode_ascii[4] = {0}; + for (size_t i = 0; mode[i]; ++i) mode_ascii[i] = static_cast(mode[i]); + + // try to open the utf8 path + FILE* result = fopen(path_utf8, mode_ascii); + + // free dummy buffer + xml_memory::deallocate(path_utf8); + + return result; + } +#endif + + PUGI__FN bool save_file_impl(const xml_document& doc, FILE* file, const char_t* indent, unsigned int flags, xml_encoding encoding) + { + if (!file) return false; + + xml_writer_file writer(file); + doc.save(writer, indent, flags, encoding); + + int result = ferror(file); + + fclose(file); + + return result == 0; + } + + PUGI__FN xml_parse_result load_buffer_impl(xml_document_struct* doc, xml_node_struct* root, void* contents, size_t size, unsigned int options, xml_encoding encoding, bool is_mutable, bool own, char_t** out_buffer) + { + // check input buffer + assert(contents || size == 0); + + // get actual encoding + xml_encoding buffer_encoding = impl::get_buffer_encoding(encoding, contents, size); + + // get private buffer + char_t* buffer = 0; + size_t length = 0; + + if (!impl::convert_buffer(buffer, length, buffer_encoding, contents, size, is_mutable)) return impl::make_parse_result(status_out_of_memory); + + // delete original buffer if we performed a conversion + if (own && buffer != contents && contents) impl::xml_memory::deallocate(contents); + + // store buffer for offset_debug + doc->buffer = buffer; + + // parse + xml_parse_result res = impl::xml_parser::parse(buffer, length, doc, root, options); + + // remember encoding + res.encoding = buffer_encoding; + + // grab onto buffer if it's our buffer, user is responsible for deallocating contents himself + if (own || buffer != contents) *out_buffer = buffer; + + return res; + } +PUGI__NS_END + +namespace pugi +{ + PUGI__FN xml_writer_file::xml_writer_file(void* file_): file(file_) + { + } + + PUGI__FN void xml_writer_file::write(const void* data, size_t size) + { + size_t result = fwrite(data, 1, size, static_cast(file)); + (void)!result; // unfortunately we can't do proper error handling here + } + +#ifndef PUGIXML_NO_STL + PUGI__FN xml_writer_stream::xml_writer_stream(std::basic_ostream >& stream): narrow_stream(&stream), wide_stream(0) + { + } + + PUGI__FN xml_writer_stream::xml_writer_stream(std::basic_ostream >& stream): narrow_stream(0), wide_stream(&stream) + { + } + + PUGI__FN void xml_writer_stream::write(const void* data, size_t size) + { + if (narrow_stream) + { + assert(!wide_stream); + narrow_stream->write(reinterpret_cast(data), static_cast(size)); + } + else + { + assert(wide_stream); + assert(size % sizeof(wchar_t) == 0); + + wide_stream->write(reinterpret_cast(data), static_cast(size / sizeof(wchar_t))); + } + } +#endif + + PUGI__FN xml_tree_walker::xml_tree_walker(): _depth(0) + { + } + + PUGI__FN xml_tree_walker::~xml_tree_walker() + { + } + + PUGI__FN int xml_tree_walker::depth() const + { + return _depth; + } + + PUGI__FN bool xml_tree_walker::begin(xml_node&) + { + return true; + } + + PUGI__FN bool xml_tree_walker::end(xml_node&) + { + return true; + } + + PUGI__FN xml_attribute::xml_attribute(): _attr(0) + { + } + + PUGI__FN xml_attribute::xml_attribute(xml_attribute_struct* attr): _attr(attr) + { + } + + PUGI__FN static void unspecified_bool_xml_attribute(xml_attribute***) + { + } + + PUGI__FN xml_attribute::operator xml_attribute::unspecified_bool_type() const + { + return _attr ? unspecified_bool_xml_attribute : 0; + } + + PUGI__FN bool xml_attribute::operator!() const + { + return !_attr; + } + + PUGI__FN bool xml_attribute::operator==(const xml_attribute& r) const + { + return (_attr == r._attr); + } + + PUGI__FN bool xml_attribute::operator!=(const xml_attribute& r) const + { + return (_attr != r._attr); + } + + PUGI__FN bool xml_attribute::operator<(const xml_attribute& r) const + { + return (_attr < r._attr); + } + + PUGI__FN bool xml_attribute::operator>(const xml_attribute& r) const + { + return (_attr > r._attr); + } + + PUGI__FN bool xml_attribute::operator<=(const xml_attribute& r) const + { + return (_attr <= r._attr); + } + + PUGI__FN bool xml_attribute::operator>=(const xml_attribute& r) const + { + return (_attr >= r._attr); + } + + PUGI__FN xml_attribute xml_attribute::next_attribute() const + { + return _attr ? xml_attribute(_attr->next_attribute) : xml_attribute(); + } + + PUGI__FN xml_attribute xml_attribute::previous_attribute() const + { + return _attr && _attr->prev_attribute_c->next_attribute ? xml_attribute(_attr->prev_attribute_c) : xml_attribute(); + } + + PUGI__FN const char_t* xml_attribute::as_string(const char_t* def) const + { + return (_attr && _attr->value) ? _attr->value : def; + } + + PUGI__FN int xml_attribute::as_int(int def) const + { + return impl::get_value_int(_attr ? _attr->value : 0, def); + } + + PUGI__FN unsigned int xml_attribute::as_uint(unsigned int def) const + { + return impl::get_value_uint(_attr ? _attr->value : 0, def); + } + + PUGI__FN double xml_attribute::as_double(double def) const + { + return impl::get_value_double(_attr ? _attr->value : 0, def); + } + + PUGI__FN float xml_attribute::as_float(float def) const + { + return impl::get_value_float(_attr ? _attr->value : 0, def); + } + + PUGI__FN bool xml_attribute::as_bool(bool def) const + { + return impl::get_value_bool(_attr ? _attr->value : 0, def); + } + +#ifdef PUGIXML_HAS_LONG_LONG + PUGI__FN long long xml_attribute::as_llong(long long def) const + { + return impl::get_value_llong(_attr ? _attr->value : 0, def); + } + + PUGI__FN unsigned long long xml_attribute::as_ullong(unsigned long long def) const + { + return impl::get_value_ullong(_attr ? _attr->value : 0, def); + } +#endif + + PUGI__FN bool xml_attribute::empty() const + { + return !_attr; + } + + PUGI__FN const char_t* xml_attribute::name() const + { + return (_attr && _attr->name) ? _attr->name : PUGIXML_TEXT(""); + } + + PUGI__FN const char_t* xml_attribute::value() const + { + return (_attr && _attr->value) ? _attr->value : PUGIXML_TEXT(""); + } + + PUGI__FN size_t xml_attribute::hash_value() const + { + return static_cast(reinterpret_cast(_attr) / sizeof(xml_attribute_struct)); + } + + PUGI__FN xml_attribute_struct* xml_attribute::internal_object() const + { + return _attr; + } + + PUGI__FN xml_attribute& xml_attribute::operator=(const char_t* rhs) + { + set_value(rhs); + return *this; + } + + PUGI__FN xml_attribute& xml_attribute::operator=(int rhs) + { + set_value(rhs); + return *this; + } + + PUGI__FN xml_attribute& xml_attribute::operator=(unsigned int rhs) + { + set_value(rhs); + return *this; + } + + PUGI__FN xml_attribute& xml_attribute::operator=(double rhs) + { + set_value(rhs); + return *this; + } + + PUGI__FN xml_attribute& xml_attribute::operator=(bool rhs) + { + set_value(rhs); + return *this; + } + +#ifdef PUGIXML_HAS_LONG_LONG + PUGI__FN xml_attribute& xml_attribute::operator=(long long rhs) + { + set_value(rhs); + return *this; + } + + PUGI__FN xml_attribute& xml_attribute::operator=(unsigned long long rhs) + { + set_value(rhs); + return *this; + } +#endif + + PUGI__FN bool xml_attribute::set_name(const char_t* rhs) + { + if (!_attr) return false; + + return impl::strcpy_insitu(_attr->name, _attr->header, impl::xml_memory_page_name_allocated_mask, rhs); + } + + PUGI__FN bool xml_attribute::set_value(const char_t* rhs) + { + if (!_attr) return false; + + return impl::strcpy_insitu(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); + } + + PUGI__FN bool xml_attribute::set_value(int rhs) + { + if (!_attr) return false; + + return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); + } + + PUGI__FN bool xml_attribute::set_value(unsigned int rhs) + { + if (!_attr) return false; + + return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); + } + + PUGI__FN bool xml_attribute::set_value(double rhs) + { + if (!_attr) return false; + + return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); + } + + PUGI__FN bool xml_attribute::set_value(bool rhs) + { + if (!_attr) return false; + + return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); + } + +#ifdef PUGIXML_HAS_LONG_LONG + PUGI__FN bool xml_attribute::set_value(long long rhs) + { + if (!_attr) return false; + + return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); + } + + PUGI__FN bool xml_attribute::set_value(unsigned long long rhs) + { + if (!_attr) return false; + + return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); + } +#endif + +#ifdef __BORLANDC__ + PUGI__FN bool operator&&(const xml_attribute& lhs, bool rhs) + { + return (bool)lhs && rhs; + } + + PUGI__FN bool operator||(const xml_attribute& lhs, bool rhs) + { + return (bool)lhs || rhs; + } +#endif + + PUGI__FN xml_node::xml_node(): _root(0) + { + } + + PUGI__FN xml_node::xml_node(xml_node_struct* p): _root(p) + { + } + + PUGI__FN static void unspecified_bool_xml_node(xml_node***) + { + } + + PUGI__FN xml_node::operator xml_node::unspecified_bool_type() const + { + return _root ? unspecified_bool_xml_node : 0; + } + + PUGI__FN bool xml_node::operator!() const + { + return !_root; + } + + PUGI__FN xml_node::iterator xml_node::begin() const + { + return iterator(_root ? _root->first_child : 0, _root); + } + + PUGI__FN xml_node::iterator xml_node::end() const + { + return iterator(0, _root); + } + + PUGI__FN xml_node::attribute_iterator xml_node::attributes_begin() const + { + return attribute_iterator(_root ? _root->first_attribute : 0, _root); + } + + PUGI__FN xml_node::attribute_iterator xml_node::attributes_end() const + { + return attribute_iterator(0, _root); + } + + PUGI__FN xml_object_range xml_node::children() const + { + return xml_object_range(begin(), end()); + } + + PUGI__FN xml_object_range xml_node::children(const char_t* name_) const + { + return xml_object_range(xml_named_node_iterator(child(name_)._root, _root, name_), xml_named_node_iterator(0, _root, name_)); + } + + PUGI__FN xml_object_range xml_node::attributes() const + { + return xml_object_range(attributes_begin(), attributes_end()); + } + + PUGI__FN bool xml_node::operator==(const xml_node& r) const + { + return (_root == r._root); + } + + PUGI__FN bool xml_node::operator!=(const xml_node& r) const + { + return (_root != r._root); + } + + PUGI__FN bool xml_node::operator<(const xml_node& r) const + { + return (_root < r._root); + } + + PUGI__FN bool xml_node::operator>(const xml_node& r) const + { + return (_root > r._root); + } + + PUGI__FN bool xml_node::operator<=(const xml_node& r) const + { + return (_root <= r._root); + } + + PUGI__FN bool xml_node::operator>=(const xml_node& r) const + { + return (_root >= r._root); + } + + PUGI__FN bool xml_node::empty() const + { + return !_root; + } + + PUGI__FN const char_t* xml_node::name() const + { + return (_root && _root->name) ? _root->name : PUGIXML_TEXT(""); + } + + PUGI__FN xml_node_type xml_node::type() const + { + return _root ? static_cast((_root->header & impl::xml_memory_page_type_mask) + 1) : node_null; + } + + PUGI__FN const char_t* xml_node::value() const + { + return (_root && _root->value) ? _root->value : PUGIXML_TEXT(""); + } + + PUGI__FN xml_node xml_node::child(const char_t* name_) const + { + if (!_root) return xml_node(); + + for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling) + if (i->name && impl::strequal(name_, i->name)) return xml_node(i); + + return xml_node(); + } + + PUGI__FN xml_attribute xml_node::attribute(const char_t* name_) const + { + if (!_root) return xml_attribute(); + + for (xml_attribute_struct* i = _root->first_attribute; i; i = i->next_attribute) + if (i->name && impl::strequal(name_, i->name)) + return xml_attribute(i); + + return xml_attribute(); + } + + PUGI__FN xml_node xml_node::next_sibling(const char_t* name_) const + { + if (!_root) return xml_node(); + + for (xml_node_struct* i = _root->next_sibling; i; i = i->next_sibling) + if (i->name && impl::strequal(name_, i->name)) return xml_node(i); + + return xml_node(); + } + + PUGI__FN xml_node xml_node::next_sibling() const + { + if (!_root) return xml_node(); + + if (_root->next_sibling) return xml_node(_root->next_sibling); + else return xml_node(); + } + + PUGI__FN xml_node xml_node::previous_sibling(const char_t* name_) const + { + if (!_root) return xml_node(); + + for (xml_node_struct* i = _root->prev_sibling_c; i->next_sibling; i = i->prev_sibling_c) + if (i->name && impl::strequal(name_, i->name)) return xml_node(i); + + return xml_node(); + } + + PUGI__FN xml_node xml_node::previous_sibling() const + { + if (!_root) return xml_node(); + + if (_root->prev_sibling_c->next_sibling) return xml_node(_root->prev_sibling_c); + else return xml_node(); + } + + PUGI__FN xml_node xml_node::parent() const + { + return _root ? xml_node(_root->parent) : xml_node(); + } + + PUGI__FN xml_node xml_node::root() const + { + if (!_root) return xml_node(); + + impl::xml_memory_page* page = reinterpret_cast(_root->header & impl::xml_memory_page_pointer_mask); + + return xml_node(static_cast(page->allocator)); + } + + PUGI__FN xml_text xml_node::text() const + { + return xml_text(_root); + } + + PUGI__FN const char_t* xml_node::child_value() const + { + if (!_root) return PUGIXML_TEXT(""); + + for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling) + if (i->value && impl::is_text_node(i)) + return i->value; + + return PUGIXML_TEXT(""); + } + + PUGI__FN const char_t* xml_node::child_value(const char_t* name_) const + { + return child(name_).child_value(); + } + + PUGI__FN xml_attribute xml_node::first_attribute() const + { + return _root ? xml_attribute(_root->first_attribute) : xml_attribute(); + } + + PUGI__FN xml_attribute xml_node::last_attribute() const + { + return _root && _root->first_attribute ? xml_attribute(_root->first_attribute->prev_attribute_c) : xml_attribute(); + } + + PUGI__FN xml_node xml_node::first_child() const + { + return _root ? xml_node(_root->first_child) : xml_node(); + } + + PUGI__FN xml_node xml_node::last_child() const + { + return _root && _root->first_child ? xml_node(_root->first_child->prev_sibling_c) : xml_node(); + } + + PUGI__FN bool xml_node::set_name(const char_t* rhs) + { + switch (type()) + { + case node_pi: + case node_declaration: + case node_element: + return impl::strcpy_insitu(_root->name, _root->header, impl::xml_memory_page_name_allocated_mask, rhs); + + default: + return false; + } + } + + PUGI__FN bool xml_node::set_value(const char_t* rhs) + { + switch (type()) + { + case node_pi: + case node_cdata: + case node_pcdata: + case node_comment: + case node_doctype: + return impl::strcpy_insitu(_root->value, _root->header, impl::xml_memory_page_value_allocated_mask, rhs); + + default: + return false; + } + } + + PUGI__FN xml_attribute xml_node::append_attribute(const char_t* name_) + { + if (type() != node_element && type() != node_declaration) return xml_attribute(); + + xml_attribute a(impl::append_attribute_ll(_root, impl::get_allocator(_root))); + a.set_name(name_); + + return a; + } + + PUGI__FN xml_attribute xml_node::prepend_attribute(const char_t* name_) + { + if (type() != node_element && type() != node_declaration) return xml_attribute(); + + xml_attribute a(impl::allocate_attribute(impl::get_allocator(_root))); + if (!a) return xml_attribute(); + + a.set_name(name_); + + xml_attribute_struct* head = _root->first_attribute; + + if (head) + { + a._attr->prev_attribute_c = head->prev_attribute_c; + head->prev_attribute_c = a._attr; + } + else + a._attr->prev_attribute_c = a._attr; + + a._attr->next_attribute = head; + _root->first_attribute = a._attr; + + return a; + } + + PUGI__FN xml_attribute xml_node::insert_attribute_before(const char_t* name_, const xml_attribute& attr) + { + if ((type() != node_element && type() != node_declaration) || attr.empty()) return xml_attribute(); + + // check that attribute belongs to *this + xml_attribute_struct* cur = attr._attr; + + while (cur->prev_attribute_c->next_attribute) cur = cur->prev_attribute_c; + + if (cur != _root->first_attribute) return xml_attribute(); + + xml_attribute a(impl::allocate_attribute(impl::get_allocator(_root))); + if (!a) return xml_attribute(); + + a.set_name(name_); + + if (attr._attr->prev_attribute_c->next_attribute) + attr._attr->prev_attribute_c->next_attribute = a._attr; + else + _root->first_attribute = a._attr; + + a._attr->prev_attribute_c = attr._attr->prev_attribute_c; + a._attr->next_attribute = attr._attr; + attr._attr->prev_attribute_c = a._attr; + + return a; + } + + PUGI__FN xml_attribute xml_node::insert_attribute_after(const char_t* name_, const xml_attribute& attr) + { + if ((type() != node_element && type() != node_declaration) || attr.empty()) return xml_attribute(); + + // check that attribute belongs to *this + xml_attribute_struct* cur = attr._attr; + + while (cur->prev_attribute_c->next_attribute) cur = cur->prev_attribute_c; + + if (cur != _root->first_attribute) return xml_attribute(); + + xml_attribute a(impl::allocate_attribute(impl::get_allocator(_root))); + if (!a) return xml_attribute(); + + a.set_name(name_); + + if (attr._attr->next_attribute) + attr._attr->next_attribute->prev_attribute_c = a._attr; + else + _root->first_attribute->prev_attribute_c = a._attr; + + a._attr->next_attribute = attr._attr->next_attribute; + a._attr->prev_attribute_c = attr._attr; + attr._attr->next_attribute = a._attr; + + return a; + } + + PUGI__FN xml_attribute xml_node::append_copy(const xml_attribute& proto) + { + if (!proto) return xml_attribute(); + + xml_attribute result = append_attribute(proto.name()); + result.set_value(proto.value()); + + return result; + } + + PUGI__FN xml_attribute xml_node::prepend_copy(const xml_attribute& proto) + { + if (!proto) return xml_attribute(); + + xml_attribute result = prepend_attribute(proto.name()); + result.set_value(proto.value()); + + return result; + } + + PUGI__FN xml_attribute xml_node::insert_copy_after(const xml_attribute& proto, const xml_attribute& attr) + { + if (!proto) return xml_attribute(); + + xml_attribute result = insert_attribute_after(proto.name(), attr); + result.set_value(proto.value()); + + return result; + } + + PUGI__FN xml_attribute xml_node::insert_copy_before(const xml_attribute& proto, const xml_attribute& attr) + { + if (!proto) return xml_attribute(); + + xml_attribute result = insert_attribute_before(proto.name(), attr); + result.set_value(proto.value()); + + return result; + } + + PUGI__FN xml_node xml_node::append_child(xml_node_type type_) + { + if (!impl::allow_insert_child(this->type(), type_)) return xml_node(); + + xml_node n(impl::append_node(_root, impl::get_allocator(_root), type_)); + + if (type_ == node_declaration) n.set_name(PUGIXML_TEXT("xml")); + + return n; + } + + PUGI__FN xml_node xml_node::prepend_child(xml_node_type type_) + { + if (!impl::allow_insert_child(this->type(), type_)) return xml_node(); + + xml_node n(impl::allocate_node(impl::get_allocator(_root), type_)); + if (!n) return xml_node(); + + n._root->parent = _root; + + xml_node_struct* head = _root->first_child; + + if (head) + { + n._root->prev_sibling_c = head->prev_sibling_c; + head->prev_sibling_c = n._root; + } + else + n._root->prev_sibling_c = n._root; + + n._root->next_sibling = head; + _root->first_child = n._root; + + if (type_ == node_declaration) n.set_name(PUGIXML_TEXT("xml")); + + return n; + } + + PUGI__FN xml_node xml_node::insert_child_before(xml_node_type type_, const xml_node& node) + { + if (!impl::allow_insert_child(this->type(), type_)) return xml_node(); + if (!node._root || node._root->parent != _root) return xml_node(); + + xml_node n(impl::allocate_node(impl::get_allocator(_root), type_)); + if (!n) return xml_node(); + + n._root->parent = _root; + + if (node._root->prev_sibling_c->next_sibling) + node._root->prev_sibling_c->next_sibling = n._root; + else + _root->first_child = n._root; + + n._root->prev_sibling_c = node._root->prev_sibling_c; + n._root->next_sibling = node._root; + node._root->prev_sibling_c = n._root; + + if (type_ == node_declaration) n.set_name(PUGIXML_TEXT("xml")); + + return n; + } + + PUGI__FN xml_node xml_node::insert_child_after(xml_node_type type_, const xml_node& node) + { + if (!impl::allow_insert_child(this->type(), type_)) return xml_node(); + if (!node._root || node._root->parent != _root) return xml_node(); + + xml_node n(impl::allocate_node(impl::get_allocator(_root), type_)); + if (!n) return xml_node(); + + n._root->parent = _root; + + if (node._root->next_sibling) + node._root->next_sibling->prev_sibling_c = n._root; + else + _root->first_child->prev_sibling_c = n._root; + + n._root->next_sibling = node._root->next_sibling; + n._root->prev_sibling_c = node._root; + node._root->next_sibling = n._root; + + if (type_ == node_declaration) n.set_name(PUGIXML_TEXT("xml")); + + return n; + } + + PUGI__FN xml_node xml_node::append_child(const char_t* name_) + { + xml_node result = append_child(node_element); + + result.set_name(name_); + + return result; + } + + PUGI__FN xml_node xml_node::prepend_child(const char_t* name_) + { + xml_node result = prepend_child(node_element); + + result.set_name(name_); + + return result; + } + + PUGI__FN xml_node xml_node::insert_child_after(const char_t* name_, const xml_node& node) + { + xml_node result = insert_child_after(node_element, node); + + result.set_name(name_); + + return result; + } + + PUGI__FN xml_node xml_node::insert_child_before(const char_t* name_, const xml_node& node) + { + xml_node result = insert_child_before(node_element, node); + + result.set_name(name_); + + return result; + } + + PUGI__FN xml_node xml_node::append_copy(const xml_node& proto) + { + xml_node result = append_child(proto.type()); + + if (result) impl::recursive_copy_skip(result, proto, result); + + return result; + } + + PUGI__FN xml_node xml_node::prepend_copy(const xml_node& proto) + { + xml_node result = prepend_child(proto.type()); + + if (result) impl::recursive_copy_skip(result, proto, result); + + return result; + } + + PUGI__FN xml_node xml_node::insert_copy_after(const xml_node& proto, const xml_node& node) + { + xml_node result = insert_child_after(proto.type(), node); + + if (result) impl::recursive_copy_skip(result, proto, result); + + return result; + } + + PUGI__FN xml_node xml_node::insert_copy_before(const xml_node& proto, const xml_node& node) + { + xml_node result = insert_child_before(proto.type(), node); + + if (result) impl::recursive_copy_skip(result, proto, result); + + return result; + } + + PUGI__FN bool xml_node::remove_attribute(const char_t* name_) + { + return remove_attribute(attribute(name_)); + } + + PUGI__FN bool xml_node::remove_attribute(const xml_attribute& a) + { + if (!_root || !a._attr) return false; + + // check that attribute belongs to *this + xml_attribute_struct* attr = a._attr; + + while (attr->prev_attribute_c->next_attribute) attr = attr->prev_attribute_c; + + if (attr != _root->first_attribute) return false; + + if (a._attr->next_attribute) a._attr->next_attribute->prev_attribute_c = a._attr->prev_attribute_c; + else if (_root->first_attribute) _root->first_attribute->prev_attribute_c = a._attr->prev_attribute_c; + + if (a._attr->prev_attribute_c->next_attribute) a._attr->prev_attribute_c->next_attribute = a._attr->next_attribute; + else _root->first_attribute = a._attr->next_attribute; + + impl::destroy_attribute(a._attr, impl::get_allocator(_root)); + + return true; + } + + PUGI__FN bool xml_node::remove_child(const char_t* name_) + { + return remove_child(child(name_)); + } + + PUGI__FN bool xml_node::remove_child(const xml_node& n) + { + if (!_root || !n._root || n._root->parent != _root) return false; + + if (n._root->next_sibling) n._root->next_sibling->prev_sibling_c = n._root->prev_sibling_c; + else if (_root->first_child) _root->first_child->prev_sibling_c = n._root->prev_sibling_c; + + if (n._root->prev_sibling_c->next_sibling) n._root->prev_sibling_c->next_sibling = n._root->next_sibling; + else _root->first_child = n._root->next_sibling; + + impl::destroy_node(n._root, impl::get_allocator(_root)); + + return true; + } + + PUGI__FN xml_parse_result xml_node::append_buffer(const void* contents, size_t size, unsigned int options, xml_encoding encoding) + { + // append_buffer is only valid for elements/documents + if (!impl::allow_insert_child(type(), node_element)) return impl::make_parse_result(status_append_invalid_root); + + // get document node + impl::xml_document_struct* doc = static_cast(root()._root); + assert(doc); + + // get extra buffer element (we'll store the document fragment buffer there so that we can deallocate it later) + impl::xml_memory_page* page = 0; + impl::xml_extra_buffer* extra = static_cast(doc->allocate_memory(sizeof(impl::xml_extra_buffer), page)); + (void)page; + + if (!extra) return impl::make_parse_result(status_out_of_memory); + + // save name; name of the root has to be NULL before parsing - otherwise closing node mismatches will not be detected at the top level + char_t* rootname = _root->name; + _root->name = 0; + + // parse + char_t* buffer = 0; + xml_parse_result res = impl::load_buffer_impl(doc, _root, const_cast(contents), size, options, encoding, false, false, &buffer); + + // restore name + _root->name = rootname; + + // add extra buffer to the list + extra->buffer = buffer; + extra->next = doc->extra_buffers; + doc->extra_buffers = extra; + + return res; + } + + PUGI__FN xml_node xml_node::find_child_by_attribute(const char_t* name_, const char_t* attr_name, const char_t* attr_value) const + { + if (!_root) return xml_node(); + + for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling) + if (i->name && impl::strequal(name_, i->name)) + { + for (xml_attribute_struct* a = i->first_attribute; a; a = a->next_attribute) + if (a->name && impl::strequal(attr_name, a->name) && impl::strequal(attr_value, a->value ? a->value : PUGIXML_TEXT(""))) + return xml_node(i); + } + + return xml_node(); + } + + PUGI__FN xml_node xml_node::find_child_by_attribute(const char_t* attr_name, const char_t* attr_value) const + { + if (!_root) return xml_node(); + + for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling) + for (xml_attribute_struct* a = i->first_attribute; a; a = a->next_attribute) + if (a->name && impl::strequal(attr_name, a->name) && impl::strequal(attr_value, a->value ? a->value : PUGIXML_TEXT(""))) + return xml_node(i); + + return xml_node(); + } + +#ifndef PUGIXML_NO_STL + PUGI__FN string_t xml_node::path(char_t delimiter) const + { + xml_node cursor = *this; // Make a copy. + + string_t result = cursor.name(); + + while (cursor.parent()) + { + cursor = cursor.parent(); + + string_t temp = cursor.name(); + temp += delimiter; + temp += result; + result.swap(temp); + } + + return result; + } +#endif + + PUGI__FN xml_node xml_node::first_element_by_path(const char_t* path_, char_t delimiter) const + { + xml_node found = *this; // Current search context. + + if (!_root || !path_ || !path_[0]) return found; + + if (path_[0] == delimiter) + { + // Absolute path; e.g. '/foo/bar' + found = found.root(); + ++path_; + } + + const char_t* path_segment = path_; + + while (*path_segment == delimiter) ++path_segment; + + const char_t* path_segment_end = path_segment; + + while (*path_segment_end && *path_segment_end != delimiter) ++path_segment_end; + + if (path_segment == path_segment_end) return found; + + const char_t* next_segment = path_segment_end; + + while (*next_segment == delimiter) ++next_segment; + + if (*path_segment == '.' && path_segment + 1 == path_segment_end) + return found.first_element_by_path(next_segment, delimiter); + else if (*path_segment == '.' && *(path_segment+1) == '.' && path_segment + 2 == path_segment_end) + return found.parent().first_element_by_path(next_segment, delimiter); + else + { + for (xml_node_struct* j = found._root->first_child; j; j = j->next_sibling) + { + if (j->name && impl::strequalrange(j->name, path_segment, static_cast(path_segment_end - path_segment))) + { + xml_node subsearch = xml_node(j).first_element_by_path(next_segment, delimiter); + + if (subsearch) return subsearch; + } + } + + return xml_node(); + } + } + + PUGI__FN bool xml_node::traverse(xml_tree_walker& walker) + { + walker._depth = -1; + + xml_node arg_begin = *this; + if (!walker.begin(arg_begin)) return false; + + xml_node cur = first_child(); + + if (cur) + { + ++walker._depth; + + do + { + xml_node arg_for_each = cur; + if (!walker.for_each(arg_for_each)) + return false; + + if (cur.first_child()) + { + ++walker._depth; + cur = cur.first_child(); + } + else if (cur.next_sibling()) + cur = cur.next_sibling(); + else + { + // Borland C++ workaround + while (!cur.next_sibling() && cur != *this && !cur.parent().empty()) + { + --walker._depth; + cur = cur.parent(); + } + + if (cur != *this) + cur = cur.next_sibling(); + } + } + while (cur && cur != *this); + } + + assert(walker._depth == -1); + + xml_node arg_end = *this; + return walker.end(arg_end); + } + + PUGI__FN size_t xml_node::hash_value() const + { + return static_cast(reinterpret_cast(_root) / sizeof(xml_node_struct)); + } + + PUGI__FN xml_node_struct* xml_node::internal_object() const + { + return _root; + } + + PUGI__FN void xml_node::print(xml_writer& writer, const char_t* indent, unsigned int flags, xml_encoding encoding, unsigned int depth) const + { + if (!_root) return; + + impl::xml_buffered_writer buffered_writer(writer, encoding); + + impl::node_output(buffered_writer, *this, indent, flags, depth); + } + +#ifndef PUGIXML_NO_STL + PUGI__FN void xml_node::print(std::basic_ostream >& stream, const char_t* indent, unsigned int flags, xml_encoding encoding, unsigned int depth) const + { + xml_writer_stream writer(stream); + + print(writer, indent, flags, encoding, depth); + } + + PUGI__FN void xml_node::print(std::basic_ostream >& stream, const char_t* indent, unsigned int flags, unsigned int depth) const + { + xml_writer_stream writer(stream); + + print(writer, indent, flags, encoding_wchar, depth); + } +#endif + + PUGI__FN ptrdiff_t xml_node::offset_debug() const + { + xml_node_struct* r = root()._root; + + if (!r) return -1; + + const char_t* buffer = static_cast(r)->buffer; + + if (!buffer) return -1; + + switch (type()) + { + case node_document: + return 0; + + case node_element: + case node_declaration: + case node_pi: + return (_root->header & impl::xml_memory_page_name_allocated_mask) ? -1 : _root->name - buffer; + + case node_pcdata: + case node_cdata: + case node_comment: + case node_doctype: + return (_root->header & impl::xml_memory_page_value_allocated_mask) ? -1 : _root->value - buffer; + + default: + return -1; + } + } + +#ifdef __BORLANDC__ + PUGI__FN bool operator&&(const xml_node& lhs, bool rhs) + { + return (bool)lhs && rhs; + } + + PUGI__FN bool operator||(const xml_node& lhs, bool rhs) + { + return (bool)lhs || rhs; + } +#endif + + PUGI__FN xml_text::xml_text(xml_node_struct* root): _root(root) + { + } + + PUGI__FN xml_node_struct* xml_text::_data() const + { + if (!_root || impl::is_text_node(_root)) return _root; + + for (xml_node_struct* node = _root->first_child; node; node = node->next_sibling) + if (impl::is_text_node(node)) + return node; + + return 0; + } + + PUGI__FN xml_node_struct* xml_text::_data_new() + { + xml_node_struct* d = _data(); + if (d) return d; + + return xml_node(_root).append_child(node_pcdata).internal_object(); + } + + PUGI__FN xml_text::xml_text(): _root(0) + { + } + + PUGI__FN static void unspecified_bool_xml_text(xml_text***) + { + } + + PUGI__FN xml_text::operator xml_text::unspecified_bool_type() const + { + return _data() ? unspecified_bool_xml_text : 0; + } + + PUGI__FN bool xml_text::operator!() const + { + return !_data(); + } + + PUGI__FN bool xml_text::empty() const + { + return _data() == 0; + } + + PUGI__FN const char_t* xml_text::get() const + { + xml_node_struct* d = _data(); + + return (d && d->value) ? d->value : PUGIXML_TEXT(""); + } + + PUGI__FN const char_t* xml_text::as_string(const char_t* def) const + { + xml_node_struct* d = _data(); + + return (d && d->value) ? d->value : def; + } + + PUGI__FN int xml_text::as_int(int def) const + { + xml_node_struct* d = _data(); + + return impl::get_value_int(d ? d->value : 0, def); + } + + PUGI__FN unsigned int xml_text::as_uint(unsigned int def) const + { + xml_node_struct* d = _data(); + + return impl::get_value_uint(d ? d->value : 0, def); + } + + PUGI__FN double xml_text::as_double(double def) const + { + xml_node_struct* d = _data(); + + return impl::get_value_double(d ? d->value : 0, def); + } + + PUGI__FN float xml_text::as_float(float def) const + { + xml_node_struct* d = _data(); + + return impl::get_value_float(d ? d->value : 0, def); + } + + PUGI__FN bool xml_text::as_bool(bool def) const + { + xml_node_struct* d = _data(); + + return impl::get_value_bool(d ? d->value : 0, def); + } + +#ifdef PUGIXML_HAS_LONG_LONG + PUGI__FN long long xml_text::as_llong(long long def) const + { + xml_node_struct* d = _data(); + + return impl::get_value_llong(d ? d->value : 0, def); + } + + PUGI__FN unsigned long long xml_text::as_ullong(unsigned long long def) const + { + xml_node_struct* d = _data(); + + return impl::get_value_ullong(d ? d->value : 0, def); + } +#endif + + PUGI__FN bool xml_text::set(const char_t* rhs) + { + xml_node_struct* dn = _data_new(); + + return dn ? impl::strcpy_insitu(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; + } + + PUGI__FN bool xml_text::set(int rhs) + { + xml_node_struct* dn = _data_new(); + + return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; + } + + PUGI__FN bool xml_text::set(unsigned int rhs) + { + xml_node_struct* dn = _data_new(); + + return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; + } + + PUGI__FN bool xml_text::set(double rhs) + { + xml_node_struct* dn = _data_new(); + + return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; + } + + PUGI__FN bool xml_text::set(bool rhs) + { + xml_node_struct* dn = _data_new(); + + return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; + } + +#ifdef PUGIXML_HAS_LONG_LONG + PUGI__FN bool xml_text::set(long long rhs) + { + xml_node_struct* dn = _data_new(); + + return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; + } + + PUGI__FN bool xml_text::set(unsigned long long rhs) + { + xml_node_struct* dn = _data_new(); + + return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; + } +#endif + + PUGI__FN xml_text& xml_text::operator=(const char_t* rhs) + { + set(rhs); + return *this; + } + + PUGI__FN xml_text& xml_text::operator=(int rhs) + { + set(rhs); + return *this; + } + + PUGI__FN xml_text& xml_text::operator=(unsigned int rhs) + { + set(rhs); + return *this; + } + + PUGI__FN xml_text& xml_text::operator=(double rhs) + { + set(rhs); + return *this; + } + + PUGI__FN xml_text& xml_text::operator=(bool rhs) + { + set(rhs); + return *this; + } + +#ifdef PUGIXML_HAS_LONG_LONG + PUGI__FN xml_text& xml_text::operator=(long long rhs) + { + set(rhs); + return *this; + } + + PUGI__FN xml_text& xml_text::operator=(unsigned long long rhs) + { + set(rhs); + return *this; + } +#endif + + PUGI__FN xml_node xml_text::data() const + { + return xml_node(_data()); + } + +#ifdef __BORLANDC__ + PUGI__FN bool operator&&(const xml_text& lhs, bool rhs) + { + return (bool)lhs && rhs; + } + + PUGI__FN bool operator||(const xml_text& lhs, bool rhs) + { + return (bool)lhs || rhs; + } +#endif + + PUGI__FN xml_node_iterator::xml_node_iterator() + { + } + + PUGI__FN xml_node_iterator::xml_node_iterator(const xml_node& node): _wrap(node), _parent(node.parent()) + { + } + + PUGI__FN xml_node_iterator::xml_node_iterator(xml_node_struct* ref, xml_node_struct* parent): _wrap(ref), _parent(parent) + { + } + + PUGI__FN bool xml_node_iterator::operator==(const xml_node_iterator& rhs) const + { + return _wrap._root == rhs._wrap._root && _parent._root == rhs._parent._root; + } + + PUGI__FN bool xml_node_iterator::operator!=(const xml_node_iterator& rhs) const + { + return _wrap._root != rhs._wrap._root || _parent._root != rhs._parent._root; + } + + PUGI__FN xml_node& xml_node_iterator::operator*() const + { + assert(_wrap._root); + return _wrap; + } + + PUGI__FN xml_node* xml_node_iterator::operator->() const + { + assert(_wrap._root); + return const_cast(&_wrap); // BCC32 workaround + } + + PUGI__FN const xml_node_iterator& xml_node_iterator::operator++() + { + assert(_wrap._root); + _wrap._root = _wrap._root->next_sibling; + return *this; + } + + PUGI__FN xml_node_iterator xml_node_iterator::operator++(int) + { + xml_node_iterator temp = *this; + ++*this; + return temp; + } + + PUGI__FN const xml_node_iterator& xml_node_iterator::operator--() + { + _wrap = _wrap._root ? _wrap.previous_sibling() : _parent.last_child(); + return *this; + } + + PUGI__FN xml_node_iterator xml_node_iterator::operator--(int) + { + xml_node_iterator temp = *this; + --*this; + return temp; + } + + PUGI__FN xml_attribute_iterator::xml_attribute_iterator() + { + } + + PUGI__FN xml_attribute_iterator::xml_attribute_iterator(const xml_attribute& attr, const xml_node& parent): _wrap(attr), _parent(parent) + { + } + + PUGI__FN xml_attribute_iterator::xml_attribute_iterator(xml_attribute_struct* ref, xml_node_struct* parent): _wrap(ref), _parent(parent) + { + } + + PUGI__FN bool xml_attribute_iterator::operator==(const xml_attribute_iterator& rhs) const + { + return _wrap._attr == rhs._wrap._attr && _parent._root == rhs._parent._root; + } + + PUGI__FN bool xml_attribute_iterator::operator!=(const xml_attribute_iterator& rhs) const + { + return _wrap._attr != rhs._wrap._attr || _parent._root != rhs._parent._root; + } + + PUGI__FN xml_attribute& xml_attribute_iterator::operator*() const + { + assert(_wrap._attr); + return _wrap; + } + + PUGI__FN xml_attribute* xml_attribute_iterator::operator->() const + { + assert(_wrap._attr); + return const_cast(&_wrap); // BCC32 workaround + } + + PUGI__FN const xml_attribute_iterator& xml_attribute_iterator::operator++() + { + assert(_wrap._attr); + _wrap._attr = _wrap._attr->next_attribute; + return *this; + } + + PUGI__FN xml_attribute_iterator xml_attribute_iterator::operator++(int) + { + xml_attribute_iterator temp = *this; + ++*this; + return temp; + } + + PUGI__FN const xml_attribute_iterator& xml_attribute_iterator::operator--() + { + _wrap = _wrap._attr ? _wrap.previous_attribute() : _parent.last_attribute(); + return *this; + } + + PUGI__FN xml_attribute_iterator xml_attribute_iterator::operator--(int) + { + xml_attribute_iterator temp = *this; + --*this; + return temp; + } + + PUGI__FN xml_named_node_iterator::xml_named_node_iterator(): _name(0) + { + } + + PUGI__FN xml_named_node_iterator::xml_named_node_iterator(const xml_node& node, const char_t* name): _wrap(node), _parent(node.parent()), _name(name) + { + } + + PUGI__FN xml_named_node_iterator::xml_named_node_iterator(xml_node_struct* ref, xml_node_struct* parent, const char_t* name): _wrap(ref), _parent(parent), _name(name) + { + } + + PUGI__FN bool xml_named_node_iterator::operator==(const xml_named_node_iterator& rhs) const + { + return _wrap._root == rhs._wrap._root && _parent._root == rhs._parent._root; + } + + PUGI__FN bool xml_named_node_iterator::operator!=(const xml_named_node_iterator& rhs) const + { + return _wrap._root != rhs._wrap._root || _parent._root != rhs._parent._root; + } + + PUGI__FN xml_node& xml_named_node_iterator::operator*() const + { + assert(_wrap._root); + return _wrap; + } + + PUGI__FN xml_node* xml_named_node_iterator::operator->() const + { + assert(_wrap._root); + return const_cast(&_wrap); // BCC32 workaround + } + + PUGI__FN const xml_named_node_iterator& xml_named_node_iterator::operator++() + { + assert(_wrap._root); + _wrap = _wrap.next_sibling(_name); + return *this; + } + + PUGI__FN xml_named_node_iterator xml_named_node_iterator::operator++(int) + { + xml_named_node_iterator temp = *this; + ++*this; + return temp; + } + + PUGI__FN const xml_named_node_iterator& xml_named_node_iterator::operator--() + { + if (_wrap._root) + _wrap = _wrap.previous_sibling(_name); + else + { + _wrap = _parent.last_child(); + + if (!impl::strequal(_wrap.name(), _name)) + _wrap = _wrap.previous_sibling(_name); + } + + return *this; + } + + PUGI__FN xml_named_node_iterator xml_named_node_iterator::operator--(int) + { + xml_named_node_iterator temp = *this; + --*this; + return temp; + } + + PUGI__FN xml_parse_result::xml_parse_result(): status(status_internal_error), offset(0), encoding(encoding_auto) + { + } + + PUGI__FN xml_parse_result::operator bool() const + { + return status == status_ok; + } + + PUGI__FN const char* xml_parse_result::description() const + { + switch (status) + { + case status_ok: return "No error"; + + case status_file_not_found: return "File was not found"; + case status_io_error: return "Error reading from file/stream"; + case status_out_of_memory: return "Could not allocate memory"; + case status_internal_error: return "Internal error occurred"; + + case status_unrecognized_tag: return "Could not determine tag type"; + + case status_bad_pi: return "Error parsing document declaration/processing instruction"; + case status_bad_comment: return "Error parsing comment"; + case status_bad_cdata: return "Error parsing CDATA section"; + case status_bad_doctype: return "Error parsing document type declaration"; + case status_bad_pcdata: return "Error parsing PCDATA section"; + case status_bad_start_element: return "Error parsing start element tag"; + case status_bad_attribute: return "Error parsing element attribute"; + case status_bad_end_element: return "Error parsing end element tag"; + case status_end_element_mismatch: return "Start-end tags mismatch"; + + case status_append_invalid_root: return "Unable to append nodes: root is not an element or document"; + + case status_no_document_element: return "No document element found"; + + default: return "Unknown error"; + } + } + + PUGI__FN xml_document::xml_document(): _buffer(0) + { + create(); + } + + PUGI__FN xml_document::~xml_document() + { + destroy(); + } + + PUGI__FN void xml_document::reset() + { + destroy(); + create(); + } + + PUGI__FN void xml_document::reset(const xml_document& proto) + { + reset(); + + for (xml_node cur = proto.first_child(); cur; cur = cur.next_sibling()) + append_copy(cur); + } + + PUGI__FN void xml_document::create() + { + assert(!_root); + + // initialize sentinel page + PUGI__STATIC_ASSERT(sizeof(impl::xml_memory_page) + sizeof(impl::xml_document_struct) + impl::xml_memory_page_alignment <= sizeof(_memory)); + + // align upwards to page boundary + void* page_memory = reinterpret_cast((reinterpret_cast(_memory) + (impl::xml_memory_page_alignment - 1)) & ~(impl::xml_memory_page_alignment - 1)); + + // prepare page structure + impl::xml_memory_page* page = impl::xml_memory_page::construct(page_memory); + assert(page); + + page->busy_size = impl::xml_memory_page_size; + + // allocate new root + _root = new (page->data) impl::xml_document_struct(page); + _root->prev_sibling_c = _root; + + // setup sentinel page + page->allocator = static_cast(_root); + } + + PUGI__FN void xml_document::destroy() + { + assert(_root); + + // destroy static storage + if (_buffer) + { + impl::xml_memory::deallocate(_buffer); + _buffer = 0; + } + + // destroy extra buffers (note: no need to destroy linked list nodes, they're allocated using document allocator) + for (impl::xml_extra_buffer* extra = static_cast(_root)->extra_buffers; extra; extra = extra->next) + { + if (extra->buffer) impl::xml_memory::deallocate(extra->buffer); + } + + // destroy dynamic storage, leave sentinel page (it's in static memory) + impl::xml_memory_page* root_page = reinterpret_cast(_root->header & impl::xml_memory_page_pointer_mask); + assert(root_page && !root_page->prev && !root_page->memory); + + for (impl::xml_memory_page* page = root_page->next; page; ) + { + impl::xml_memory_page* next = page->next; + + impl::xml_allocator::deallocate_page(page); + + page = next; + } + + _root = 0; + } + +#ifndef PUGIXML_NO_STL + PUGI__FN xml_parse_result xml_document::load(std::basic_istream >& stream, unsigned int options, xml_encoding encoding) + { + reset(); + + return impl::load_stream_impl(*this, stream, options, encoding); + } + + PUGI__FN xml_parse_result xml_document::load(std::basic_istream >& stream, unsigned int options) + { + reset(); + + return impl::load_stream_impl(*this, stream, options, encoding_wchar); + } +#endif + + PUGI__FN xml_parse_result xml_document::load(const char_t* contents, unsigned int options) + { + // Force native encoding (skip autodetection) + #ifdef PUGIXML_WCHAR_MODE + xml_encoding encoding = encoding_wchar; + #else + xml_encoding encoding = encoding_utf8; + #endif + + return load_buffer(contents, impl::strlength(contents) * sizeof(char_t), options, encoding); + } + + PUGI__FN xml_parse_result xml_document::load_file(const char* path_, unsigned int options, xml_encoding encoding) + { + reset(); + + FILE* file = fopen(path_, "rb"); + + return impl::load_file_impl(*this, file, options, encoding); + } + + PUGI__FN xml_parse_result xml_document::load_file(const wchar_t* path_, unsigned int options, xml_encoding encoding) + { + reset(); + + FILE* file = impl::open_file_wide(path_, L"rb"); + + return impl::load_file_impl(*this, file, options, encoding); + } + + PUGI__FN xml_parse_result xml_document::load_buffer(const void* contents, size_t size, unsigned int options, xml_encoding encoding) + { + reset(); + + return impl::load_buffer_impl(static_cast(_root), _root, const_cast(contents), size, options, encoding, false, false, &_buffer); + } + + PUGI__FN xml_parse_result xml_document::load_buffer_inplace(void* contents, size_t size, unsigned int options, xml_encoding encoding) + { + reset(); + + return impl::load_buffer_impl(static_cast(_root), _root, contents, size, options, encoding, true, false, &_buffer); + } + + PUGI__FN xml_parse_result xml_document::load_buffer_inplace_own(void* contents, size_t size, unsigned int options, xml_encoding encoding) + { + reset(); + + return impl::load_buffer_impl(static_cast(_root), _root, contents, size, options, encoding, true, true, &_buffer); + } + + PUGI__FN void xml_document::save(xml_writer& writer, const char_t* indent, unsigned int flags, xml_encoding encoding) const + { + impl::xml_buffered_writer buffered_writer(writer, encoding); + + if ((flags & format_write_bom) && encoding != encoding_latin1) + { + // BOM always represents the codepoint U+FEFF, so just write it in native encoding + #ifdef PUGIXML_WCHAR_MODE + unsigned int bom = 0xfeff; + buffered_writer.write(static_cast(bom)); + #else + buffered_writer.write('\xef', '\xbb', '\xbf'); + #endif + } + + if (!(flags & format_no_declaration) && !impl::has_declaration(*this)) + { + buffered_writer.write(PUGIXML_TEXT("'); + if (!(flags & format_raw)) buffered_writer.write('\n'); + } + + impl::node_output(buffered_writer, *this, indent, flags, 0); + } + +#ifndef PUGIXML_NO_STL + PUGI__FN void xml_document::save(std::basic_ostream >& stream, const char_t* indent, unsigned int flags, xml_encoding encoding) const + { + xml_writer_stream writer(stream); + + save(writer, indent, flags, encoding); + } + + PUGI__FN void xml_document::save(std::basic_ostream >& stream, const char_t* indent, unsigned int flags) const + { + xml_writer_stream writer(stream); + + save(writer, indent, flags, encoding_wchar); + } +#endif + + PUGI__FN bool xml_document::save_file(const char* path_, const char_t* indent, unsigned int flags, xml_encoding encoding) const + { + FILE* file = fopen(path_, (flags & format_save_file_text) ? "w" : "wb"); + return impl::save_file_impl(*this, file, indent, flags, encoding); + } + + PUGI__FN bool xml_document::save_file(const wchar_t* path_, const char_t* indent, unsigned int flags, xml_encoding encoding) const + { + FILE* file = impl::open_file_wide(path_, (flags & format_save_file_text) ? L"w" : L"wb"); + return impl::save_file_impl(*this, file, indent, flags, encoding); + } + + PUGI__FN xml_node xml_document::document_element() const + { + assert(_root); + + for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling) + if ((i->header & impl::xml_memory_page_type_mask) + 1 == node_element) + return xml_node(i); + + return xml_node(); + } + +#ifndef PUGIXML_NO_STL + PUGI__FN std::string PUGIXML_FUNCTION as_utf8(const wchar_t* str) + { + assert(str); + + return impl::as_utf8_impl(str, impl::strlength_wide(str)); + } + + PUGI__FN std::string PUGIXML_FUNCTION as_utf8(const std::basic_string& str) + { + return impl::as_utf8_impl(str.c_str(), str.size()); + } + + PUGI__FN std::basic_string PUGIXML_FUNCTION as_wide(const char* str) + { + assert(str); + + return impl::as_wide_impl(str, strlen(str)); + } + + PUGI__FN std::basic_string PUGIXML_FUNCTION as_wide(const std::string& str) + { + return impl::as_wide_impl(str.c_str(), str.size()); + } +#endif + + PUGI__FN void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate) + { + impl::xml_memory::allocate = allocate; + impl::xml_memory::deallocate = deallocate; + } + + PUGI__FN allocation_function PUGIXML_FUNCTION get_memory_allocation_function() + { + return impl::xml_memory::allocate; + } + + PUGI__FN deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function() + { + return impl::xml_memory::deallocate; + } +} + +#if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC)) +namespace std +{ + // Workarounds for (non-standard) iterator category detection for older versions (MSVC7/IC8 and earlier) + PUGI__FN std::bidirectional_iterator_tag _Iter_cat(const pugi::xml_node_iterator&) + { + return std::bidirectional_iterator_tag(); + } + + PUGI__FN std::bidirectional_iterator_tag _Iter_cat(const pugi::xml_attribute_iterator&) + { + return std::bidirectional_iterator_tag(); + } + + PUGI__FN std::bidirectional_iterator_tag _Iter_cat(const pugi::xml_named_node_iterator&) + { + return std::bidirectional_iterator_tag(); + } +} +#endif + +#if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC) +namespace std +{ + // Workarounds for (non-standard) iterator category detection + PUGI__FN std::bidirectional_iterator_tag __iterator_category(const pugi::xml_node_iterator&) + { + return std::bidirectional_iterator_tag(); + } + + PUGI__FN std::bidirectional_iterator_tag __iterator_category(const pugi::xml_attribute_iterator&) + { + return std::bidirectional_iterator_tag(); + } + + PUGI__FN std::bidirectional_iterator_tag __iterator_category(const pugi::xml_named_node_iterator&) + { + return std::bidirectional_iterator_tag(); + } +} +#endif + +#ifndef PUGIXML_NO_XPATH + +// STL replacements +PUGI__NS_BEGIN + struct equal_to + { + template bool operator()(const T& lhs, const T& rhs) const + { + return lhs == rhs; + } + }; + + struct not_equal_to + { + template bool operator()(const T& lhs, const T& rhs) const + { + return lhs != rhs; + } + }; + + struct less + { + template bool operator()(const T& lhs, const T& rhs) const + { + return lhs < rhs; + } + }; + + struct less_equal + { + template bool operator()(const T& lhs, const T& rhs) const + { + return lhs <= rhs; + } + }; + + template void swap(T& lhs, T& rhs) + { + T temp = lhs; + lhs = rhs; + rhs = temp; + } + + template I min_element(I begin, I end, const Pred& pred) + { + I result = begin; + + for (I it = begin + 1; it != end; ++it) + if (pred(*it, *result)) + result = it; + + return result; + } + + template void reverse(I begin, I end) + { + while (end - begin > 1) swap(*begin++, *--end); + } + + template I unique(I begin, I end) + { + // fast skip head + while (end - begin > 1 && *begin != *(begin + 1)) begin++; + + if (begin == end) return begin; + + // last written element + I write = begin++; + + // merge unique elements + while (begin != end) + { + if (*begin != *write) + *++write = *begin++; + else + begin++; + } + + // past-the-end (write points to live element) + return write + 1; + } + + template void copy_backwards(I begin, I end, I target) + { + while (begin != end) *--target = *--end; + } + + template void insertion_sort(I begin, I end, const Pred& pred, T*) + { + assert(begin != end); + + for (I it = begin + 1; it != end; ++it) + { + T val = *it; + + if (pred(val, *begin)) + { + // move to front + copy_backwards(begin, it, it + 1); + *begin = val; + } + else + { + I hole = it; + + // move hole backwards + while (pred(val, *(hole - 1))) + { + *hole = *(hole - 1); + hole--; + } + + // fill hole with element + *hole = val; + } + } + } + + // std variant for elements with == + template void partition(I begin, I middle, I end, const Pred& pred, I* out_eqbeg, I* out_eqend) + { + I eqbeg = middle, eqend = middle + 1; + + // expand equal range + while (eqbeg != begin && *(eqbeg - 1) == *eqbeg) --eqbeg; + while (eqend != end && *eqend == *eqbeg) ++eqend; + + // process outer elements + I ltend = eqbeg, gtbeg = eqend; + + for (;;) + { + // find the element from the right side that belongs to the left one + for (; gtbeg != end; ++gtbeg) + if (!pred(*eqbeg, *gtbeg)) + { + if (*gtbeg == *eqbeg) swap(*gtbeg, *eqend++); + else break; + } + + // find the element from the left side that belongs to the right one + for (; ltend != begin; --ltend) + if (!pred(*(ltend - 1), *eqbeg)) + { + if (*eqbeg == *(ltend - 1)) swap(*(ltend - 1), *--eqbeg); + else break; + } + + // scanned all elements + if (gtbeg == end && ltend == begin) + { + *out_eqbeg = eqbeg; + *out_eqend = eqend; + return; + } + + // make room for elements by moving equal area + if (gtbeg == end) + { + if (--ltend != --eqbeg) swap(*ltend, *eqbeg); + swap(*eqbeg, *--eqend); + } + else if (ltend == begin) + { + if (eqend != gtbeg) swap(*eqbeg, *eqend); + ++eqend; + swap(*gtbeg++, *eqbeg++); + } + else swap(*gtbeg++, *--ltend); + } + } + + template void median3(I first, I middle, I last, const Pred& pred) + { + if (pred(*middle, *first)) swap(*middle, *first); + if (pred(*last, *middle)) swap(*last, *middle); + if (pred(*middle, *first)) swap(*middle, *first); + } + + template void median(I first, I middle, I last, const Pred& pred) + { + if (last - first <= 40) + { + // median of three for small chunks + median3(first, middle, last, pred); + } + else + { + // median of nine + size_t step = (last - first + 1) / 8; + + median3(first, first + step, first + 2 * step, pred); + median3(middle - step, middle, middle + step, pred); + median3(last - 2 * step, last - step, last, pred); + median3(first + step, middle, last - step, pred); + } + } + + template void sort(I begin, I end, const Pred& pred) + { + // sort large chunks + while (end - begin > 32) + { + // find median element + I middle = begin + (end - begin) / 2; + median(begin, middle, end - 1, pred); + + // partition in three chunks (< = >) + I eqbeg, eqend; + partition(begin, middle, end, pred, &eqbeg, &eqend); + + // loop on larger half + if (eqbeg - begin > end - eqend) + { + sort(eqend, end, pred); + end = eqbeg; + } + else + { + sort(begin, eqbeg, pred); + begin = eqend; + } + } + + // insertion sort small chunk + if (begin != end) insertion_sort(begin, end, pred, &*begin); + } +PUGI__NS_END + +// Allocator used for AST and evaluation stacks +PUGI__NS_BEGIN + struct xpath_memory_block + { + xpath_memory_block* next; + + char data[ + #ifdef PUGIXML_MEMORY_XPATH_PAGE_SIZE + PUGIXML_MEMORY_XPATH_PAGE_SIZE + #else + 4096 + #endif + ]; + }; + + class xpath_allocator + { + xpath_memory_block* _root; + size_t _root_size; + + public: + #ifdef PUGIXML_NO_EXCEPTIONS + jmp_buf* error_handler; + #endif + + xpath_allocator(xpath_memory_block* root, size_t root_size = 0): _root(root), _root_size(root_size) + { + #ifdef PUGIXML_NO_EXCEPTIONS + error_handler = 0; + #endif + } + + void* allocate_nothrow(size_t size) + { + const size_t block_capacity = sizeof(_root->data); + + // align size so that we're able to store pointers in subsequent blocks + size = (size + sizeof(void*) - 1) & ~(sizeof(void*) - 1); + + if (_root_size + size <= block_capacity) + { + void* buf = _root->data + _root_size; + _root_size += size; + return buf; + } + else + { + size_t block_data_size = (size > block_capacity) ? size : block_capacity; + size_t block_size = block_data_size + offsetof(xpath_memory_block, data); + + xpath_memory_block* block = static_cast(xml_memory::allocate(block_size)); + if (!block) return 0; + + block->next = _root; + + _root = block; + _root_size = size; + + return block->data; + } + } + + void* allocate(size_t size) + { + void* result = allocate_nothrow(size); + + if (!result) + { + #ifdef PUGIXML_NO_EXCEPTIONS + assert(error_handler); + longjmp(*error_handler, 1); + #else + throw std::bad_alloc(); + #endif + } + + return result; + } + + void* reallocate(void* ptr, size_t old_size, size_t new_size) + { + // align size so that we're able to store pointers in subsequent blocks + old_size = (old_size + sizeof(void*) - 1) & ~(sizeof(void*) - 1); + new_size = (new_size + sizeof(void*) - 1) & ~(sizeof(void*) - 1); + + // we can only reallocate the last object + assert(ptr == 0 || static_cast(ptr) + old_size == _root->data + _root_size); + + // adjust root size so that we have not allocated the object at all + bool only_object = (_root_size == old_size); + + if (ptr) _root_size -= old_size; + + // allocate a new version (this will obviously reuse the memory if possible) + void* result = allocate(new_size); + assert(result); + + // we have a new block + if (result != ptr && ptr) + { + // copy old data + assert(new_size >= old_size); + memcpy(result, ptr, old_size); + + // free the previous page if it had no other objects + if (only_object) + { + assert(_root->data == result); + assert(_root->next); + + xpath_memory_block* next = _root->next->next; + + if (next) + { + // deallocate the whole page, unless it was the first one + xml_memory::deallocate(_root->next); + _root->next = next; + } + } + } + + return result; + } + + void revert(const xpath_allocator& state) + { + // free all new pages + xpath_memory_block* cur = _root; + + while (cur != state._root) + { + xpath_memory_block* next = cur->next; + + xml_memory::deallocate(cur); + + cur = next; + } + + // restore state + _root = state._root; + _root_size = state._root_size; + } + + void release() + { + xpath_memory_block* cur = _root; + assert(cur); + + while (cur->next) + { + xpath_memory_block* next = cur->next; + + xml_memory::deallocate(cur); + + cur = next; + } + } + }; + + struct xpath_allocator_capture + { + xpath_allocator_capture(xpath_allocator* alloc): _target(alloc), _state(*alloc) + { + } + + ~xpath_allocator_capture() + { + _target->revert(_state); + } + + xpath_allocator* _target; + xpath_allocator _state; + }; + + struct xpath_stack + { + xpath_allocator* result; + xpath_allocator* temp; + }; + + struct xpath_stack_data + { + xpath_memory_block blocks[2]; + xpath_allocator result; + xpath_allocator temp; + xpath_stack stack; + + #ifdef PUGIXML_NO_EXCEPTIONS + jmp_buf error_handler; + #endif + + xpath_stack_data(): result(blocks + 0), temp(blocks + 1) + { + blocks[0].next = blocks[1].next = 0; + + stack.result = &result; + stack.temp = &temp; + + #ifdef PUGIXML_NO_EXCEPTIONS + result.error_handler = temp.error_handler = &error_handler; + #endif + } + + ~xpath_stack_data() + { + result.release(); + temp.release(); + } + }; +PUGI__NS_END + +// String class +PUGI__NS_BEGIN + class xpath_string + { + const char_t* _buffer; + bool _uses_heap; + + static char_t* duplicate_string(const char_t* string, size_t length, xpath_allocator* alloc) + { + char_t* result = static_cast(alloc->allocate((length + 1) * sizeof(char_t))); + assert(result); + + memcpy(result, string, length * sizeof(char_t)); + result[length] = 0; + + return result; + } + + static char_t* duplicate_string(const char_t* string, xpath_allocator* alloc) + { + return duplicate_string(string, strlength(string), alloc); + } + + public: + xpath_string(): _buffer(PUGIXML_TEXT("")), _uses_heap(false) + { + } + + explicit xpath_string(const char_t* str, xpath_allocator* alloc) + { + bool empty_ = (*str == 0); + + _buffer = empty_ ? PUGIXML_TEXT("") : duplicate_string(str, alloc); + _uses_heap = !empty_; + } + + explicit xpath_string(const char_t* str, bool use_heap): _buffer(str), _uses_heap(use_heap) + { + } + + xpath_string(const char_t* begin, const char_t* end, xpath_allocator* alloc) + { + assert(begin <= end); + + bool empty_ = (begin == end); + + _buffer = empty_ ? PUGIXML_TEXT("") : duplicate_string(begin, static_cast(end - begin), alloc); + _uses_heap = !empty_; + } + + void append(const xpath_string& o, xpath_allocator* alloc) + { + // skip empty sources + if (!*o._buffer) return; + + // fast append for constant empty target and constant source + if (!*_buffer && !_uses_heap && !o._uses_heap) + { + _buffer = o._buffer; + } + else + { + // need to make heap copy + size_t target_length = strlength(_buffer); + size_t source_length = strlength(o._buffer); + size_t result_length = target_length + source_length; + + // allocate new buffer + char_t* result = static_cast(alloc->reallocate(_uses_heap ? const_cast(_buffer) : 0, (target_length + 1) * sizeof(char_t), (result_length + 1) * sizeof(char_t))); + assert(result); + + // append first string to the new buffer in case there was no reallocation + if (!_uses_heap) memcpy(result, _buffer, target_length * sizeof(char_t)); + + // append second string to the new buffer + memcpy(result + target_length, o._buffer, source_length * sizeof(char_t)); + result[result_length] = 0; + + // finalize + _buffer = result; + _uses_heap = true; + } + } + + const char_t* c_str() const + { + return _buffer; + } + + size_t length() const + { + return strlength(_buffer); + } + + char_t* data(xpath_allocator* alloc) + { + // make private heap copy + if (!_uses_heap) + { + _buffer = duplicate_string(_buffer, alloc); + _uses_heap = true; + } + + return const_cast(_buffer); + } + + bool empty() const + { + return *_buffer == 0; + } + + bool operator==(const xpath_string& o) const + { + return strequal(_buffer, o._buffer); + } + + bool operator!=(const xpath_string& o) const + { + return !strequal(_buffer, o._buffer); + } + + bool uses_heap() const + { + return _uses_heap; + } + }; + + PUGI__FN xpath_string xpath_string_const(const char_t* str) + { + return xpath_string(str, false); + } +PUGI__NS_END + +PUGI__NS_BEGIN + PUGI__FN bool starts_with(const char_t* string, const char_t* pattern) + { + while (*pattern && *string == *pattern) + { + string++; + pattern++; + } + + return *pattern == 0; + } + + PUGI__FN const char_t* find_char(const char_t* s, char_t c) + { + #ifdef PUGIXML_WCHAR_MODE + return wcschr(s, c); + #else + return strchr(s, c); + #endif + } + + PUGI__FN const char_t* find_substring(const char_t* s, const char_t* p) + { + #ifdef PUGIXML_WCHAR_MODE + // MSVC6 wcsstr bug workaround (if s is empty it always returns 0) + return (*p == 0) ? s : wcsstr(s, p); + #else + return strstr(s, p); + #endif + } + + // Converts symbol to lower case, if it is an ASCII one + PUGI__FN char_t tolower_ascii(char_t ch) + { + return static_cast(ch - 'A') < 26 ? static_cast(ch | ' ') : ch; + } + + PUGI__FN xpath_string string_value(const xpath_node& na, xpath_allocator* alloc) + { + if (na.attribute()) + return xpath_string_const(na.attribute().value()); + else + { + const xml_node& n = na.node(); + + switch (n.type()) + { + case node_pcdata: + case node_cdata: + case node_comment: + case node_pi: + return xpath_string_const(n.value()); + + case node_document: + case node_element: + { + xpath_string result; + + xml_node cur = n.first_child(); + + while (cur && cur != n) + { + if (cur.type() == node_pcdata || cur.type() == node_cdata) + result.append(xpath_string_const(cur.value()), alloc); + + if (cur.first_child()) + cur = cur.first_child(); + else if (cur.next_sibling()) + cur = cur.next_sibling(); + else + { + while (!cur.next_sibling() && cur != n) + cur = cur.parent(); + + if (cur != n) cur = cur.next_sibling(); + } + } + + return result; + } + + default: + return xpath_string(); + } + } + } + + PUGI__FN unsigned int node_height(xml_node n) + { + unsigned int result = 0; + + while (n) + { + ++result; + n = n.parent(); + } + + return result; + } + + PUGI__FN bool node_is_before(xml_node ln, unsigned int lh, xml_node rn, unsigned int rh) + { + // normalize heights + for (unsigned int i = rh; i < lh; i++) ln = ln.parent(); + for (unsigned int j = lh; j < rh; j++) rn = rn.parent(); + + // one node is the ancestor of the other + if (ln == rn) return lh < rh; + + // find common ancestor + while (ln.parent() != rn.parent()) + { + ln = ln.parent(); + rn = rn.parent(); + } + + // there is no common ancestor (the shared parent is null), nodes are from different documents + if (!ln.parent()) return ln < rn; + + // determine sibling order + for (; ln; ln = ln.next_sibling()) + if (ln == rn) + return true; + + return false; + } + + PUGI__FN bool node_is_ancestor(xml_node parent, xml_node node) + { + while (node && node != parent) node = node.parent(); + + return parent && node == parent; + } + + PUGI__FN const void* document_order(const xpath_node& xnode) + { + xml_node_struct* node = xnode.node().internal_object(); + + if (node) + { + if (node->name && (node->header & xml_memory_page_name_allocated_mask) == 0) return node->name; + if (node->value && (node->header & xml_memory_page_value_allocated_mask) == 0) return node->value; + return 0; + } + + xml_attribute_struct* attr = xnode.attribute().internal_object(); + + if (attr) + { + if ((attr->header & xml_memory_page_name_allocated_mask) == 0) return attr->name; + if ((attr->header & xml_memory_page_value_allocated_mask) == 0) return attr->value; + return 0; + } + + return 0; + } + + struct document_order_comparator + { + bool operator()(const xpath_node& lhs, const xpath_node& rhs) const + { + // optimized document order based check + const void* lo = document_order(lhs); + const void* ro = document_order(rhs); + + if (lo && ro) return lo < ro; + + // slow comparison + xml_node ln = lhs.node(), rn = rhs.node(); + + // compare attributes + if (lhs.attribute() && rhs.attribute()) + { + // shared parent + if (lhs.parent() == rhs.parent()) + { + // determine sibling order + for (xml_attribute a = lhs.attribute(); a; a = a.next_attribute()) + if (a == rhs.attribute()) + return true; + + return false; + } + + // compare attribute parents + ln = lhs.parent(); + rn = rhs.parent(); + } + else if (lhs.attribute()) + { + // attributes go after the parent element + if (lhs.parent() == rhs.node()) return false; + + ln = lhs.parent(); + } + else if (rhs.attribute()) + { + // attributes go after the parent element + if (rhs.parent() == lhs.node()) return true; + + rn = rhs.parent(); + } + + if (ln == rn) return false; + + unsigned int lh = node_height(ln); + unsigned int rh = node_height(rn); + + return node_is_before(ln, lh, rn, rh); + } + }; + + struct duplicate_comparator + { + bool operator()(const xpath_node& lhs, const xpath_node& rhs) const + { + if (lhs.attribute()) return rhs.attribute() ? lhs.attribute() < rhs.attribute() : true; + else return rhs.attribute() ? false : lhs.node() < rhs.node(); + } + }; + + PUGI__FN double gen_nan() + { + #if defined(__STDC_IEC_559__) || ((FLT_RADIX - 0 == 2) && (FLT_MAX_EXP - 0 == 128) && (FLT_MANT_DIG - 0 == 24)) + union { float f; uint32_t i; } u[sizeof(float) == sizeof(uint32_t) ? 1 : -1]; + u[0].i = 0x7fc00000; + return u[0].f; + #else + // fallback + const volatile double zero = 0.0; + return zero / zero; + #endif + } + + PUGI__FN bool is_nan(double value) + { + #if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__) + return !!_isnan(value); + #elif defined(fpclassify) && defined(FP_NAN) + return fpclassify(value) == FP_NAN; + #else + // fallback + const volatile double v = value; + return v != v; + #endif + } + + PUGI__FN const char_t* convert_number_to_string_special(double value) + { + #if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__) + if (_finite(value)) return (value == 0) ? PUGIXML_TEXT("0") : 0; + if (_isnan(value)) return PUGIXML_TEXT("NaN"); + return value > 0 ? PUGIXML_TEXT("Infinity") : PUGIXML_TEXT("-Infinity"); + #elif defined(fpclassify) && defined(FP_NAN) && defined(FP_INFINITE) && defined(FP_ZERO) + switch (fpclassify(value)) + { + case FP_NAN: + return PUGIXML_TEXT("NaN"); + + case FP_INFINITE: + return value > 0 ? PUGIXML_TEXT("Infinity") : PUGIXML_TEXT("-Infinity"); + + case FP_ZERO: + return PUGIXML_TEXT("0"); + + default: + return 0; + } + #else + // fallback + const volatile double v = value; + + if (v == 0) return PUGIXML_TEXT("0"); + if (v != v) return PUGIXML_TEXT("NaN"); + if (v * 2 == v) return value > 0 ? PUGIXML_TEXT("Infinity") : PUGIXML_TEXT("-Infinity"); + return 0; + #endif + } + + PUGI__FN bool convert_number_to_boolean(double value) + { + return (value != 0 && !is_nan(value)); + } + + PUGI__FN void truncate_zeros(char* begin, char* end) + { + while (begin != end && end[-1] == '0') end--; + + *end = 0; + } + + // gets mantissa digits in the form of 0.xxxxx with 0. implied and the exponent +#if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 && !defined(_WIN32_WCE) + PUGI__FN void convert_number_to_mantissa_exponent(double value, char* buffer, size_t buffer_size, char** out_mantissa, int* out_exponent) + { + // get base values + int sign, exponent; + _ecvt_s(buffer, buffer_size, value, DBL_DIG + 1, &exponent, &sign); + + // truncate redundant zeros + truncate_zeros(buffer, buffer + strlen(buffer)); + + // fill results + *out_mantissa = buffer; + *out_exponent = exponent; + } +#else + PUGI__FN void convert_number_to_mantissa_exponent(double value, char* buffer, size_t buffer_size, char** out_mantissa, int* out_exponent) + { + // get a scientific notation value with IEEE DBL_DIG decimals + sprintf(buffer, "%.*e", DBL_DIG, value); + assert(strlen(buffer) < buffer_size); + (void)!buffer_size; + + // get the exponent (possibly negative) + char* exponent_string = strchr(buffer, 'e'); + assert(exponent_string); + + int exponent = atoi(exponent_string + 1); + + // extract mantissa string: skip sign + char* mantissa = buffer[0] == '-' ? buffer + 1 : buffer; + assert(mantissa[0] != '0' && mantissa[1] == '.'); + + // divide mantissa by 10 to eliminate integer part + mantissa[1] = mantissa[0]; + mantissa++; + exponent++; + + // remove extra mantissa digits and zero-terminate mantissa + truncate_zeros(mantissa, exponent_string); + + // fill results + *out_mantissa = mantissa; + *out_exponent = exponent; + } +#endif + + PUGI__FN xpath_string convert_number_to_string(double value, xpath_allocator* alloc) + { + // try special number conversion + const char_t* special = convert_number_to_string_special(value); + if (special) return xpath_string_const(special); + + // get mantissa + exponent form + char mantissa_buffer[32]; + + char* mantissa; + int exponent; + convert_number_to_mantissa_exponent(value, mantissa_buffer, sizeof(mantissa_buffer), &mantissa, &exponent); + + // allocate a buffer of suitable length for the number + size_t result_size = strlen(mantissa_buffer) + (exponent > 0 ? exponent : -exponent) + 4; + char_t* result = static_cast(alloc->allocate(sizeof(char_t) * result_size)); + assert(result); + + // make the number! + char_t* s = result; + + // sign + if (value < 0) *s++ = '-'; + + // integer part + if (exponent <= 0) + { + *s++ = '0'; + } + else + { + while (exponent > 0) + { + assert(*mantissa == 0 || static_cast(static_cast(*mantissa) - '0') <= 9); + *s++ = *mantissa ? *mantissa++ : '0'; + exponent--; + } + } + + // fractional part + if (*mantissa) + { + // decimal point + *s++ = '.'; + + // extra zeroes from negative exponent + while (exponent < 0) + { + *s++ = '0'; + exponent++; + } + + // extra mantissa digits + while (*mantissa) + { + assert(static_cast(*mantissa - '0') <= 9); + *s++ = *mantissa++; + } + } + + // zero-terminate + assert(s < result + result_size); + *s = 0; + + return xpath_string(result, true); + } + + PUGI__FN bool check_string_to_number_format(const char_t* string) + { + // parse leading whitespace + while (PUGI__IS_CHARTYPE(*string, ct_space)) ++string; + + // parse sign + if (*string == '-') ++string; + + if (!*string) return false; + + // if there is no integer part, there should be a decimal part with at least one digit + if (!PUGI__IS_CHARTYPEX(string[0], ctx_digit) && (string[0] != '.' || !PUGI__IS_CHARTYPEX(string[1], ctx_digit))) return false; + + // parse integer part + while (PUGI__IS_CHARTYPEX(*string, ctx_digit)) ++string; + + // parse decimal part + if (*string == '.') + { + ++string; + + while (PUGI__IS_CHARTYPEX(*string, ctx_digit)) ++string; + } + + // parse trailing whitespace + while (PUGI__IS_CHARTYPE(*string, ct_space)) ++string; + + return *string == 0; + } + + PUGI__FN double convert_string_to_number(const char_t* string) + { + // check string format + if (!check_string_to_number_format(string)) return gen_nan(); + + // parse string + #ifdef PUGIXML_WCHAR_MODE + return wcstod(string, 0); + #else + return atof(string); + #endif + } + + PUGI__FN bool convert_string_to_number_scratch(char_t (&buffer)[32], const char_t* begin, const char_t* end, double* out_result) + { + size_t length = static_cast(end - begin); + char_t* scratch = buffer; + + if (length >= sizeof(buffer) / sizeof(buffer[0])) + { + // need to make dummy on-heap copy + scratch = static_cast(xml_memory::allocate((length + 1) * sizeof(char_t))); + if (!scratch) return false; + } + + // copy string to zero-terminated buffer and perform conversion + memcpy(scratch, begin, length * sizeof(char_t)); + scratch[length] = 0; + + *out_result = convert_string_to_number(scratch); + + // free dummy buffer + if (scratch != buffer) xml_memory::deallocate(scratch); + + return true; + } + + PUGI__FN double round_nearest(double value) + { + return floor(value + 0.5); + } + + PUGI__FN double round_nearest_nzero(double value) + { + // same as round_nearest, but returns -0 for [-0.5, -0] + // ceil is used to differentiate between +0 and -0 (we return -0 for [-0.5, -0] and +0 for +0) + return (value >= -0.5 && value <= 0) ? ceil(value) : floor(value + 0.5); + } + + PUGI__FN const char_t* qualified_name(const xpath_node& node) + { + return node.attribute() ? node.attribute().name() : node.node().name(); + } + + PUGI__FN const char_t* local_name(const xpath_node& node) + { + const char_t* name = qualified_name(node); + const char_t* p = find_char(name, ':'); + + return p ? p + 1 : name; + } + + struct namespace_uri_predicate + { + const char_t* prefix; + size_t prefix_length; + + namespace_uri_predicate(const char_t* name) + { + const char_t* pos = find_char(name, ':'); + + prefix = pos ? name : 0; + prefix_length = pos ? static_cast(pos - name) : 0; + } + + bool operator()(const xml_attribute& a) const + { + const char_t* name = a.name(); + + if (!starts_with(name, PUGIXML_TEXT("xmlns"))) return false; + + return prefix ? name[5] == ':' && strequalrange(name + 6, prefix, prefix_length) : name[5] == 0; + } + }; + + PUGI__FN const char_t* namespace_uri(const xml_node& node) + { + namespace_uri_predicate pred = node.name(); + + xml_node p = node; + + while (p) + { + xml_attribute a = p.find_attribute(pred); + + if (a) return a.value(); + + p = p.parent(); + } + + return PUGIXML_TEXT(""); + } + + PUGI__FN const char_t* namespace_uri(const xml_attribute& attr, const xml_node& parent) + { + namespace_uri_predicate pred = attr.name(); + + // Default namespace does not apply to attributes + if (!pred.prefix) return PUGIXML_TEXT(""); + + xml_node p = parent; + + while (p) + { + xml_attribute a = p.find_attribute(pred); + + if (a) return a.value(); + + p = p.parent(); + } + + return PUGIXML_TEXT(""); + } + + PUGI__FN const char_t* namespace_uri(const xpath_node& node) + { + return node.attribute() ? namespace_uri(node.attribute(), node.parent()) : namespace_uri(node.node()); + } + + PUGI__FN void normalize_space(char_t* buffer) + { + char_t* write = buffer; + + for (char_t* it = buffer; *it; ) + { + char_t ch = *it++; + + if (PUGI__IS_CHARTYPE(ch, ct_space)) + { + // replace whitespace sequence with single space + while (PUGI__IS_CHARTYPE(*it, ct_space)) it++; + + // avoid leading spaces + if (write != buffer) *write++ = ' '; + } + else *write++ = ch; + } + + // remove trailing space + if (write != buffer && PUGI__IS_CHARTYPE(write[-1], ct_space)) write--; + + // zero-terminate + *write = 0; + } + + PUGI__FN void translate(char_t* buffer, const char_t* from, const char_t* to) + { + size_t to_length = strlength(to); + + char_t* write = buffer; + + while (*buffer) + { + PUGI__DMC_VOLATILE char_t ch = *buffer++; + + const char_t* pos = find_char(from, ch); + + if (!pos) + *write++ = ch; // do not process + else if (static_cast(pos - from) < to_length) + *write++ = to[pos - from]; // replace + } + + // zero-terminate + *write = 0; + } + + struct xpath_variable_boolean: xpath_variable + { + xpath_variable_boolean(): value(false) + { + } + + bool value; + char_t name[1]; + }; + + struct xpath_variable_number: xpath_variable + { + xpath_variable_number(): value(0) + { + } + + double value; + char_t name[1]; + }; + + struct xpath_variable_string: xpath_variable + { + xpath_variable_string(): value(0) + { + } + + ~xpath_variable_string() + { + if (value) xml_memory::deallocate(value); + } + + char_t* value; + char_t name[1]; + }; + + struct xpath_variable_node_set: xpath_variable + { + xpath_node_set value; + char_t name[1]; + }; + + static const xpath_node_set dummy_node_set; + + PUGI__FN unsigned int hash_string(const char_t* str) + { + // Jenkins one-at-a-time hash (http://en.wikipedia.org/wiki/Jenkins_hash_function#one-at-a-time) + unsigned int result = 0; + + while (*str) + { + result += static_cast(*str++); + result += result << 10; + result ^= result >> 6; + } + + result += result << 3; + result ^= result >> 11; + result += result << 15; + + return result; + } + + template PUGI__FN T* new_xpath_variable(const char_t* name) + { + size_t length = strlength(name); + if (length == 0) return 0; // empty variable names are invalid + + // $$ we can't use offsetof(T, name) because T is non-POD, so we just allocate additional length characters + void* memory = xml_memory::allocate(sizeof(T) + length * sizeof(char_t)); + if (!memory) return 0; + + T* result = new (memory) T(); + + memcpy(result->name, name, (length + 1) * sizeof(char_t)); + + return result; + } + + PUGI__FN xpath_variable* new_xpath_variable(xpath_value_type type, const char_t* name) + { + switch (type) + { + case xpath_type_node_set: + return new_xpath_variable(name); + + case xpath_type_number: + return new_xpath_variable(name); + + case xpath_type_string: + return new_xpath_variable(name); + + case xpath_type_boolean: + return new_xpath_variable(name); + + default: + return 0; + } + } + + template PUGI__FN void delete_xpath_variable(T* var) + { + var->~T(); + xml_memory::deallocate(var); + } + + PUGI__FN void delete_xpath_variable(xpath_value_type type, xpath_variable* var) + { + switch (type) + { + case xpath_type_node_set: + delete_xpath_variable(static_cast(var)); + break; + + case xpath_type_number: + delete_xpath_variable(static_cast(var)); + break; + + case xpath_type_string: + delete_xpath_variable(static_cast(var)); + break; + + case xpath_type_boolean: + delete_xpath_variable(static_cast(var)); + break; + + default: + assert(!"Invalid variable type"); + } + } + + PUGI__FN xpath_variable* get_variable_scratch(char_t (&buffer)[32], xpath_variable_set* set, const char_t* begin, const char_t* end) + { + size_t length = static_cast(end - begin); + char_t* scratch = buffer; + + if (length >= sizeof(buffer) / sizeof(buffer[0])) + { + // need to make dummy on-heap copy + scratch = static_cast(xml_memory::allocate((length + 1) * sizeof(char_t))); + if (!scratch) return 0; + } + + // copy string to zero-terminated buffer and perform lookup + memcpy(scratch, begin, length * sizeof(char_t)); + scratch[length] = 0; + + xpath_variable* result = set->get(scratch); + + // free dummy buffer + if (scratch != buffer) xml_memory::deallocate(scratch); + + return result; + } +PUGI__NS_END + +// Internal node set class +PUGI__NS_BEGIN + PUGI__FN xpath_node_set::type_t xpath_sort(xpath_node* begin, xpath_node* end, xpath_node_set::type_t type, bool rev) + { + xpath_node_set::type_t order = rev ? xpath_node_set::type_sorted_reverse : xpath_node_set::type_sorted; + + if (type == xpath_node_set::type_unsorted) + { + sort(begin, end, document_order_comparator()); + + type = xpath_node_set::type_sorted; + } + + if (type != order) reverse(begin, end); + + return order; + } + + PUGI__FN xpath_node xpath_first(const xpath_node* begin, const xpath_node* end, xpath_node_set::type_t type) + { + if (begin == end) return xpath_node(); + + switch (type) + { + case xpath_node_set::type_sorted: + return *begin; + + case xpath_node_set::type_sorted_reverse: + return *(end - 1); + + case xpath_node_set::type_unsorted: + return *min_element(begin, end, document_order_comparator()); + + default: + assert(!"Invalid node set type"); + return xpath_node(); + } + } + + class xpath_node_set_raw + { + xpath_node_set::type_t _type; + + xpath_node* _begin; + xpath_node* _end; + xpath_node* _eos; + + public: + xpath_node_set_raw(): _type(xpath_node_set::type_unsorted), _begin(0), _end(0), _eos(0) + { + } + + xpath_node* begin() const + { + return _begin; + } + + xpath_node* end() const + { + return _end; + } + + bool empty() const + { + return _begin == _end; + } + + size_t size() const + { + return static_cast(_end - _begin); + } + + xpath_node first() const + { + return xpath_first(_begin, _end, _type); + } + + void push_back(const xpath_node& node, xpath_allocator* alloc) + { + if (_end == _eos) + { + size_t capacity = static_cast(_eos - _begin); + + // get new capacity (1.5x rule) + size_t new_capacity = capacity + capacity / 2 + 1; + + // reallocate the old array or allocate a new one + xpath_node* data = static_cast(alloc->reallocate(_begin, capacity * sizeof(xpath_node), new_capacity * sizeof(xpath_node))); + assert(data); + + // finalize + _begin = data; + _end = data + capacity; + _eos = data + new_capacity; + } + + *_end++ = node; + } + + void append(const xpath_node* begin_, const xpath_node* end_, xpath_allocator* alloc) + { + size_t size_ = static_cast(_end - _begin); + size_t capacity = static_cast(_eos - _begin); + size_t count = static_cast(end_ - begin_); + + if (size_ + count > capacity) + { + // reallocate the old array or allocate a new one + xpath_node* data = static_cast(alloc->reallocate(_begin, capacity * sizeof(xpath_node), (size_ + count) * sizeof(xpath_node))); + assert(data); + + // finalize + _begin = data; + _end = data + size_; + _eos = data + size_ + count; + } + + memcpy(_end, begin_, count * sizeof(xpath_node)); + _end += count; + } + + void sort_do() + { + _type = xpath_sort(_begin, _end, _type, false); + } + + void truncate(xpath_node* pos) + { + assert(_begin <= pos && pos <= _end); + + _end = pos; + } + + void remove_duplicates() + { + if (_type == xpath_node_set::type_unsorted) + sort(_begin, _end, duplicate_comparator()); + + _end = unique(_begin, _end); + } + + xpath_node_set::type_t type() const + { + return _type; + } + + void set_type(xpath_node_set::type_t value) + { + _type = value; + } + }; +PUGI__NS_END + +PUGI__NS_BEGIN + struct xpath_context + { + xpath_node n; + size_t position, size; + + xpath_context(const xpath_node& n_, size_t position_, size_t size_): n(n_), position(position_), size(size_) + { + } + }; + + enum lexeme_t + { + lex_none = 0, + lex_equal, + lex_not_equal, + lex_less, + lex_greater, + lex_less_or_equal, + lex_greater_or_equal, + lex_plus, + lex_minus, + lex_multiply, + lex_union, + lex_var_ref, + lex_open_brace, + lex_close_brace, + lex_quoted_string, + lex_number, + lex_slash, + lex_double_slash, + lex_open_square_brace, + lex_close_square_brace, + lex_string, + lex_comma, + lex_axis_attribute, + lex_dot, + lex_double_dot, + lex_double_colon, + lex_eof + }; + + struct xpath_lexer_string + { + const char_t* begin; + const char_t* end; + + xpath_lexer_string(): begin(0), end(0) + { + } + + bool operator==(const char_t* other) const + { + size_t length = static_cast(end - begin); + + return strequalrange(other, begin, length); + } + }; + + class xpath_lexer + { + const char_t* _cur; + const char_t* _cur_lexeme_pos; + xpath_lexer_string _cur_lexeme_contents; + + lexeme_t _cur_lexeme; + + public: + explicit xpath_lexer(const char_t* query): _cur(query) + { + next(); + } + + const char_t* state() const + { + return _cur; + } + + void next() + { + const char_t* cur = _cur; + + while (PUGI__IS_CHARTYPE(*cur, ct_space)) ++cur; + + // save lexeme position for error reporting + _cur_lexeme_pos = cur; + + switch (*cur) + { + case 0: + _cur_lexeme = lex_eof; + break; + + case '>': + if (*(cur+1) == '=') + { + cur += 2; + _cur_lexeme = lex_greater_or_equal; + } + else + { + cur += 1; + _cur_lexeme = lex_greater; + } + break; + + case '<': + if (*(cur+1) == '=') + { + cur += 2; + _cur_lexeme = lex_less_or_equal; + } + else + { + cur += 1; + _cur_lexeme = lex_less; + } + break; + + case '!': + if (*(cur+1) == '=') + { + cur += 2; + _cur_lexeme = lex_not_equal; + } + else + { + _cur_lexeme = lex_none; + } + break; + + case '=': + cur += 1; + _cur_lexeme = lex_equal; + + break; + + case '+': + cur += 1; + _cur_lexeme = lex_plus; + + break; + + case '-': + cur += 1; + _cur_lexeme = lex_minus; + + break; + + case '*': + cur += 1; + _cur_lexeme = lex_multiply; + + break; + + case '|': + cur += 1; + _cur_lexeme = lex_union; + + break; + + case '$': + cur += 1; + + if (PUGI__IS_CHARTYPEX(*cur, ctx_start_symbol)) + { + _cur_lexeme_contents.begin = cur; + + while (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++; + + if (cur[0] == ':' && PUGI__IS_CHARTYPEX(cur[1], ctx_symbol)) // qname + { + cur++; // : + + while (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++; + } + + _cur_lexeme_contents.end = cur; + + _cur_lexeme = lex_var_ref; + } + else + { + _cur_lexeme = lex_none; + } + + break; + + case '(': + cur += 1; + _cur_lexeme = lex_open_brace; + + break; + + case ')': + cur += 1; + _cur_lexeme = lex_close_brace; + + break; + + case '[': + cur += 1; + _cur_lexeme = lex_open_square_brace; + + break; + + case ']': + cur += 1; + _cur_lexeme = lex_close_square_brace; + + break; + + case ',': + cur += 1; + _cur_lexeme = lex_comma; + + break; + + case '/': + if (*(cur+1) == '/') + { + cur += 2; + _cur_lexeme = lex_double_slash; + } + else + { + cur += 1; + _cur_lexeme = lex_slash; + } + break; + + case '.': + if (*(cur+1) == '.') + { + cur += 2; + _cur_lexeme = lex_double_dot; + } + else if (PUGI__IS_CHARTYPEX(*(cur+1), ctx_digit)) + { + _cur_lexeme_contents.begin = cur; // . + + ++cur; + + while (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++; + + _cur_lexeme_contents.end = cur; + + _cur_lexeme = lex_number; + } + else + { + cur += 1; + _cur_lexeme = lex_dot; + } + break; + + case '@': + cur += 1; + _cur_lexeme = lex_axis_attribute; + + break; + + case '"': + case '\'': + { + char_t terminator = *cur; + + ++cur; + + _cur_lexeme_contents.begin = cur; + while (*cur && *cur != terminator) cur++; + _cur_lexeme_contents.end = cur; + + if (!*cur) + _cur_lexeme = lex_none; + else + { + cur += 1; + _cur_lexeme = lex_quoted_string; + } + + break; + } + + case ':': + if (*(cur+1) == ':') + { + cur += 2; + _cur_lexeme = lex_double_colon; + } + else + { + _cur_lexeme = lex_none; + } + break; + + default: + if (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) + { + _cur_lexeme_contents.begin = cur; + + while (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++; + + if (*cur == '.') + { + cur++; + + while (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++; + } + + _cur_lexeme_contents.end = cur; + + _cur_lexeme = lex_number; + } + else if (PUGI__IS_CHARTYPEX(*cur, ctx_start_symbol)) + { + _cur_lexeme_contents.begin = cur; + + while (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++; + + if (cur[0] == ':') + { + if (cur[1] == '*') // namespace test ncname:* + { + cur += 2; // :* + } + else if (PUGI__IS_CHARTYPEX(cur[1], ctx_symbol)) // namespace test qname + { + cur++; // : + + while (PUGI__IS_CHARTYPEX(*cur, ctx_symbol)) cur++; + } + } + + _cur_lexeme_contents.end = cur; + + _cur_lexeme = lex_string; + } + else + { + _cur_lexeme = lex_none; + } + } + + _cur = cur; + } + + lexeme_t current() const + { + return _cur_lexeme; + } + + const char_t* current_pos() const + { + return _cur_lexeme_pos; + } + + const xpath_lexer_string& contents() const + { + assert(_cur_lexeme == lex_var_ref || _cur_lexeme == lex_number || _cur_lexeme == lex_string || _cur_lexeme == lex_quoted_string); + + return _cur_lexeme_contents; + } + }; + + enum ast_type_t + { + ast_unknown, + ast_op_or, // left or right + ast_op_and, // left and right + ast_op_equal, // left = right + ast_op_not_equal, // left != right + ast_op_less, // left < right + ast_op_greater, // left > right + ast_op_less_or_equal, // left <= right + ast_op_greater_or_equal, // left >= right + ast_op_add, // left + right + ast_op_subtract, // left - right + ast_op_multiply, // left * right + ast_op_divide, // left / right + ast_op_mod, // left % right + ast_op_negate, // left - right + ast_op_union, // left | right + ast_predicate, // apply predicate to set; next points to next predicate + ast_filter, // select * from left where right + ast_filter_posinv, // select * from left where right; proximity position invariant + ast_string_constant, // string constant + ast_number_constant, // number constant + ast_variable, // variable + ast_func_last, // last() + ast_func_position, // position() + ast_func_count, // count(left) + ast_func_id, // id(left) + ast_func_local_name_0, // local-name() + ast_func_local_name_1, // local-name(left) + ast_func_namespace_uri_0, // namespace-uri() + ast_func_namespace_uri_1, // namespace-uri(left) + ast_func_name_0, // name() + ast_func_name_1, // name(left) + ast_func_string_0, // string() + ast_func_string_1, // string(left) + ast_func_concat, // concat(left, right, siblings) + ast_func_starts_with, // starts_with(left, right) + ast_func_contains, // contains(left, right) + ast_func_substring_before, // substring-before(left, right) + ast_func_substring_after, // substring-after(left, right) + ast_func_substring_2, // substring(left, right) + ast_func_substring_3, // substring(left, right, third) + ast_func_string_length_0, // string-length() + ast_func_string_length_1, // string-length(left) + ast_func_normalize_space_0, // normalize-space() + ast_func_normalize_space_1, // normalize-space(left) + ast_func_translate, // translate(left, right, third) + ast_func_boolean, // boolean(left) + ast_func_not, // not(left) + ast_func_true, // true() + ast_func_false, // false() + ast_func_lang, // lang(left) + ast_func_number_0, // number() + ast_func_number_1, // number(left) + ast_func_sum, // sum(left) + ast_func_floor, // floor(left) + ast_func_ceiling, // ceiling(left) + ast_func_round, // round(left) + ast_step, // process set left with step + ast_step_root // select root node + }; + + enum axis_t + { + axis_ancestor, + axis_ancestor_or_self, + axis_attribute, + axis_child, + axis_descendant, + axis_descendant_or_self, + axis_following, + axis_following_sibling, + axis_namespace, + axis_parent, + axis_preceding, + axis_preceding_sibling, + axis_self + }; + + enum nodetest_t + { + nodetest_none, + nodetest_name, + nodetest_type_node, + nodetest_type_comment, + nodetest_type_pi, + nodetest_type_text, + nodetest_pi, + nodetest_all, + nodetest_all_in_namespace + }; + + template struct axis_to_type + { + static const axis_t axis; + }; + + template const axis_t axis_to_type::axis = N; + + class xpath_ast_node + { + private: + // node type + char _type; + char _rettype; + + // for ast_step / ast_predicate + char _axis; + char _test; + + // tree node structure + xpath_ast_node* _left; + xpath_ast_node* _right; + xpath_ast_node* _next; + + union + { + // value for ast_string_constant + const char_t* string; + // value for ast_number_constant + double number; + // variable for ast_variable + xpath_variable* variable; + // node test for ast_step (node name/namespace/node type/pi target) + const char_t* nodetest; + } _data; + + xpath_ast_node(const xpath_ast_node&); + xpath_ast_node& operator=(const xpath_ast_node&); + + template static bool compare_eq(xpath_ast_node* lhs, xpath_ast_node* rhs, const xpath_context& c, const xpath_stack& stack, const Comp& comp) + { + xpath_value_type lt = lhs->rettype(), rt = rhs->rettype(); + + if (lt != xpath_type_node_set && rt != xpath_type_node_set) + { + if (lt == xpath_type_boolean || rt == xpath_type_boolean) + return comp(lhs->eval_boolean(c, stack), rhs->eval_boolean(c, stack)); + else if (lt == xpath_type_number || rt == xpath_type_number) + return comp(lhs->eval_number(c, stack), rhs->eval_number(c, stack)); + else if (lt == xpath_type_string || rt == xpath_type_string) + { + xpath_allocator_capture cr(stack.result); + + xpath_string ls = lhs->eval_string(c, stack); + xpath_string rs = rhs->eval_string(c, stack); + + return comp(ls, rs); + } + } + else if (lt == xpath_type_node_set && rt == xpath_type_node_set) + { + xpath_allocator_capture cr(stack.result); + + xpath_node_set_raw ls = lhs->eval_node_set(c, stack); + xpath_node_set_raw rs = rhs->eval_node_set(c, stack); + + for (const xpath_node* li = ls.begin(); li != ls.end(); ++li) + for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri) + { + xpath_allocator_capture cri(stack.result); + + if (comp(string_value(*li, stack.result), string_value(*ri, stack.result))) + return true; + } + + return false; + } + else + { + if (lt == xpath_type_node_set) + { + swap(lhs, rhs); + swap(lt, rt); + } + + if (lt == xpath_type_boolean) + return comp(lhs->eval_boolean(c, stack), rhs->eval_boolean(c, stack)); + else if (lt == xpath_type_number) + { + xpath_allocator_capture cr(stack.result); + + double l = lhs->eval_number(c, stack); + xpath_node_set_raw rs = rhs->eval_node_set(c, stack); + + for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri) + { + xpath_allocator_capture cri(stack.result); + + if (comp(l, convert_string_to_number(string_value(*ri, stack.result).c_str()))) + return true; + } + + return false; + } + else if (lt == xpath_type_string) + { + xpath_allocator_capture cr(stack.result); + + xpath_string l = lhs->eval_string(c, stack); + xpath_node_set_raw rs = rhs->eval_node_set(c, stack); + + for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri) + { + xpath_allocator_capture cri(stack.result); + + if (comp(l, string_value(*ri, stack.result))) + return true; + } + + return false; + } + } + + assert(!"Wrong types"); + return false; + } + + template static bool compare_rel(xpath_ast_node* lhs, xpath_ast_node* rhs, const xpath_context& c, const xpath_stack& stack, const Comp& comp) + { + xpath_value_type lt = lhs->rettype(), rt = rhs->rettype(); + + if (lt != xpath_type_node_set && rt != xpath_type_node_set) + return comp(lhs->eval_number(c, stack), rhs->eval_number(c, stack)); + else if (lt == xpath_type_node_set && rt == xpath_type_node_set) + { + xpath_allocator_capture cr(stack.result); + + xpath_node_set_raw ls = lhs->eval_node_set(c, stack); + xpath_node_set_raw rs = rhs->eval_node_set(c, stack); + + for (const xpath_node* li = ls.begin(); li != ls.end(); ++li) + { + xpath_allocator_capture cri(stack.result); + + double l = convert_string_to_number(string_value(*li, stack.result).c_str()); + + for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri) + { + xpath_allocator_capture crii(stack.result); + + if (comp(l, convert_string_to_number(string_value(*ri, stack.result).c_str()))) + return true; + } + } + + return false; + } + else if (lt != xpath_type_node_set && rt == xpath_type_node_set) + { + xpath_allocator_capture cr(stack.result); + + double l = lhs->eval_number(c, stack); + xpath_node_set_raw rs = rhs->eval_node_set(c, stack); + + for (const xpath_node* ri = rs.begin(); ri != rs.end(); ++ri) + { + xpath_allocator_capture cri(stack.result); + + if (comp(l, convert_string_to_number(string_value(*ri, stack.result).c_str()))) + return true; + } + + return false; + } + else if (lt == xpath_type_node_set && rt != xpath_type_node_set) + { + xpath_allocator_capture cr(stack.result); + + xpath_node_set_raw ls = lhs->eval_node_set(c, stack); + double r = rhs->eval_number(c, stack); + + for (const xpath_node* li = ls.begin(); li != ls.end(); ++li) + { + xpath_allocator_capture cri(stack.result); + + if (comp(convert_string_to_number(string_value(*li, stack.result).c_str()), r)) + return true; + } + + return false; + } + else + { + assert(!"Wrong types"); + return false; + } + } + + void apply_predicate(xpath_node_set_raw& ns, size_t first, xpath_ast_node* expr, const xpath_stack& stack) + { + assert(ns.size() >= first); + + size_t i = 1; + size_t size = ns.size() - first; + + xpath_node* last = ns.begin() + first; + + // remove_if... or well, sort of + for (xpath_node* it = last; it != ns.end(); ++it, ++i) + { + xpath_context c(*it, i, size); + + if (expr->rettype() == xpath_type_number) + { + if (expr->eval_number(c, stack) == i) + *last++ = *it; + } + else if (expr->eval_boolean(c, stack)) + *last++ = *it; + } + + ns.truncate(last); + } + + void apply_predicates(xpath_node_set_raw& ns, size_t first, const xpath_stack& stack) + { + if (ns.size() == first) return; + + for (xpath_ast_node* pred = _right; pred; pred = pred->_next) + { + apply_predicate(ns, first, pred->_left, stack); + } + } + + void step_push(xpath_node_set_raw& ns, const xml_attribute& a, const xml_node& parent, xpath_allocator* alloc) + { + if (!a) return; + + const char_t* name = a.name(); + + // There are no attribute nodes corresponding to attributes that declare namespaces + // That is, "xmlns:..." or "xmlns" + if (starts_with(name, PUGIXML_TEXT("xmlns")) && (name[5] == 0 || name[5] == ':')) return; + + switch (_test) + { + case nodetest_name: + if (strequal(name, _data.nodetest)) ns.push_back(xpath_node(a, parent), alloc); + break; + + case nodetest_type_node: + case nodetest_all: + ns.push_back(xpath_node(a, parent), alloc); + break; + + case nodetest_all_in_namespace: + if (starts_with(name, _data.nodetest)) + ns.push_back(xpath_node(a, parent), alloc); + break; + + default: + ; + } + } + + void step_push(xpath_node_set_raw& ns, const xml_node& n, xpath_allocator* alloc) + { + if (!n) return; + + switch (_test) + { + case nodetest_name: + if (n.type() == node_element && strequal(n.name(), _data.nodetest)) ns.push_back(n, alloc); + break; + + case nodetest_type_node: + ns.push_back(n, alloc); + break; + + case nodetest_type_comment: + if (n.type() == node_comment) + ns.push_back(n, alloc); + break; + + case nodetest_type_text: + if (n.type() == node_pcdata || n.type() == node_cdata) + ns.push_back(n, alloc); + break; + + case nodetest_type_pi: + if (n.type() == node_pi) + ns.push_back(n, alloc); + break; + + case nodetest_pi: + if (n.type() == node_pi && strequal(n.name(), _data.nodetest)) + ns.push_back(n, alloc); + break; + + case nodetest_all: + if (n.type() == node_element) + ns.push_back(n, alloc); + break; + + case nodetest_all_in_namespace: + if (n.type() == node_element && starts_with(n.name(), _data.nodetest)) + ns.push_back(n, alloc); + break; + + default: + assert(!"Unknown axis"); + } + } + + template void step_fill(xpath_node_set_raw& ns, const xml_node& n, xpath_allocator* alloc, T) + { + const axis_t axis = T::axis; + + switch (axis) + { + case axis_attribute: + { + for (xml_attribute a = n.first_attribute(); a; a = a.next_attribute()) + step_push(ns, a, n, alloc); + + break; + } + + case axis_child: + { + for (xml_node c = n.first_child(); c; c = c.next_sibling()) + step_push(ns, c, alloc); + + break; + } + + case axis_descendant: + case axis_descendant_or_self: + { + if (axis == axis_descendant_or_self) + step_push(ns, n, alloc); + + xml_node cur = n.first_child(); + + while (cur && cur != n) + { + step_push(ns, cur, alloc); + + if (cur.first_child()) + cur = cur.first_child(); + else if (cur.next_sibling()) + cur = cur.next_sibling(); + else + { + while (!cur.next_sibling() && cur != n) + cur = cur.parent(); + + if (cur != n) cur = cur.next_sibling(); + } + } + + break; + } + + case axis_following_sibling: + { + for (xml_node c = n.next_sibling(); c; c = c.next_sibling()) + step_push(ns, c, alloc); + + break; + } + + case axis_preceding_sibling: + { + for (xml_node c = n.previous_sibling(); c; c = c.previous_sibling()) + step_push(ns, c, alloc); + + break; + } + + case axis_following: + { + xml_node cur = n; + + // exit from this node so that we don't include descendants + while (cur && !cur.next_sibling()) cur = cur.parent(); + cur = cur.next_sibling(); + + for (;;) + { + step_push(ns, cur, alloc); + + if (cur.first_child()) + cur = cur.first_child(); + else if (cur.next_sibling()) + cur = cur.next_sibling(); + else + { + while (cur && !cur.next_sibling()) cur = cur.parent(); + cur = cur.next_sibling(); + + if (!cur) break; + } + } + + break; + } + + case axis_preceding: + { + xml_node cur = n; + + while (cur && !cur.previous_sibling()) cur = cur.parent(); + cur = cur.previous_sibling(); + + for (;;) + { + if (cur.last_child()) + cur = cur.last_child(); + else + { + // leaf node, can't be ancestor + step_push(ns, cur, alloc); + + if (cur.previous_sibling()) + cur = cur.previous_sibling(); + else + { + do + { + cur = cur.parent(); + if (!cur) break; + + if (!node_is_ancestor(cur, n)) step_push(ns, cur, alloc); + } + while (!cur.previous_sibling()); + + cur = cur.previous_sibling(); + + if (!cur) break; + } + } + } + + break; + } + + case axis_ancestor: + case axis_ancestor_or_self: + { + if (axis == axis_ancestor_or_self) + step_push(ns, n, alloc); + + xml_node cur = n.parent(); + + while (cur) + { + step_push(ns, cur, alloc); + + cur = cur.parent(); + } + + break; + } + + case axis_self: + { + step_push(ns, n, alloc); + + break; + } + + case axis_parent: + { + if (n.parent()) step_push(ns, n.parent(), alloc); + + break; + } + + default: + assert(!"Unimplemented axis"); + } + } + + template void step_fill(xpath_node_set_raw& ns, const xml_attribute& a, const xml_node& p, xpath_allocator* alloc, T v) + { + const axis_t axis = T::axis; + + switch (axis) + { + case axis_ancestor: + case axis_ancestor_or_self: + { + if (axis == axis_ancestor_or_self && _test == nodetest_type_node) // reject attributes based on principal node type test + step_push(ns, a, p, alloc); + + xml_node cur = p; + + while (cur) + { + step_push(ns, cur, alloc); + + cur = cur.parent(); + } + + break; + } + + case axis_descendant_or_self: + case axis_self: + { + if (_test == nodetest_type_node) // reject attributes based on principal node type test + step_push(ns, a, p, alloc); + + break; + } + + case axis_following: + { + xml_node cur = p; + + for (;;) + { + if (cur.first_child()) + cur = cur.first_child(); + else if (cur.next_sibling()) + cur = cur.next_sibling(); + else + { + while (cur && !cur.next_sibling()) cur = cur.parent(); + cur = cur.next_sibling(); + + if (!cur) break; + } + + step_push(ns, cur, alloc); + } + + break; + } + + case axis_parent: + { + step_push(ns, p, alloc); + + break; + } + + case axis_preceding: + { + // preceding:: axis does not include attribute nodes and attribute ancestors (they are the same as parent's ancestors), so we can reuse node preceding + step_fill(ns, p, alloc, v); + break; + } + + default: + assert(!"Unimplemented axis"); + } + } + + template xpath_node_set_raw step_do(const xpath_context& c, const xpath_stack& stack, T v) + { + const axis_t axis = T::axis; + bool attributes = (axis == axis_ancestor || axis == axis_ancestor_or_self || axis == axis_descendant_or_self || axis == axis_following || axis == axis_parent || axis == axis_preceding || axis == axis_self); + + xpath_node_set_raw ns; + ns.set_type((axis == axis_ancestor || axis == axis_ancestor_or_self || axis == axis_preceding || axis == axis_preceding_sibling) ? xpath_node_set::type_sorted_reverse : xpath_node_set::type_sorted); + + if (_left) + { + xpath_node_set_raw s = _left->eval_node_set(c, stack); + + // self axis preserves the original order + if (axis == axis_self) ns.set_type(s.type()); + + for (const xpath_node* it = s.begin(); it != s.end(); ++it) + { + size_t size = ns.size(); + + // in general, all axes generate elements in a particular order, but there is no order guarantee if axis is applied to two nodes + if (axis != axis_self && size != 0) ns.set_type(xpath_node_set::type_unsorted); + + if (it->node()) + step_fill(ns, it->node(), stack.result, v); + else if (attributes) + step_fill(ns, it->attribute(), it->parent(), stack.result, v); + + apply_predicates(ns, size, stack); + } + } + else + { + if (c.n.node()) + step_fill(ns, c.n.node(), stack.result, v); + else if (attributes) + step_fill(ns, c.n.attribute(), c.n.parent(), stack.result, v); + + apply_predicates(ns, 0, stack); + } + + // child, attribute and self axes always generate unique set of nodes + // for other axis, if the set stayed sorted, it stayed unique because the traversal algorithms do not visit the same node twice + if (axis != axis_child && axis != axis_attribute && axis != axis_self && ns.type() == xpath_node_set::type_unsorted) + ns.remove_duplicates(); + + return ns; + } + + public: + xpath_ast_node(ast_type_t type, xpath_value_type rettype_, const char_t* value): + _type(static_cast(type)), _rettype(static_cast(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0) + { + assert(type == ast_string_constant); + _data.string = value; + } + + xpath_ast_node(ast_type_t type, xpath_value_type rettype_, double value): + _type(static_cast(type)), _rettype(static_cast(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0) + { + assert(type == ast_number_constant); + _data.number = value; + } + + xpath_ast_node(ast_type_t type, xpath_value_type rettype_, xpath_variable* value): + _type(static_cast(type)), _rettype(static_cast(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0) + { + assert(type == ast_variable); + _data.variable = value; + } + + xpath_ast_node(ast_type_t type, xpath_value_type rettype_, xpath_ast_node* left = 0, xpath_ast_node* right = 0): + _type(static_cast(type)), _rettype(static_cast(rettype_)), _axis(0), _test(0), _left(left), _right(right), _next(0) + { + } + + xpath_ast_node(ast_type_t type, xpath_ast_node* left, axis_t axis, nodetest_t test, const char_t* contents): + _type(static_cast(type)), _rettype(xpath_type_node_set), _axis(static_cast(axis)), _test(static_cast(test)), _left(left), _right(0), _next(0) + { + _data.nodetest = contents; + } + + void set_next(xpath_ast_node* value) + { + _next = value; + } + + void set_right(xpath_ast_node* value) + { + _right = value; + } + + bool eval_boolean(const xpath_context& c, const xpath_stack& stack) + { + switch (_type) + { + case ast_op_or: + return _left->eval_boolean(c, stack) || _right->eval_boolean(c, stack); + + case ast_op_and: + return _left->eval_boolean(c, stack) && _right->eval_boolean(c, stack); + + case ast_op_equal: + return compare_eq(_left, _right, c, stack, equal_to()); + + case ast_op_not_equal: + return compare_eq(_left, _right, c, stack, not_equal_to()); + + case ast_op_less: + return compare_rel(_left, _right, c, stack, less()); + + case ast_op_greater: + return compare_rel(_right, _left, c, stack, less()); + + case ast_op_less_or_equal: + return compare_rel(_left, _right, c, stack, less_equal()); + + case ast_op_greater_or_equal: + return compare_rel(_right, _left, c, stack, less_equal()); + + case ast_func_starts_with: + { + xpath_allocator_capture cr(stack.result); + + xpath_string lr = _left->eval_string(c, stack); + xpath_string rr = _right->eval_string(c, stack); + + return starts_with(lr.c_str(), rr.c_str()); + } + + case ast_func_contains: + { + xpath_allocator_capture cr(stack.result); + + xpath_string lr = _left->eval_string(c, stack); + xpath_string rr = _right->eval_string(c, stack); + + return find_substring(lr.c_str(), rr.c_str()) != 0; + } + + case ast_func_boolean: + return _left->eval_boolean(c, stack); + + case ast_func_not: + return !_left->eval_boolean(c, stack); + + case ast_func_true: + return true; + + case ast_func_false: + return false; + + case ast_func_lang: + { + if (c.n.attribute()) return false; + + xpath_allocator_capture cr(stack.result); + + xpath_string lang = _left->eval_string(c, stack); + + for (xml_node n = c.n.node(); n; n = n.parent()) + { + xml_attribute a = n.attribute(PUGIXML_TEXT("xml:lang")); + + if (a) + { + const char_t* value = a.value(); + + // strnicmp / strncasecmp is not portable + for (const char_t* lit = lang.c_str(); *lit; ++lit) + { + if (tolower_ascii(*lit) != tolower_ascii(*value)) return false; + ++value; + } + + return *value == 0 || *value == '-'; + } + } + + return false; + } + + case ast_variable: + { + assert(_rettype == _data.variable->type()); + + if (_rettype == xpath_type_boolean) + return _data.variable->get_boolean(); + + // fallthrough to type conversion + } + + default: + { + switch (_rettype) + { + case xpath_type_number: + return convert_number_to_boolean(eval_number(c, stack)); + + case xpath_type_string: + { + xpath_allocator_capture cr(stack.result); + + return !eval_string(c, stack).empty(); + } + + case xpath_type_node_set: + { + xpath_allocator_capture cr(stack.result); + + return !eval_node_set(c, stack).empty(); + } + + default: + assert(!"Wrong expression for return type boolean"); + return false; + } + } + } + } + + double eval_number(const xpath_context& c, const xpath_stack& stack) + { + switch (_type) + { + case ast_op_add: + return _left->eval_number(c, stack) + _right->eval_number(c, stack); + + case ast_op_subtract: + return _left->eval_number(c, stack) - _right->eval_number(c, stack); + + case ast_op_multiply: + return _left->eval_number(c, stack) * _right->eval_number(c, stack); + + case ast_op_divide: + return _left->eval_number(c, stack) / _right->eval_number(c, stack); + + case ast_op_mod: + return fmod(_left->eval_number(c, stack), _right->eval_number(c, stack)); + + case ast_op_negate: + return -_left->eval_number(c, stack); + + case ast_number_constant: + return _data.number; + + case ast_func_last: + return static_cast(c.size); + + case ast_func_position: + return static_cast(c.position); + + case ast_func_count: + { + xpath_allocator_capture cr(stack.result); + + return static_cast(_left->eval_node_set(c, stack).size()); + } + + case ast_func_string_length_0: + { + xpath_allocator_capture cr(stack.result); + + return static_cast(string_value(c.n, stack.result).length()); + } + + case ast_func_string_length_1: + { + xpath_allocator_capture cr(stack.result); + + return static_cast(_left->eval_string(c, stack).length()); + } + + case ast_func_number_0: + { + xpath_allocator_capture cr(stack.result); + + return convert_string_to_number(string_value(c.n, stack.result).c_str()); + } + + case ast_func_number_1: + return _left->eval_number(c, stack); + + case ast_func_sum: + { + xpath_allocator_capture cr(stack.result); + + double r = 0; + + xpath_node_set_raw ns = _left->eval_node_set(c, stack); + + for (const xpath_node* it = ns.begin(); it != ns.end(); ++it) + { + xpath_allocator_capture cri(stack.result); + + r += convert_string_to_number(string_value(*it, stack.result).c_str()); + } + + return r; + } + + case ast_func_floor: + { + double r = _left->eval_number(c, stack); + + return r == r ? floor(r) : r; + } + + case ast_func_ceiling: + { + double r = _left->eval_number(c, stack); + + return r == r ? ceil(r) : r; + } + + case ast_func_round: + return round_nearest_nzero(_left->eval_number(c, stack)); + + case ast_variable: + { + assert(_rettype == _data.variable->type()); + + if (_rettype == xpath_type_number) + return _data.variable->get_number(); + + // fallthrough to type conversion + } + + default: + { + switch (_rettype) + { + case xpath_type_boolean: + return eval_boolean(c, stack) ? 1 : 0; + + case xpath_type_string: + { + xpath_allocator_capture cr(stack.result); + + return convert_string_to_number(eval_string(c, stack).c_str()); + } + + case xpath_type_node_set: + { + xpath_allocator_capture cr(stack.result); + + return convert_string_to_number(eval_string(c, stack).c_str()); + } + + default: + assert(!"Wrong expression for return type number"); + return 0; + } + + } + } + } + + xpath_string eval_string_concat(const xpath_context& c, const xpath_stack& stack) + { + assert(_type == ast_func_concat); + + xpath_allocator_capture ct(stack.temp); + + // count the string number + size_t count = 1; + for (xpath_ast_node* nc = _right; nc; nc = nc->_next) count++; + + // gather all strings + xpath_string static_buffer[4]; + xpath_string* buffer = static_buffer; + + // allocate on-heap for large concats + if (count > sizeof(static_buffer) / sizeof(static_buffer[0])) + { + buffer = static_cast(stack.temp->allocate(count * sizeof(xpath_string))); + assert(buffer); + } + + // evaluate all strings to temporary stack + xpath_stack swapped_stack = {stack.temp, stack.result}; + + buffer[0] = _left->eval_string(c, swapped_stack); + + size_t pos = 1; + for (xpath_ast_node* n = _right; n; n = n->_next, ++pos) buffer[pos] = n->eval_string(c, swapped_stack); + assert(pos == count); + + // get total length + size_t length = 0; + for (size_t i = 0; i < count; ++i) length += buffer[i].length(); + + // create final string + char_t* result = static_cast(stack.result->allocate((length + 1) * sizeof(char_t))); + assert(result); + + char_t* ri = result; + + for (size_t j = 0; j < count; ++j) + for (const char_t* bi = buffer[j].c_str(); *bi; ++bi) + *ri++ = *bi; + + *ri = 0; + + return xpath_string(result, true); + } + + xpath_string eval_string(const xpath_context& c, const xpath_stack& stack) + { + switch (_type) + { + case ast_string_constant: + return xpath_string_const(_data.string); + + case ast_func_local_name_0: + { + xpath_node na = c.n; + + return xpath_string_const(local_name(na)); + } + + case ast_func_local_name_1: + { + xpath_allocator_capture cr(stack.result); + + xpath_node_set_raw ns = _left->eval_node_set(c, stack); + xpath_node na = ns.first(); + + return xpath_string_const(local_name(na)); + } + + case ast_func_name_0: + { + xpath_node na = c.n; + + return xpath_string_const(qualified_name(na)); + } + + case ast_func_name_1: + { + xpath_allocator_capture cr(stack.result); + + xpath_node_set_raw ns = _left->eval_node_set(c, stack); + xpath_node na = ns.first(); + + return xpath_string_const(qualified_name(na)); + } + + case ast_func_namespace_uri_0: + { + xpath_node na = c.n; + + return xpath_string_const(namespace_uri(na)); + } + + case ast_func_namespace_uri_1: + { + xpath_allocator_capture cr(stack.result); + + xpath_node_set_raw ns = _left->eval_node_set(c, stack); + xpath_node na = ns.first(); + + return xpath_string_const(namespace_uri(na)); + } + + case ast_func_string_0: + return string_value(c.n, stack.result); + + case ast_func_string_1: + return _left->eval_string(c, stack); + + case ast_func_concat: + return eval_string_concat(c, stack); + + case ast_func_substring_before: + { + xpath_allocator_capture cr(stack.temp); + + xpath_stack swapped_stack = {stack.temp, stack.result}; + + xpath_string s = _left->eval_string(c, swapped_stack); + xpath_string p = _right->eval_string(c, swapped_stack); + + const char_t* pos = find_substring(s.c_str(), p.c_str()); + + return pos ? xpath_string(s.c_str(), pos, stack.result) : xpath_string(); + } + + case ast_func_substring_after: + { + xpath_allocator_capture cr(stack.temp); + + xpath_stack swapped_stack = {stack.temp, stack.result}; + + xpath_string s = _left->eval_string(c, swapped_stack); + xpath_string p = _right->eval_string(c, swapped_stack); + + const char_t* pos = find_substring(s.c_str(), p.c_str()); + if (!pos) return xpath_string(); + + const char_t* result = pos + p.length(); + + return s.uses_heap() ? xpath_string(result, stack.result) : xpath_string_const(result); + } + + case ast_func_substring_2: + { + xpath_allocator_capture cr(stack.temp); + + xpath_stack swapped_stack = {stack.temp, stack.result}; + + xpath_string s = _left->eval_string(c, swapped_stack); + size_t s_length = s.length(); + + double first = round_nearest(_right->eval_number(c, stack)); + + if (is_nan(first)) return xpath_string(); // NaN + else if (first >= s_length + 1) return xpath_string(); + + size_t pos = first < 1 ? 1 : static_cast(first); + assert(1 <= pos && pos <= s_length + 1); + + const char_t* rbegin = s.c_str() + (pos - 1); + + return s.uses_heap() ? xpath_string(rbegin, stack.result) : xpath_string_const(rbegin); + } + + case ast_func_substring_3: + { + xpath_allocator_capture cr(stack.temp); + + xpath_stack swapped_stack = {stack.temp, stack.result}; + + xpath_string s = _left->eval_string(c, swapped_stack); + size_t s_length = s.length(); + + double first = round_nearest(_right->eval_number(c, stack)); + double last = first + round_nearest(_right->_next->eval_number(c, stack)); + + if (is_nan(first) || is_nan(last)) return xpath_string(); + else if (first >= s_length + 1) return xpath_string(); + else if (first >= last) return xpath_string(); + else if (last < 1) return xpath_string(); + + size_t pos = first < 1 ? 1 : static_cast(first); + size_t end = last >= s_length + 1 ? s_length + 1 : static_cast(last); + + assert(1 <= pos && pos <= end && end <= s_length + 1); + const char_t* rbegin = s.c_str() + (pos - 1); + const char_t* rend = s.c_str() + (end - 1); + + return (end == s_length + 1 && !s.uses_heap()) ? xpath_string_const(rbegin) : xpath_string(rbegin, rend, stack.result); + } + + case ast_func_normalize_space_0: + { + xpath_string s = string_value(c.n, stack.result); + + normalize_space(s.data(stack.result)); + + return s; + } + + case ast_func_normalize_space_1: + { + xpath_string s = _left->eval_string(c, stack); + + normalize_space(s.data(stack.result)); + + return s; + } + + case ast_func_translate: + { + xpath_allocator_capture cr(stack.temp); + + xpath_stack swapped_stack = {stack.temp, stack.result}; + + xpath_string s = _left->eval_string(c, stack); + xpath_string from = _right->eval_string(c, swapped_stack); + xpath_string to = _right->_next->eval_string(c, swapped_stack); + + translate(s.data(stack.result), from.c_str(), to.c_str()); + + return s; + } + + case ast_variable: + { + assert(_rettype == _data.variable->type()); + + if (_rettype == xpath_type_string) + return xpath_string_const(_data.variable->get_string()); + + // fallthrough to type conversion + } + + default: + { + switch (_rettype) + { + case xpath_type_boolean: + return xpath_string_const(eval_boolean(c, stack) ? PUGIXML_TEXT("true") : PUGIXML_TEXT("false")); + + case xpath_type_number: + return convert_number_to_string(eval_number(c, stack), stack.result); + + case xpath_type_node_set: + { + xpath_allocator_capture cr(stack.temp); + + xpath_stack swapped_stack = {stack.temp, stack.result}; + + xpath_node_set_raw ns = eval_node_set(c, swapped_stack); + return ns.empty() ? xpath_string() : string_value(ns.first(), stack.result); + } + + default: + assert(!"Wrong expression for return type string"); + return xpath_string(); + } + } + } + } + + xpath_node_set_raw eval_node_set(const xpath_context& c, const xpath_stack& stack) + { + switch (_type) + { + case ast_op_union: + { + xpath_allocator_capture cr(stack.temp); + + xpath_stack swapped_stack = {stack.temp, stack.result}; + + xpath_node_set_raw ls = _left->eval_node_set(c, swapped_stack); + xpath_node_set_raw rs = _right->eval_node_set(c, stack); + + // we can optimize merging two sorted sets, but this is a very rare operation, so don't bother + rs.set_type(xpath_node_set::type_unsorted); + + rs.append(ls.begin(), ls.end(), stack.result); + rs.remove_duplicates(); + + return rs; + } + + case ast_filter: + case ast_filter_posinv: + { + xpath_node_set_raw set = _left->eval_node_set(c, stack); + + // either expression is a number or it contains position() call; sort by document order + if (_type == ast_filter) set.sort_do(); + + apply_predicate(set, 0, _right, stack); + + return set; + } + + case ast_func_id: + return xpath_node_set_raw(); + + case ast_step: + { + switch (_axis) + { + case axis_ancestor: + return step_do(c, stack, axis_to_type()); + + case axis_ancestor_or_self: + return step_do(c, stack, axis_to_type()); + + case axis_attribute: + return step_do(c, stack, axis_to_type()); + + case axis_child: + return step_do(c, stack, axis_to_type()); + + case axis_descendant: + return step_do(c, stack, axis_to_type()); + + case axis_descendant_or_self: + return step_do(c, stack, axis_to_type()); + + case axis_following: + return step_do(c, stack, axis_to_type()); + + case axis_following_sibling: + return step_do(c, stack, axis_to_type()); + + case axis_namespace: + // namespaced axis is not supported + return xpath_node_set_raw(); + + case axis_parent: + return step_do(c, stack, axis_to_type()); + + case axis_preceding: + return step_do(c, stack, axis_to_type()); + + case axis_preceding_sibling: + return step_do(c, stack, axis_to_type()); + + case axis_self: + return step_do(c, stack, axis_to_type()); + + default: + assert(!"Unknown axis"); + return xpath_node_set_raw(); + } + } + + case ast_step_root: + { + assert(!_right); // root step can't have any predicates + + xpath_node_set_raw ns; + + ns.set_type(xpath_node_set::type_sorted); + + if (c.n.node()) ns.push_back(c.n.node().root(), stack.result); + else if (c.n.attribute()) ns.push_back(c.n.parent().root(), stack.result); + + return ns; + } + + case ast_variable: + { + assert(_rettype == _data.variable->type()); + + if (_rettype == xpath_type_node_set) + { + const xpath_node_set& s = _data.variable->get_node_set(); + + xpath_node_set_raw ns; + + ns.set_type(s.type()); + ns.append(s.begin(), s.end(), stack.result); + + return ns; + } + + // fallthrough to type conversion + } + + default: + assert(!"Wrong expression for return type node set"); + return xpath_node_set_raw(); + } + } + + bool is_posinv() + { + switch (_type) + { + case ast_func_position: + return false; + + case ast_string_constant: + case ast_number_constant: + case ast_variable: + return true; + + case ast_step: + case ast_step_root: + return true; + + case ast_predicate: + case ast_filter: + case ast_filter_posinv: + return true; + + default: + if (_left && !_left->is_posinv()) return false; + + for (xpath_ast_node* n = _right; n; n = n->_next) + if (!n->is_posinv()) return false; + + return true; + } + } + + xpath_value_type rettype() const + { + return static_cast(_rettype); + } + }; + + struct xpath_parser + { + xpath_allocator* _alloc; + xpath_lexer _lexer; + + const char_t* _query; + xpath_variable_set* _variables; + + xpath_parse_result* _result; + + char_t _scratch[32]; + + #ifdef PUGIXML_NO_EXCEPTIONS + jmp_buf _error_handler; + #endif + + void throw_error(const char* message) + { + _result->error = message; + _result->offset = _lexer.current_pos() - _query; + + #ifdef PUGIXML_NO_EXCEPTIONS + longjmp(_error_handler, 1); + #else + throw xpath_exception(*_result); + #endif + } + + void throw_error_oom() + { + #ifdef PUGIXML_NO_EXCEPTIONS + throw_error("Out of memory"); + #else + throw std::bad_alloc(); + #endif + } + + void* alloc_node() + { + void* result = _alloc->allocate_nothrow(sizeof(xpath_ast_node)); + + if (!result) throw_error_oom(); + + return result; + } + + const char_t* alloc_string(const xpath_lexer_string& value) + { + if (value.begin) + { + size_t length = static_cast(value.end - value.begin); + + char_t* c = static_cast(_alloc->allocate_nothrow((length + 1) * sizeof(char_t))); + if (!c) throw_error_oom(); + assert(c); // workaround for clang static analysis + + memcpy(c, value.begin, length * sizeof(char_t)); + c[length] = 0; + + return c; + } + else return 0; + } + + xpath_ast_node* parse_function_helper(ast_type_t type0, ast_type_t type1, size_t argc, xpath_ast_node* args[2]) + { + assert(argc <= 1); + + if (argc == 1 && args[0]->rettype() != xpath_type_node_set) throw_error("Function has to be applied to node set"); + + return new (alloc_node()) xpath_ast_node(argc == 0 ? type0 : type1, xpath_type_string, args[0]); + } + + xpath_ast_node* parse_function(const xpath_lexer_string& name, size_t argc, xpath_ast_node* args[2]) + { + switch (name.begin[0]) + { + case 'b': + if (name == PUGIXML_TEXT("boolean") && argc == 1) + return new (alloc_node()) xpath_ast_node(ast_func_boolean, xpath_type_boolean, args[0]); + + break; + + case 'c': + if (name == PUGIXML_TEXT("count") && argc == 1) + { + if (args[0]->rettype() != xpath_type_node_set) throw_error("Function has to be applied to node set"); + return new (alloc_node()) xpath_ast_node(ast_func_count, xpath_type_number, args[0]); + } + else if (name == PUGIXML_TEXT("contains") && argc == 2) + return new (alloc_node()) xpath_ast_node(ast_func_contains, xpath_type_boolean, args[0], args[1]); + else if (name == PUGIXML_TEXT("concat") && argc >= 2) + return new (alloc_node()) xpath_ast_node(ast_func_concat, xpath_type_string, args[0], args[1]); + else if (name == PUGIXML_TEXT("ceiling") && argc == 1) + return new (alloc_node()) xpath_ast_node(ast_func_ceiling, xpath_type_number, args[0]); + + break; + + case 'f': + if (name == PUGIXML_TEXT("false") && argc == 0) + return new (alloc_node()) xpath_ast_node(ast_func_false, xpath_type_boolean); + else if (name == PUGIXML_TEXT("floor") && argc == 1) + return new (alloc_node()) xpath_ast_node(ast_func_floor, xpath_type_number, args[0]); + + break; + + case 'i': + if (name == PUGIXML_TEXT("id") && argc == 1) + return new (alloc_node()) xpath_ast_node(ast_func_id, xpath_type_node_set, args[0]); + + break; + + case 'l': + if (name == PUGIXML_TEXT("last") && argc == 0) + return new (alloc_node()) xpath_ast_node(ast_func_last, xpath_type_number); + else if (name == PUGIXML_TEXT("lang") && argc == 1) + return new (alloc_node()) xpath_ast_node(ast_func_lang, xpath_type_boolean, args[0]); + else if (name == PUGIXML_TEXT("local-name") && argc <= 1) + return parse_function_helper(ast_func_local_name_0, ast_func_local_name_1, argc, args); + + break; + + case 'n': + if (name == PUGIXML_TEXT("name") && argc <= 1) + return parse_function_helper(ast_func_name_0, ast_func_name_1, argc, args); + else if (name == PUGIXML_TEXT("namespace-uri") && argc <= 1) + return parse_function_helper(ast_func_namespace_uri_0, ast_func_namespace_uri_1, argc, args); + else if (name == PUGIXML_TEXT("normalize-space") && argc <= 1) + return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_normalize_space_0 : ast_func_normalize_space_1, xpath_type_string, args[0], args[1]); + else if (name == PUGIXML_TEXT("not") && argc == 1) + return new (alloc_node()) xpath_ast_node(ast_func_not, xpath_type_boolean, args[0]); + else if (name == PUGIXML_TEXT("number") && argc <= 1) + return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_number_0 : ast_func_number_1, xpath_type_number, args[0]); + + break; + + case 'p': + if (name == PUGIXML_TEXT("position") && argc == 0) + return new (alloc_node()) xpath_ast_node(ast_func_position, xpath_type_number); + + break; + + case 'r': + if (name == PUGIXML_TEXT("round") && argc == 1) + return new (alloc_node()) xpath_ast_node(ast_func_round, xpath_type_number, args[0]); + + break; + + case 's': + if (name == PUGIXML_TEXT("string") && argc <= 1) + return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_0 : ast_func_string_1, xpath_type_string, args[0]); + else if (name == PUGIXML_TEXT("string-length") && argc <= 1) + return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_length_0 : ast_func_string_length_1, xpath_type_number, args[0]); + else if (name == PUGIXML_TEXT("starts-with") && argc == 2) + return new (alloc_node()) xpath_ast_node(ast_func_starts_with, xpath_type_boolean, args[0], args[1]); + else if (name == PUGIXML_TEXT("substring-before") && argc == 2) + return new (alloc_node()) xpath_ast_node(ast_func_substring_before, xpath_type_string, args[0], args[1]); + else if (name == PUGIXML_TEXT("substring-after") && argc == 2) + return new (alloc_node()) xpath_ast_node(ast_func_substring_after, xpath_type_string, args[0], args[1]); + else if (name == PUGIXML_TEXT("substring") && (argc == 2 || argc == 3)) + return new (alloc_node()) xpath_ast_node(argc == 2 ? ast_func_substring_2 : ast_func_substring_3, xpath_type_string, args[0], args[1]); + else if (name == PUGIXML_TEXT("sum") && argc == 1) + { + if (args[0]->rettype() != xpath_type_node_set) throw_error("Function has to be applied to node set"); + return new (alloc_node()) xpath_ast_node(ast_func_sum, xpath_type_number, args[0]); + } + + break; + + case 't': + if (name == PUGIXML_TEXT("translate") && argc == 3) + return new (alloc_node()) xpath_ast_node(ast_func_translate, xpath_type_string, args[0], args[1]); + else if (name == PUGIXML_TEXT("true") && argc == 0) + return new (alloc_node()) xpath_ast_node(ast_func_true, xpath_type_boolean); + + break; + + default: + break; + } + + throw_error("Unrecognized function or wrong parameter count"); + + return 0; + } + + axis_t parse_axis_name(const xpath_lexer_string& name, bool& specified) + { + specified = true; + + switch (name.begin[0]) + { + case 'a': + if (name == PUGIXML_TEXT("ancestor")) + return axis_ancestor; + else if (name == PUGIXML_TEXT("ancestor-or-self")) + return axis_ancestor_or_self; + else if (name == PUGIXML_TEXT("attribute")) + return axis_attribute; + + break; + + case 'c': + if (name == PUGIXML_TEXT("child")) + return axis_child; + + break; + + case 'd': + if (name == PUGIXML_TEXT("descendant")) + return axis_descendant; + else if (name == PUGIXML_TEXT("descendant-or-self")) + return axis_descendant_or_self; + + break; + + case 'f': + if (name == PUGIXML_TEXT("following")) + return axis_following; + else if (name == PUGIXML_TEXT("following-sibling")) + return axis_following_sibling; + + break; + + case 'n': + if (name == PUGIXML_TEXT("namespace")) + return axis_namespace; + + break; + + case 'p': + if (name == PUGIXML_TEXT("parent")) + return axis_parent; + else if (name == PUGIXML_TEXT("preceding")) + return axis_preceding; + else if (name == PUGIXML_TEXT("preceding-sibling")) + return axis_preceding_sibling; + + break; + + case 's': + if (name == PUGIXML_TEXT("self")) + return axis_self; + + break; + + default: + break; + } + + specified = false; + return axis_child; + } + + nodetest_t parse_node_test_type(const xpath_lexer_string& name) + { + switch (name.begin[0]) + { + case 'c': + if (name == PUGIXML_TEXT("comment")) + return nodetest_type_comment; + + break; + + case 'n': + if (name == PUGIXML_TEXT("node")) + return nodetest_type_node; + + break; + + case 'p': + if (name == PUGIXML_TEXT("processing-instruction")) + return nodetest_type_pi; + + break; + + case 't': + if (name == PUGIXML_TEXT("text")) + return nodetest_type_text; + + break; + + default: + break; + } + + return nodetest_none; + } + + // PrimaryExpr ::= VariableReference | '(' Expr ')' | Literal | Number | FunctionCall + xpath_ast_node* parse_primary_expression() + { + switch (_lexer.current()) + { + case lex_var_ref: + { + xpath_lexer_string name = _lexer.contents(); + + if (!_variables) + throw_error("Unknown variable: variable set is not provided"); + + xpath_variable* var = get_variable_scratch(_scratch, _variables, name.begin, name.end); + + if (!var) + throw_error("Unknown variable: variable set does not contain the given name"); + + _lexer.next(); + + return new (alloc_node()) xpath_ast_node(ast_variable, var->type(), var); + } + + case lex_open_brace: + { + _lexer.next(); + + xpath_ast_node* n = parse_expression(); + + if (_lexer.current() != lex_close_brace) + throw_error("Unmatched braces"); + + _lexer.next(); + + return n; + } + + case lex_quoted_string: + { + const char_t* value = alloc_string(_lexer.contents()); + + xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_string_constant, xpath_type_string, value); + _lexer.next(); + + return n; + } + + case lex_number: + { + double value = 0; + + if (!convert_string_to_number_scratch(_scratch, _lexer.contents().begin, _lexer.contents().end, &value)) + throw_error_oom(); + + xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_number_constant, xpath_type_number, value); + _lexer.next(); + + return n; + } + + case lex_string: + { + xpath_ast_node* args[2] = {0}; + size_t argc = 0; + + xpath_lexer_string function = _lexer.contents(); + _lexer.next(); + + xpath_ast_node* last_arg = 0; + + if (_lexer.current() != lex_open_brace) + throw_error("Unrecognized function call"); + _lexer.next(); + + if (_lexer.current() != lex_close_brace) + args[argc++] = parse_expression(); + + while (_lexer.current() != lex_close_brace) + { + if (_lexer.current() != lex_comma) + throw_error("No comma between function arguments"); + _lexer.next(); + + xpath_ast_node* n = parse_expression(); + + if (argc < 2) args[argc] = n; + else last_arg->set_next(n); + + argc++; + last_arg = n; + } + + _lexer.next(); + + return parse_function(function, argc, args); + } + + default: + throw_error("Unrecognizable primary expression"); + + return 0; + } + } + + // FilterExpr ::= PrimaryExpr | FilterExpr Predicate + // Predicate ::= '[' PredicateExpr ']' + // PredicateExpr ::= Expr + xpath_ast_node* parse_filter_expression() + { + xpath_ast_node* n = parse_primary_expression(); + + while (_lexer.current() == lex_open_square_brace) + { + _lexer.next(); + + xpath_ast_node* expr = parse_expression(); + + if (n->rettype() != xpath_type_node_set) throw_error("Predicate has to be applied to node set"); + + bool posinv = expr->rettype() != xpath_type_number && expr->is_posinv(); + + n = new (alloc_node()) xpath_ast_node(posinv ? ast_filter_posinv : ast_filter, xpath_type_node_set, n, expr); + + if (_lexer.current() != lex_close_square_brace) + throw_error("Unmatched square brace"); + + _lexer.next(); + } + + return n; + } + + // Step ::= AxisSpecifier NodeTest Predicate* | AbbreviatedStep + // AxisSpecifier ::= AxisName '::' | '@'? + // NodeTest ::= NameTest | NodeType '(' ')' | 'processing-instruction' '(' Literal ')' + // NameTest ::= '*' | NCName ':' '*' | QName + // AbbreviatedStep ::= '.' | '..' + xpath_ast_node* parse_step(xpath_ast_node* set) + { + if (set && set->rettype() != xpath_type_node_set) + throw_error("Step has to be applied to node set"); + + bool axis_specified = false; + axis_t axis = axis_child; // implied child axis + + if (_lexer.current() == lex_axis_attribute) + { + axis = axis_attribute; + axis_specified = true; + + _lexer.next(); + } + else if (_lexer.current() == lex_dot) + { + _lexer.next(); + + return new (alloc_node()) xpath_ast_node(ast_step, set, axis_self, nodetest_type_node, 0); + } + else if (_lexer.current() == lex_double_dot) + { + _lexer.next(); + + return new (alloc_node()) xpath_ast_node(ast_step, set, axis_parent, nodetest_type_node, 0); + } + + nodetest_t nt_type = nodetest_none; + xpath_lexer_string nt_name; + + if (_lexer.current() == lex_string) + { + // node name test + nt_name = _lexer.contents(); + _lexer.next(); + + // was it an axis name? + if (_lexer.current() == lex_double_colon) + { + // parse axis name + if (axis_specified) throw_error("Two axis specifiers in one step"); + + axis = parse_axis_name(nt_name, axis_specified); + + if (!axis_specified) throw_error("Unknown axis"); + + // read actual node test + _lexer.next(); + + if (_lexer.current() == lex_multiply) + { + nt_type = nodetest_all; + nt_name = xpath_lexer_string(); + _lexer.next(); + } + else if (_lexer.current() == lex_string) + { + nt_name = _lexer.contents(); + _lexer.next(); + } + else throw_error("Unrecognized node test"); + } + + if (nt_type == nodetest_none) + { + // node type test or processing-instruction + if (_lexer.current() == lex_open_brace) + { + _lexer.next(); + + if (_lexer.current() == lex_close_brace) + { + _lexer.next(); + + nt_type = parse_node_test_type(nt_name); + + if (nt_type == nodetest_none) throw_error("Unrecognized node type"); + + nt_name = xpath_lexer_string(); + } + else if (nt_name == PUGIXML_TEXT("processing-instruction")) + { + if (_lexer.current() != lex_quoted_string) + throw_error("Only literals are allowed as arguments to processing-instruction()"); + + nt_type = nodetest_pi; + nt_name = _lexer.contents(); + _lexer.next(); + + if (_lexer.current() != lex_close_brace) + throw_error("Unmatched brace near processing-instruction()"); + _lexer.next(); + } + else + throw_error("Unmatched brace near node type test"); + + } + // QName or NCName:* + else + { + if (nt_name.end - nt_name.begin > 2 && nt_name.end[-2] == ':' && nt_name.end[-1] == '*') // NCName:* + { + nt_name.end--; // erase * + + nt_type = nodetest_all_in_namespace; + } + else nt_type = nodetest_name; + } + } + } + else if (_lexer.current() == lex_multiply) + { + nt_type = nodetest_all; + _lexer.next(); + } + else throw_error("Unrecognized node test"); + + xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step, set, axis, nt_type, alloc_string(nt_name)); + + xpath_ast_node* last = 0; + + while (_lexer.current() == lex_open_square_brace) + { + _lexer.next(); + + xpath_ast_node* expr = parse_expression(); + + xpath_ast_node* pred = new (alloc_node()) xpath_ast_node(ast_predicate, xpath_type_node_set, expr); + + if (_lexer.current() != lex_close_square_brace) + throw_error("Unmatched square brace"); + _lexer.next(); + + if (last) last->set_next(pred); + else n->set_right(pred); + + last = pred; + } + + return n; + } + + // RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | RelativeLocationPath '//' Step + xpath_ast_node* parse_relative_location_path(xpath_ast_node* set) + { + xpath_ast_node* n = parse_step(set); + + while (_lexer.current() == lex_slash || _lexer.current() == lex_double_slash) + { + lexeme_t l = _lexer.current(); + _lexer.next(); + + if (l == lex_double_slash) + n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0); + + n = parse_step(n); + } + + return n; + } + + // LocationPath ::= RelativeLocationPath | AbsoluteLocationPath + // AbsoluteLocationPath ::= '/' RelativeLocationPath? | '//' RelativeLocationPath + xpath_ast_node* parse_location_path() + { + if (_lexer.current() == lex_slash) + { + _lexer.next(); + + xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step_root, xpath_type_node_set); + + // relative location path can start from axis_attribute, dot, double_dot, multiply and string lexemes; any other lexeme means standalone root path + lexeme_t l = _lexer.current(); + + if (l == lex_string || l == lex_axis_attribute || l == lex_dot || l == lex_double_dot || l == lex_multiply) + return parse_relative_location_path(n); + else + return n; + } + else if (_lexer.current() == lex_double_slash) + { + _lexer.next(); + + xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step_root, xpath_type_node_set); + n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0); + + return parse_relative_location_path(n); + } + + // else clause moved outside of if because of bogus warning 'control may reach end of non-void function being inlined' in gcc 4.0.1 + return parse_relative_location_path(0); + } + + // PathExpr ::= LocationPath + // | FilterExpr + // | FilterExpr '/' RelativeLocationPath + // | FilterExpr '//' RelativeLocationPath + // UnionExpr ::= PathExpr | UnionExpr '|' PathExpr + // UnaryExpr ::= UnionExpr | '-' UnaryExpr + xpath_ast_node* parse_path_or_unary_expression() + { + // Clarification. + // PathExpr begins with either LocationPath or FilterExpr. + // FilterExpr begins with PrimaryExpr + // PrimaryExpr begins with '$' in case of it being a variable reference, + // '(' in case of it being an expression, string literal, number constant or + // function call. + + if (_lexer.current() == lex_var_ref || _lexer.current() == lex_open_brace || + _lexer.current() == lex_quoted_string || _lexer.current() == lex_number || + _lexer.current() == lex_string) + { + if (_lexer.current() == lex_string) + { + // This is either a function call, or not - if not, we shall proceed with location path + const char_t* state = _lexer.state(); + + while (PUGI__IS_CHARTYPE(*state, ct_space)) ++state; + + if (*state != '(') return parse_location_path(); + + // This looks like a function call; however this still can be a node-test. Check it. + if (parse_node_test_type(_lexer.contents()) != nodetest_none) return parse_location_path(); + } + + xpath_ast_node* n = parse_filter_expression(); + + if (_lexer.current() == lex_slash || _lexer.current() == lex_double_slash) + { + lexeme_t l = _lexer.current(); + _lexer.next(); + + if (l == lex_double_slash) + { + if (n->rettype() != xpath_type_node_set) throw_error("Step has to be applied to node set"); + + n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0); + } + + // select from location path + return parse_relative_location_path(n); + } + + return n; + } + else if (_lexer.current() == lex_minus) + { + _lexer.next(); + + // precedence 7+ - only parses union expressions + xpath_ast_node* expr = parse_expression_rec(parse_path_or_unary_expression(), 7); + + return new (alloc_node()) xpath_ast_node(ast_op_negate, xpath_type_number, expr); + } + else + return parse_location_path(); + } + + struct binary_op_t + { + ast_type_t asttype; + xpath_value_type rettype; + int precedence; + + binary_op_t(): asttype(ast_unknown), rettype(xpath_type_none), precedence(0) + { + } + + binary_op_t(ast_type_t asttype_, xpath_value_type rettype_, int precedence_): asttype(asttype_), rettype(rettype_), precedence(precedence_) + { + } + + static binary_op_t parse(xpath_lexer& lexer) + { + switch (lexer.current()) + { + case lex_string: + if (lexer.contents() == PUGIXML_TEXT("or")) + return binary_op_t(ast_op_or, xpath_type_boolean, 1); + else if (lexer.contents() == PUGIXML_TEXT("and")) + return binary_op_t(ast_op_and, xpath_type_boolean, 2); + else if (lexer.contents() == PUGIXML_TEXT("div")) + return binary_op_t(ast_op_divide, xpath_type_number, 6); + else if (lexer.contents() == PUGIXML_TEXT("mod")) + return binary_op_t(ast_op_mod, xpath_type_number, 6); + else + return binary_op_t(); + + case lex_equal: + return binary_op_t(ast_op_equal, xpath_type_boolean, 3); + + case lex_not_equal: + return binary_op_t(ast_op_not_equal, xpath_type_boolean, 3); + + case lex_less: + return binary_op_t(ast_op_less, xpath_type_boolean, 4); + + case lex_greater: + return binary_op_t(ast_op_greater, xpath_type_boolean, 4); + + case lex_less_or_equal: + return binary_op_t(ast_op_less_or_equal, xpath_type_boolean, 4); + + case lex_greater_or_equal: + return binary_op_t(ast_op_greater_or_equal, xpath_type_boolean, 4); + + case lex_plus: + return binary_op_t(ast_op_add, xpath_type_number, 5); + + case lex_minus: + return binary_op_t(ast_op_subtract, xpath_type_number, 5); + + case lex_multiply: + return binary_op_t(ast_op_multiply, xpath_type_number, 6); + + case lex_union: + return binary_op_t(ast_op_union, xpath_type_node_set, 7); + + default: + return binary_op_t(); + } + } + }; + + xpath_ast_node* parse_expression_rec(xpath_ast_node* lhs, int limit) + { + binary_op_t op = binary_op_t::parse(_lexer); + + while (op.asttype != ast_unknown && op.precedence >= limit) + { + _lexer.next(); + + xpath_ast_node* rhs = parse_path_or_unary_expression(); + + binary_op_t nextop = binary_op_t::parse(_lexer); + + while (nextop.asttype != ast_unknown && nextop.precedence > op.precedence) + { + rhs = parse_expression_rec(rhs, nextop.precedence); + + nextop = binary_op_t::parse(_lexer); + } + + if (op.asttype == ast_op_union && (lhs->rettype() != xpath_type_node_set || rhs->rettype() != xpath_type_node_set)) + throw_error("Union operator has to be applied to node sets"); + + lhs = new (alloc_node()) xpath_ast_node(op.asttype, op.rettype, lhs, rhs); + + op = binary_op_t::parse(_lexer); + } + + return lhs; + } + + // Expr ::= OrExpr + // OrExpr ::= AndExpr | OrExpr 'or' AndExpr + // AndExpr ::= EqualityExpr | AndExpr 'and' EqualityExpr + // EqualityExpr ::= RelationalExpr + // | EqualityExpr '=' RelationalExpr + // | EqualityExpr '!=' RelationalExpr + // RelationalExpr ::= AdditiveExpr + // | RelationalExpr '<' AdditiveExpr + // | RelationalExpr '>' AdditiveExpr + // | RelationalExpr '<=' AdditiveExpr + // | RelationalExpr '>=' AdditiveExpr + // AdditiveExpr ::= MultiplicativeExpr + // | AdditiveExpr '+' MultiplicativeExpr + // | AdditiveExpr '-' MultiplicativeExpr + // MultiplicativeExpr ::= UnaryExpr + // | MultiplicativeExpr '*' UnaryExpr + // | MultiplicativeExpr 'div' UnaryExpr + // | MultiplicativeExpr 'mod' UnaryExpr + xpath_ast_node* parse_expression() + { + return parse_expression_rec(parse_path_or_unary_expression(), 0); + } + + xpath_parser(const char_t* query, xpath_variable_set* variables, xpath_allocator* alloc, xpath_parse_result* result): _alloc(alloc), _lexer(query), _query(query), _variables(variables), _result(result) + { + } + + xpath_ast_node* parse() + { + xpath_ast_node* result = parse_expression(); + + if (_lexer.current() != lex_eof) + { + // there are still unparsed tokens left, error + throw_error("Incorrect query"); + } + + return result; + } + + static xpath_ast_node* parse(const char_t* query, xpath_variable_set* variables, xpath_allocator* alloc, xpath_parse_result* result) + { + xpath_parser parser(query, variables, alloc, result); + + #ifdef PUGIXML_NO_EXCEPTIONS + int error = setjmp(parser._error_handler); + + return (error == 0) ? parser.parse() : 0; + #else + return parser.parse(); + #endif + } + }; + + struct xpath_query_impl + { + static xpath_query_impl* create() + { + void* memory = xml_memory::allocate(sizeof(xpath_query_impl)); + + return new (memory) xpath_query_impl(); + } + + static void destroy(void* ptr) + { + if (!ptr) return; + + // free all allocated pages + static_cast(ptr)->alloc.release(); + + // free allocator memory (with the first page) + xml_memory::deallocate(ptr); + } + + xpath_query_impl(): root(0), alloc(&block) + { + block.next = 0; + } + + xpath_ast_node* root; + xpath_allocator alloc; + xpath_memory_block block; + }; + + PUGI__FN xpath_string evaluate_string_impl(xpath_query_impl* impl, const xpath_node& n, xpath_stack_data& sd) + { + if (!impl) return xpath_string(); + + #ifdef PUGIXML_NO_EXCEPTIONS + if (setjmp(sd.error_handler)) return xpath_string(); + #endif + + xpath_context c(n, 1, 1); + + return impl->root->eval_string(c, sd.stack); + } +PUGI__NS_END + +namespace pugi +{ +#ifndef PUGIXML_NO_EXCEPTIONS + PUGI__FN xpath_exception::xpath_exception(const xpath_parse_result& result_): _result(result_) + { + assert(_result.error); + } + + PUGI__FN const char* xpath_exception::what() const throw() + { + return _result.error; + } + + PUGI__FN const xpath_parse_result& xpath_exception::result() const + { + return _result; + } +#endif + + PUGI__FN xpath_node::xpath_node() + { + } + + PUGI__FN xpath_node::xpath_node(const xml_node& node_): _node(node_) + { + } + + PUGI__FN xpath_node::xpath_node(const xml_attribute& attribute_, const xml_node& parent_): _node(attribute_ ? parent_ : xml_node()), _attribute(attribute_) + { + } + + PUGI__FN xml_node xpath_node::node() const + { + return _attribute ? xml_node() : _node; + } + + PUGI__FN xml_attribute xpath_node::attribute() const + { + return _attribute; + } + + PUGI__FN xml_node xpath_node::parent() const + { + return _attribute ? _node : _node.parent(); + } + + PUGI__FN static void unspecified_bool_xpath_node(xpath_node***) + { + } + + PUGI__FN xpath_node::operator xpath_node::unspecified_bool_type() const + { + return (_node || _attribute) ? unspecified_bool_xpath_node : 0; + } + + PUGI__FN bool xpath_node::operator!() const + { + return !(_node || _attribute); + } + + PUGI__FN bool xpath_node::operator==(const xpath_node& n) const + { + return _node == n._node && _attribute == n._attribute; + } + + PUGI__FN bool xpath_node::operator!=(const xpath_node& n) const + { + return _node != n._node || _attribute != n._attribute; + } + +#ifdef __BORLANDC__ + PUGI__FN bool operator&&(const xpath_node& lhs, bool rhs) + { + return (bool)lhs && rhs; + } + + PUGI__FN bool operator||(const xpath_node& lhs, bool rhs) + { + return (bool)lhs || rhs; + } +#endif + + PUGI__FN void xpath_node_set::_assign(const_iterator begin_, const_iterator end_) + { + assert(begin_ <= end_); + + size_t size_ = static_cast(end_ - begin_); + + if (size_ <= 1) + { + // deallocate old buffer + if (_begin != &_storage) impl::xml_memory::deallocate(_begin); + + // use internal buffer + if (begin_ != end_) _storage = *begin_; + + _begin = &_storage; + _end = &_storage + size_; + } + else + { + // make heap copy + xpath_node* storage = static_cast(impl::xml_memory::allocate(size_ * sizeof(xpath_node))); + + if (!storage) + { + #ifdef PUGIXML_NO_EXCEPTIONS + return; + #else + throw std::bad_alloc(); + #endif + } + + memcpy(storage, begin_, size_ * sizeof(xpath_node)); + + // deallocate old buffer + if (_begin != &_storage) impl::xml_memory::deallocate(_begin); + + // finalize + _begin = storage; + _end = storage + size_; + } + } + + PUGI__FN xpath_node_set::xpath_node_set(): _type(type_unsorted), _begin(&_storage), _end(&_storage) + { + } + + PUGI__FN xpath_node_set::xpath_node_set(const_iterator begin_, const_iterator end_, type_t type_): _type(type_), _begin(&_storage), _end(&_storage) + { + _assign(begin_, end_); + } + + PUGI__FN xpath_node_set::~xpath_node_set() + { + if (_begin != &_storage) impl::xml_memory::deallocate(_begin); + } + + PUGI__FN xpath_node_set::xpath_node_set(const xpath_node_set& ns): _type(ns._type), _begin(&_storage), _end(&_storage) + { + _assign(ns._begin, ns._end); + } + + PUGI__FN xpath_node_set& xpath_node_set::operator=(const xpath_node_set& ns) + { + if (this == &ns) return *this; + + _type = ns._type; + _assign(ns._begin, ns._end); + + return *this; + } + + PUGI__FN xpath_node_set::type_t xpath_node_set::type() const + { + return _type; + } + + PUGI__FN size_t xpath_node_set::size() const + { + return _end - _begin; + } + + PUGI__FN bool xpath_node_set::empty() const + { + return _begin == _end; + } + + PUGI__FN const xpath_node& xpath_node_set::operator[](size_t index) const + { + assert(index < size()); + return _begin[index]; + } + + PUGI__FN xpath_node_set::const_iterator xpath_node_set::begin() const + { + return _begin; + } + + PUGI__FN xpath_node_set::const_iterator xpath_node_set::end() const + { + return _end; + } + + PUGI__FN void xpath_node_set::sort(bool reverse) + { + _type = impl::xpath_sort(_begin, _end, _type, reverse); + } + + PUGI__FN xpath_node xpath_node_set::first() const + { + return impl::xpath_first(_begin, _end, _type); + } + + PUGI__FN xpath_parse_result::xpath_parse_result(): error("Internal error"), offset(0) + { + } + + PUGI__FN xpath_parse_result::operator bool() const + { + return error == 0; + } + + PUGI__FN const char* xpath_parse_result::description() const + { + return error ? error : "No error"; + } + + PUGI__FN xpath_variable::xpath_variable(): _type(xpath_type_none), _next(0) + { + } + + PUGI__FN const char_t* xpath_variable::name() const + { + switch (_type) + { + case xpath_type_node_set: + return static_cast(this)->name; + + case xpath_type_number: + return static_cast(this)->name; + + case xpath_type_string: + return static_cast(this)->name; + + case xpath_type_boolean: + return static_cast(this)->name; + + default: + assert(!"Invalid variable type"); + return 0; + } + } + + PUGI__FN xpath_value_type xpath_variable::type() const + { + return _type; + } + + PUGI__FN bool xpath_variable::get_boolean() const + { + return (_type == xpath_type_boolean) ? static_cast(this)->value : false; + } + + PUGI__FN double xpath_variable::get_number() const + { + return (_type == xpath_type_number) ? static_cast(this)->value : impl::gen_nan(); + } + + PUGI__FN const char_t* xpath_variable::get_string() const + { + const char_t* value = (_type == xpath_type_string) ? static_cast(this)->value : 0; + return value ? value : PUGIXML_TEXT(""); + } + + PUGI__FN const xpath_node_set& xpath_variable::get_node_set() const + { + return (_type == xpath_type_node_set) ? static_cast(this)->value : impl::dummy_node_set; + } + + PUGI__FN bool xpath_variable::set(bool value) + { + if (_type != xpath_type_boolean) return false; + + static_cast(this)->value = value; + return true; + } + + PUGI__FN bool xpath_variable::set(double value) + { + if (_type != xpath_type_number) return false; + + static_cast(this)->value = value; + return true; + } + + PUGI__FN bool xpath_variable::set(const char_t* value) + { + if (_type != xpath_type_string) return false; + + impl::xpath_variable_string* var = static_cast(this); + + // duplicate string + size_t size = (impl::strlength(value) + 1) * sizeof(char_t); + + char_t* copy = static_cast(impl::xml_memory::allocate(size)); + if (!copy) return false; + + memcpy(copy, value, size); + + // replace old string + if (var->value) impl::xml_memory::deallocate(var->value); + var->value = copy; + + return true; + } + + PUGI__FN bool xpath_variable::set(const xpath_node_set& value) + { + if (_type != xpath_type_node_set) return false; + + static_cast(this)->value = value; + return true; + } + + PUGI__FN xpath_variable_set::xpath_variable_set() + { + for (size_t i = 0; i < sizeof(_data) / sizeof(_data[0]); ++i) _data[i] = 0; + } + + PUGI__FN xpath_variable_set::~xpath_variable_set() + { + for (size_t i = 0; i < sizeof(_data) / sizeof(_data[0]); ++i) + { + xpath_variable* var = _data[i]; + + while (var) + { + xpath_variable* next = var->_next; + + impl::delete_xpath_variable(var->_type, var); + + var = next; + } + } + } + + PUGI__FN xpath_variable* xpath_variable_set::find(const char_t* name) const + { + const size_t hash_size = sizeof(_data) / sizeof(_data[0]); + size_t hash = impl::hash_string(name) % hash_size; + + // look for existing variable + for (xpath_variable* var = _data[hash]; var; var = var->_next) + if (impl::strequal(var->name(), name)) + return var; + + return 0; + } + + PUGI__FN xpath_variable* xpath_variable_set::add(const char_t* name, xpath_value_type type) + { + const size_t hash_size = sizeof(_data) / sizeof(_data[0]); + size_t hash = impl::hash_string(name) % hash_size; + + // look for existing variable + for (xpath_variable* var = _data[hash]; var; var = var->_next) + if (impl::strequal(var->name(), name)) + return var->type() == type ? var : 0; + + // add new variable + xpath_variable* result = impl::new_xpath_variable(type, name); + + if (result) + { + result->_type = type; + result->_next = _data[hash]; + + _data[hash] = result; + } + + return result; + } + + PUGI__FN bool xpath_variable_set::set(const char_t* name, bool value) + { + xpath_variable* var = add(name, xpath_type_boolean); + return var ? var->set(value) : false; + } + + PUGI__FN bool xpath_variable_set::set(const char_t* name, double value) + { + xpath_variable* var = add(name, xpath_type_number); + return var ? var->set(value) : false; + } + + PUGI__FN bool xpath_variable_set::set(const char_t* name, const char_t* value) + { + xpath_variable* var = add(name, xpath_type_string); + return var ? var->set(value) : false; + } + + PUGI__FN bool xpath_variable_set::set(const char_t* name, const xpath_node_set& value) + { + xpath_variable* var = add(name, xpath_type_node_set); + return var ? var->set(value) : false; + } + + PUGI__FN xpath_variable* xpath_variable_set::get(const char_t* name) + { + return find(name); + } + + PUGI__FN const xpath_variable* xpath_variable_set::get(const char_t* name) const + { + return find(name); + } + + PUGI__FN xpath_query::xpath_query(const char_t* query, xpath_variable_set* variables): _impl(0) + { + impl::xpath_query_impl* qimpl = impl::xpath_query_impl::create(); + + if (!qimpl) + { + #ifdef PUGIXML_NO_EXCEPTIONS + _result.error = "Out of memory"; + #else + throw std::bad_alloc(); + #endif + } + else + { + impl::buffer_holder impl_holder(qimpl, impl::xpath_query_impl::destroy); + + qimpl->root = impl::xpath_parser::parse(query, variables, &qimpl->alloc, &_result); + + if (qimpl->root) + { + _impl = static_cast(impl_holder.release()); + _result.error = 0; + } + } + } + + PUGI__FN xpath_query::~xpath_query() + { + impl::xpath_query_impl::destroy(_impl); + } + + PUGI__FN xpath_value_type xpath_query::return_type() const + { + if (!_impl) return xpath_type_none; + + return static_cast(_impl)->root->rettype(); + } + + PUGI__FN bool xpath_query::evaluate_boolean(const xpath_node& n) const + { + if (!_impl) return false; + + impl::xpath_context c(n, 1, 1); + impl::xpath_stack_data sd; + + #ifdef PUGIXML_NO_EXCEPTIONS + if (setjmp(sd.error_handler)) return false; + #endif + + return static_cast(_impl)->root->eval_boolean(c, sd.stack); + } + + PUGI__FN double xpath_query::evaluate_number(const xpath_node& n) const + { + if (!_impl) return impl::gen_nan(); + + impl::xpath_context c(n, 1, 1); + impl::xpath_stack_data sd; + + #ifdef PUGIXML_NO_EXCEPTIONS + if (setjmp(sd.error_handler)) return impl::gen_nan(); + #endif + + return static_cast(_impl)->root->eval_number(c, sd.stack); + } + +#ifndef PUGIXML_NO_STL + PUGI__FN string_t xpath_query::evaluate_string(const xpath_node& n) const + { + impl::xpath_stack_data sd; + + return impl::evaluate_string_impl(static_cast(_impl), n, sd).c_str(); + } +#endif + + PUGI__FN size_t xpath_query::evaluate_string(char_t* buffer, size_t capacity, const xpath_node& n) const + { + impl::xpath_stack_data sd; + + impl::xpath_string r = impl::evaluate_string_impl(static_cast(_impl), n, sd); + + size_t full_size = r.length() + 1; + + if (capacity > 0) + { + size_t size = (full_size < capacity) ? full_size : capacity; + assert(size > 0); + + memcpy(buffer, r.c_str(), (size - 1) * sizeof(char_t)); + buffer[size - 1] = 0; + } + + return full_size; + } + + PUGI__FN xpath_node_set xpath_query::evaluate_node_set(const xpath_node& n) const + { + if (!_impl) return xpath_node_set(); + + impl::xpath_ast_node* root = static_cast(_impl)->root; + + if (root->rettype() != xpath_type_node_set) + { + #ifdef PUGIXML_NO_EXCEPTIONS + return xpath_node_set(); + #else + xpath_parse_result res; + res.error = "Expression does not evaluate to node set"; + + throw xpath_exception(res); + #endif + } + + impl::xpath_context c(n, 1, 1); + impl::xpath_stack_data sd; + + #ifdef PUGIXML_NO_EXCEPTIONS + if (setjmp(sd.error_handler)) return xpath_node_set(); + #endif + + impl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack); + + return xpath_node_set(r.begin(), r.end(), r.type()); + } + + PUGI__FN const xpath_parse_result& xpath_query::result() const + { + return _result; + } + + PUGI__FN static void unspecified_bool_xpath_query(xpath_query***) + { + } + + PUGI__FN xpath_query::operator xpath_query::unspecified_bool_type() const + { + return _impl ? unspecified_bool_xpath_query : 0; + } + + PUGI__FN bool xpath_query::operator!() const + { + return !_impl; + } + + PUGI__FN xpath_node xml_node::select_single_node(const char_t* query, xpath_variable_set* variables) const + { + xpath_query q(query, variables); + return select_single_node(q); + } + + PUGI__FN xpath_node xml_node::select_single_node(const xpath_query& query) const + { + xpath_node_set s = query.evaluate_node_set(*this); + return s.empty() ? xpath_node() : s.first(); + } + + PUGI__FN xpath_node_set xml_node::select_nodes(const char_t* query, xpath_variable_set* variables) const + { + xpath_query q(query, variables); + return select_nodes(q); + } + + PUGI__FN xpath_node_set xml_node::select_nodes(const xpath_query& query) const + { + return query.evaluate_node_set(*this); + } +} + +#endif + +#ifdef __BORLANDC__ +# pragma option pop +#endif + +// Intel C++ does not properly keep warning state for function templates, +// so popping warning state at the end of translation unit leads to warnings in the middle. +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) +# pragma warning(pop) +#endif + +// Undefine all local macros (makes sure we're not leaking macros in header-only mode) +#undef PUGI__NO_INLINE +#undef PUGI__STATIC_ASSERT +#undef PUGI__DMC_VOLATILE +#undef PUGI__MSVC_CRT_VERSION +#undef PUGI__NS_BEGIN +#undef PUGI__NS_END +#undef PUGI__FN +#undef PUGI__FN_NO_INLINE +#undef PUGI__IS_CHARTYPE_IMPL +#undef PUGI__IS_CHARTYPE +#undef PUGI__IS_CHARTYPEX +#undef PUGI__SKIPWS +#undef PUGI__OPTSET +#undef PUGI__PUSHNODE +#undef PUGI__POPNODE +#undef PUGI__SCANFOR +#undef PUGI__SCANWHILE +#undef PUGI__ENDSEG +#undef PUGI__THROW_ERROR +#undef PUGI__CHECK_ERROR + +#endif + +/** + * Copyright (c) 2006-2014 Arseny Kapoulkine + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ diff --git a/src/common/pugixml.h b/src/common/pugixml.h new file mode 100644 index 000000000..8f45cf6e4 --- /dev/null +++ b/src/common/pugixml.h @@ -0,0 +1,1332 @@ +/** + * pugixml parser - version 1.4 + * -------------------------------------------------------- + * Copyright (C) 2006-2014, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com) + * Report bugs and download new versions at http://pugixml.org/ + * + * This library is distributed under the MIT License. See notice at the end + * of this file. + * + * This work is based on the pugxml parser, which is: + * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net) + */ + +#ifndef PUGIXML_VERSION +// Define version macro; evaluates to major * 100 + minor so that it's safe to use in less-than comparisons +# define PUGIXML_VERSION 140 +#endif + +// Include user configuration file (this can define various configuration macros) +#include "pugiconfig.h" + +#ifndef HEADER_PUGIXML_HPP +#define HEADER_PUGIXML_HPP + +// Include stddef.h for size_t and ptrdiff_t +#include + +// Include exception header for XPath +#if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS) +# include +#endif + +// Include STL headers +#ifndef PUGIXML_NO_STL +# include +# include +# include +#endif + +// Macro for deprecated features +#ifndef PUGIXML_DEPRECATED +# if defined(__GNUC__) +# define PUGIXML_DEPRECATED __attribute__((deprecated)) +# elif defined(_MSC_VER) && _MSC_VER >= 1300 +# define PUGIXML_DEPRECATED __declspec(deprecated) +# else +# define PUGIXML_DEPRECATED +# endif +#endif + +// If no API is defined, assume default +#ifndef PUGIXML_API +# define PUGIXML_API +#endif + +// If no API for classes is defined, assume default +#ifndef PUGIXML_CLASS +# define PUGIXML_CLASS PUGIXML_API +#endif + +// If no API for functions is defined, assume default +#ifndef PUGIXML_FUNCTION +# define PUGIXML_FUNCTION PUGIXML_API +#endif + +// If the platform is known to have long long support, enable long long functions +#ifndef PUGIXML_HAS_LONG_LONG +# if defined(__cplusplus) && __cplusplus >= 201103 +# define PUGIXML_HAS_LONG_LONG +# elif defined(_MSC_VER) && _MSC_VER >= 1400 +# define PUGIXML_HAS_LONG_LONG +# endif +#endif + +// Character interface macros +#ifdef PUGIXML_WCHAR_MODE +# define PUGIXML_TEXT(t) L ## t +# define PUGIXML_CHAR wchar_t +#else +# define PUGIXML_TEXT(t) t +# define PUGIXML_CHAR char +#endif + +namespace pugi +{ + // Character type used for all internal storage and operations; depends on PUGIXML_WCHAR_MODE + typedef PUGIXML_CHAR char_t; + +#ifndef PUGIXML_NO_STL + // String type used for operations that work with STL string; depends on PUGIXML_WCHAR_MODE + typedef std::basic_string, std::allocator > string_t; +#endif +} + +// The PugiXML namespace +namespace pugi +{ + // Tree node types + enum xml_node_type + { + node_null, // Empty (null) node handle + node_document, // A document tree's absolute root + node_element, // Element tag, i.e. '' + node_pcdata, // Plain character data, i.e. 'text' + node_cdata, // Character data, i.e. '' + node_comment, // Comment tag, i.e. '' + node_pi, // Processing instruction, i.e. '' + node_declaration, // Document declaration, i.e. '' + node_doctype // Document type declaration, i.e. '' + }; + + // Parsing options + + // Minimal parsing mode (equivalent to turning all other flags off). + // Only elements and PCDATA sections are added to the DOM tree, no text conversions are performed. + const unsigned int parse_minimal = 0x0000; + + // This flag determines if processing instructions (node_pi) are added to the DOM tree. This flag is off by default. + const unsigned int parse_pi = 0x0001; + + // This flag determines if comments (node_comment) are added to the DOM tree. This flag is off by default. + const unsigned int parse_comments = 0x0002; + + // This flag determines if CDATA sections (node_cdata) are added to the DOM tree. This flag is on by default. + const unsigned int parse_cdata = 0x0004; + + // This flag determines if plain character data (node_pcdata) that consist only of whitespace are added to the DOM tree. + // This flag is off by default; turning it on usually results in slower parsing and more memory consumption. + const unsigned int parse_ws_pcdata = 0x0008; + + // This flag determines if character and entity references are expanded during parsing. This flag is on by default. + const unsigned int parse_escapes = 0x0010; + + // This flag determines if EOL characters are normalized (converted to #xA) during parsing. This flag is on by default. + const unsigned int parse_eol = 0x0020; + + // This flag determines if attribute values are normalized using CDATA normalization rules during parsing. This flag is on by default. + const unsigned int parse_wconv_attribute = 0x0040; + + // This flag determines if attribute values are normalized using NMTOKENS normalization rules during parsing. This flag is off by default. + const unsigned int parse_wnorm_attribute = 0x0080; + + // This flag determines if document declaration (node_declaration) is added to the DOM tree. This flag is off by default. + const unsigned int parse_declaration = 0x0100; + + // This flag determines if document type declaration (node_doctype) is added to the DOM tree. This flag is off by default. + const unsigned int parse_doctype = 0x0200; + + // This flag determines if plain character data (node_pcdata) that is the only child of the parent node and that consists only + // of whitespace is added to the DOM tree. + // This flag is off by default; turning it on may result in slower parsing and more memory consumption. + const unsigned int parse_ws_pcdata_single = 0x0400; + + // This flag determines if leading and trailing whitespace is to be removed from plain character data. This flag is off by default. + const unsigned int parse_trim_pcdata = 0x0800; + + // This flag determines if plain character data that does not have a parent node is added to the DOM tree, and if an empty document + // is a valid document. This flag is off by default. + const unsigned int parse_fragment = 0x1000; + + // The default parsing mode. + // Elements, PCDATA and CDATA sections are added to the DOM tree, character/reference entities are expanded, + // End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules. + const unsigned int parse_default = parse_cdata | parse_escapes | parse_wconv_attribute | parse_eol; + + // The full parsing mode. + // Nodes of all types are added to the DOM tree, character/reference entities are expanded, + // End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules. + const unsigned int parse_full = parse_default | parse_pi | parse_comments | parse_declaration | parse_doctype; + + // These flags determine the encoding of input data for XML document + enum xml_encoding + { + encoding_auto, // Auto-detect input encoding using BOM or < / class xml_object_range + { + public: + typedef It const_iterator; + typedef It iterator; + + xml_object_range(It b, It e): _begin(b), _end(e) + { + } + + It begin() const { return _begin; } + It end() const { return _end; } + + private: + It _begin, _end; + }; + + // Writer interface for node printing (see xml_node::print) + class PUGIXML_CLASS xml_writer + { + public: + virtual ~xml_writer() {} + + // Write memory chunk into stream/file/whatever + virtual void write(const void* data, size_t size) = 0; + }; + + // xml_writer implementation for FILE* + class PUGIXML_CLASS xml_writer_file: public xml_writer + { + public: + // Construct writer from a FILE* object; void* is used to avoid header dependencies on stdio + xml_writer_file(void* file); + + virtual void write(const void* data, size_t size); + + private: + void* file; + }; + + #ifndef PUGIXML_NO_STL + // xml_writer implementation for streams + class PUGIXML_CLASS xml_writer_stream: public xml_writer + { + public: + // Construct writer from an output stream object + xml_writer_stream(std::basic_ostream >& stream); + xml_writer_stream(std::basic_ostream >& stream); + + virtual void write(const void* data, size_t size); + + private: + std::basic_ostream >* narrow_stream; + std::basic_ostream >* wide_stream; + }; + #endif + + // A light-weight handle for manipulating attributes in DOM tree + class PUGIXML_CLASS xml_attribute + { + friend class xml_attribute_iterator; + friend class xml_node; + + private: + xml_attribute_struct* _attr; + + typedef void (*unspecified_bool_type)(xml_attribute***); + + public: + // Default constructor. Constructs an empty attribute. + xml_attribute(); + + // Constructs attribute from internal pointer + explicit xml_attribute(xml_attribute_struct* attr); + + // Safe bool conversion operator + operator unspecified_bool_type() const; + + // Borland C++ workaround + bool operator!() const; + + // Comparison operators (compares wrapped attribute pointers) + bool operator==(const xml_attribute& r) const; + bool operator!=(const xml_attribute& r) const; + bool operator<(const xml_attribute& r) const; + bool operator>(const xml_attribute& r) const; + bool operator<=(const xml_attribute& r) const; + bool operator>=(const xml_attribute& r) const; + + // Check if attribute is empty + bool empty() const; + + // Get attribute name/value, or "" if attribute is empty + const char_t* name() const; + const char_t* value() const; + + // Get attribute value, or the default value if attribute is empty + const char_t* as_string(const char_t* def = PUGIXML_TEXT("")) const; + + // Get attribute value as a number, or the default value if conversion did not succeed or attribute is empty + int as_int(int def = 0) const; + unsigned int as_uint(unsigned int def = 0) const; + double as_double(double def = 0) const; + float as_float(float def = 0) const; + + #ifdef PUGIXML_HAS_LONG_LONG + long long as_llong(long long def = 0) const; + unsigned long long as_ullong(unsigned long long def = 0) const; + #endif + + // Get attribute value as bool (returns true if first character is in '1tTyY' set), or the default value if attribute is empty + bool as_bool(bool def = false) const; + + // Set attribute name/value (returns false if attribute is empty or there is not enough memory) + bool set_name(const char_t* rhs); + bool set_value(const char_t* rhs); + + // Set attribute value with type conversion (numbers are converted to strings, boolean is converted to "true"/"false") + bool set_value(int rhs); + bool set_value(unsigned int rhs); + bool set_value(double rhs); + bool set_value(bool rhs); + + #ifdef PUGIXML_HAS_LONG_LONG + bool set_value(long long rhs); + bool set_value(unsigned long long rhs); + #endif + + // Set attribute value (equivalent to set_value without error checking) + xml_attribute& operator=(const char_t* rhs); + xml_attribute& operator=(int rhs); + xml_attribute& operator=(unsigned int rhs); + xml_attribute& operator=(double rhs); + xml_attribute& operator=(bool rhs); + + #ifdef PUGIXML_HAS_LONG_LONG + xml_attribute& operator=(long long rhs); + xml_attribute& operator=(unsigned long long rhs); + #endif + + // Get next/previous attribute in the attribute list of the parent node + xml_attribute next_attribute() const; + xml_attribute previous_attribute() const; + + // Get hash value (unique for handles to the same object) + size_t hash_value() const; + + // Get internal pointer + xml_attribute_struct* internal_object() const; + }; + +#ifdef __BORLANDC__ + // Borland C++ workaround + bool PUGIXML_FUNCTION operator&&(const xml_attribute& lhs, bool rhs); + bool PUGIXML_FUNCTION operator||(const xml_attribute& lhs, bool rhs); +#endif + + // A light-weight handle for manipulating nodes in DOM tree + class PUGIXML_CLASS xml_node + { + friend class xml_attribute_iterator; + friend class xml_node_iterator; + friend class xml_named_node_iterator; + + protected: + xml_node_struct* _root; + + typedef void (*unspecified_bool_type)(xml_node***); + + public: + // Default constructor. Constructs an empty node. + xml_node(); + + // Constructs node from internal pointer + explicit xml_node(xml_node_struct* p); + + // Safe bool conversion operator + operator unspecified_bool_type() const; + + // Borland C++ workaround + bool operator!() const; + + // Comparison operators (compares wrapped node pointers) + bool operator==(const xml_node& r) const; + bool operator!=(const xml_node& r) const; + bool operator<(const xml_node& r) const; + bool operator>(const xml_node& r) const; + bool operator<=(const xml_node& r) const; + bool operator>=(const xml_node& r) const; + + // Check if node is empty. + bool empty() const; + + // Get node type + xml_node_type type() const; + + // Get node name, or "" if node is empty or it has no name + const char_t* name() const; + + // Get node value, or "" if node is empty or it has no value + // Note: For text node.value() does not return "text"! Use child_value() or text() methods to access text inside nodes. + const char_t* value() const; + + // Get attribute list + xml_attribute first_attribute() const; + xml_attribute last_attribute() const; + + // Get children list + xml_node first_child() const; + xml_node last_child() const; + + // Get next/previous sibling in the children list of the parent node + xml_node next_sibling() const; + xml_node previous_sibling() const; + + // Get parent node + xml_node parent() const; + + // Get root of DOM tree this node belongs to + xml_node root() const; + + // Get text object for the current node + xml_text text() const; + + // Get child, attribute or next/previous sibling with the specified name + xml_node child(const char_t* name) const; + xml_attribute attribute(const char_t* name) const; + xml_node next_sibling(const char_t* name) const; + xml_node previous_sibling(const char_t* name) const; + + // Get child value of current node; that is, value of the first child node of type PCDATA/CDATA + const char_t* child_value() const; + + // Get child value of child with specified name. Equivalent to child(name).child_value(). + const char_t* child_value(const char_t* name) const; + + // Set node name/value (returns false if node is empty, there is not enough memory, or node can not have name/value) + bool set_name(const char_t* rhs); + bool set_value(const char_t* rhs); + + // Add attribute with specified name. Returns added attribute, or empty attribute on errors. + xml_attribute append_attribute(const char_t* name); + xml_attribute prepend_attribute(const char_t* name); + xml_attribute insert_attribute_after(const char_t* name, const xml_attribute& attr); + xml_attribute insert_attribute_before(const char_t* name, const xml_attribute& attr); + + // Add a copy of the specified attribute. Returns added attribute, or empty attribute on errors. + xml_attribute append_copy(const xml_attribute& proto); + xml_attribute prepend_copy(const xml_attribute& proto); + xml_attribute insert_copy_after(const xml_attribute& proto, const xml_attribute& attr); + xml_attribute insert_copy_before(const xml_attribute& proto, const xml_attribute& attr); + + // Add child node with specified type. Returns added node, or empty node on errors. + xml_node append_child(xml_node_type type = node_element); + xml_node prepend_child(xml_node_type type = node_element); + xml_node insert_child_after(xml_node_type type, const xml_node& node); + xml_node insert_child_before(xml_node_type type, const xml_node& node); + + // Add child element with specified name. Returns added node, or empty node on errors. + xml_node append_child(const char_t* name); + xml_node prepend_child(const char_t* name); + xml_node insert_child_after(const char_t* name, const xml_node& node); + xml_node insert_child_before(const char_t* name, const xml_node& node); + + // Add a copy of the specified node as a child. Returns added node, or empty node on errors. + xml_node append_copy(const xml_node& proto); + xml_node prepend_copy(const xml_node& proto); + xml_node insert_copy_after(const xml_node& proto, const xml_node& node); + xml_node insert_copy_before(const xml_node& proto, const xml_node& node); + + // Remove specified attribute + bool remove_attribute(const xml_attribute& a); + bool remove_attribute(const char_t* name); + + // Remove specified child + bool remove_child(const xml_node& n); + bool remove_child(const char_t* name); + + // Parses buffer as an XML document fragment and appends all nodes as children of the current node. + // Copies/converts the buffer, so it may be deleted or changed after the function returns. + // Note: append_buffer allocates memory that has the lifetime of the owning document; removing the appended nodes does not immediately reclaim that memory. + xml_parse_result append_buffer(const void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto); + + // Find attribute using predicate. Returns first attribute for which predicate returned true. + template xml_attribute find_attribute(Predicate pred) const + { + if (!_root) return xml_attribute(); + + for (xml_attribute attrib = first_attribute(); attrib; attrib = attrib.next_attribute()) + if (pred(attrib)) + return attrib; + + return xml_attribute(); + } + + // Find child node using predicate. Returns first child for which predicate returned true. + template xml_node find_child(Predicate pred) const + { + if (!_root) return xml_node(); + + for (xml_node node = first_child(); node; node = node.next_sibling()) + if (pred(node)) + return node; + + return xml_node(); + } + + // Find node from subtree using predicate. Returns first node from subtree (depth-first), for which predicate returned true. + template xml_node find_node(Predicate pred) const + { + if (!_root) return xml_node(); + + xml_node cur = first_child(); + + while (cur._root && cur._root != _root) + { + if (pred(cur)) return cur; + + if (cur.first_child()) cur = cur.first_child(); + else if (cur.next_sibling()) cur = cur.next_sibling(); + else + { + while (!cur.next_sibling() && cur._root != _root) cur = cur.parent(); + + if (cur._root != _root) cur = cur.next_sibling(); + } + } + + return xml_node(); + } + + // Find child node by attribute name/value + xml_node find_child_by_attribute(const char_t* name, const char_t* attr_name, const char_t* attr_value) const; + xml_node find_child_by_attribute(const char_t* attr_name, const char_t* attr_value) const; + + #ifndef PUGIXML_NO_STL + // Get the absolute node path from root as a text string. + string_t path(char_t delimiter = '/') const; + #endif + + // Search for a node by path consisting of node names and . or .. elements. + xml_node first_element_by_path(const char_t* path, char_t delimiter = '/') const; + + // Recursively traverse subtree with xml_tree_walker + bool traverse(xml_tree_walker& walker); + + #ifndef PUGIXML_NO_XPATH + // Select single node by evaluating XPath query. Returns first node from the resulting node set. + xpath_node select_single_node(const char_t* query, xpath_variable_set* variables = 0) const; + xpath_node select_single_node(const xpath_query& query) const; + + // Select node set by evaluating XPath query + xpath_node_set select_nodes(const char_t* query, xpath_variable_set* variables = 0) const; + xpath_node_set select_nodes(const xpath_query& query) const; + #endif + + // Print subtree using a writer object + void print(xml_writer& writer, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const; + + #ifndef PUGIXML_NO_STL + // Print subtree to stream + void print(std::basic_ostream >& os, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const; + void print(std::basic_ostream >& os, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, unsigned int depth = 0) const; + #endif + + // Child nodes iterators + typedef xml_node_iterator iterator; + + iterator begin() const; + iterator end() const; + + // Attribute iterators + typedef xml_attribute_iterator attribute_iterator; + + attribute_iterator attributes_begin() const; + attribute_iterator attributes_end() const; + + // Range-based for support + xml_object_range children() const; + xml_object_range children(const char_t* name) const; + xml_object_range attributes() const; + + // Get node offset in parsed file/string (in char_t units) for debugging purposes + ptrdiff_t offset_debug() const; + + // Get hash value (unique for handles to the same object) + size_t hash_value() const; + + // Get internal pointer + xml_node_struct* internal_object() const; + }; + +#ifdef __BORLANDC__ + // Borland C++ workaround + bool PUGIXML_FUNCTION operator&&(const xml_node& lhs, bool rhs); + bool PUGIXML_FUNCTION operator||(const xml_node& lhs, bool rhs); +#endif + + // A helper for working with text inside PCDATA nodes + class PUGIXML_CLASS xml_text + { + friend class xml_node; + + xml_node_struct* _root; + + typedef void (*unspecified_bool_type)(xml_text***); + + explicit xml_text(xml_node_struct* root); + + xml_node_struct* _data_new(); + xml_node_struct* _data() const; + + public: + // Default constructor. Constructs an empty object. + xml_text(); + + // Safe bool conversion operator + operator unspecified_bool_type() const; + + // Borland C++ workaround + bool operator!() const; + + // Check if text object is empty + bool empty() const; + + // Get text, or "" if object is empty + const char_t* get() const; + + // Get text, or the default value if object is empty + const char_t* as_string(const char_t* def = PUGIXML_TEXT("")) const; + + // Get text as a number, or the default value if conversion did not succeed or object is empty + int as_int(int def = 0) const; + unsigned int as_uint(unsigned int def = 0) const; + double as_double(double def = 0) const; + float as_float(float def = 0) const; + + #ifdef PUGIXML_HAS_LONG_LONG + long long as_llong(long long def = 0) const; + unsigned long long as_ullong(unsigned long long def = 0) const; + #endif + + // Get text as bool (returns true if first character is in '1tTyY' set), or the default value if object is empty + bool as_bool(bool def = false) const; + + // Set text (returns false if object is empty or there is not enough memory) + bool set(const char_t* rhs); + + // Set text with type conversion (numbers are converted to strings, boolean is converted to "true"/"false") + bool set(int rhs); + bool set(unsigned int rhs); + bool set(double rhs); + bool set(bool rhs); + + #ifdef PUGIXML_HAS_LONG_LONG + bool set(long long rhs); + bool set(unsigned long long rhs); + #endif + + // Set text (equivalent to set without error checking) + xml_text& operator=(const char_t* rhs); + xml_text& operator=(int rhs); + xml_text& operator=(unsigned int rhs); + xml_text& operator=(double rhs); + xml_text& operator=(bool rhs); + + #ifdef PUGIXML_HAS_LONG_LONG + xml_text& operator=(long long rhs); + xml_text& operator=(unsigned long long rhs); + #endif + + // Get the data node (node_pcdata or node_cdata) for this object + xml_node data() const; + }; + +#ifdef __BORLANDC__ + // Borland C++ workaround + bool PUGIXML_FUNCTION operator&&(const xml_text& lhs, bool rhs); + bool PUGIXML_FUNCTION operator||(const xml_text& lhs, bool rhs); +#endif + + // Child node iterator (a bidirectional iterator over a collection of xml_node) + class PUGIXML_CLASS xml_node_iterator + { + friend class xml_node; + + private: + mutable xml_node _wrap; + xml_node _parent; + + xml_node_iterator(xml_node_struct* ref, xml_node_struct* parent); + + public: + // Iterator traits + typedef ptrdiff_t difference_type; + typedef xml_node value_type; + typedef xml_node* pointer; + typedef xml_node& reference; + + #ifndef PUGIXML_NO_STL + typedef std::bidirectional_iterator_tag iterator_category; + #endif + + // Default constructor + xml_node_iterator(); + + // Construct an iterator which points to the specified node + xml_node_iterator(const xml_node& node); + + // Iterator operators + bool operator==(const xml_node_iterator& rhs) const; + bool operator!=(const xml_node_iterator& rhs) const; + + xml_node& operator*() const; + xml_node* operator->() const; + + const xml_node_iterator& operator++(); + xml_node_iterator operator++(int); + + const xml_node_iterator& operator--(); + xml_node_iterator operator--(int); + }; + + // Attribute iterator (a bidirectional iterator over a collection of xml_attribute) + class PUGIXML_CLASS xml_attribute_iterator + { + friend class xml_node; + + private: + mutable xml_attribute _wrap; + xml_node _parent; + + xml_attribute_iterator(xml_attribute_struct* ref, xml_node_struct* parent); + + public: + // Iterator traits + typedef ptrdiff_t difference_type; + typedef xml_attribute value_type; + typedef xml_attribute* pointer; + typedef xml_attribute& reference; + + #ifndef PUGIXML_NO_STL + typedef std::bidirectional_iterator_tag iterator_category; + #endif + + // Default constructor + xml_attribute_iterator(); + + // Construct an iterator which points to the specified attribute + xml_attribute_iterator(const xml_attribute& attr, const xml_node& parent); + + // Iterator operators + bool operator==(const xml_attribute_iterator& rhs) const; + bool operator!=(const xml_attribute_iterator& rhs) const; + + xml_attribute& operator*() const; + xml_attribute* operator->() const; + + const xml_attribute_iterator& operator++(); + xml_attribute_iterator operator++(int); + + const xml_attribute_iterator& operator--(); + xml_attribute_iterator operator--(int); + }; + + // Named node range helper + class PUGIXML_CLASS xml_named_node_iterator + { + friend class xml_node; + + public: + // Iterator traits + typedef ptrdiff_t difference_type; + typedef xml_node value_type; + typedef xml_node* pointer; + typedef xml_node& reference; + + #ifndef PUGIXML_NO_STL + typedef std::bidirectional_iterator_tag iterator_category; + #endif + + // Default constructor + xml_named_node_iterator(); + + // Construct an iterator which points to the specified node + xml_named_node_iterator(const xml_node& node, const char_t* name); + + // Iterator operators + bool operator==(const xml_named_node_iterator& rhs) const; + bool operator!=(const xml_named_node_iterator& rhs) const; + + xml_node& operator*() const; + xml_node* operator->() const; + + const xml_named_node_iterator& operator++(); + xml_named_node_iterator operator++(int); + + const xml_named_node_iterator& operator--(); + xml_named_node_iterator operator--(int); + + private: + mutable xml_node _wrap; + xml_node _parent; + const char_t* _name; + + xml_named_node_iterator(xml_node_struct* ref, xml_node_struct* parent, const char_t* name); + }; + + // Abstract tree walker class (see xml_node::traverse) + class PUGIXML_CLASS xml_tree_walker + { + friend class xml_node; + + private: + int _depth; + + protected: + // Get current traversal depth + int depth() const; + + public: + xml_tree_walker(); + virtual ~xml_tree_walker(); + + // Callback that is called when traversal begins + virtual bool begin(xml_node& node); + + // Callback that is called for each node traversed + virtual bool for_each(xml_node& node) = 0; + + // Callback that is called when traversal ends + virtual bool end(xml_node& node); + }; + + // Parsing status, returned as part of xml_parse_result object + enum xml_parse_status + { + status_ok = 0, // No error + + status_file_not_found, // File was not found during load_file() + status_io_error, // Error reading from file/stream + status_out_of_memory, // Could not allocate memory + status_internal_error, // Internal error occurred + + status_unrecognized_tag, // Parser could not determine tag type + + status_bad_pi, // Parsing error occurred while parsing document declaration/processing instruction + status_bad_comment, // Parsing error occurred while parsing comment + status_bad_cdata, // Parsing error occurred while parsing CDATA section + status_bad_doctype, // Parsing error occurred while parsing document type declaration + status_bad_pcdata, // Parsing error occurred while parsing PCDATA section + status_bad_start_element, // Parsing error occurred while parsing start element tag + status_bad_attribute, // Parsing error occurred while parsing element attribute + status_bad_end_element, // Parsing error occurred while parsing end element tag + status_end_element_mismatch,// There was a mismatch of start-end tags (closing tag had incorrect name, some tag was not closed or there was an excessive closing tag) + + status_append_invalid_root, // Unable to append nodes since root type is not node_element or node_document (exclusive to xml_node::append_buffer) + + status_no_document_element // Parsing resulted in a document without element nodes + }; + + // Parsing result + struct PUGIXML_CLASS xml_parse_result + { + // Parsing status (see xml_parse_status) + xml_parse_status status; + + // Last parsed offset (in char_t units from start of input data) + ptrdiff_t offset; + + // Source document encoding + xml_encoding encoding; + + // Default constructor, initializes object to failed state + xml_parse_result(); + + // Cast to bool operator + operator bool() const; + + // Get error description + const char* description() const; + }; + + // Document class (DOM tree root) + class PUGIXML_CLASS xml_document: public xml_node + { + private: + char_t* _buffer; + + char _memory[192]; + + // Non-copyable semantics + xml_document(const xml_document&); + const xml_document& operator=(const xml_document&); + + void create(); + void destroy(); + + public: + // Default constructor, makes empty document + xml_document(); + + // Destructor, invalidates all node/attribute handles to this document + ~xml_document(); + + // Removes all nodes, leaving the empty document + void reset(); + + // Removes all nodes, then copies the entire contents of the specified document + void reset(const xml_document& proto); + + #ifndef PUGIXML_NO_STL + // Load document from stream. + xml_parse_result load(std::basic_istream >& stream, unsigned int options = parse_default, xml_encoding encoding = encoding_auto); + xml_parse_result load(std::basic_istream >& stream, unsigned int options = parse_default); + #endif + + // Load document from zero-terminated string. No encoding conversions are applied. + xml_parse_result load(const char_t* contents, unsigned int options = parse_default); + + // Load document from file + xml_parse_result load_file(const char* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto); + xml_parse_result load_file(const wchar_t* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto); + + // Load document from buffer. Copies/converts the buffer, so it may be deleted or changed after the function returns. + xml_parse_result load_buffer(const void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto); + + // Load document from buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data). + // You should ensure that buffer data will persist throughout the document's lifetime, and free the buffer memory manually once document is destroyed. + xml_parse_result load_buffer_inplace(void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto); + + // Load document from buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data). + // You should allocate the buffer with pugixml allocation function; document will free the buffer when it is no longer needed (you can't use it anymore). + xml_parse_result load_buffer_inplace_own(void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto); + + // Save XML document to writer (semantics is slightly different from xml_node::print, see documentation for details). + void save(xml_writer& writer, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const; + + #ifndef PUGIXML_NO_STL + // Save XML document to stream (semantics is slightly different from xml_node::print, see documentation for details). + void save(std::basic_ostream >& stream, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const; + void save(std::basic_ostream >& stream, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default) const; + #endif + + // Save XML to file + bool save_file(const char* path, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const; + bool save_file(const wchar_t* path, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const; + + // Get document element + xml_node document_element() const; + }; + +#ifndef PUGIXML_NO_XPATH + // XPath query return type + enum xpath_value_type + { + xpath_type_none, // Unknown type (query failed to compile) + xpath_type_node_set, // Node set (xpath_node_set) + xpath_type_number, // Number + xpath_type_string, // String + xpath_type_boolean // Boolean + }; + + // XPath parsing result + struct PUGIXML_CLASS xpath_parse_result + { + // Error message (0 if no error) + const char* error; + + // Last parsed offset (in char_t units from string start) + ptrdiff_t offset; + + // Default constructor, initializes object to failed state + xpath_parse_result(); + + // Cast to bool operator + operator bool() const; + + // Get error description + const char* description() const; + }; + + // A single XPath variable + class PUGIXML_CLASS xpath_variable + { + friend class xpath_variable_set; + + protected: + xpath_value_type _type; + xpath_variable* _next; + + xpath_variable(); + + // Non-copyable semantics + xpath_variable(const xpath_variable&); + xpath_variable& operator=(const xpath_variable&); + + public: + // Get variable name + const char_t* name() const; + + // Get variable type + xpath_value_type type() const; + + // Get variable value; no type conversion is performed, default value (false, NaN, empty string, empty node set) is returned on type mismatch error + bool get_boolean() const; + double get_number() const; + const char_t* get_string() const; + const xpath_node_set& get_node_set() const; + + // Set variable value; no type conversion is performed, false is returned on type mismatch error + bool set(bool value); + bool set(double value); + bool set(const char_t* value); + bool set(const xpath_node_set& value); + }; + + // A set of XPath variables + class PUGIXML_CLASS xpath_variable_set + { + private: + xpath_variable* _data[64]; + + // Non-copyable semantics + xpath_variable_set(const xpath_variable_set&); + xpath_variable_set& operator=(const xpath_variable_set&); + + xpath_variable* find(const char_t* name) const; + + public: + // Default constructor/destructor + xpath_variable_set(); + ~xpath_variable_set(); + + // Add a new variable or get the existing one, if the types match + xpath_variable* add(const char_t* name, xpath_value_type type); + + // Set value of an existing variable; no type conversion is performed, false is returned if there is no such variable or if types mismatch + bool set(const char_t* name, bool value); + bool set(const char_t* name, double value); + bool set(const char_t* name, const char_t* value); + bool set(const char_t* name, const xpath_node_set& value); + + // Get existing variable by name + xpath_variable* get(const char_t* name); + const xpath_variable* get(const char_t* name) const; + }; + + // A compiled XPath query object + class PUGIXML_CLASS xpath_query + { + private: + void* _impl; + xpath_parse_result _result; + + typedef void (*unspecified_bool_type)(xpath_query***); + + // Non-copyable semantics + xpath_query(const xpath_query&); + xpath_query& operator=(const xpath_query&); + + public: + // Construct a compiled object from XPath expression. + // If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on compilation errors. + explicit xpath_query(const char_t* query, xpath_variable_set* variables = 0); + + // Destructor + ~xpath_query(); + + // Get query expression return type + xpath_value_type return_type() const; + + // Evaluate expression as boolean value in the specified context; performs type conversion if necessary. + // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors. + bool evaluate_boolean(const xpath_node& n) const; + + // Evaluate expression as double value in the specified context; performs type conversion if necessary. + // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors. + double evaluate_number(const xpath_node& n) const; + + #ifndef PUGIXML_NO_STL + // Evaluate expression as string value in the specified context; performs type conversion if necessary. + // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors. + string_t evaluate_string(const xpath_node& n) const; + #endif + + // Evaluate expression as string value in the specified context; performs type conversion if necessary. + // At most capacity characters are written to the destination buffer, full result size is returned (includes terminating zero). + // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors. + // If PUGIXML_NO_EXCEPTIONS is defined, returns empty set instead. + size_t evaluate_string(char_t* buffer, size_t capacity, const xpath_node& n) const; + + // Evaluate expression as node set in the specified context. + // If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on type mismatch and std::bad_alloc on out of memory errors. + // If PUGIXML_NO_EXCEPTIONS is defined, returns empty node set instead. + xpath_node_set evaluate_node_set(const xpath_node& n) const; + + // Get parsing result (used to get compilation errors in PUGIXML_NO_EXCEPTIONS mode) + const xpath_parse_result& result() const; + + // Safe bool conversion operator + operator unspecified_bool_type() const; + + // Borland C++ workaround + bool operator!() const; + }; + + #ifndef PUGIXML_NO_EXCEPTIONS + // XPath exception class + class PUGIXML_CLASS xpath_exception: public std::exception + { + private: + xpath_parse_result _result; + + public: + // Construct exception from parse result + explicit xpath_exception(const xpath_parse_result& result); + + // Get error message + virtual const char* what() const throw(); + + // Get parse result + const xpath_parse_result& result() const; + }; + #endif + + // XPath node class (either xml_node or xml_attribute) + class PUGIXML_CLASS xpath_node + { + private: + xml_node _node; + xml_attribute _attribute; + + typedef void (*unspecified_bool_type)(xpath_node***); + + public: + // Default constructor; constructs empty XPath node + xpath_node(); + + // Construct XPath node from XML node/attribute + xpath_node(const xml_node& node); + xpath_node(const xml_attribute& attribute, const xml_node& parent); + + // Get node/attribute, if any + xml_node node() const; + xml_attribute attribute() const; + + // Get parent of contained node/attribute + xml_node parent() const; + + // Safe bool conversion operator + operator unspecified_bool_type() const; + + // Borland C++ workaround + bool operator!() const; + + // Comparison operators + bool operator==(const xpath_node& n) const; + bool operator!=(const xpath_node& n) const; + }; + +#ifdef __BORLANDC__ + // Borland C++ workaround + bool PUGIXML_FUNCTION operator&&(const xpath_node& lhs, bool rhs); + bool PUGIXML_FUNCTION operator||(const xpath_node& lhs, bool rhs); +#endif + + // A fixed-size collection of XPath nodes + class PUGIXML_CLASS xpath_node_set + { + public: + // Collection type + enum type_t + { + type_unsorted, // Not ordered + type_sorted, // Sorted by document order (ascending) + type_sorted_reverse // Sorted by document order (descending) + }; + + // Constant iterator type + typedef const xpath_node* const_iterator; + + // Default constructor. Constructs empty set. + xpath_node_set(); + + // Constructs a set from iterator range; data is not checked for duplicates and is not sorted according to provided type, so be careful + xpath_node_set(const_iterator begin, const_iterator end, type_t type = type_unsorted); + + // Destructor + ~xpath_node_set(); + + // Copy constructor/assignment operator + xpath_node_set(const xpath_node_set& ns); + xpath_node_set& operator=(const xpath_node_set& ns); + + // Get collection type + type_t type() const; + + // Get collection size + size_t size() const; + + // Indexing operator + const xpath_node& operator[](size_t index) const; + + // Collection iterators + const_iterator begin() const; + const_iterator end() const; + + // Sort the collection in ascending/descending order by document order + void sort(bool reverse = false); + + // Get first node in the collection by document order + xpath_node first() const; + + // Check if collection is empty + bool empty() const; + + private: + type_t _type; + + xpath_node _storage; + + xpath_node* _begin; + xpath_node* _end; + + void _assign(const_iterator begin, const_iterator end); + }; +#endif + +#ifndef PUGIXML_NO_STL + // Convert wide string to UTF8 + std::basic_string, std::allocator > PUGIXML_FUNCTION as_utf8(const wchar_t* str); + std::basic_string, std::allocator > PUGIXML_FUNCTION as_utf8(const std::basic_string, std::allocator >& str); + + // Convert UTF8 to wide string + std::basic_string, std::allocator > PUGIXML_FUNCTION as_wide(const char* str); + std::basic_string, std::allocator > PUGIXML_FUNCTION as_wide(const std::basic_string, std::allocator >& str); +#endif + + // Memory allocation function interface; returns pointer to allocated memory or NULL on failure + typedef void* (*allocation_function)(size_t size); + + // Memory deallocation function interface + typedef void (*deallocation_function)(void* ptr); + + // Override default memory management functions. All subsequent allocations/deallocations will be performed via supplied functions. + void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate); + + // Get current memory management functions + allocation_function PUGIXML_FUNCTION get_memory_allocation_function(); + deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function(); +} + +#if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC)) +namespace std +{ + // Workarounds for (non-standard) iterator category detection for older versions (MSVC7/IC8 and earlier) + std::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_node_iterator&); + std::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_attribute_iterator&); + std::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_named_node_iterator&); +} +#endif + +#if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC) +namespace std +{ + // Workarounds for (non-standard) iterator category detection + std::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_node_iterator&); + std::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_attribute_iterator&); + std::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_named_node_iterator&); +} +#endif + +#endif + +/** + * Copyright (c) 2006-2014 Arseny Kapoulkine + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ From 05541ed49b8ad5a9988b55c1658e2221c37f5a7a Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 22 Jun 2014 20:37:06 +0400 Subject: [PATCH 054/144] add base for localization https://github.com/HarpyWar/pvpgn/issues/13 --- src/bnetd/CMakeLists.txt | 1 + src/bnetd/command.cpp | 4 +- src/bnetd/i18n.cpp | 236 +++++++++++++++++++++++++++++++++++++ src/bnetd/i18n.h | 58 +++++++++ src/bnetd/luainterface.cpp | 1 + src/bnetd/main.cpp | 4 +- src/bnetd/prefs.cpp | 27 +++++ src/bnetd/prefs.h | 1 + src/bnetd/server.cpp | 6 + src/bnetd/server.h | 1 + src/common/setup_before.h | 1 + 11 files changed, 338 insertions(+), 2 deletions(-) create mode 100644 src/bnetd/i18n.cpp create mode 100644 src/bnetd/i18n.h diff --git a/src/bnetd/CMakeLists.txt b/src/bnetd/CMakeLists.txt index 05ba46453..7007acb37 100644 --- a/src/bnetd/CMakeLists.txt +++ b/src/bnetd/CMakeLists.txt @@ -36,6 +36,7 @@ set(BNETD_SOURCES anongame_wol.cpp anongame_wol.h handle_wserv.cpp handle_wserv.h luafunctions.cpp luafunctions.h luainterface.cpp luainterface.h luaobjects.cpp luaobjects.h luawrapper.cpp luawrapper.h + i18n.cpp i18n.h ../win32/winmain.cpp ../win32/winmain.h ) diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index e3d3b613c..d51d202d0 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -3763,7 +3763,9 @@ namespace pvpgn std::string mode_str = args[1]; if (mode_str == "all") - mode = restart_mode_channels; + mode = restart_mode_all; + else if (mode_str == "i18n") + mode = restart_mode_i18n; else if (mode_str == "channels") mode = restart_mode_channels; else if (mode_str == "realms") diff --git a/src/bnetd/i18n.cpp b/src/bnetd/i18n.cpp new file mode 100644 index 000000000..683562bfa --- /dev/null +++ b/src/bnetd/i18n.cpp @@ -0,0 +1,236 @@ +/* +* Copyright (C) 2014 HarpyWar (harpywar@gmail.com) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +#include "common/setup_before.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "compat/strcasecmp.h" +#include "compat/snprintf.h" + +#include "common/token.h" + +#include "common/list.h" +#include "common/eventlog.h" +#include "common/xalloc.h" +#include "common/xstring.h" +#include "common/util.h" +#include "common/tag.h" +#include "common/pugixml.h" +#include "common/format.h" + +#include "account.h" +#include "connection.h" +#include "message.h" +#include "helpfile.h" +#include "channel.h" +#include "i18n.h" +#include "prefs.h" +#include "common/setup_after.h" + +namespace pvpgn +{ + + namespace bnetd + { + const char * commonfile = "common.xml"; // filename template, actually file name is "common-{lang}.xml" + + /* Array with string translations, each string has array with pair language=translation + { + original = { + { language = translate }, + ... + }, + ... + } + */ + std::map > translations = std::map >(); + + std::vector languages{ + GAMELANG_ENGLISH_UINT, /* enUS */ + GAMELANG_GERMAN_UINT, /* deDE */ + GAMELANG_CZECH_UINT, /* csCZ */ + GAMELANG_SPANISH_UINT, /* esES */ + GAMELANG_FRENCH_UINT, /* frFR */ + GAMELANG_ITALIAN_UINT, /* itIT */ + GAMELANG_JAPANESE_UINT, /* jaJA */ + GAMELANG_KOREAN_UINT, /* koKR */ + GAMELANG_POLISH_UINT, /* plPL */ + GAMELANG_RUSSIAN_UINT, /* ruRU */ + GAMELANG_CHINESE_S_UINT, /* zhCN */ + GAMELANG_CHINESE_T_UINT /* zhTW */ + }; + + const char * _find_string(char const * text, t_gamelang gamelang); + + + extern int i18n_reload(void) + { + translations.clear(); + i18n_load(); + + return 0; + } + + extern int i18n_load(void) + { + const char * filename = buildpath(prefs_get_i18ndir(), commonfile); + + std::string lang_filename; + pugi::xml_document doc; + std::string original, translate; + + // iterate language list + for (std::vector::iterator lang = languages.begin(); lang != languages.end(); ++lang) + { + lang_filename = i18n_filename(filename, *lang); + if (FILE *f = fopen(lang_filename.c_str(), "r")) { + fclose(f); + + if (!doc.load_file(lang_filename.c_str())) + { + ERROR1("could not parse localization file \"%s\"", lang_filename.c_str()); + continue; + } + } + else { + // file not exists, ignore it + continue; + } + + // root node + pugi::xml_node nodes = doc.child("strings"); + + // load xml strings to map + for (pugi::xml_node node = nodes.child("string"); node; node = node.next_sibling("string")) + { + original = node.child_value("original"); + if (original[0] == '\0') + continue; + + //std::map >::iterator it = translations.find(original); + // if not found then init + //if (it == translations.end()) + // translations[original] = std::map(); + + + // check if translate string has a reference to another translation + if (pugi::xml_attribute attr = node.child("translate").attribute("id")) + { + if (pugi::xml_node n = nodes.find_child_by_attribute("id", attr.value())) + translate = n.child_value("translate"); + else + { + translate = original; + WARN2("could not find localization reference id=\"%s\", use original string (%s)", attr.value(), lang_filename.c_str()); + } + } + else + { + translate = node.child_value("translate"); + if (translate[0] == '\0') + { + translate = original; + WARN2("empty localization for \"%s\", use original string (%s)", original, lang_filename.c_str()); + } + } + translations[original][*lang] = translate; + } + + INFO1("localization file loaded \"%s\"", lang_filename.c_str()); + } + + return 0; + } + + /* Find localized text for the given language */ + const char * _find_string(char const * text, t_gamelang gamelang) + { + std::map >::iterator it = translations.find(text); + if (it != translations.end()) + { + if (!it->second[gamelang].empty()) + return it->second[gamelang].c_str(); + } + return NULL; + + } + + /* Return text translation */ + extern const char * localize(t_connection * c, char const * text) + { + t_gamelang gamelang = conn_get_gamelang(c); + + if (!gamelang || !tag_check_gamelang(gamelang)) + return text; + + if (const char * translate = _find_string(text, gamelang)) + return translate; + + return text; + } + + + /* Add a locale tag into filename + example: motd.txt -> motd-ruRU.txt */ + extern std::string i18n_filename(const char * filename, t_tag gamelang) + { + // get language string + char lang_str[sizeof(t_tag)+1]; + std::memset(lang_str, 0, sizeof(lang_str)); + tag_uint_to_str(lang_str, gamelang); + + if (!tag_check_gamelang(gamelang)) + { + ERROR1("got unknown language tag \"%s\"", lang_str); + return filename; + } + + std::string _filename(filename); + + // get extension + std::string::size_type idx(_filename.rfind('.')); + if (idx == std::string::npos || idx + 4 != _filename.size()) + { + ERROR1("Invalid extension for '%s'", _filename.c_str()); + return filename; + } + std::string ext(_filename.substr(idx + 1)); + + // get filename without extension + std::string fname(_filename.substr(0, idx)); + + std::string lang_filename(fname + "-" + lang_str + "." + ext); + return lang_filename; + } + + + } +} diff --git a/src/bnetd/i18n.h b/src/bnetd/i18n.h new file mode 100644 index 000000000..18368c027 --- /dev/null +++ b/src/bnetd/i18n.h @@ -0,0 +1,58 @@ +/* +* Copyright (C) 2014 HarpyWar (harpywar@gmail.com) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ +#ifndef INCLUDED_LOCALIZATION_TYPES +#define INCLUDED_LOCALIZATION_TYPES + +namespace pvpgn +{ + namespace bnetd + { + + + } +} + +#endif + +#ifndef JUST_NEED_TYPES +#ifndef INCLUDED_LOCALIZATION_PROTOS +#define INCLUDED_LOCALIZATION_PROTOS + +#define JUST_NEED_TYPES +# include +#undef JUST_NEED_TYPES + +namespace pvpgn +{ + + namespace bnetd + { + extern int i18n_load(void); + extern int i18n_reload(void); + extern const char * localize(t_connection * c, char const * text); + + + extern std::string i18n_filename(const char * filename, t_tag gamelang); + + } + +} + +/*****/ +#endif +#endif diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 718a42460..ff30364cc 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -167,6 +167,7 @@ namespace pvpgn { lua::table config = bind.table(); config.update("filedir", prefs_get_filedir()); + config.update("i18ndir", prefs_get_i18ndir()); config.update("scriptdir", prefs_get_scriptdir()); config.update("reportdir", prefs_get_reportdir()); config.update("chanlogdir", prefs_get_chanlogdir()); diff --git a/src/bnetd/main.cpp b/src/bnetd/main.cpp index fc118fdc9..3f9c01818 100644 --- a/src/bnetd/main.cpp +++ b/src/bnetd/main.cpp @@ -89,6 +89,7 @@ #include "realm.h" #include "topic.h" #include "handle_apireg.h" +#include "i18n.h" #include "common/setup_after.h" #ifdef WITH_LUA @@ -335,6 +336,8 @@ int pre_server_startup(void) return STATUS_FDWATCH_FAILURE; } + i18n_load(); + connlist_create(); gamelist_create(); timerlist_create(); @@ -382,7 +385,6 @@ int pre_server_startup(void) eventlog(eventlog_level_error, __FUNCTION__, "could not load realm list"); topiclist_load(prefs_get_topicfile()); - #ifdef WITH_LUA lua_load(prefs_get_scriptdir()); #endif diff --git a/src/bnetd/prefs.cpp b/src/bnetd/prefs.cpp index a27ef5ccd..ce3ec754b 100644 --- a/src/bnetd/prefs.cpp +++ b/src/bnetd/prefs.cpp @@ -39,6 +39,7 @@ namespace pvpgn static struct { /* files and paths */ char const * filedir; + char const * i18ndir; char const * storage_path; char const * logfile; char const * loglevels; @@ -179,6 +180,10 @@ namespace pvpgn static const char *conf_get_filedir(void); static int conf_setdef_filedir(void); + static int conf_set_i18ndir(const char *valstr); + static const char *conf_get_i18ndir(void); + static int conf_setdef_i18ndir(void); + static int conf_set_storage_path(const char *valstr); static const char *conf_get_storage_path(void); static int conf_setdef_storage_path(void); @@ -703,6 +708,7 @@ namespace pvpgn static t_conf_entry conf_table[] = { { "filedir", conf_set_filedir, conf_get_filedir, conf_setdef_filedir }, + { "i18ndir", conf_set_i18ndir, conf_get_i18ndir, conf_setdef_i18ndir }, { "storage_path", conf_set_storage_path, conf_get_storage_path, conf_setdef_storage_path }, { "logfile", conf_set_logfile, conf_get_logfile, conf_setdef_logfile }, { "loglevels", conf_set_loglevels, conf_get_loglevels, conf_setdef_loglevels }, @@ -912,6 +918,27 @@ namespace pvpgn } + extern char const * prefs_get_i18ndir(void) + { + return prefs_runtime_config.i18ndir; + } + + static int conf_set_i18ndir(const char *valstr) + { + return conf_set_str(&prefs_runtime_config.i18ndir, valstr, NULL); + } + + static int conf_setdef_i18ndir(void) + { + return conf_set_str(&prefs_runtime_config.i18ndir, NULL, BNETD_I18N_DIR); + } + + static const char* conf_get_i18ndir(void) + { + return prefs_runtime_config.i18ndir; + } + + extern char const * prefs_get_logfile(void) { return prefs_runtime_config.logfile; diff --git a/src/bnetd/prefs.h b/src/bnetd/prefs.h index 46d3bc137..76556774a 100644 --- a/src/bnetd/prefs.h +++ b/src/bnetd/prefs.h @@ -37,6 +37,7 @@ namespace pvpgn extern void prefs_unload(void); extern char const * prefs_get_storage_path(void); extern char const * prefs_get_filedir(void); + extern char const * prefs_get_i18ndir(void); extern char const * prefs_get_logfile(void); extern char const * prefs_get_loglevels(void); extern char const * prefs_get_motdfile(void); diff --git a/src/bnetd/server.cpp b/src/bnetd/server.cpp index 31ef3de0e..0533503d9 100644 --- a/src/bnetd/server.cpp +++ b/src/bnetd/server.cpp @@ -86,6 +86,7 @@ #include "icons.h" #include "anongame_infos.h" #include "topic.h" +#include "i18n.h" #include "common/setup_after.h" #ifdef WITH_LUA @@ -1373,6 +1374,11 @@ namespace pvpgn attrlayer_load_default(); } + if (do_restart == restart_mode_all || do_restart == restart_mode_i18n) + { + i18n_reload(); + } + if (do_restart == restart_mode_all || do_restart == restart_mode_channels) { channellist_reload(); diff --git a/src/bnetd/server.h b/src/bnetd/server.h index 6723efe28..b5a763ad1 100644 --- a/src/bnetd/server.h +++ b/src/bnetd/server.h @@ -76,6 +76,7 @@ namespace pvpgn restart_mode_none, // always first (0) restart_mode_all, + restart_mode_i18n, restart_mode_channels, restart_mode_realms, restart_mode_autoupdate, diff --git a/src/common/setup_before.h b/src/common/setup_before.h index bf37070bf..73daa666e 100644 --- a/src/common/setup_before.h +++ b/src/common/setup_before.h @@ -126,6 +126,7 @@ const bool BNETD_CHANLOG = false; # define BNETD_DEFAULT_CONF_FILE "conf/bnetd.conf" #endif const char * const BNETD_FILE_DIR = "files"; +const char * const BNETD_I18N_DIR = "conf/i18n"; const char * const BNETD_SCRIPT_DIR = "lua"; const char * const BNETD_STORAGE_PATH = ""; const char * const BNETD_REPORT_DIR = "reports"; From d4b513ded124a0d63d5fc99c82a67d504df080ca Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Mon, 23 Jun 2014 15:12:59 +0400 Subject: [PATCH 055/144] Allow /quiz for everyone, but /quiz start|stop is only for server admin/operator https://github.com/HarpyWar/pvpgn/issues/34 --- lua/handle_command.lua | 5 ++--- lua/quiz/command.lua | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lua/handle_command.lua b/lua/handle_command.lua index 43c5a4b55..5012553cb 100644 --- a/lua/handle_command.lua +++ b/lua/handle_command.lua @@ -11,11 +11,10 @@ local lua_command_table = { [1] = { ["/w3motd"] = command_w3motd, - }, - [2] = { + -- Quiz ["/quiz"] = command_quiz, - } + }, [8] = { ["/redirect"] = command_redirect, }, diff --git a/lua/quiz/command.lua b/lua/quiz/command.lua index 270af1b07..d61b448ac 100644 --- a/lua/quiz/command.lua +++ b/lua/quiz/command.lua @@ -35,13 +35,18 @@ end -- Start quiz in current channel function q_command_start(account, filename) - + + if not account_is_operator_or_admin(account.name) then + api.message_send_text(account.name, message_type_error, account.name, "You must be at least a Channel Operator to use this command.") + return 1 + end + local channel = api.channel_get_by_id(account.channel_id) if not channel then api.message_send_text(account.name, message_type_error, account.name, "This command can only be used inside a channel.") return 1 end - + if config.quiz_channel then api.message_send_text(account.name, message_type_error, account.name, 'Quiz has already ran in channel "'..config.quiz_channel..'". Use /qstop to force finish.') return 1 @@ -61,6 +66,11 @@ end -- Stop quiz function q_command_stop(account) + if not account_is_operator_or_admin(account.name) then + api.message_send_text(account.name, message_type_error, account.name, "You must be at least a Channel Operator to use this command.") + return 1 + end + if not config.quiz_channel then api.message_send_text(account.name, message_type_error, account.name, 'Quiz is not running.') return 1 From 102e315102cd9aaf2007119a75d98ca1bacb3b76 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 24 Jun 2014 10:06:01 +0400 Subject: [PATCH 056/144] fix compile errors, add config values for i18n https://github.com/HarpyWar/pvpgn/issues/13 --- conf/bnetd.conf.in | 1 + conf/bnetd.conf.win32 | 1 + conf/bnhelp.conf.in | 2 +- src/bnetd/i18n.cpp | 18 +++++++++--------- src/bnetd/i18n.h | 1 - 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/conf/bnetd.conf.in b/conf/bnetd.conf.in index e5887ba23..7b12b1b26 100644 --- a/conf/bnetd.conf.in +++ b/conf/bnetd.conf.in @@ -79,6 +79,7 @@ storage_path = "file:mode=plain;dir=${LOCALSTATEDIR}/users;clan=${LOCALSTATEDIR} #----------------------------------------------------------------------------# filedir = "${LOCALSTATEDIR}/files" +i18ndir = "${SYSCONFDIR}/i18n" scriptdir = "${LOCALSTATEDIR}/lua" reportdir = "${LOCALSTATEDIR}/reports" chanlogdir = "${LOCALSTATEDIR}/chanlogs" diff --git a/conf/bnetd.conf.win32 b/conf/bnetd.conf.win32 index 7927a2512..7041a639a 100644 --- a/conf/bnetd.conf.win32 +++ b/conf/bnetd.conf.win32 @@ -59,6 +59,7 @@ storage_path = file:mode=plain;dir=var\users;clan=var\clans;team=var\teams;defau #----------------------------------------------------------------------------# filedir = files +i18ndir = conf\i18n scriptdir = lua reportdir = var\reports chanlogdir = var\chanlogs diff --git a/conf/bnhelp.conf.in b/conf/bnhelp.conf.in index 2fee341b2..c8e119ad9 100644 --- a/conf/bnhelp.conf.in +++ b/conf/bnhelp.conf.in @@ -450,7 +450,7 @@ -------------------------------------------------------- /rehash Forces the server to reload specified config. Set "all" to reload all configs. - = all | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua %clan -------------------------------------------------------- diff --git a/src/bnetd/i18n.cpp b/src/bnetd/i18n.cpp index 683562bfa..df465876b 100644 --- a/src/bnetd/i18n.cpp +++ b/src/bnetd/i18n.cpp @@ -51,8 +51,8 @@ #include "message.h" #include "helpfile.h" #include "channel.h" -#include "i18n.h" #include "prefs.h" +#include "i18n.h" #include "common/setup_after.h" namespace pvpgn @@ -72,8 +72,10 @@ namespace pvpgn } */ std::map > translations = std::map >(); - - std::vector languages{ + + const char * _find_string(char const * text, t_gamelang gamelang); + + const t_gamelang languages[12] = { GAMELANG_ENGLISH_UINT, /* enUS */ GAMELANG_GERMAN_UINT, /* deDE */ GAMELANG_CZECH_UINT, /* csCZ */ @@ -88,8 +90,6 @@ namespace pvpgn GAMELANG_CHINESE_T_UINT /* zhTW */ }; - const char * _find_string(char const * text, t_gamelang gamelang); - extern int i18n_reload(void) { @@ -108,9 +108,9 @@ namespace pvpgn std::string original, translate; // iterate language list - for (std::vector::iterator lang = languages.begin(); lang != languages.end(); ++lang) + for (int i = 0; i < (sizeof(languages) / sizeof(*languages)); i++) { - lang_filename = i18n_filename(filename, *lang); + lang_filename = i18n_filename(filename, languages[i]); if (FILE *f = fopen(lang_filename.c_str(), "r")) { fclose(f); @@ -158,10 +158,10 @@ namespace pvpgn if (translate[0] == '\0') { translate = original; - WARN2("empty localization for \"%s\", use original string (%s)", original, lang_filename.c_str()); + WARN2("empty localization for \"%s\", use original string (%s)", original.c_str(), lang_filename.c_str()); } } - translations[original][*lang] = translate; + translations[original][languages[i]] = translate; } INFO1("localization file loaded \"%s\"", lang_filename.c_str()); diff --git a/src/bnetd/i18n.h b/src/bnetd/i18n.h index 18368c027..6246186f2 100644 --- a/src/bnetd/i18n.h +++ b/src/bnetd/i18n.h @@ -23,7 +23,6 @@ namespace pvpgn namespace bnetd { - } } From 9ea6aabe0e3bbf666b1b881850ac10a62f1b8521 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Thu, 26 Jun 2014 16:14:15 +0400 Subject: [PATCH 057/144] fix truncate message text --- src/bnetd/message.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bnetd/message.cpp b/src/bnetd/message.cpp index bfc53d512..d71e62a8c 100644 --- a/src/bnetd/message.cpp +++ b/src/bnetd/message.cpp @@ -990,12 +990,13 @@ namespace pvpgn if (text && text[0] == '\0') text = " "; /* empty messages crash some clients, just send whitespace */ + std::string temp; if (text && (std::strlen(text) > MAX_MESSAGE_LEN)) { /* PELISH: We are trying to support MAX_IRC_MESSAGE_LEN for IRC and also MAX_MESSAGE_LEN for bnet */ - char * temp = (char *)text; eventlog(eventlog_level_warn, __FUNCTION__, "line too long, truncation..."); - temp[MAX_MESSAGE_LEN] = '\0'; + temp = std::string(text, text + MAX_MESSAGE_LEN); + text = temp.c_str(); } packet_set_size(packet, sizeof(t_server_message)); From 4676a6bb5dd87e08d37d75f2f31353ab115c668c Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Thu, 26 Jun 2014 16:15:06 +0400 Subject: [PATCH 058/144] new version of cppformat library --- src/common/format.cpp | 629 ++++++++++++++++++++++++------------- src/common/format.h | 702 +++++++++++++++++++++++++++++++----------- 2 files changed, 951 insertions(+), 380 deletions(-) diff --git a/src/common/format.cpp b/src/common/format.cpp index 1776456fd..3f5d8080b 100644 --- a/src/common/format.cpp +++ b/src/common/format.cpp @@ -42,6 +42,9 @@ #ifdef _WIN32 # define WIN32_LEAN_AND_MEAN +# ifdef __MINGW32__ +# include +# endif # include # undef ERROR #endif @@ -108,13 +111,15 @@ void ReportError(FormatFunc func, int error_code, fmt::StringRef message) FMT_NOEXCEPT(true) { try { fmt::Writer full_message; - func(full_message, error_code, message); // TODO: this may throw? + func(full_message, error_code, message); // TODO: make sure this doesn't throw std::fwrite(full_message.c_str(), full_message.size(), 1, stderr); std::fputc('\n', stderr); } catch (...) {} } } // namespace +int fmt::internal::SignBitNoInline(double value) { return SignBit(value); } + template int fmt::internal::CharTraits::FormatFloat( char *buffer, std::size_t size, const char *format, @@ -228,7 +233,11 @@ int fmt::internal::StrError( result = ERANGE; buffer = message; #elif _WIN32 +# ifdef __MINGW32__ + strerror(result); +# else result = strerror_s(buffer, buffer_size, error_code); +# endif // If the buffer is full then the message is probably truncated. if (result == 0 && std::strlen(buffer) == buffer_size - 1) result = ERANGE; @@ -289,6 +298,44 @@ void fmt::internal::FormatWinErrorMessage( } #endif +template +void fmt::internal::FormatErrorReporter::operator()( + const Char *s, fmt::StringRef message) const { + for (int n = num_open_braces; *s; ++s) { + if (*s == '{') { + ++n; + } else if (*s == '}') { + if (--n == 0) + throw fmt::FormatError(message); + } + } + throw fmt::FormatError("unmatched '{' in format"); +} + +// Parses an unsigned integer advancing s to the end of the parsed input. +// This function assumes that the first character of s is a digit. +template +int fmt::internal::ParseNonnegativeInt( + const Char *&s, const char *&error) FMT_NOEXCEPT(true) { + assert('0' <= *s && *s <= '9'); + unsigned value = 0; + do { + unsigned new_value = value * 10 + (*s++ - '0'); + // Check if value wrapped around. + value = new_value >= value ? new_value : UINT_MAX; + } while ('0' <= *s && *s <= '9'); + if (value > INT_MAX) { + if (!error) + error = "number is too big in format"; + return 0; + } + return value; +} + +template +const typename fmt::internal::ArgInfo + fmt::BasicWriter::DUMMY_ARG = {fmt::internal::ArgInfo::INT, 0}; + // Fills the padding around the content and returns the pointer to the // content area. template @@ -305,48 +352,9 @@ typename fmt::BasicWriter::CharPtr return content; } -template -typename fmt::BasicWriter::CharPtr - fmt::BasicWriter::PrepareFilledBuffer( - unsigned size, const AlignSpec &spec, char sign) { - unsigned width = spec.width(); - if (width <= size) { - CharPtr p = GrowBuffer(size); - *p = sign; - return p + size - 1; - } - CharPtr p = GrowBuffer(width); - CharPtr end = p + width; - Alignment align = spec.align(); - // TODO: error if fill is not convertible to Char - Char fill = static_cast(spec.fill()); - if (align == ALIGN_LEFT) { - *p = sign; - p += size; - std::fill(p, end, fill); - } else if (align == ALIGN_CENTER) { - p = FillPadding(p, width, size, fill); - *p = sign; - p += size; - } else { - if (align == ALIGN_NUMERIC) { - if (sign) { - *p++ = sign; - --size; - } - } else { - *(end - size) = sign; - } - std::fill(p, end - size, fill); - p = end; - } - return p - 1; -} - template template -void fmt::BasicWriter::FormatDouble( - T value, const FormatSpec &spec, int precision) { +void fmt::BasicWriter::FormatDouble(T value, const FormatSpec &spec) { // Check type. char type = spec.type(); bool upper = false; @@ -354,7 +362,7 @@ void fmt::BasicWriter::FormatDouble( case 0: type = 'g'; break; - case 'e': case 'f': case 'g': + case 'e': case 'f': case 'g': case 'a': break; case 'F': #ifdef _MSC_VER @@ -362,7 +370,7 @@ void fmt::BasicWriter::FormatDouble( type = 'f'; #endif // Fall through. - case 'E': case 'G': + case 'E': case 'G': case 'A': upper = true; break; default: @@ -435,7 +443,7 @@ void fmt::BasicWriter::FormatDouble( if (width != 0) *format_ptr++ = '*'; } - if (precision >= 0) { + if (spec.precision() >= 0) { *format_ptr++ = '.'; *format_ptr++ = '*'; } @@ -459,7 +467,7 @@ void fmt::BasicWriter::FormatDouble( #endif Char *start = &buffer_[offset]; int n = internal::CharTraits::FormatFloat( - start, size, format, width_for_sprintf, precision, value); + start, size, format, width_for_sprintf, spec.precision(), value); if (n >= 0 && offset + n < buffer_.capacity()) { if (sign) { if ((spec.align() != ALIGN_RIGHT && spec.align() != ALIGN_DEFAULT) || @@ -494,84 +502,356 @@ void fmt::BasicWriter::FormatDouble( } } -// Throws Exception(message) if format contains '}', otherwise throws -// FormatError reporting unmatched '{'. The idea is that unmatched '{' -// should override other errors. template -void fmt::BasicWriter::FormatParser::ReportError( - const Char *s, StringRef message) const { - for (int num_open_braces = num_open_braces_; *s; ++s) { - if (*s == '{') { - ++num_open_braces; - } else if (*s == '}') { - if (--num_open_braces == 0) - throw fmt::FormatError(message); - } +fmt::ULongLong fmt::BasicWriter::GetIntValue(const Arg &arg) { + switch (arg.type) { + case Arg::INT: + return arg.int_value; + case Arg::UINT: + return arg.uint_value; + case Arg::LONG_LONG: + return arg.long_long_value; + case Arg::ULONG_LONG: + return arg.ulong_long_value; + default: + return -1; } - throw fmt::FormatError("unmatched '{' in format"); } -// Parses an unsigned integer advancing s to the end of the parsed input. -// This function assumes that the first character of s is a digit. template -unsigned fmt::BasicWriter::FormatParser::ParseUInt(const Char *&s) const { - assert('0' <= *s && *s <= '9'); - unsigned value = 0; - do { - unsigned new_value = value * 10 + (*s++ - '0'); - if (new_value < value) // Check if value wrapped around. - ReportError(s, "number is too big in format"); - value = new_value; - } while ('0' <= *s && *s <= '9'); - return value; +template +void fmt::BasicWriter::FormatString( + const Arg::StringValue &str, const FormatSpec &spec) { + if (spec.type_ && spec.type_ != 's') + internal::ReportUnknownType(spec.type_, "string"); + const StringChar *s = str.value; + std::size_t size = str.size; + if (size == 0) { + if (!s) + throw FormatError("string pointer is null"); + if (*s) + size = std::char_traits::length(s); + } + FormatString(s, size, spec); } template -inline const typename fmt::BasicWriter::ArgInfo +inline const typename fmt::BasicWriter::Arg &fmt::BasicWriter::FormatParser::ParseArgIndex(const Char *&s) { unsigned arg_index = 0; if (*s < '0' || *s > '9') { if (*s != '}' && *s != ':') - ReportError(s, "invalid argument index in format string"); + report_error_(s, "invalid argument index in format string"); if (next_arg_index_ < 0) { - ReportError(s, + report_error_(s, "cannot switch from manual to automatic argument indexing"); } arg_index = next_arg_index_++; } else { if (next_arg_index_ > 0) { - ReportError(s, + report_error_(s, "cannot switch from automatic to manual argument indexing"); } next_arg_index_ = -1; - arg_index = ParseUInt(s); + const char *error = 0; + arg_index = internal::ParseNonnegativeInt(s, error); + if (error) + report_error_(s, error); // TODO } - if (arg_index >= num_args_) - ReportError(s, "argument index is out of range in format"); + if (arg_index >= args_.size()) + report_error_(s, "argument index is out of range in format"); return args_[arg_index]; } template void fmt::BasicWriter::FormatParser::CheckSign( - const Char *&s, const ArgInfo &arg) { + const Char *&s, const Arg &arg) { char sign = static_cast(*s); - if (arg.type > LAST_NUMERIC_TYPE) { - ReportError(s, + if (arg.type > Arg::LAST_NUMERIC_TYPE) { + report_error_(s, fmt::Format("format specifier '{}' requires numeric argument") << sign); } - if (arg.type == UINT || arg.type == ULONG || arg.type == ULONG_LONG) { - ReportError(s, + if (arg.type == Arg::UINT || arg.type == Arg::ULONG_LONG) { + report_error_(s, fmt::Format("format specifier '{}' requires signed argument") << sign); } ++s; } +template +void fmt::BasicWriter::PrintfParser::ParseFlags( + FormatSpec &spec, const Char *&s) { + for (;;) { + switch (*s++) { + case '-': + spec.align_ = ALIGN_LEFT; + break; + case '+': + spec.flags_ |= SIGN_FLAG | PLUS_FLAG; + break; + case '0': + spec.fill_ = '0'; + break; + case ' ': + spec.flags_ |= SIGN_FLAG; + break; + case '#': + spec.flags_ |= HASH_FLAG; + break; + default: + --s; + return; + } + } +} + +template +unsigned fmt::BasicWriter::PrintfParser::ParseHeader( + const Char *&s, FormatSpec &spec, const char *&error) { + unsigned arg_index = UINT_MAX; + Char c = *s; + if (c >= '0' && c <= '9') { + // Parse an argument index (if followed by '$') or a width possibly + // preceded with '0' flag(s). + unsigned value = internal::ParseNonnegativeInt(s, error); + if (*s == '$') { // value is an argument index + ++s; + arg_index = value; + } else { + if (c == '0') + spec.fill_ = '0'; + if (value != 0) { + // Nonzero value means that we parsed width and don't need to + // parse it or flags again, so return now. + spec.width_ = value; + return arg_index; + } + } + } + ParseFlags(spec, s); + // Parse width. + if (*s >= '0' && *s <= '9') { + spec.width_ = internal::ParseNonnegativeInt(s, error); + } else if (*s == '*') { + ++s; + const Arg &arg = HandleArgIndex(UINT_MAX, error); + // TODO: use ArgVisitor + ULongLong width = 0; + switch (arg.type) { + case Arg::INT: + width = arg.int_value; + if (arg.int_value < 0) { + spec.align_ = ALIGN_LEFT; + width = 0 - width; + } + break; + case Arg::UINT: + width = arg.uint_value; + break; + case Arg::LONG_LONG: + width = arg.long_long_value; + if (arg.long_long_value < 0) { + spec.align_ = ALIGN_LEFT; + width = 0 - width; + } + break; + case Arg::ULONG_LONG: + width = arg.ulong_long_value; + break; + default: + if (!error) + error = "width is not integer"; + } + if (width <= INT_MAX) + spec.width_ = static_cast(width); + else if (!error) + error = "number is too big in format"; + } + return arg_index; +} + +// TODO: move to a base class that doesn't depend on template argument +template +const typename fmt::BasicWriter::Arg + &fmt::BasicWriter::PrintfParser::HandleArgIndex( + unsigned arg_index, const char *&error) { + if (arg_index != UINT_MAX) { + if (next_arg_index_ <= 0) { + next_arg_index_ = -1; + --arg_index; + } else if (!error) { + error = "cannot switch from automatic to manual argument indexing"; + } + } else if (next_arg_index_ >= 0) { + arg_index = next_arg_index_++; + } else if (!error) { + error = "cannot switch from manual to automatic argument indexing"; + } + if (arg_index < args_.size()) + return args_[arg_index]; + if (!error) + error = "argument index is out of range in format"; + return DUMMY_ARG; +} + +template +void fmt::BasicWriter::PrintfParser::Format( + BasicWriter &writer, BasicStringRef format, + const ArgList &args) { + const Char *start = format.c_str(); + args_ = args; + next_arg_index_ = 0; + const Char *s = start; + while (*s) { + Char c = *s++; + if (c != '%') continue; + if (*s == c) { + writer.buffer_.append(start, s); + start = ++s; + continue; + } + writer.buffer_.append(start, s - 1); + + FormatSpec spec; + spec.align_ = ALIGN_RIGHT; + + // Reporting errors is delayed till the format specification is + // completely parsed. This is done to avoid potentially confusing + // error messages for incomplete format strings. For example, in + // sprintf("%2$", 42); + // the format specification is incomplete. In naive approach we + // would parse 2 as an argument index and report an error that the + // index is out of range which would be rather confusing if the + // use meant "%2d$" rather than "%2$d". If we delay an error, the + // user will get an error that the format string is invalid which + // is OK for both cases. + const char *error = 0; + + // Parse argument index, flags and width. + unsigned arg_index = ParseHeader(s, spec, error); + + // Parse precision. + if (*s == '.') { + ++s; + if ('0' <= *s && *s <= '9') { + spec.precision_ = internal::ParseNonnegativeInt(s, error); + } else if (*s == '*') { + ++s; + const Arg &arg = HandleArgIndex(UINT_MAX, error); + if (arg.type <= Arg::LAST_INTEGER_TYPE) + spec.precision_ = GetIntValue(arg); + else if (!error) + error = "precision is not integer"; + } + } + + const Arg &arg = HandleArgIndex(arg_index, error); + if (spec.hash_flag() && GetIntValue(arg) == 0) + spec.flags_ &= ~HASH_FLAG; + if (spec.fill_ == '0') { + if (arg.type <= Arg::LAST_NUMERIC_TYPE) + spec.align_ = ALIGN_NUMERIC; + else + spec.fill_ = ' '; // Ignore '0' flag for non-numeric types. + } + + // Parse length. + switch (*s) { + case 'h': + // TODO: convert to short + case 'l': + case 'j': + case 'z': + case 't': + case 'L': + // TODO: handle length + ++s; + break; + } + + // Parse type. + if (!*s) + throw FormatError("invalid format string"); + if (error) + throw FormatError(error); + spec.type_ = static_cast(*s++); + + start = s; + + // Format argument. + switch (arg.type) { + case Arg::INT: + writer.FormatInt(arg.int_value, spec); + break; + case Arg::UINT: + writer.FormatInt(arg.uint_value, spec); + break; + case Arg::LONG_LONG: + writer.FormatInt(arg.long_long_value, spec); + break; + case Arg::ULONG_LONG: + writer.FormatInt(arg.ulong_long_value, spec); + break; + case Arg::DOUBLE: + writer.FormatDouble(arg.double_value, spec); + break; + case Arg::LONG_DOUBLE: + writer.FormatDouble(arg.long_double_value, spec); + break; + case Arg::CHAR: { + if (spec.type_ && spec.type_ != 'c') + internal::ReportUnknownType(spec.type_, "char"); + typedef typename BasicWriter::CharPtr CharPtr; + CharPtr out = CharPtr(); + if (spec.width_ > 1) { + Char fill = static_cast(spec.fill()); + out = writer.GrowBuffer(spec.width_); + if (spec.align_ == ALIGN_RIGHT) { + std::fill_n(out, spec.width_ - 1, fill); + out += spec.width_ - 1; + } else if (spec.align_ == ALIGN_CENTER) { + out = writer.FillPadding(out, spec.width_, 1, fill); + } else { + std::fill_n(out + 1, spec.width_ - 1, fill); + } + } else { + out = writer.GrowBuffer(1); + } + *out = static_cast(arg.int_value); + break; + } + case Arg::STRING: + writer.FormatString(arg.string, spec); + break; + case Arg::WSTRING: + writer.FormatString(arg.wstring, spec); + break; + case Arg::POINTER: + if (spec.type_ && spec.type_ != 'p') + internal::ReportUnknownType(spec.type_, "pointer"); + spec.flags_= HASH_FLAG; + spec.type_ = 'x'; + writer.FormatInt(reinterpret_cast(arg.pointer_value), spec); + break; + case Arg::CUSTOM: + if (spec.type_) + internal::ReportUnknownType(spec.type_, "object"); + arg.custom.format(&writer, arg.custom.value, spec); + break; + default: + assert(false); + break; + } + } + writer.buffer_.append(start, s); +} + template void fmt::BasicWriter::FormatParser::Format( BasicWriter &writer, BasicStringRef format, - std::size_t num_args, const ArgInfo *args) { + const ArgList &args) { + const char *error = 0; const Char *start = format.c_str(); - num_args_ = num_args; args_ = args; next_arg_index_ = 0; const Char *s = start; @@ -585,13 +865,12 @@ void fmt::BasicWriter::FormatParser::Format( } if (c == '}') throw FormatError("unmatched '}' in format"); - num_open_braces_= 1; + report_error_.num_open_braces = 1; writer.buffer_.append(start, s - 1); - const ArgInfo &arg = ParseArgIndex(s); + const Arg &arg = ParseArgIndex(s); FormatSpec spec; - int precision = -1; if (*s == ':') { ++s; @@ -618,12 +897,12 @@ void fmt::BasicWriter::FormatParser::Format( if (p != s) { if (c == '}') break; if (c == '{') - ReportError(s, "invalid fill character '{'"); + report_error_(s, "invalid fill character '{'"); s += 2; spec.fill_ = c; } else ++s; - if (spec.align_ == ALIGN_NUMERIC && arg.type > LAST_NUMERIC_TYPE) - ReportError(s, "format specifier '=' requires numeric argument"); + if (spec.align_ == ALIGN_NUMERIC && arg.type > Arg::LAST_NUMERIC_TYPE) + report_error_(s, "format specifier '=' requires numeric argument"); break; } } while (--p >= s); @@ -645,8 +924,8 @@ void fmt::BasicWriter::FormatParser::Format( } if (*s == '#') { - if (arg.type > LAST_NUMERIC_TYPE) - ReportError(s, "format specifier '#' requires numeric argument"); + if (arg.type > Arg::LAST_NUMERIC_TYPE) + report_error_(s, "format specifier '#' requires numeric argument"); spec.flags_ |= HASH_FLAG; ++s; } @@ -654,72 +933,62 @@ void fmt::BasicWriter::FormatParser::Format( // Parse width and zero flag. if ('0' <= *s && *s <= '9') { if (*s == '0') { - if (arg.type > LAST_NUMERIC_TYPE) - ReportError(s, "format specifier '0' requires numeric argument"); + if (arg.type > Arg::LAST_NUMERIC_TYPE) + report_error_(s, "format specifier '0' requires numeric argument"); spec.align_ = ALIGN_NUMERIC; spec.fill_ = '0'; } // Zero may be parsed again as a part of the width, but it is simpler // and more efficient than checking if the next char is a digit. - unsigned value = ParseUInt(s); - if (value > INT_MAX) - ReportError(s, "number is too big in format"); - spec.width_ = value; + spec.width_ = internal::ParseNonnegativeInt(s, error); + if (error) + report_error_(s, error); } // Parse precision. if (*s == '.') { ++s; - precision = 0; + spec.precision_ = 0; if ('0' <= *s && *s <= '9') { - unsigned value = ParseUInt(s); - if (value > INT_MAX) - ReportError(s, "number is too big in format"); - precision = value; + spec.precision_ = internal::ParseNonnegativeInt(s, error); + if (error) + report_error_(s, error); } else if (*s == '{') { ++s; - ++num_open_braces_; - const ArgInfo &precision_arg = ParseArgIndex(s); + ++report_error_.num_open_braces; + const Arg &precision_arg = ParseArgIndex(s); ULongLong value = 0; switch (precision_arg.type) { - case INT: + case Arg::INT: if (precision_arg.int_value < 0) - ReportError(s, "negative precision in format"); + report_error_(s, "negative precision in format"); value = precision_arg.int_value; break; - case UINT: + case Arg::UINT: value = precision_arg.uint_value; break; - case LONG: - if (precision_arg.long_value < 0) - ReportError(s, "negative precision in format"); - value = precision_arg.long_value; - break; - case ULONG: - value = precision_arg.ulong_value; - break; - case LONG_LONG: + case Arg::LONG_LONG: if (precision_arg.long_long_value < 0) - ReportError(s, "negative precision in format"); + report_error_(s, "negative precision in format"); value = precision_arg.long_long_value; break; - case ULONG_LONG: + case Arg::ULONG_LONG: value = precision_arg.ulong_long_value; break; default: - ReportError(s, "precision is not integer"); + report_error_(s, "precision is not integer"); } if (value > INT_MAX) - ReportError(s, "number is too big in format"); - precision = static_cast(value); + report_error_(s, "number is too big in format"); + spec.precision_ = static_cast(value); if (*s++ != '}') throw FormatError("unmatched '{' in format"); - --num_open_braces_; + --report_error_.num_open_braces; } else { - ReportError(s, "missing precision in format"); + report_error_(s, "missing precision in format"); } - if (arg.type != DOUBLE && arg.type != LONG_DOUBLE) { - ReportError(s, + if (arg.type != Arg::DOUBLE && arg.type != Arg::LONG_DOUBLE) { + report_error_(s, "precision specifier requires floating-point argument"); } } @@ -735,31 +1004,25 @@ void fmt::BasicWriter::FormatParser::Format( // Format argument. switch (arg.type) { - case INT: + case Arg::INT: writer.FormatInt(arg.int_value, spec); break; - case UINT: + case Arg::UINT: writer.FormatInt(arg.uint_value, spec); break; - case LONG: - writer.FormatInt(arg.long_value, spec); - break; - case ULONG: - writer.FormatInt(arg.ulong_value, spec); - break; - case LONG_LONG: + case Arg::LONG_LONG: writer.FormatInt(arg.long_long_value, spec); break; - case ULONG_LONG: + case Arg::ULONG_LONG: writer.FormatInt(arg.ulong_long_value, spec); break; - case DOUBLE: - writer.FormatDouble(arg.double_value, spec, precision); + case Arg::DOUBLE: + writer.FormatDouble(arg.double_value, spec); break; - case LONG_DOUBLE: - writer.FormatDouble(arg.long_double_value, spec, precision); + case Arg::LONG_DOUBLE: + writer.FormatDouble(arg.long_double_value, spec); break; - case CHAR: { + case Arg::CHAR: { if (spec.type_ && spec.type_ != 'c') internal::ReportUnknownType(spec.type_, "char"); typedef typename BasicWriter::CharPtr CharPtr; @@ -781,31 +1044,23 @@ void fmt::BasicWriter::FormatParser::Format( *out = static_cast(arg.int_value); break; } - case STRING: { - if (spec.type_ && spec.type_ != 's') - internal::ReportUnknownType(spec.type_, "string"); - const Char *str = arg.string.value; - std::size_t size = arg.string.size; - if (size == 0) { - if (!str) - throw FormatError("string pointer is null"); - if (*str) - size = std::char_traits::length(str); - } - writer.FormatString(str, size, spec); + case Arg::STRING: + writer.FormatString(arg.string, spec); break; - } - case POINTER: + case Arg::WSTRING: + writer.FormatString(arg.wstring, spec); + break; + case Arg::POINTER: if (spec.type_ && spec.type_ != 'p') internal::ReportUnknownType(spec.type_, "pointer"); spec.flags_= HASH_FLAG; spec.type_ = 'x'; writer.FormatInt(reinterpret_cast(arg.pointer_value), spec); break; - case CUSTOM: + case Arg::CUSTOM: if (spec.type_) internal::ReportUnknownType(spec.type_, "object"); - arg.custom.format(writer, arg.custom.value, spec); + arg.custom.format(&writer, arg.custom.value, spec); break; default: assert(false); @@ -852,67 +1107,29 @@ void fmt::ANSITerminalSink::operator()( // Explicit instantiations for char. -template void fmt::BasicWriter::FormatDouble( - double value, const FormatSpec &spec, int precision); - -template void fmt::BasicWriter::FormatDouble( - long double value, const FormatSpec &spec, int precision); - template fmt::BasicWriter::CharPtr fmt::BasicWriter::FillPadding(CharPtr buffer, unsigned total_size, std::size_t content_size, wchar_t fill); -template fmt::BasicWriter::CharPtr - fmt::BasicWriter::PrepareFilledBuffer( - unsigned size, const AlignSpec &spec, char sign); - -template void fmt::BasicWriter::FormatParser::ReportError( - const char *s, StringRef message) const; - -template unsigned fmt::BasicWriter::FormatParser::ParseUInt( - const char *&s) const; - -template const fmt::BasicWriter::ArgInfo - &fmt::BasicWriter::FormatParser::ParseArgIndex(const char *&s); - -template void fmt::BasicWriter::FormatParser::CheckSign( - const char *&s, const ArgInfo &arg); - template void fmt::BasicWriter::FormatParser::Format( - BasicWriter &writer, BasicStringRef format, - std::size_t num_args, const ArgInfo *args); - -// Explicit instantiations for wchar_t. + BasicWriter &writer, BasicStringRef format, const ArgList &args); -template void fmt::BasicWriter::FormatDouble( - double value, const FormatSpec &spec, int precision); +template void fmt::BasicWriter::PrintfParser::Format( + BasicWriter &writer, BasicStringRef format, const ArgList &args); -template void fmt::BasicWriter::FormatDouble( - long double value, const FormatSpec &spec, int precision); +// Explicit instantiations for wchar_t. template fmt::BasicWriter::CharPtr fmt::BasicWriter::FillPadding(CharPtr buffer, - unsigned total_size, std::size_t content_size, wchar_t fill); - -template fmt::BasicWriter::CharPtr - fmt::BasicWriter::PrepareFilledBuffer( - unsigned size, const AlignSpec &spec, char sign); - -template void fmt::BasicWriter::FormatParser::ReportError( - const wchar_t *s, StringRef message) const; - -template unsigned fmt::BasicWriter::FormatParser::ParseUInt( - const wchar_t *&s) const; - -template const fmt::BasicWriter::ArgInfo - &fmt::BasicWriter::FormatParser::ParseArgIndex(const wchar_t *&s); - -template void fmt::BasicWriter::FormatParser::CheckSign( - const wchar_t *&s, const ArgInfo &arg); + unsigned total_size, std::size_t content_size, wchar_t fill); template void fmt::BasicWriter::FormatParser::Format( - BasicWriter &writer, BasicStringRef format, - std::size_t num_args, const ArgInfo *args); + BasicWriter &writer, BasicStringRef format, + const ArgList &args); + +template void fmt::BasicWriter::PrintfParser::Format( + BasicWriter &writer, BasicStringRef format, + const ArgList &args); #if _MSC_VER # pragma warning(pop) diff --git a/src/common/format.h b/src/common/format.h index 27c700513..9e6eae899 100644 --- a/src/common/format.h +++ b/src/common/format.h @@ -35,12 +35,15 @@ #include // for std::ptrdiff_t #include #include -#include #include #include #include #include +#if _SECURE_SCL +# include +#endif + #ifdef __GNUC__ # define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) # define FMT_GCC_EXTENSION __extension__ @@ -61,19 +64,29 @@ // Compatibility with compilers other than clang. #ifdef __has_feature # define FMT_HAS_FEATURE(x) __has_feature(x) -# define FMT_HAS_BUILTIN(x) __has_builtin(x) #else # define FMT_HAS_FEATURE(x) 0 +#endif + +#ifdef __has_builtin +# define FMT_HAS_BUILTIN(x) __has_builtin(x) +#else # define FMT_HAS_BUILTIN(x) 0 #endif +#ifdef _MSC_VER +# define FMT_MSC_VER _MSC_VER +#else +# define FMT_MSC_VER 0 +#endif + #ifndef FMT_USE_VARIADIC_TEMPLATES // Variadic templates are available in GCC since version 4.4 // (http://gcc.gnu.org/projects/cxx0x.html) and in Visual C++ // since version 2013. # define FMT_USE_VARIADIC_TEMPLATES \ (FMT_HAS_FEATURE(cxx_variadic_templates) || \ - (FMT_GCC_VERSION >= 404 && __cplusplus >= 201103) || _MSC_VER >= 1800) + (FMT_GCC_VERSION >= 404 && __cplusplus >= 201103) || FMT_MSC_VER >= 1800) #endif #ifndef FMT_USE_RVALUE_REFERENCES @@ -84,7 +97,7 @@ # else # define FMT_USE_RVALUE_REFERENCES \ (FMT_HAS_FEATURE(cxx_rvalue_references) || \ - (FMT_GCC_VERSION >= 403 && __cplusplus >= 201103) || _MSC_VER >= 1600) + (FMT_GCC_VERSION >= 403 && __cplusplus >= 201103) || FMT_MSC_VER >= 1600) # endif #endif @@ -106,7 +119,7 @@ TypeName(const TypeName&); \ void operator=(const TypeName&) -#if _MSC_VER +#if FMT_MSC_VER # pragma warning(push) # pragma warning(disable: 4521) // 'class' : multiple copy constructors specified #endif @@ -186,6 +199,15 @@ class BasicStringRef { typedef BasicStringRef StringRef; typedef BasicStringRef WStringRef; +/** + A formatting error such as invalid format string. +*/ +class FormatError : public std::runtime_error { +public: + explicit FormatError(const std::string &message) + : std::runtime_error(message) {} +}; + namespace internal { // The number of characters to store in the Array object, representing the @@ -302,7 +324,7 @@ template void Array::append(const T *begin, const T *end) { std::ptrdiff_t num_elements = end - begin; if (size_ + num_elements > capacity_) - Grow(num_elements); + Grow(size_ + num_elements); std::copy(begin, end, CheckPtr(ptr_, capacity_) + size_); size_ += num_elements; } @@ -376,6 +398,8 @@ inline bool IsNegative(T value) { return SignChecker::is_signed>::IsNegative(value); } +int SignBitNoInline(double value); + template struct IntTraits { // Smallest of uint32_t and uint64_t that is large enough to represent @@ -441,8 +465,8 @@ void FormatDecimal(Char *buffer, UInt value, unsigned num_digits) { // "Three Optimization Tips for C++". See speed-test for a comparison. unsigned index = (value % 100) * 2; value /= 100; - buffer[num_digits] = internal::DIGITS[index + 1]; - buffer[num_digits - 1] = internal::DIGITS[index]; + buffer[num_digits] = DIGITS[index + 1]; + buffer[num_digits - 1] = DIGITS[index]; num_digits -= 2; } if (value < 10) { @@ -450,13 +474,12 @@ void FormatDecimal(Char *buffer, UInt value, unsigned num_digits) { return; } unsigned index = static_cast(value * 2); - buffer[1] = internal::DIGITS[index + 1]; - buffer[0] = internal::DIGITS[index]; + buffer[1] = DIGITS[index + 1]; + buffer[0] = DIGITS[index]; } template -void FormatCustomArg( - BasicWriter &w, const void *arg, const FormatSpec &spec); +void FormatCustomArg(void *writer, const void *arg, const FormatSpec &spec); #ifdef _WIN32 // A converter from UTF-8 to UTF-16. @@ -509,19 +532,82 @@ void FormatWinErrorMessage( fmt::Writer &out, int error_code, fmt::StringRef message); #endif -} // namespace internal +struct SimpleErrorReporter { + void operator()(const void *, fmt::StringRef message) const { + throw fmt::FormatError(message); + } +}; -/** - A formatting error such as invalid format string. - */ -class FormatError : public std::runtime_error { - public: - explicit FormatError(const std::string &message) - : std::runtime_error(message) {} +// Throws Exception(message) if format contains '}', otherwise throws +// FormatError reporting unmatched '{'. The idea is that unmatched '{' +// should override other errors. +template +struct FormatErrorReporter { + int num_open_braces; + void operator()(const Char *s, fmt::StringRef message) const; +}; + +// Parses a nonnegative integer advancing s to the end of the parsed input. +// This function assumes that the first character of s is a digit. +template +int ParseNonnegativeInt( + const Char *&s, const char *&error) FMT_NOEXCEPT(true); + +// Computes max(Arg, 1) at compile time. It is used to avoid errors about +// allocating an array of 0 size. +template +struct NonZero { + enum { VALUE = Arg }; +}; + +template <> +struct NonZero<0> { + enum { VALUE = 1 }; +}; + +// Information about a format argument. It is a POD type to allow +// storage in internal::Array. +struct ArgInfo { + enum Type { + // Integer types should go first, + INT, UINT, LONG_LONG, ULONG_LONG, LAST_INTEGER_TYPE = ULONG_LONG, + // followed by floating-point types. + DOUBLE, LONG_DOUBLE, LAST_NUMERIC_TYPE = LONG_DOUBLE, + CHAR, STRING, WSTRING, POINTER, CUSTOM + }; + Type type; + + template + struct StringValue { + const Char *value; + std::size_t size; + }; + + typedef void (*FormatFunc)( + void *writer, const void *arg, const FormatSpec &spec); + + struct CustomValue { + const void *value; + FormatFunc format; + }; + + union { + int int_value; + unsigned uint_value; + double double_value; + LongLong long_long_value; + ULongLong ulong_long_value; + long double long_double_value; + const void *pointer_value; + StringValue string; + StringValue wstring; + CustomValue custom; + }; }; +} // namespace internal /** - An error returned by the operating system or the language runtime, + An error returned by an operating system or a language runtime, for example a file opening error. */ class SystemError : public std::runtime_error { @@ -550,6 +636,7 @@ template struct TypeSpec : EmptySpec { Alignment align() const { return ALIGN_DEFAULT; } unsigned width() const { return 0; } + int precision() const { return -1; } bool sign_flag() const { return false; } bool plus_flag() const { return false; } @@ -580,6 +667,8 @@ struct AlignSpec : WidthSpec { : WidthSpec(width, fill), align_(align) {} Alignment align() const { return align_; } + + int precision() const { return -1; } }; // An alignment and type specifier. @@ -597,15 +686,19 @@ struct AlignTypeSpec : AlignSpec { // A full format specifier. struct FormatSpec : AlignSpec { unsigned flags_; + int precision_; char type_; - FormatSpec(unsigned width = 0, char type = 0, wchar_t fill = ' ') - : AlignSpec(width, fill), flags_(0), type_(type) {} + FormatSpec( + unsigned width = 0, char type = 0, wchar_t fill = ' ') + : AlignSpec(width, fill), flags_(0), precision_(-1), type_(type) {} bool sign_flag() const { return (flags_ & SIGN_FLAG) != 0; } bool plus_flag() const { return (flags_ & PLUS_FLAG) != 0; } bool hash_flag() const { return (flags_ & HASH_FLAG) != 0; } + int precision() const { return precision_; } + char type() const { return type_; } }; @@ -754,6 +847,52 @@ inline StrFormatSpec pad( return StrFormatSpec(str, width, fill); } +class ArgList { + private: + const internal::ArgInfo *args_; + std::size_t size_; + +public: + ArgList() : size_(0) {} + ArgList(const internal::ArgInfo *args, std::size_t size) + : args_(args), size_(size) {} + + std::size_t size() const { return size_; } + + const internal::ArgInfo &operator[](std::size_t index) const { + return args_[index]; + } +}; + +// Generates a comma-separated list by applying f to numbers 1..n. +#define FMT_GEN(n, f) FMT_GEN##n(f) +#define FMT_GEN1(f) f(1) +#define FMT_GEN2(f) FMT_GEN1(f), f(2) +#define FMT_GEN3(f) FMT_GEN2(f), f(3) +#define FMT_GEN4(f) FMT_GEN3(f), f(4) +#define FMT_GEN5(f) FMT_GEN4(f), f(5) +#define FMT_GEN6(f) FMT_GEN5(f), f(6) +#define FMT_GEN7(f) FMT_GEN6(f), f(7) +#define FMT_GEN8(f) FMT_GEN7(f), f(8) +#define FMT_GEN9(f) FMT_GEN8(f), f(9) + +#define FMT_MAKE_TEMPLATE_ARG(n) typename T##n +#define FMT_MAKE_ARG(n) const T##n &v##n +#define FMT_MAKE_REF(n) MakeArg(v##n) + +#define FMT_TEMPLATE(func_name, n) \ + template \ + inline void func_name(BasicStringRef format, FMT_GEN(n, FMT_MAKE_ARG)) { \ + const fmt::internal::ArgInfo args[] = {FMT_GEN(n, FMT_MAKE_REF)}; \ + func_name(format, fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ + } + +// Defines a variadic function returning void. +#define FMT_VARIADIC_VOID(func_name) \ + FMT_TEMPLATE(format, 1) FMT_TEMPLATE(format, 2) FMT_TEMPLATE(format, 3) \ + FMT_TEMPLATE(format, 4) FMT_TEMPLATE(format, 5) FMT_TEMPLATE(format, 6) \ + FMT_TEMPLATE(format, 7) FMT_TEMPLATE(format, 8) FMT_TEMPLATE(format, 9) + /** \rst This template provides operations for formatting and writing data into @@ -798,6 +937,10 @@ class BasicWriter { typedef typename internal::CharTraits::CharPtr CharPtr; + typedef internal::ArgInfo Arg; + + static const Arg DUMMY_ARG; + #if _SECURE_SCL static Char *GetBase(CharPtr p) { return p.base(); } #else @@ -815,13 +958,18 @@ class BasicWriter { return internal::CheckPtr(&buffer_[size], n); } - CharPtr PrepareFilledBuffer(unsigned size, const EmptySpec &, char sign) { + // Prepare a buffer for integer formatting. + CharPtr PrepareBufferForInt(unsigned num_digits, + const EmptySpec &, const char *prefix, unsigned prefix_size) { + unsigned size = prefix_size + num_digits; CharPtr p = GrowBuffer(size); - *p = sign; + std::copy(prefix, prefix + prefix_size, p); return p + size - 1; } - CharPtr PrepareFilledBuffer(unsigned size, const AlignSpec &spec, char sign); + template + CharPtr PrepareBufferForInt(unsigned num_digits, + const Spec &spec, const char *prefix, unsigned prefix_size); // Formats an integer. template @@ -829,57 +977,24 @@ class BasicWriter { // Formats a floating-point number (double or long double). template - void FormatDouble(T value, const FormatSpec &spec, int precision); + void FormatDouble(T value, const FormatSpec &spec); // Formats a string. template CharPtr FormatString( const StringChar *s, std::size_t size, const AlignSpec &spec); - // This method is private to disallow writing a wide string to a + template + void FormatString( + const Arg::StringValue &str, const FormatSpec &spec); + + // This method is private to disallow writing a wide string to a // char stream and vice versa. If you want to print a wide string // as a pointer as std::ostream does, cast it to const void*. // Do not implement! void operator<<(typename internal::CharTraits::UnsupportedStrType); - enum Type { - // Numeric types should go first. - INT, UINT, LONG, ULONG, LONG_LONG, ULONG_LONG, DOUBLE, LONG_DOUBLE, - LAST_NUMERIC_TYPE = LONG_DOUBLE, - CHAR, STRING, WSTRING, POINTER, CUSTOM - }; - - struct StringValue { - const Char *value; - std::size_t size; - }; - - typedef void (*FormatFunc)( - BasicWriter &w, const void *arg, const FormatSpec &spec); - - struct CustomValue { - const void *value; - FormatFunc format; - }; - - // Information about a format argument. It is a POD type to allow - // storage in internal::Array. - struct ArgInfo { - Type type; - union { - int int_value; - unsigned uint_value; - double double_value; - long long_value; - unsigned long ulong_value; - LongLong long_long_value; - ULongLong ulong_long_value; - long double long_double_value; - const void *pointer_value; - StringValue string; - CustomValue custom; - }; - }; + static ULongLong GetIntValue(const Arg &arg); // An argument action that does nothing. struct NullArgAction { @@ -888,7 +1003,7 @@ class BasicWriter { // A wrapper around a format argument. template - class BasicArg : public Action, public ArgInfo { + class BasicArg : public Action, public Arg { private: // This method is private to disallow formatting of arbitrary pointers. // If you want to output a pointer cast it to const void*. Do not implement! @@ -901,66 +1016,96 @@ class BasicWriter { BasicArg(T *value); public: - using ArgInfo::type; - - BasicArg(short value) { type = INT; this->int_value = value; } - BasicArg(unsigned short value) { type = UINT; this->int_value = value; } - BasicArg(int value) { type = INT; this->int_value = value; } - BasicArg(unsigned value) { type = UINT; this->uint_value = value; } - BasicArg(long value) { type = LONG; this->long_value = value; } - BasicArg(unsigned long value) { type = ULONG; this->ulong_value = value; } + using Arg::type; + + BasicArg() {} + // TODO: unsigned char & signed char + BasicArg(short value) { type = Arg::INT; Arg::int_value = value; } + BasicArg(unsigned short value) { + type = Arg::UINT; + Arg::uint_value = value; + } + BasicArg(int value) { type = Arg::INT; Arg::int_value = value; } + BasicArg(unsigned value) { type = Arg::UINT; Arg::uint_value = value; } + BasicArg(long value) { + if (sizeof(long) == sizeof(int)) { + type = Arg::INT; + Arg::int_value = static_cast(value); + } else { + type = Arg::LONG_LONG; + Arg::long_long_value = value; + } + } + BasicArg(unsigned long value) { + if (sizeof(unsigned long) == sizeof(unsigned)) { + type = Arg::UINT; + Arg::uint_value = static_cast(value); + } else { + type = Arg::ULONG_LONG; + Arg::ulong_long_value = value; + } + } BasicArg(LongLong value) { - type = LONG_LONG; - this->long_long_value = value; + type = Arg::LONG_LONG; + Arg::long_long_value = value; } BasicArg(ULongLong value) { - type = ULONG_LONG; - this->ulong_long_value = value; + type = Arg::ULONG_LONG; + Arg::ulong_long_value = value; } - BasicArg(float value) { type = DOUBLE; this->double_value = value; } - BasicArg(double value) { type = DOUBLE; this->double_value = value; } + BasicArg(float value) { type = Arg::DOUBLE; Arg::double_value = value; } + BasicArg(double value) { type = Arg::DOUBLE; Arg::double_value = value; } BasicArg(long double value) { - type = LONG_DOUBLE; - this->long_double_value = value; + type = Arg::LONG_DOUBLE; + Arg::long_double_value = value; } - BasicArg(char value) { type = CHAR; this->int_value = value; } + BasicArg(char value) { type = Arg::CHAR; Arg::int_value = value; } BasicArg(wchar_t value) { - type = CHAR; - this->int_value = internal::CharTraits::ConvertChar(value); + type = Arg::CHAR; + Arg::int_value = internal::CharTraits::ConvertChar(value); + } + + BasicArg(const char *value) { + type = Arg::STRING; + Arg::string.value = value; + Arg::string.size = 0; } - BasicArg(const Char *value) { - type = STRING; - this->string.value = value; - this->string.size = 0; + BasicArg(const wchar_t *value) { + type = Arg::WSTRING; + Arg::wstring.value = value; + Arg::wstring.size = 0; } BasicArg(Char *value) { - type = STRING; - this->string.value = value; - this->string.size = 0; + type = Arg::STRING; + Arg::string.value = value; + Arg::string.size = 0; } - BasicArg(const void *value) { type = POINTER; this->pointer_value = value; } - BasicArg(void *value) { type = POINTER; this->pointer_value = value; } + BasicArg(const void *value) { + type = Arg::POINTER; + Arg::pointer_value = value; + } + BasicArg(void *value) { type = Arg::POINTER; Arg::pointer_value = value; } BasicArg(const std::basic_string &value) { - type = STRING; - this->string.value = value.c_str(); - this->string.size = value.size(); + type = Arg::STRING; + Arg::string.value = value.c_str(); + Arg::string.size = value.size(); } BasicArg(BasicStringRef value) { - type = STRING; - this->string.value = value.c_str(); - this->string.size = value.size(); + type = Arg::STRING; + Arg::string.value = value.c_str(); + Arg::string.size = value.size(); } template BasicArg(const T &value) { - type = CUSTOM; - this->custom.value = &value; - this->custom.format = &internal::FormatCustomArg; + type = Arg::CUSTOM; + Arg::custom.value = &value; + Arg::custom.format = &internal::FormatCustomArg; } // The destructor is declared noexcept(false) because the action may throw @@ -971,28 +1116,40 @@ class BasicWriter { } }; - typedef BasicArg<> Arg; - // Format string parser. class FormatParser { private: - std::size_t num_args_; - const ArgInfo *args_; - int num_open_braces_; + ArgList args_; int next_arg_index_; + fmt::internal::FormatErrorReporter report_error_; - void ReportError(const Char *s, StringRef message) const; + // Parses argument index and returns an argument with this index. + const Arg &ParseArgIndex(const Char *&s); - unsigned ParseUInt(const Char *&s) const; + void CheckSign(const Char *&s, const Arg &arg); - // Parses argument index and returns an argument with this index. - const ArgInfo &ParseArgIndex(const Char *&s); + public: + void Format(BasicWriter &writer, + BasicStringRef format, const ArgList &args); + }; - void CheckSign(const Char *&s, const ArgInfo &arg); + // Printf format string parser. + class PrintfParser { + private: + ArgList args_; + int next_arg_index_; + + void ParseFlags(FormatSpec &spec, const Char *&s); + + // Parses argument index, flags and width and returns the parsed + // argument index. + unsigned ParseHeader(const Char *&s, FormatSpec &spec, const char *&error); + + const Arg &HandleArgIndex(unsigned arg_index, const char *&error); public: void Format(BasicWriter &writer, - BasicStringRef format, std::size_t num_args, const ArgInfo *args); + BasicStringRef format, const ArgList &args); }; public: @@ -1047,9 +1204,12 @@ class BasicWriter { return std::basic_string(&buffer_[0], buffer_.size()); } - inline void VFormat(BasicStringRef format, - std::size_t num_args, const ArgInfo *args) { - FormatParser().Format(*this, format, num_args, args); + inline void format(BasicStringRef format, const ArgList &args) { + FormatParser().Format(*this, format, args); + } + + inline void printf(BasicStringRef format, const ArgList &args) { + PrintfParser().Format(*this, format, args); } /** @@ -1109,11 +1269,23 @@ class BasicWriter { */ template void Format(BasicStringRef format, const Args & ... args) { - Arg arg_array[] = {args...}; - VFormat(format, sizeof...(Args), arg_array); + BasicArg<> arg_array[] = {args...}; + this->format(format, ArgList(arg_array, sizeof...(Args))); } + + template + void printf(BasicStringRef format, const Args & ... args) { + BasicArg<> arg_array[internal::NonZero::VALUE] = {args...}; + this->printf(format, ArgList(arg_array, sizeof...(Args))); + } + +#else + FMT_VARIADIC_VOID(format) #endif + template + static Arg MakeArg(const T &arg) { return BasicArg<>(arg); } + BasicWriter &operator<<(int value) { return *this << IntFormatSpec(value); } @@ -1138,7 +1310,7 @@ class BasicWriter { } BasicWriter &operator<<(double value) { - FormatDouble(value, FormatSpec(), -1); + FormatDouble(value, FormatSpec()); return *this; } @@ -1147,7 +1319,7 @@ class BasicWriter { (``'g'``) and writes it to the stream. */ BasicWriter &operator<<(long double value) { - FormatDouble(value, FormatSpec(), -1); + FormatDouble(value, FormatSpec()); return *this; } @@ -1220,81 +1392,143 @@ typename BasicWriter::CharPtr BasicWriter::FormatString( return out; } +template +template +typename fmt::BasicWriter::CharPtr + fmt::BasicWriter::PrepareBufferForInt( + unsigned num_digits, const Spec &spec, + const char *prefix, unsigned prefix_size) { + unsigned width = spec.width(); + Alignment align = spec.align(); + if (spec.precision() > static_cast(num_digits)) { + // Octal prefix '0' is counted as a digit, so ignore it if precision + // is specified. + if (prefix_size > 0 && prefix[prefix_size - 1] == '0') + --prefix_size; + unsigned number_size = prefix_size + spec.precision(); + AlignSpec subspec(number_size, '0', ALIGN_NUMERIC); + if (number_size >= width) + return PrepareBufferForInt(num_digits, subspec, prefix, prefix_size); + buffer_.reserve(width); + unsigned fill_size = width - number_size; + if (align != ALIGN_LEFT) { + CharPtr p = GrowBuffer(fill_size); + std::fill(p, p + fill_size, spec.fill()); + } + CharPtr result = PrepareBufferForInt(num_digits, subspec, prefix, prefix_size); + if (align == ALIGN_LEFT) { + CharPtr p = GrowBuffer(fill_size); + std::fill(p, p + fill_size, spec.fill()); + } + return result; + } + unsigned size = prefix_size + num_digits; + if (width <= size) { + CharPtr p = GrowBuffer(size); + std::copy(prefix, prefix + prefix_size, p); + return p + size - 1; + } + CharPtr p = GrowBuffer(width); + CharPtr end = p + width; + // TODO: error if fill is not convertible to Char + Char fill = static_cast(spec.fill()); + if (align == ALIGN_LEFT) { + std::copy(prefix, prefix + prefix_size, p); + p += size; + std::fill(p, end, fill); + } else if (align == ALIGN_CENTER) { + p = FillPadding(p, width, size, fill); + std::copy(prefix, prefix + prefix_size, p); + p += size; + } else { + if (align == ALIGN_NUMERIC) { + if (prefix_size != 0) { + p = std::copy(prefix, prefix + prefix_size, p); + size -= prefix_size; + } + } else { + std::copy(prefix, prefix + prefix_size, end - size); + } + std::fill(p, end - size, fill); + p = end; + } + return p - 1; +} + template template void BasicWriter::FormatInt(T value, const Spec &spec) { - unsigned size = 0; - char sign = 0; + unsigned prefix_size = 0; typedef typename internal::IntTraits::MainType UnsignedType; UnsignedType abs_value = value; + char prefix[4] = ""; if (internal::IsNegative(value)) { - sign = '-'; - ++size; + prefix[0] = '-'; + ++prefix_size; abs_value = 0 - abs_value; } else if (spec.sign_flag()) { - sign = spec.plus_flag() ? '+' : ' '; - ++size; + prefix[0] = spec.plus_flag() ? '+' : ' '; + ++prefix_size; } switch (spec.type()) { case 0: case 'd': { unsigned num_digits = internal::CountDigits(abs_value); - CharPtr p = - PrepareFilledBuffer(size + num_digits, spec, sign) + 1 - num_digits; + CharPtr p = PrepareBufferForInt( + num_digits, spec, prefix, prefix_size) + 1 - num_digits; internal::FormatDecimal(GetBase(p), abs_value, num_digits); break; } case 'x': case 'X': { UnsignedType n = abs_value; - bool print_prefix = spec.hash_flag(); - if (print_prefix) size += 2; + if (spec.hash_flag()) { + prefix[prefix_size++] = '0'; + prefix[prefix_size++] = spec.type(); + } + unsigned num_digits = 0; do { - ++size; + ++num_digits; } while ((n >>= 4) != 0); - Char *p = GetBase(PrepareFilledBuffer(size, spec, sign)); + Char *p = GetBase(PrepareBufferForInt( + num_digits, spec, prefix, prefix_size)); n = abs_value; const char *digits = spec.type() == 'x' ? "0123456789abcdef" : "0123456789ABCDEF"; do { *p-- = digits[n & 0xf]; } while ((n >>= 4) != 0); - if (print_prefix) { - *p-- = spec.type(); - *p = '0'; - } break; } case 'b': case 'B': { UnsignedType n = abs_value; - bool print_prefix = spec.hash_flag(); - if (print_prefix) size += 2; + if (spec.hash_flag()) { + prefix[prefix_size++] = '0'; + prefix[prefix_size++] = spec.type(); + } + unsigned num_digits = 0; do { - ++size; + ++num_digits; } while ((n >>= 1) != 0); - Char *p = GetBase(PrepareFilledBuffer(size, spec, sign)); + Char *p = GetBase(PrepareBufferForInt(num_digits, spec, prefix, prefix_size)); n = abs_value; do { *p-- = '0' + (n & 1); } while ((n >>= 1) != 0); - if (print_prefix) { - *p-- = spec.type(); - *p = '0'; - } break; } case 'o': { UnsignedType n = abs_value; - bool print_prefix = spec.hash_flag(); - if (print_prefix) ++size; + if (spec.hash_flag()) + prefix[prefix_size++] = '0'; + unsigned num_digits = 0; do { - ++size; + ++num_digits; } while ((n >>= 3) != 0); - Char *p = GetBase(PrepareFilledBuffer(size, spec, sign)); + Char *p = GetBase(PrepareBufferForInt( + num_digits, spec, prefix, prefix_size)); n = abs_value; do { *p-- = '0' + (n & 7); } while ((n >>= 3) != 0); - if (print_prefix) - *p = '0'; break; } default: @@ -1320,9 +1554,9 @@ void Format(BasicWriter &w, const FormatSpec &spec, const T &value) { namespace internal { // Formats an argument of a custom type, such as a user-defined class. template -void FormatCustomArg( - BasicWriter &w, const void *arg, const FormatSpec &spec) { - Format(w, spec, *static_cast(arg)); +void FormatCustomArg(void *writer, const void *arg, const FormatSpec &spec) { + Format(*static_cast*>(writer), + spec, *static_cast(arg)); } } @@ -1361,7 +1595,7 @@ class BasicFormatter { } }; - typedef typename BasicWriter::ArgInfo ArgInfo; + typedef typename internal::ArgInfo ArgInfo; typedef typename BasicWriter::template BasicArg Arg; enum { NUM_INLINE_ARGS = 10 }; @@ -1388,7 +1622,7 @@ class BasicFormatter { if (!format_) return; const Char *format = format_; format_ = 0; - writer_->VFormat(format, args_.size(), &args_[0]); + writer_->format(format, ArgList(&args_[0], args_.size())); } public: @@ -1589,10 +1823,11 @@ class SystemErrorSink { /** \rst - Formats a message and throws SystemError with the description of the form - ": ", where is the formatted message and - is the system message corresponding to the error code. - error_code is a system error code as given by errno. + Formats a message and throws :cpp:class:`fmt::SystemError` with + the description of the form "**: **", + where ** is the formatted message and ** + is the system message corresponding to the error code. + *error_code* is a system error code as given by ``errno``. \endrst */ inline Formatter ThrowSystemError( @@ -1622,10 +1857,15 @@ class WinErrorSink { }; /** - Formats a message and throws SystemError with the description of the form - ": ", where is the formatted message and - is the system message corresponding to the error code. - error_code is a Windows error code as given by GetLastError. + \rst + Formats a message and throws :cpp:class:`fmt::SystemError` with + the description of the form "**: **", + where ** is the formatted message and ** + is the system message corresponding to the error code. + *error_code* is a Windows error code as given by ``GetLastError``. + + This function is only available on Windows. + \endrst */ inline Formatter ThrowWinError(int error_code, StringRef format) { Formatter f(format, WinErrorSink(error_code)); @@ -1653,17 +1893,29 @@ class FileSink { } }; -// Formats a string and prints it to stdout. -// Example: -// Print("Elapsed time: {0:.2f} seconds") << 1.23; +/** + \rst + Formats a string and writes the result to ``stdout``. + + **Example**:: + + Print("Elapsed time: {0:.2f} seconds") << 1.23; + \endrst + */ inline Formatter Print(StringRef format) { Formatter f(format, FileSink(stdout)); return f; } -// Formats a string and prints it to a file. -// Example: -// Print(stderr, "Don't {}!") << "panic"; +/** + \rst + Formats a string and writes the result to a file. + + **Example**:: + + Print(stderr, "Don't {}!") << "panic"; + \endrst + */ inline Formatter Print(std::FILE *file, StringRef format) { Formatter f(format, FileSink(file)); return f; @@ -1708,7 +1960,7 @@ inline Formatter PrintColored(Color c, StringRef format) { Formats a string similarly to Python's `str.format `__ function and returns an :cpp:class:`fmt::BasicWriter` object containing the output. - + This version of the Format function uses C++11 features such as variadic templates and rvalue references. For C++98 version, see the :cpp:func:`fmt::Format()` overload above. @@ -1722,7 +1974,7 @@ inline Formatter PrintColored(Color c, StringRef format) { **Example**:: - std::string message = str(Format("The answer is {}", 42); + std::string message = str(Format("The answer is {}", 42)); See also `Format String Syntax`_. \endrst @@ -1755,6 +2007,20 @@ void Print(std::FILE *f, StringRef format, const Args & ... args) { std::fwrite(w.data(), 1, w.size(), f); } +template +inline Writer sprintf(StringRef format, const Args & ... args) { + Writer w; + w.printf(format, args...); + return std::move(w); +} + +template +void printf(StringRef format, const Args & ... args) { + Writer w; + w.printf(format, args...); + std::fwrite(w.data(), 1, w.size(), stdout); +} + #endif // FMT_USE_VARIADIC_TEMPLATES && FMT_USE_RVALUE_REFERENCES /** @@ -1860,10 +2126,98 @@ inline void FormatDec(char *&buffer, T value) { } } +#if FMT_GCC_VERSION +// Use the system_header pragma to suppress warnings about variadic macros +// because suppressing -Wvariadic-macros with the diagnostic pragma doesn't work. +# pragma GCC system_header +#endif + +#define FMT_CONCATENATE(arg1, arg2) FMT_CONCATENATE1(arg1, arg2) +#define FMT_CONCATENATE1(arg1, arg2) FMT_CONCATENATE2(arg1, arg2) +#define FMT_CONCATENATE2(arg1, arg2) arg1##arg2 + +#define FMT_EXPAND(args) args +#define FMT_FOR_EACH_1(func, x, ...) func(x, 1) +#define FMT_FOR_EACH_2(func, x, ...) \ + func(x, 2), FMT_EXPAND(FMT_FOR_EACH_1(func, __VA_ARGS__)) +#define FMT_FOR_EACH_3(func, x, ...) \ + func(x, 3), FMT_EXPAND(FMT_FOR_EACH_2(func, __VA_ARGS__)) +#define FMT_FOR_EACH_4(func, x, ...) \ + func(x, 4), FMT_EXPAND(FMT_FOR_EACH_3(func, __VA_ARGS__)) +#define FMT_FOR_EACH_5(func, x, ...) \ + func(x, 5), FMT_EXPAND(FMT_FOR_EACH_4(func, __VA_ARGS__)) +#define FMT_FOR_EACH_6(func, x, ...) \ + func(x, 6), FMT_EXPAND(FMT_FOR_EACH_5(func, __VA_ARGS__)) +#define FMT_FOR_EACH_7(func, x, ...) \ + func(x, 7), FMT_EXPAND(FMT_FOR_EACH_6(func, __VA_ARGS__)) +#define FMT_FOR_EACH_8(func, x, ...) \ + func(x, 8), FMT_EXPAND(FMT_FOR_EACH_7(func, __VA_ARGS__)) + +#define FMT_FOR_EACH_NARG(...) FMT_FOR_EACH_NARG_(__VA_ARGS__, FMT_FOR_EACH_RSEQ_N()) +#define FMT_FOR_EACH_NARG_(...) FMT_EXPAND(FMT_FOR_EACH_ARG_N(__VA_ARGS__)) +#define FMT_FOR_EACH_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, N, ...) N +#define FMT_FOR_EACH_RSEQ_N() 8, 7, 6, 5, 4, 3, 2, 1, 0 + +#define FMT_FOR_EACH_(N, func, ...) \ + FMT_CONCATENATE(FMT_FOR_EACH_, N)(func, __VA_ARGS__) +#define FMT_FOR_EACH(func, ...) \ + FMT_EXPAND(FMT_FOR_EACH_(FMT_FOR_EACH_NARG(__VA_ARGS__), func, __VA_ARGS__)) + +#define FMT_ADD_ARG_NAME(type, index) type arg##index +#define FMT_GET_ARG_NAME(type, index) arg##index +#define FMT_MAKE_ARG(arg, index) fmt::Writer::MakeArg(arg) + +#define FMT_VARIADIC(return_type, func_name, ...) \ + inline return_type func_name(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__)) { \ + return func_name(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ + fmt::ArgList()); \ + } \ + template \ + inline return_type func_name(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ + const T1 &v1) { \ + const fmt::internal::ArgInfo args[] = {FMT_FOR_EACH(FMT_MAKE_ARG, v1)}; \ + return func_name(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ + fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ + } \ + template \ + inline return_type func_name(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ + const T1 &v1, const T2 &v2) { \ + const fmt::internal::ArgInfo args[] = {FMT_FOR_EACH(FMT_MAKE_ARG, v1, v2)}; \ + return func_name(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ + fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ + } \ + template \ + inline return_type func_name(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ + const T1 &v1, const T2 &v2, const T3 &v3) { \ + const fmt::internal::ArgInfo args[] = { \ + FMT_FOR_EACH(FMT_MAKE_ARG, v1, v2, v3) \ + }; \ + return func_name(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ + fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ + } \ + template \ + inline return_type func_name(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ + const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4) { \ + const fmt::internal::ArgInfo args[] = { \ + FMT_FOR_EACH(FMT_MAKE_ARG, v1, v2, v3, v4) \ + }; \ + return func_name(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ + fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ + } \ + template \ + inline return_type func_name(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ + const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5) { \ + const fmt::internal::ArgInfo args[] = { \ + FMT_FOR_EACH(FMT_MAKE_ARG, v1, v2, v3, v4, v5) \ + }; \ + return func_name(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ + fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ + } + // Restore warnings. #if FMT_GCC_VERSION >= 406 # pragma GCC diagnostic pop -#elif _MSC_VER +#elif FMT_MSC_VER # pragma warning(pop) #endif From 268520ec8bacd0dc78c51bba6d64431db7d5e149 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 28 Jun 2014 21:29:25 +0400 Subject: [PATCH 059/144] finish localize function with formatter for hardcoded strings --- src/bnetd/i18n.cpp | 51 +++++++++++++++++++++++++++------------------- src/bnetd/i18n.h | 9 +++++++- 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/src/bnetd/i18n.cpp b/src/bnetd/i18n.cpp index df465876b..d961ad9b6 100644 --- a/src/bnetd/i18n.cpp +++ b/src/bnetd/i18n.cpp @@ -126,10 +126,10 @@ namespace pvpgn } // root node - pugi::xml_node nodes = doc.child("strings"); + pugi::xml_node nodes = doc.child("root").child("items"); // load xml strings to map - for (pugi::xml_node node = nodes.child("string"); node; node = node.next_sibling("string")) + for (pugi::xml_node node = nodes.child("item"); node; node = node.next_sibling("item")) { original = node.child_value("original"); if (original[0] == '\0') @@ -142,14 +142,14 @@ namespace pvpgn // check if translate string has a reference to another translation - if (pugi::xml_attribute attr = node.child("translate").attribute("id")) + if (pugi::xml_attribute attr = node.child("translate").attribute("refid")) { if (pugi::xml_node n = nodes.find_child_by_attribute("id", attr.value())) translate = n.child_value("translate"); else { translate = original; - WARN2("could not find localization reference id=\"%s\", use original string (%s)", attr.value(), lang_filename.c_str()); + WARN2("could not find translate reference refid=\"%s\", use original string (%s)", attr.value(), lang_filename.c_str()); } } else @@ -158,7 +158,7 @@ namespace pvpgn if (translate[0] == '\0') { translate = original; - WARN2("empty localization for \"%s\", use original string (%s)", original.c_str(), lang_filename.c_str()); + //WARN2("empty translate for \"%s\", use original string (%s)", original.c_str(), lang_filename.c_str()); } } translations[original][languages[i]] = translate; @@ -170,6 +170,30 @@ namespace pvpgn return 0; } + extern std::string _localize(t_connection * c, const char * func, const char * fmt, const fmt::ArgList &args) + { + const char *format; + std::string output; + try + { + format = fmt; + + if (t_gamelang lang = conn_get_gamelang(c)) + if (!(format = _find_string(fmt, lang))) + format = fmt; + + fmt::Writer w; + w.format(format, args); + output = w.str(); + } + catch (const std::exception& e) + { + ERROR1("Can't format translation string \"%s\" (%s)", fmt, e.what()); + } + return output; + } + + /* Find localized text for the given language */ const char * _find_string(char const * text, t_gamelang gamelang) { @@ -180,26 +204,11 @@ namespace pvpgn return it->second[gamelang].c_str(); } return NULL; - - } - - /* Return text translation */ - extern const char * localize(t_connection * c, char const * text) - { - t_gamelang gamelang = conn_get_gamelang(c); - - if (!gamelang || !tag_check_gamelang(gamelang)) - return text; - - if (const char * translate = _find_string(text, gamelang)) - return translate; - - return text; } /* Add a locale tag into filename - example: motd.txt -> motd-ruRU.txt */ + example: motd.txt -> motd-ruRU.txt */ extern std::string i18n_filename(const char * filename, t_tag gamelang) { // get language string diff --git a/src/bnetd/i18n.h b/src/bnetd/i18n.h index 6246186f2..5dfc9cc5e 100644 --- a/src/bnetd/i18n.h +++ b/src/bnetd/i18n.h @@ -34,6 +34,7 @@ namespace pvpgn #define JUST_NEED_TYPES # include +# include "common/format.h" #undef JUST_NEED_TYPES namespace pvpgn @@ -43,11 +44,17 @@ namespace pvpgn { extern int i18n_load(void); extern int i18n_reload(void); - extern const char * localize(t_connection * c, char const * text); + //extern const char * localize(t_connection * c, char const * text); extern std::string i18n_filename(const char * filename, t_tag gamelang); +#define _VARIADIC_MAX 10 + extern std::string _localize(t_connection * c, const char * func, const char *fmt, const fmt::ArgList &args); + FMT_VARIADIC(std::string, _localize, t_connection *, const char *, const char *) + #define localize(c, fmt, ...) _localize(c, __FUNCTION__, fmt, __VA_ARGS__) + //#define localize(c, fmt) _localize(c, __FUNCTION__, fmt) + } } From 69545f25bf3d6d00d0f40f842439288c9899243f Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 28 Jun 2014 21:32:11 +0400 Subject: [PATCH 060/144] localize all static strings (IRC and WWOL are not localized due to encoding issue with IRC protocol) --- src/bnetd/account_wrap.cpp | 18 +- src/bnetd/account_wrap.h | 2 +- src/bnetd/alias_command.cpp | 5 +- src/bnetd/channel.cpp | 3 +- src/bnetd/command.cpp | 1139 +++++++++++++++++------------------ src/bnetd/connection.cpp | 45 +- src/bnetd/handle_bnet.cpp | 13 +- src/bnetd/helpfile.cpp | 3 +- src/bnetd/icons.cpp | 10 +- src/bnetd/ipban.cpp | 40 +- src/bnetd/mail.cpp | 25 +- src/bnetd/message.cpp | 6 +- src/bnetd/message.h | 2 + 13 files changed, 639 insertions(+), 672 deletions(-) diff --git a/src/bnetd/account_wrap.cpp b/src/bnetd/account_wrap.cpp index 60f4dc2d3..2a1073587 100644 --- a/src/bnetd/account_wrap.cpp +++ b/src/bnetd/account_wrap.cpp @@ -40,6 +40,7 @@ #include "anongame_infos.h" #include "team.h" #include "server.h" +#include "i18n.h" #include "compat/snprintf.h" #include "common/setup_after.h" @@ -454,10 +455,10 @@ namespace pvpgn /* Return text with account lock */ - extern char * account_get_locktext(t_account * account, bool with_author) + extern std::string account_get_locktext(t_account * account, bool with_author) { - char msgtemp[MAX_MESSAGE_LEN], msgtemp2[MAX_MESSAGE_LEN]; - snprintf(msgtemp, sizeof(msgtemp), ""); + std::string msgtemp; + t_connection * c = account_get_conn(account); // append author of ban if (with_author) @@ -465,24 +466,21 @@ namespace pvpgn if (char const * author = account_get_auth_lockby(account)) if (author && author[0] != '\0') { - snprintf(msgtemp2, sizeof(msgtemp2), " by %s", author); - std::strcat(msgtemp, msgtemp2); + msgtemp += localize(c, " by {}", author); } } // append remaining time if (unsigned int locktime = account_get_auth_locktime(account)) - snprintf(msgtemp2, sizeof(msgtemp2), " for %.48s", seconds_to_timestr(locktime - now)); + msgtemp += localize(c, " for {}", seconds_to_timestr(locktime - now)); else - snprintf(msgtemp2, sizeof(msgtemp2), " permanently"); - std::strcat(msgtemp, msgtemp2); + msgtemp += localize(c, " permanently"); // append reason char const * reason = account_get_auth_lockreason(account); if (reason && reason[0] != '\0') { - snprintf(msgtemp2, sizeof(msgtemp2), " with a reason \"%s\"", reason); - std::strcat(msgtemp, msgtemp2); + msgtemp += localize(c, " with a reason \"{}\"", reason); } return msgtemp; } diff --git a/src/bnetd/account_wrap.h b/src/bnetd/account_wrap.h index 4d12245dc..d71cf8bf1 100644 --- a/src/bnetd/account_wrap.h +++ b/src/bnetd/account_wrap.h @@ -93,7 +93,7 @@ namespace pvpgn extern int account_set_auth_mutetime(t_account * account, unsigned int val); extern int account_set_auth_mutereason(t_account * account, char const * val); extern int account_set_auth_muteby(t_account * account, char const * val); - extern char * account_get_locktext(t_account * account, bool with_author = true); + extern std::string account_get_locktext(t_account * account, bool with_author = true); /* profile */ extern char const * account_get_sex(t_account * account); /* the profile attributes are updated directly in bnetd.c */ diff --git a/src/bnetd/alias_command.cpp b/src/bnetd/alias_command.cpp index 450bc221b..54f2cf66a 100644 --- a/src/bnetd/alias_command.cpp +++ b/src/bnetd/alias_command.cpp @@ -32,6 +32,7 @@ #include "common/xalloc.h" #include "message.h" #include "connection.h" +#include "i18n.h" #include "common/setup_after.h" @@ -59,7 +60,7 @@ namespace pvpgn t_output * output; char temp[MAX_MESSAGE_LEN]; - message_send_text(c, message_type_info, c, "Alias list:"); + message_send_text(c, message_type_info, c, localize(c, "Alias list:")); LIST_TRAVERSE_CONST(aliaslist_head, elem1) { if (!(alias = (t_alias*)elem_get_data(elem1))) @@ -580,7 +581,7 @@ namespace pvpgn if (do_alias(c, cmd, text) < 0) { - message_send_text(c, message_type_info, c, "No such alias. Use // to show the list."); + message_send_text(c, message_type_info, c, localize(c, "No such alias. Use // to show the list.")); return -1; } return 0; diff --git a/src/bnetd/channel.cpp b/src/bnetd/channel.cpp index 46690a19a..273ae836c 100644 --- a/src/bnetd/channel.cpp +++ b/src/bnetd/channel.cpp @@ -41,6 +41,7 @@ #include "account_wrap.h" #include "prefs.h" #include "irc.h" +#include "i18n.h" #include "common/setup_after.h" #ifdef WITH_LUA @@ -465,7 +466,7 @@ namespace pvpgn && (channel->currmembers == 1) && (account_is_operator_or_admin(conn_get_account(connection), channel_get_name(channel)) == 0)) { - message_send_text(connection, message_type_info, connection, "you are now tempOP for this channel"); + message_send_text(connection, message_type_info, connection, localize(connection, "you are now tempOP for this channel")); conn_set_tmpOP_channel(connection, (char *)channel_get_name(channel)); channel_update_userflags(connection); } diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index d51d202d0..7427cb332 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -79,15 +79,16 @@ #include "topic.h" #include "friends.h" #include "clan.h" -#include "common/setup_after.h" #include "common/flags.h" #include "icons.h" +#include "i18n.h" #include "attrlayer.h" #ifdef WITH_LUA #include "luainterface.h" #endif +#include "common/setup_after.h" namespace pvpgn { @@ -99,8 +100,9 @@ namespace pvpgn static void do_whois(t_connection * c, char const * dest); static void user_timer_cb(t_connection * c, std::time_t now, t_timer_data str); - char msgtemp[MAX_MESSAGE_LEN]; - char msgtemp2[MAX_MESSAGE_LEN]; + std::string msgtemp, msgtemp2; + char msgtemp0[MAX_MESSAGE_LEN]; + static char const * bnclass_get_str(unsigned int cclass) { @@ -163,7 +165,7 @@ namespace pvpgn return result; } - + std::string msgt; static void do_whisper(t_connection * user_c, char const * dest, char const * text) { t_connection * dest_c; @@ -171,13 +173,13 @@ namespace pvpgn if (account_get_auth_mute(conn_get_account(user_c)) == 1) { - message_send_text(user_c, message_type_error, user_c, "Your account has been muted, you can't whisper to other users."); + message_send_text(user_c, message_type_error, user_c, localize(user_c, "Your account has been muted, you can't whisper to other users.")); return; } if (!(dest_c = connlist_find_connection_by_name(dest, conn_get_realm(user_c)))) { - message_send_text(user_c, message_type_error, user_c, "That user is not logged on."); + message_send_text(user_c, message_type_error, user_c, localize(user_c, "That user is not logged on.")); return; } @@ -189,7 +191,7 @@ namespace pvpgn if (conn_get_dndstr(dest_c)) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s is unavailable (%.128s)", conn_get_username(dest_c), conn_get_dndstr(dest_c)); + msgtemp = localize(user_c, "{} is unavailable ({})", conn_get_username(dest_c), conn_get_dndstr(dest_c)); message_send_text(user_c, message_type_info, user_c, msgtemp); return; } @@ -198,7 +200,7 @@ namespace pvpgn if (conn_get_awaystr(dest_c)) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s is away (%.128s)", conn_get_username(dest_c), conn_get_awaystr(dest_c)); + msgtemp = localize(user_c, "{} is away ({})", conn_get_username(dest_c), conn_get_awaystr(dest_c)); message_send_text(user_c, message_type_info, user_c, msgtemp); } @@ -220,8 +222,7 @@ namespace pvpgn static void do_whois(t_connection * c, char const * dest) { t_connection * dest_c; - char namepart[136]; /* 64 + " (" + 64 + ")" + NUL */ - char const * verb; + std::string namepart, verb; /* 64 + " (" + 64 + ")" + NUL */ t_game const * game; t_channel const * channel; @@ -234,7 +235,7 @@ namespace pvpgn struct std::tm * tmlogin; if (!(dest_a = accountlist_find_account(dest))) { - message_send_text(c, message_type_error, c, "Unknown user."); + message_send_text(c, message_type_error, c, localize(c, "Unknown user.")); return; } @@ -243,42 +244,44 @@ namespace pvpgn btlogin = bnettime_add_tzbias(btlogin, conn_get_tzbias(c)); ulogin = bnettime_to_time(btlogin); if (!(tmlogin = std::gmtime(&ulogin))) - std::strcpy(msgtemp, "User was last seen on ?"); + std::strcpy(msgtemp0, "?"); else - std::strftime(msgtemp, sizeof(msgtemp), "User was last seen on : %a %b %d %H:%M:%S", tmlogin); + std::strftime(msgtemp0, sizeof(msgtemp0), "%a %b %d %H:%M:%S", tmlogin); + msgtemp = localize(c, "User was last seen on: {}", msgtemp0); } - else std::strcpy(msgtemp, "User is offline"); + else + msgtemp = localize(c, "User is offline"); message_send_text(c, message_type_info, c, msgtemp); return; } if (c == dest_c) { - std::strcpy(namepart, "You"); - verb = "are"; + namepart = localize(c, "You"); + verb = localize(c, "are"); } else { char const * tname; - std::sprintf(namepart, "%.64s", (tname = conn_get_chatcharname(dest_c, c))); + namepart = (tname = conn_get_chatcharname(dest_c, c)); conn_unget_chatcharname(dest_c, tname); - verb = "is"; + verb = localize(c, "is"); } if ((game = conn_get_game(dest_c))) { - snprintf(msgtemp, sizeof(msgtemp), "%s %s using %s and %s currently in %s game \"%.64s\".", + msgtemp = localize(c, "{} {} using {} and {} currently in {} game \"{}\".", namepart, verb, - clienttag_get_title(conn_get_clienttag(dest_c)), + //clienttag_get_title(conn_get_clienttag(dest_c)), verb, game_get_flag(game) == game_flag_private ? "private" : "", game_get_name(game)); } else if ((channel = conn_get_channel(dest_c))) { - snprintf(msgtemp, sizeof(msgtemp), "%s %s using %s and %s currently in channel \"%.64s\".", + msgtemp = localize(c, "{} {} using {} and {} currently in channel \"{}\".", namepart, verb, clienttag_get_title(conn_get_clienttag(dest_c)), @@ -286,7 +289,7 @@ namespace pvpgn channel_get_name(channel)); } else - snprintf(msgtemp, sizeof(msgtemp), "%s %s using %s.", + msgtemp = localize(c, "{} {} using {}.", namepart, verb, clienttag_get_title(conn_get_clienttag(dest_c))); @@ -294,7 +297,7 @@ namespace pvpgn if (conn_get_dndstr(dest_c)) { - snprintf(msgtemp, sizeof(msgtemp), "%s %s refusing messages (%.128s)", + msgtemp = localize(c, "{} {} refusing messages ({})", namepart, verb, conn_get_dndstr(dest_c)); @@ -303,7 +306,7 @@ namespace pvpgn else if (conn_get_awaystr(dest_c)) { - snprintf(msgtemp, sizeof(msgtemp), "%s away (%.128s)", + msgtemp = localize(c, "{} away ({})", namepart, conn_get_awaystr(dest_c)); message_send_text(c, message_type_info, c, msgtemp); @@ -547,7 +550,7 @@ namespace pvpgn if ((text[0] != '\0') && (conn_quota_exceeded(c, text))) { - snprintf(msgtemp, sizeof(msgtemp), "You are sending commands to %s too quickly and risk being disconnected for flooding. Please slow down.", prefs_get_servername()); + msgtemp = localize(c, "You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down.", prefs_get_servername()); message_send_text(c, message_type_error, c, msgtemp); return 0; } @@ -563,12 +566,12 @@ namespace pvpgn { if (!(command_get_group(p->command_string))) { - message_send_text(c, message_type_error, c, "This command has been deactivated"); + message_send_text(c, message_type_error, c, localize(c, "This command has been deactivated")); return 0; } if (!((command_get_group(p->command_string) & account_get_command_groups(conn_get_account(c))))) { - message_send_text(c, message_type_error, c, "This command is reserved for admins."); + message_send_text(c, message_type_error, c, localize(c, "This command is reserved for admins.")); return 0; } if (p->command_handler != NULL) return ((p->command_handler)(c, text)); @@ -581,7 +584,7 @@ namespace pvpgn return 0; } - message_send_text(c, message_type_error, c, "Unknown command."); + message_send_text(c, message_type_error, c, localize(c, "Unknown command.")); eventlog(eventlog_level_debug, __FUNCTION__, "got unknown command \"%s\"", text); return 0; } @@ -626,9 +629,9 @@ namespace pvpgn char const *msg = args[2].c_str(); // message if (clan_send_message_to_online_members(clan, message_type_whisper, c, msg) >= 1) - message_send_text(c, message_type_info, c, "Message was sent to all currently available clan members."); + message_send_text(c, message_type_info, c, localize(c, "Message was sent to all currently available clan members.")); else - message_send_text(c, message_type_info, c, "All fellow members of your clan are currently offline."); + message_send_text(c, message_type_info, c, localize(c, "All fellow members of your clan are currently offline.")); return 0; } @@ -639,20 +642,20 @@ namespace pvpgn { if (clan_get_channel_type(clan) != 0) { clan_set_channel_type(clan, 0); - message_send_text(c, message_type_info, c, "Clan channel is opened up!"); + message_send_text(c, message_type_info, c, localize(c, "Clan channel is opened up!")); } else - message_send_text(c, message_type_error, c, "Clan channel has already been opened up!"); + message_send_text(c, message_type_error, c, localize(c, "Clan channel has already been opened up!")); return 0; } else if (args[1] == "private" || args[1] == "priv") { if (clan_get_channel_type(clan) != 1) { clan_set_channel_type(clan, 1); - message_send_text(c, message_type_info, c, "Clan channel is closed!"); + message_send_text(c, message_type_info, c, localize(c, "Clan channel is closed!")); } else - message_send_text(c, message_type_error, c, "Clan channel has already been closed!"); + message_send_text(c, message_type_error, c, localize(c, "Clan channel has already been closed!")); return 0; } else if (args[1] == "motd") @@ -665,7 +668,7 @@ namespace pvpgn const char * msg = args[2].c_str(); // message clan_set_motd(clan, msg); - message_send_text(c, message_type_info, c, "Clan message of day is updated!"); + message_send_text(c, message_type_info, c, localize(c, "Clan message of day is updated!")); return 0; } else if (args[1] == "invite" || args[1] == "inv") @@ -686,13 +689,13 @@ namespace pvpgn clan_add_member(clan, dest_account, CLAN_NEW); else clan_add_member(clan, dest_account, CLAN_PEON); - snprintf(msgtemp, sizeof(msgtemp), "User %s was invited to your clan!", username); + msgtemp = localize(c, "User {} was invited to your clan!", username); message_send_text(c, message_type_error, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "You are invited to %s by %s!", clan_get_name(clan), conn_get_chatname(c)); + msgtemp = localize(c, "You are invited to {} by {}!", clan_get_name(clan), conn_get_chatname(c)); message_send_text(dest_conn, message_type_error, c, msgtemp); } else { - snprintf(msgtemp, sizeof(msgtemp), "User %s is not online or is already member of clan!", username); + msgtemp = localize(c, "User {} is not online or is already member of clan!", username); message_send_text(c, message_type_error, c, msgtemp); } return 0; @@ -700,15 +703,15 @@ namespace pvpgn else if (args[1] == "disband" || args[1] == "dis") { if (args[2] != "yes") { - message_send_text(c, message_type_info, c, "This is one-way action! If you really want"); - message_send_text(c, message_type_info, c, "to disband your clan, type /clan disband yes"); + message_send_text(c, message_type_info, c, localize(c, "This is one-way action! If you really want")); + message_send_text(c, message_type_info, c, localize(c, "to disband your clan, type /clan disband yes")); } /* PELISH: fixme - Find out better solution! */ if (clanlist_remove_clan(clan) == 0) { if (clan_get_created(clan) == 1) clan_remove(clan_get_clantag(clan)); clan_destroy(clan); - message_send_text(c, message_type_info, c, "Your clan was disbanded."); + message_send_text(c, message_type_info, c, localize(c, "Your clan was disbanded.")); } return 0; } @@ -725,7 +728,7 @@ namespace pvpgn } if (args[2] == "get") { - snprintf(msgtemp, sizeof(msgtemp), "You have been invited to %s", clan_get_name(clan)); + msgtemp = localize(c, "You have been invited to {}", clan_get_name(clan)); message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -734,7 +737,7 @@ namespace pvpgn clanmember_set_fullmember(member, 1); clanmember_set_join_time(member, std::time(NULL)); - snprintf(msgtemp, sizeof(msgtemp), "You are now a clan member of %s", clan_get_name(clan)); + msgtemp = localize(c, "You are now a clan member of {}", clan_get_name(clan)); message_send_text(c, message_type_info, c, msgtemp); if (created > 0) { DEBUG1("clan %s has already been created", clan_get_name(clan)); @@ -745,8 +748,8 @@ namespace pvpgn clan_set_created(clan, 1); clan_set_creation_time(clan, std::time(NULL)); /* FIXME: send message "CLAN was be created" to members */ - snprintf(msgtemp, sizeof(msgtemp), "Clan %s was be created", clan_get_name(clan)); - clan_send_message_to_online_members(clan, message_type_whisper, c, msgtemp); /* Send message to all members */ + msgtemp = localize(c, "Clan {} was be created", clan_get_name(clan)); + clan_send_message_to_online_members(clan, message_type_whisper, c, msgtemp.c_str()); /* Send message to all members */ message_send_text(c, message_type_whisper, c, msgtemp); /* also to self */ clan_save(clan); } @@ -756,11 +759,17 @@ namespace pvpgn } else if (args[2] == "decline" || args[2] == "dec") { clan_remove_member(clan, member); - snprintf(msgtemp, sizeof(msgtemp), "You are no longer ivited to %s", clan_get_name(clan)); + msgtemp = localize(c, "You are no longer ivited to {}", clan_get_name(clan)); message_send_text(c, message_type_info, c, msgtemp); return 0; } } + + if ((args[1] == "create" || args[1] == "cre")) + { + message_send_text(c, message_type_error, c, localize(c, "You are already in clan \"{}\"", clan_get_name(clan))); + return 0; + } } // user not in clan else @@ -779,8 +788,8 @@ namespace pvpgn clanname = args[3].c_str(); // clan name if (clan = clanlist_find_clan_by_clantag(str_to_clantag(clantag))) { - message_send_text(c, message_type_error, c, "Clan with your specified already exist!"); - message_send_text(c, message_type_error, c, "Please choice another one."); + message_send_text(c, message_type_error, c, localize(c, "Clan with your specified already exist!")); + message_send_text(c, message_type_error, c, localize(c, "Please choice another one.")); return -1; } @@ -790,17 +799,17 @@ namespace pvpgn if (prefs_get_clan_min_invites() == 0) { clan_set_created(clan, 1); clan_set_creation_time(clan, std::time(NULL)); - snprintf(msgtemp, sizeof(msgtemp), "Clan %s is created!", clan_get_name(clan)); + msgtemp = localize(c, "Clan {} is created!", clan_get_name(clan)); message_send_text(c, message_type_info, c, msgtemp); clan_save(clan); } else { clan_set_created(clan, -prefs_get_clan_min_invites() + 1); //Pelish: +1 means that creator of clan is already invited - snprintf(msgtemp, sizeof(msgtemp), "Clan %s is pre-created, please invite", clan_get_name(clan)); + msgtemp = localize(c, "Clan {} is pre-created, please invite", clan_get_name(clan)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "at least %u players to your clan by using", prefs_get_clan_min_invites()); + msgtemp = localize(c, "at least {} players to your clan by using", prefs_get_clan_min_invites()); message_send_text(c, message_type_info, c, msgtemp); - message_send_text(c, message_type_info, c, "/clan invite command."); + message_send_text(c, message_type_info, c, localize(c, "/clan invite command.")); } } return 0; @@ -836,12 +845,12 @@ namespace pvpgn username = &text[1]; // username if (!*username) { - message_send_text(c, message_type_info, c, "You must supply a username."); + message_send_text(c, message_type_info, c, localize(c, "You must supply a username.")); return -1; } if (!(acc = accountlist_find_account(username))) { - snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); + msgtemp = localize(c, "There's no account with username {}.", username); message_send_text(c, message_type_info, c, msgtemp); return -1; } @@ -849,22 +858,22 @@ namespace pvpgn if (command == '+') { if (account_get_auth_admin(acc, NULL) == 1) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s is already a Server Admin", username); + msgtemp = localize(c, "{} is already a Server Admin", username); } else { account_set_auth_admin(acc, NULL, 1); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been promoted to a Server Admin", username); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has promoted you to a Server Admin", conn_get_loggeduser(c)); + msgtemp = localize(c, "{} has been promoted to a Server Admin", username); + msgtemp2 = localize(c, "{} has promoted you to a Server Admin", conn_get_loggeduser(c)); changed = 1; } } else { if (account_get_auth_admin(acc, NULL) != 1) - snprintf(msgtemp, sizeof(msgtemp), "%.64s is not a Server Admin.", username); + msgtemp = localize(c, "{} is not a Server Admin.", username); else { account_set_auth_admin(acc, NULL, 0); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been demoted from a Server Admin", username); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has demoted you from a Server Admin", conn_get_loggeduser(c)); + msgtemp = localize(c, "{} has been demoted from a Server Admin", username); + msgtemp2 = localize(c, "{} has demoted you from a Server Admin", conn_get_loggeduser(c)); changed = 1; } } @@ -895,12 +904,12 @@ namespace pvpgn username = &text[1]; // username if (!*username) { - message_send_text(c, message_type_info, c, "You must supply a username."); + message_send_text(c, message_type_info, c, localize(c, "You must supply a username.")); return -1; } if (!(acc = accountlist_find_account(username))) { - snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); + msgtemp = localize(c, "There's no account with username {}.", username); message_send_text(c, message_type_info, c, msgtemp); return -1; } @@ -908,21 +917,21 @@ namespace pvpgn if (command == '+') { if (account_get_auth_operator(acc, NULL) == 1) - snprintf(msgtemp, sizeof(msgtemp), "%.64s is already a Server Operator", username); + msgtemp = localize(c, "{} is already a Server Operator", username); else { account_set_auth_operator(acc, NULL, 1); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been promoted to a Server Operator", username); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has promoted you to a Server Operator", conn_get_loggeduser(c)); + msgtemp = localize(c, "{} has been promoted to a Server Operator", username); + msgtemp2 = localize(c, "{} has promoted you to a Server Operator", conn_get_loggeduser(c)); changed = 1; } } else { if (account_get_auth_operator(acc, NULL) != 1) - snprintf(msgtemp, sizeof(msgtemp), "%.64s is no Server Operator, so you can't demote him", username); + msgtemp = localize(c, "{} is no Server Operator, so you can't demote him", username); else { account_set_auth_operator(acc, NULL, 0); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been demoted from a Server Operator", username); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has promoted you to a Server Operator", conn_get_loggeduser(c)); + msgtemp = localize(c, "{} has been demoted from a Server Operator", username); + msgtemp2 = localize(c, "{} has promoted you to a Server Operator", conn_get_loggeduser(c)); changed = 1; } } @@ -942,12 +951,12 @@ namespace pvpgn int changed = 0; if (!(conn_get_channel(c)) || !(channel = channel_get_name(conn_get_channel(c)))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return -1; } if (account_get_auth_admin(conn_get_account(c), NULL) != 1 && account_get_auth_admin(conn_get_account(c), channel) != 1) { - message_send_text(c, message_type_error, c, "You must be at least a Channel Admin to use this command."); + message_send_text(c, message_type_error, c, localize(c, "You must be at least a Channel Admin to use this command.")); return -1; } @@ -960,7 +969,7 @@ namespace pvpgn username = args[1].c_str(); // username if (!(acc = accountlist_find_account(username))) { - snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); + msgtemp = localize(c, "There's no account with username {}.", username); message_send_text(c, message_type_info, c, msgtemp); return -1; } @@ -968,11 +977,11 @@ namespace pvpgn dst_c = account_get_conn(acc); if (account_get_auth_admin(acc, channel) == 1) - snprintf(msgtemp, sizeof(msgtemp), "%.64s is already a Channel Admin", username); + msgtemp = localize(c, "{} is already a Channel Admin", username); else { account_set_auth_admin(acc, channel, 1); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been promoted to a Channel Admin", username); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has promoted you to a Channel Admin for channel \"%.128s\"", conn_get_loggeduser(c), channel); + msgtemp = localize(c, "{} has been promoted to a Channel Admin", username); + msgtemp2 = localize(c, "{} has promoted you to a Channel Admin for channel \"{}\"", conn_get_loggeduser(c), channel); changed = 1; } @@ -991,12 +1000,12 @@ namespace pvpgn int changed = 0; if (!(conn_get_channel(c)) || !(channel = channel_get_name(conn_get_channel(c)))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return -1; } if (account_get_auth_admin(conn_get_account(c), NULL) != 1 && account_get_auth_admin(conn_get_account(c), channel) != 1) { - message_send_text(c, message_type_error, c, "You must be at least a Channel Admin to use this command."); + message_send_text(c, message_type_error, c, localize(c, "You must be at least a Channel Admin to use this command.")); return -1; } @@ -1009,7 +1018,7 @@ namespace pvpgn username = args[1].c_str(); // username if (!(acc = accountlist_find_account(username))) { - snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); + msgtemp = localize(c, "There's no account with username {}.", username); message_send_text(c, message_type_info, c, msgtemp); return -1; } @@ -1017,11 +1026,11 @@ namespace pvpgn dst_c = account_get_conn(acc); if (account_get_auth_voice(acc, channel) == 1) - snprintf(msgtemp, sizeof(msgtemp), "%.64s is already on VOP list", username); + msgtemp = localize(c, "{} is already on VOP list", username); else { account_set_auth_voice(acc, channel, 1); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been added to the VOP list", username); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has added you to the VOP list of channel \"%.128s\"", conn_get_loggeduser(c), channel); + msgtemp = localize(c, "{} has been added to the VOP list", username); + msgtemp2 = localize(c, "{} has added you to the VOP list of channel \"{}\"", conn_get_loggeduser(c), channel); changed = 1; } @@ -1040,12 +1049,12 @@ namespace pvpgn int changed = 0; if (!(conn_get_channel(c)) || !(channel = channel_get_name(conn_get_channel(c)))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return -1; } if (!(account_is_operator_or_admin(conn_get_account(c), channel_get_name(conn_get_channel(c))))) { - message_send_text(c, message_type_error, c, "You must be at least a Channel Operator to use this command."); + message_send_text(c, message_type_error, c, localize(c, "You must be at least a Channel Operator to use this command.")); return -1; } @@ -1058,31 +1067,31 @@ namespace pvpgn username = args[1].c_str(); // username if (!(acc = accountlist_find_account(username))) { - snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); + msgtemp = localize(c, "There's no account with username {}.", username); message_send_text(c, message_type_info, c, msgtemp); return -1; } dst_c = account_get_conn(acc); if (account_get_auth_voice(acc, channel) == 1) - snprintf(msgtemp, sizeof(msgtemp), "%.64s is already on VOP list, no need to Voice him", username); + msgtemp = localize(c, "{} is already on VOP list, no need to Voice him", username); else { if ((!dst_c) || conn_get_channel(c) != conn_get_channel(dst_c)) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s must be on the same channel to voice him", username); + msgtemp = localize(c, "{} must be on the same channel to voice him", username); } else { if (channel_conn_has_tmpVOICE(conn_get_channel(c), dst_c)) - snprintf(msgtemp, sizeof(msgtemp), "%.64s already has Voice in this channel", username); + msgtemp = localize(c, "{} already has Voice in this channel", username); else { if (account_is_operator_or_admin(acc, channel)) - snprintf(msgtemp, sizeof(msgtemp), "%.64s is already an operator or admin.", username); + msgtemp = localize(c, "{} is already an operator or admin.", username); else { conn_set_tmpVOICE_channel(dst_c, channel); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been granted Voice in this channel", username); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has granted you Voice in this channel", conn_get_loggeduser(c)); + msgtemp = localize(c, "{} has been granted Voice in this channel", username); + msgtemp2 = localize(c, "{} has granted you Voice in this channel", conn_get_loggeduser(c)); changed = 1; } } @@ -1105,12 +1114,12 @@ namespace pvpgn int changed = 0; if (!(conn_get_channel(c)) || !(channel = channel_get_name(conn_get_channel(c)))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return -1; } if (!(account_is_operator_or_admin(conn_get_account(c), channel_get_name(conn_get_channel(c))))) { - message_send_text(c, message_type_error, c, "You must be at least a Channel Operator to use this command."); + message_send_text(c, message_type_error, c, localize(c, "You must be at least a Channel Operator to use this command.")); return -1; } @@ -1123,7 +1132,7 @@ namespace pvpgn username = args[1].c_str(); // username if (!(acc = accountlist_find_account(username))) { - snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); + msgtemp = localize(c, "There's no account with username {}.", username); message_send_text(c, message_type_info, c, msgtemp); return -1; } @@ -1134,13 +1143,13 @@ namespace pvpgn if ((account_get_auth_admin(conn_get_account(c), channel) == 1) || (account_get_auth_admin(conn_get_account(c), NULL) == 1)) { account_set_auth_voice(acc, channel, 0); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been removed from VOP list.", username); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has removed you from VOP list of channel \"%.128s\"", conn_get_loggeduser(c), channel); + msgtemp = localize(c, "{} has been removed from VOP list.", username); + msgtemp2 = localize(c, "{} has removed you from VOP list of channel \"{}\"", conn_get_loggeduser(c), channel); changed = 1; } else { - snprintf(msgtemp, sizeof(msgtemp), "You must be at least Channel Admin to remove %.64s from the VOP list", username); + msgtemp = localize(c, "You must be at least Channel Admin to remove {} from the VOP list", username); } done = 1; } @@ -1152,8 +1161,8 @@ namespace pvpgn if ((dst_c) && channel_conn_has_tmpVOICE(conn_get_channel(c), dst_c) == 1) { conn_set_tmpVOICE_channel(dst_c, NULL); - snprintf(msgtemp, sizeof(msgtemp), "Voice has been taken from %.64s in this channel", username); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has taken your Voice in channel \"%.128s\"", conn_get_loggeduser(c), channel); + msgtemp = localize(c, "Voice has been taken from {} in this channel", username); + msgtemp2 = localize(c, "{} has taken your Voice in channel \"{}\"", conn_get_loggeduser(c), channel); changed = 1; done = 1; } @@ -1163,7 +1172,7 @@ namespace pvpgn if (!done) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s has no Voice in this channel, so it can't be taken away", username); + msgtemp = localize(c, "{} has no Voice in this channel, so it can't be taken away", username); message_send_text(c, message_type_info, c, msgtemp); } @@ -1181,7 +1190,7 @@ namespace pvpgn int changed = 0; if (!(conn_get_channel(c)) || !(channel = channel_get_name(conn_get_channel(c)))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return -1; } @@ -1195,7 +1204,7 @@ namespace pvpgn if (OP_lvl == 0) { - message_send_text(c, message_type_error, c, "You must be at least a Channel Operator or tempOP to use this command."); + message_send_text(c, message_type_error, c, localize(c, "You must be at least a Channel Operator or tempOP to use this command.")); return -1; } @@ -1208,7 +1217,7 @@ namespace pvpgn username = args[1].c_str(); // username if (!(acc = accountlist_find_account(username))) { - snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); + msgtemp = localize(c, "There's no account with username {}.", username); message_send_text(c, message_type_info, c, msgtemp); return -1; } @@ -1218,26 +1227,26 @@ namespace pvpgn if (OP_lvl == 1) // user is full op so he may fully op others { if (account_get_auth_operator(acc, channel) == 1) - snprintf(msgtemp, sizeof(msgtemp), "%.64s is already a Channel Operator", username); + msgtemp = localize(c, "{} is already a Channel Operator", username); else { account_set_auth_operator(acc, channel, 1); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been promoted to a Channel Operator", username); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has promoted you to a Channel Operator in channel \"%.128s\"", conn_get_loggeduser(c), channel); + msgtemp = localize(c, "{} has been promoted to a Channel Operator", username); + msgtemp2 = localize(c, "{} has promoted you to a Channel Operator in channel \"{}\"", conn_get_loggeduser(c), channel); changed = 1; } } else { // user is only tempOP so he may only tempOP others if ((!(dst_c)) || (conn_get_channel(c) != conn_get_channel(dst_c))) - snprintf(msgtemp, sizeof(msgtemp), "%.64s must be on the same channel to tempOP him", username); + msgtemp = localize(c, "{} must be on the same channel to tempOP him", username); else { if (account_is_operator_or_admin(acc, channel)) - snprintf(msgtemp, sizeof(msgtemp), "%.64s already is operator or admin, no need to tempOP him", username); + msgtemp = localize(c, "{} already is operator or admin, no need to tempOP him", username); else { conn_set_tmpOP_channel(dst_c, channel); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been promoted to a tempOP", username); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has promoted you to a tempOP in this channel", conn_get_loggeduser(c)); + msgtemp = localize(c, "{} has been promoted to a tempOP", username); + msgtemp2 = localize(c, "{} has promoted you to a tempOP in this channel", conn_get_loggeduser(c)); changed = 1; } } @@ -1258,12 +1267,12 @@ namespace pvpgn int changed = 0; if (!(conn_get_channel(c)) || !(channel = channel_get_name(conn_get_channel(c)))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return -1; } if (!(account_is_operator_or_admin(conn_get_account(c), channel_get_name(conn_get_channel(c))) || channel_conn_is_tmpOP(conn_get_channel(c), c))) { - message_send_text(c, message_type_error, c, "You must be at least a Channel Operator or tmpOP to use this command."); + message_send_text(c, message_type_error, c, localize(c, "You must be at least a Channel Operator or tmpOP to use this command.")); return -1; } @@ -1276,7 +1285,7 @@ namespace pvpgn username = args[1].c_str(); // username if (!(acc = accountlist_find_account(username))) { - snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); + msgtemp = localize(c, "There's no account with username {}.", username); message_send_text(c, message_type_info, c, msgtemp); return -1; } @@ -1284,20 +1293,20 @@ namespace pvpgn dst_c = account_get_conn(acc); if (channel_conn_is_tmpOP(conn_get_channel(c), dst_c)) - snprintf(msgtemp, sizeof(msgtemp), "%.64s has already tmpOP in this channel", username); + msgtemp = localize(c, "{} has already tmpOP in this channel", username); else { if ((!(dst_c)) || (conn_get_channel(c) != conn_get_channel(dst_c))) - snprintf(msgtemp, sizeof(msgtemp), "%.64s must be on the same channel to tempOP him", username); + msgtemp = localize(c, "{} must be on the same channel to tempOP him", username); else { if (account_is_operator_or_admin(acc, channel)) - snprintf(msgtemp, sizeof(msgtemp), "%.64s already is operator or admin, no need to tempOP him", username); + msgtemp = localize(c, "{} already is operator or admin, no need to tempOP him", username); else { conn_set_tmpOP_channel(dst_c, channel); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been promoted to tmpOP in this channel", username); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has promoted you to a tempOP in this channel", conn_get_loggeduser(c)); + msgtemp = localize(c, "{} has been promoted to tmpOP in this channel", username); + msgtemp2 = localize(c, "{} has promoted you to a tempOP in this channel", conn_get_loggeduser(c)); changed = 1; } } @@ -1319,7 +1328,7 @@ namespace pvpgn int done = 0; if (!(conn_get_channel(c)) || !(channel = channel_get_name(conn_get_channel(c)))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return -1; } @@ -1333,7 +1342,7 @@ namespace pvpgn if (OP_lvl == 0) { - message_send_text(c, message_type_error, c, "You must be at least a Channel Operator or tempOP to use this command."); + message_send_text(c, message_type_error, c, localize(c, "You must be at least a Channel Operator or tempOP to use this command.")); return -1; } @@ -1347,7 +1356,7 @@ namespace pvpgn if (!(acc = accountlist_find_account(username))) { - snprintf(msgtemp, sizeof(msgtemp), "There's no account with username %.64s.", username); + msgtemp = localize(c, "There's no account with username {}.", username); message_send_text(c, message_type_info, c, msgtemp); return -1; } @@ -1359,25 +1368,25 @@ namespace pvpgn if (account_get_auth_admin(acc, channel) == 1 || account_get_auth_operator(acc, channel) == 1) { if (account_get_auth_admin(acc, channel) == 1) { if (account_get_auth_admin(conn_get_account(c), channel) != 1 && account_get_auth_admin(conn_get_account(c), NULL) != 1) - message_send_text(c, message_type_info, c, "You must be at least a Channel Admin to demote another Channel Admin"); + message_send_text(c, message_type_info, c, localize(c, "You must be at least a Channel Admin to demote another Channel Admin")); else { account_set_auth_admin(acc, channel, 0); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been demoted from a Channel Admin.", username); + msgtemp = localize(c, "{} has been demoted from a Channel Admin.", username); message_send_text(c, message_type_info, c, msgtemp); if (dst_c) { - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has demoted you from a Channel Admin of channel \"%.128s\"", conn_get_loggeduser(c), channel); + msgtemp2 = localize(c, "{} has demoted you from a Channel Admin of channel \"{}\"", conn_get_loggeduser(c), channel); message_send_text(dst_c, message_type_info, c, msgtemp2); } } } if (account_get_auth_operator(acc, channel) == 1) { account_set_auth_operator(acc, channel, 0); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been demoted from a Channel Operator", username); + msgtemp = localize(c, "{} has been demoted from a Channel Operator", username); message_send_text(c, message_type_info, c, msgtemp); if (dst_c) { - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has demoted you from a Channel Operator of channel \"%.128s\"", conn_get_loggeduser(c), channel); + msgtemp2 = localize(c, "{} has demoted you from a Channel Operator of channel \"{}\"", conn_get_loggeduser(c), channel); message_send_text(dst_c, message_type_info, c, msgtemp2); } } @@ -1386,17 +1395,17 @@ namespace pvpgn if ((dst_c) && channel_conn_is_tmpOP(conn_get_channel(c), dst_c)) { conn_set_tmpOP_channel(dst_c, NULL); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been demoted from a tempOP of this channel", username); + msgtemp = localize(c, "{} has been demoted from a tempOP of this channel", username); message_send_text(c, message_type_info, c, msgtemp); if (dst_c) { - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has demoted you from a tmpOP of channel \"%.128s\"", conn_get_loggeduser(c), channel); + msgtemp2 = localize(c, "{} has demoted you from a tmpOP of channel \"{}\"", conn_get_loggeduser(c), channel); message_send_text(dst_c, message_type_info, c, msgtemp2); } done = 1; } if (!done) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s is no Channel Admin or Channel Operator or tempOP, so you can't demote him.", username); + msgtemp = localize(c, "{} is no Channel Admin or Channel Operator or tempOP, so you can't demote him.", username); message_send_text(c, message_type_info, c, msgtemp); } } @@ -1405,14 +1414,14 @@ namespace pvpgn if (dst_c && channel_conn_is_tmpOP(conn_get_channel(c), dst_c)) { conn_set_tmpOP_channel(account_get_conn(acc), NULL); - snprintf(msgtemp, sizeof(msgtemp), "%.64s has been demoted from a tempOP of this channel", username); + msgtemp = localize(c, "{} has been demoted from a tempOP of this channel", username); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp2, sizeof(msgtemp2), "%.64s has demoted you from a tempOP of channel \"%.128s\"", conn_get_loggeduser(c), channel); + msgtemp2 = localize(c, "{} has demoted you from a tempOP of channel \"{}\"", conn_get_loggeduser(c), channel); if (dst_c) message_send_text(dst_c, message_type_info, c, msgtemp2); } else { - snprintf(msgtemp, sizeof(msgtemp), "%.64s is no tempOP in this channel, so you can't demote him", username); + msgtemp = localize(c, "{} is no tempOP in this channel, so you can't demote him", username); message_send_text(c, message_type_info, c, msgtemp); } } @@ -1446,32 +1455,32 @@ namespace pvpgn text = args[2].c_str(); // username if (!(friend_acc = accountlist_find_account(text))) { - message_send_text(c, message_type_info, c, "That user does not exist."); + message_send_text(c, message_type_info, c, localize(c, "That user does not exist.")); return 0; } switch (account_add_friend(my_acc, friend_acc)) { case -1: - message_send_text(c, message_type_error, c, "Server error."); + message_send_text(c, message_type_error, c, localize(c, "Server error.")); return 0; case -2: - message_send_text(c, message_type_info, c, "You can't add yourself to your friends list."); + message_send_text(c, message_type_info, c, localize(c, "You can't add yourself to your friends list.")); return 0; case -3: - snprintf(msgtemp, sizeof(msgtemp), "You can only have a maximum of %d friends.", prefs_get_max_friends()); + msgtemp = localize(c, "You can only have a maximum of {} friends.", prefs_get_max_friends()); message_send_text(c, message_type_info, c, msgtemp); return 0; case -4: - snprintf(msgtemp, sizeof(msgtemp), "%.64s is already on your friends list!", text); + msgtemp = localize(c, "{} is already on your friends list!", text); message_send_text(c, message_type_info, c, msgtemp); return 0; } - snprintf(msgtemp, sizeof(msgtemp), "Added %.64s to your friends list.", text); + msgtemp = localize(c, "Added {} to your friends list.", text); message_send_text(c, message_type_info, c, msgtemp); dest_c = connlist_find_connection_by_account(friend_acc); if (dest_c != NULL) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s added you to his/her friends list.", conn_get_username(c)); + msgtemp = localize(c, "{} added you to his/her friends list.", conn_get_username(c)); message_send_text(dest_c, message_type_info, dest_c, msgtemp); } @@ -1563,7 +1572,7 @@ namespace pvpgn if (cnt) message_send_text(c, message_type_friendwhisperack, c, msg); else - message_send_text(c, message_type_info, c, "All of your friends are offline."); + message_send_text(c, message_type_info, c, localize(c, "All of your friends are offline.")); } else if (args[1] == "r" || args[1] == "remove" || args[1] == "del" || args[1] == "delete") { @@ -1579,11 +1588,11 @@ namespace pvpgn switch ((num = account_remove_friend2(my_acc, text))) { case -1: return -1; case -2: - snprintf(msgtemp, sizeof(msgtemp), "%.64s was not found on your friends list.", text); + msgtemp = localize(c, "{} was not found on your friends list.", text); message_send_text(c, message_type_info, c, msgtemp); return 0; default: - snprintf(msgtemp, sizeof(msgtemp), "Removed %.64s from your friends list.", text); + msgtemp = localize(c, "Removed {} from your friends list.", text); message_send_text(c, message_type_info, c, msgtemp); if ((conn_get_class(c) != conn_class_bnet) || (!(rpacket = packet_create(packet_class_bnet)))) @@ -1627,7 +1636,7 @@ namespace pvpgn { account_set_friend(my_acc, n, account_get_friend(my_acc, n - 1)); account_set_friend(my_acc, n - 1, dest_uid); - snprintf(msgtemp, sizeof(msgtemp), "Promoted %.64s in your friends list.", dest_name); + msgtemp = localize(c, "Promoted {} in your friends list.", dest_name); message_send_text(c, message_type_info, c, msgtemp); if ((conn_get_class(c) != conn_class_bnet) || (!(rpacket = packet_create(packet_class_bnet)))) @@ -1670,7 +1679,7 @@ namespace pvpgn { account_set_friend(my_acc, n, account_get_friend(my_acc, n + 1)); account_set_friend(my_acc, n + 1, dest_uid); - snprintf(msgtemp, sizeof(msgtemp), "Demoted %.64s in your friends list.", dest_name); + msgtemp = localize(c, "Demoted {} in your friends list.", dest_name); message_send_text(c, message_type_info, c, msgtemp); if ((conn_get_class(c) != conn_class_bnet) || (!(rpacket = packet_create(packet_class_bnet)))) @@ -1688,8 +1697,7 @@ namespace pvpgn } else if (args[1] == "list" || args[1] == "l" || args[1] == "online" || args[1] == "o") { char const * frienduid; - char status[128]; - char software[64]; + std::string status, software; t_connection * dest_c; t_account * friend_acc; t_game const * game; @@ -1706,12 +1714,12 @@ namespace pvpgn } if (!online_only) { - snprintf(msgtemp, sizeof(msgtemp), "Your %s - Friends List", prefs_get_servername()); + msgtemp = localize(c, "Your {} - Friends List", prefs_get_servername()); message_send_text(c, message_type_info, c, msgtemp); } else { - snprintf(msgtemp, sizeof(msgtemp), "Your %s - Online Friends List", prefs_get_servername()); + msgtemp = localize(c, "Your {} - Online Friends List", prefs_get_servername()); message_send_text(c, message_type_info, c, msgtemp); } message_send_text(c, message_type_info, c, "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="); @@ -1726,47 +1734,46 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "friend uid in list"); continue; } - software[0] = '\0'; friend_acc = friend_get_account(fr); if (!(dest_c = connlist_find_connection_by_account(friend_acc))) { if (online_only) { continue; } - std::sprintf(status, ", offline"); + status = localize(c, ", offline"); } else { - std::sprintf(software, " using %s", clienttag_get_title(conn_get_clienttag(dest_c))); + software = localize(c, " using {}", clienttag_get_title(conn_get_clienttag(dest_c))); if (friend_get_mutual(fr)) { if ((game = conn_get_game(dest_c))) - std::sprintf(status, ", in game \"%.64s\"", game_get_name(game)); + status = localize(c, ", in game \"{}\"", game_get_name(game)); else if ((channel = conn_get_channel(dest_c))) { if (strcasecmp(channel_get_name(channel), "Arranged Teams") == 0) - std::sprintf(status, ", in game AT Preparation"); + status = localize(c, ", in game AT Preparation"); else - std::sprintf(status, ", in channel \"%.64s\",", channel_get_name(channel)); + status = localize(c, ", in channel \"{}\",", channel_get_name(channel)); } else - std::sprintf(status, ", is in AT Preparation"); + status = localize(c, ", is in AT Preparation"); } else { if ((game = conn_get_game(dest_c))) - std::sprintf(status, ", is in a game"); + status = localize(c, ", is in a game"); else if ((channel = conn_get_channel(dest_c))) - std::sprintf(status, ", is in a chat channel"); + status = localize(c, ", is in a chat channel"); else - std::sprintf(status, ", is in AT Preparation"); + status = localize(c, ", is in AT Preparation"); } } frienduid = account_get_name(friend_acc); - if (software[0]) snprintf(msgtemp, sizeof(msgtemp), "%d: %s%.16s%.128s, %.64s", i + 1, friend_get_mutual(fr) ? "*" : " ", frienduid, status, software); - else snprintf(msgtemp, sizeof(msgtemp), "%d: %.16s%.128s", i + 1, frienduid, status); - message_send_text(c, message_type_info, c, msgtemp); + if (!software.empty()) snprintf(msgtemp0, sizeof(msgtemp0), "%d: %s%.16s%.128s, %.64s", i + 1, friend_get_mutual(fr) ? "*" : " ", frienduid, status, software); + else snprintf(msgtemp0, sizeof(msgtemp0), "%d: %.16s%.128s", i + 1, frienduid, status); + message_send_text(c, message_type_info, c, msgtemp0); } } message_send_text(c, message_type_info, c, "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="); - message_send_text(c, message_type_info, c, "End of Friends List"); + message_send_text(c, message_type_info, c, localize(c, "End of Friends List")); } else { describe_command(c, args[0].c_str()); @@ -1781,7 +1788,7 @@ namespace pvpgn if (!(channel = conn_get_channel(c))) { - message_send_text(c, message_type_error, c, "You are not in a channel."); + message_send_text(c, message_type_error, c, localize(c, "You are not in a channel.")); return -1; } @@ -1828,7 +1835,7 @@ namespace pvpgn if (!args[1].empty() && (clienttag = tag_validate_client(args[1].c_str()))) { // clienttag status - snprintf(msgtemp, sizeof(msgtemp), "There are currently %u user(s) in %u games of %.128s", + msgtemp = localize(c, "There are currently {} user(s) in {} games of {}", conn_get_user_count_by_clienttag(clienttag), game_get_count_by_clienttag(clienttag), clienttag_get_title(clienttag)); @@ -1837,7 +1844,7 @@ namespace pvpgn else { // overall status - snprintf(msgtemp, sizeof(msgtemp), "There are currently %d users online, in %d games, and in %d channels.", + msgtemp = localize(c, "There are currently {} users online, in {} games, and in {} channels.", connlist_login_get_length(), gamelist_get_length(), channellist_get_length()); @@ -1866,30 +1873,30 @@ namespace pvpgn if (!(channel = channellist_find_channel_by_name(cname, conn_get_country(c), realm_get_name(conn_get_realm(c))))) { - message_send_text(c, message_type_error, c, "That channel does not exist."); - message_send_text(c, message_type_error, c, "(If you are trying to search for a user, use the /whois command.)"); + message_send_text(c, message_type_error, c, localize(c, "That channel does not exist.")); + message_send_text(c, message_type_error, c, localize(c, "(If you are trying to search for a user, use the /whois command.)")); return 0; } if (channel_check_banning(channel, c) == 1) { - message_send_text(c, message_type_error, c, "You are banned from that channel."); + message_send_text(c, message_type_error, c, localize(c, "You are banned from that channel.")); return 0; } - snprintf(msgtemp, sizeof(msgtemp), "Users in channel %.64s:", cname); - i = std::strlen(msgtemp); + std::strcpy(msgtemp0, localize(c, "Users in channel {}:", cname).c_str()); + i = std::strlen(msgtemp0); for (conn = channel_get_first(channel); conn; conn = channel_get_next()) { - if (i + std::strlen((tname = conn_get_username(conn))) + 2 > sizeof(msgtemp)) /* " ", name, '\0' */ + if (i + std::strlen((tname = conn_get_username(conn))) + 2 > sizeof(msgtemp0)) /* " ", name, '\0' */ { - message_send_text(c, message_type_info, c, msgtemp); + message_send_text(c, message_type_info, c, msgtemp0); i = 0; } - std::sprintf(&msgtemp[i], " %s", tname); - i += std::strlen(&msgtemp[i]); + std::sprintf(&msgtemp0[i], " %s", tname); + i += std::strlen(&msgtemp0[i]); } if (i > 0) - message_send_text(c, message_type_info, c, msgtemp); + message_send_text(c, message_type_info, c, msgtemp0); return 0; } @@ -1916,7 +1923,7 @@ namespace pvpgn if (!(tname = conn_get_username(c))) { - message_send_text(c, message_type_error, c, "Unable to obtain your account name."); + message_send_text(c, message_type_error, c, localize(c, "Unable to obtain your account name.")); return 0; } @@ -1938,13 +1945,13 @@ namespace pvpgn } text = args[1].c_str(); // message - snprintf(msgtemp, sizeof(msgtemp), "Announcement from %.64s: %.128s", conn_get_username(c), text); - if (!(message = message_create(message_type_broadcast, c, msgtemp))) - message_send_text(c, message_type_info, c, "Could not broadcast message."); + msgtemp = localize(c, "Announcement from {}: {}", conn_get_username(c), text); + if (!(message = message_create(message_type_broadcast, c, msgtemp.c_str()))) + message_send_text(c, message_type_info, c, localize(c, "Could not broadcast message.")); else { if (message_send_all(message) < 0) - message_send_text(c, message_type_info, c, "Could not broadcast message."); + message_send_text(c, message_type_info, c, localize(c, "Could not broadcast message.")); message_destroy(message); } @@ -1953,13 +1960,13 @@ namespace pvpgn static int _handle_beep_command(t_connection * c, char const *text) { - message_send_text(c, message_type_info, c, "Audible notification on."); /* FIXME: actually do something */ + message_send_text(c, message_type_info, c, localize(c, "Audible notification on.")); /* FIXME: actually do something */ return 0; /* FIXME: these only affect CHAT clients... I think they prevent ^G from being sent */ } static int _handle_nobeep_command(t_connection * c, char const *text) { - message_send_text(c, message_type_info, c, "Audible notification off."); /* FIXME: actually do something */ + message_send_text(c, message_type_info, c, localize(c, "Audible notification off.")); /* FIXME: actually do something */ return 0; } @@ -2001,7 +2008,7 @@ namespace pvpgn static int _handle_uptime_command(t_connection * c, char const *text) { - snprintf(msgtemp, sizeof(msgtemp), "Uptime: %s", seconds_to_timestr(server_get_uptime())); + msgtemp = localize(c, "Uptime: {}", seconds_to_timestr(server_get_uptime())); message_send_text(c, message_type_info, c, msgtemp); return 0; @@ -2024,7 +2031,7 @@ namespace pvpgn account = conn_get_account(c); } else if (!(account = accountlist_find_account(username))) { - message_send_text(c, message_type_error, c, "Invalid user."); + message_send_text(c, message_type_error, c, localize(c, "Invalid user.")); return 0; } @@ -2032,7 +2039,7 @@ namespace pvpgn if (!args[2].empty() && args[2].length() == 4) clienttag = args[2].c_str(); else if (!(clienttag = tag_uint_to_str(clienttag_str, conn_get_clienttag(c)))) { - message_send_text(c, message_type_error, c, "Unable to determine client game."); + message_send_text(c, message_type_error, c, localize(c, "Unable to determine client game.")); return 0; } @@ -2064,90 +2071,90 @@ namespace pvpgn switch (clienttag_uint) { case CLIENTTAG_BNCHATBOT_UINT: - message_send_text(c, message_type_error, c, "This game does not support win/loss records."); - message_send_text(c, message_type_error, c, "You must supply a user name and a valid program ID."); - message_send_text(c, message_type_error, c, "Example: /stats joe STAR"); + message_send_text(c, message_type_error, c, localize(c, "This game does not support win/loss records.")); + message_send_text(c, message_type_error, c, localize(c, "You must supply a user name and a valid program ID.")); + message_send_text(c, message_type_error, c, localize(c, "Example: /stats joe STAR")); return 0; case CLIENTTAG_DIABLORTL_UINT: case CLIENTTAG_DIABLOSHR_UINT: - snprintf(msgtemp, sizeof(msgtemp), "%.64s's record:", account_get_name(account)); + msgtemp = localize(c, "{}'s record:", account_get_name(account)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "level: %u", account_get_normal_level(account, clienttag_uint)); + msgtemp = localize(c, "level: {}", account_get_normal_level(account, clienttag_uint)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "class: %.16s", bnclass_get_str(account_get_normal_class(account, clienttag_uint))); + msgtemp = localize(c, "class: {}", bnclass_get_str(account_get_normal_class(account, clienttag_uint))); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "stats: %u str %u mag %u dex %u vit %u gld", + msgtemp = localize(c, "stats: {} str {} mag {} dex {} vit {} gld", account_get_normal_strength(account, clienttag_uint), account_get_normal_magic(account, clienttag_uint), account_get_normal_dexterity(account, clienttag_uint), account_get_normal_vitality(account, clienttag_uint), account_get_normal_gold(account, clienttag_uint)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Diablo kills: %u", account_get_normal_diablo_kills(account, clienttag_uint)); + msgtemp = localize(c, "Diablo kills: {}", account_get_normal_diablo_kills(account, clienttag_uint)); message_send_text(c, message_type_info, c, msgtemp); return 0; case CLIENTTAG_WARCIIBNE_UINT: - snprintf(msgtemp, sizeof(msgtemp), "%.64s's record:", account_get_name(account)); + msgtemp = localize(c, "{}'s record:", account_get_name(account)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Normal games: %u-%u-%u", + msgtemp = localize(c, "Normal games: {}-{}-{}", account_get_normal_wins(account, clienttag_uint), account_get_normal_losses(account, clienttag_uint), account_get_normal_disconnects(account, clienttag_uint)); message_send_text(c, message_type_info, c, msgtemp); if (account_get_ladder_rating(account, clienttag_uint, ladder_id_normal) > 0) - snprintf(msgtemp, sizeof(msgtemp), "Ladder games: %u-%u-%u (rating %d)", + msgtemp = localize(c, "Ladder games: {}-{}-{} (rating {})", account_get_ladder_wins(account, clienttag_uint, ladder_id_normal), account_get_ladder_losses(account, clienttag_uint, ladder_id_normal), account_get_ladder_disconnects(account, clienttag_uint, ladder_id_normal), account_get_ladder_rating(account, clienttag_uint, ladder_id_normal)); else - std::strcpy(msgtemp, "Ladder games: 0-0-0"); + msgtemp = localize(c, "Ladder games: 0-0-0"); message_send_text(c, message_type_info, c, msgtemp); if (account_get_ladder_rating(account, clienttag_uint, ladder_id_ironman) > 0) - snprintf(msgtemp, sizeof(msgtemp), "IronMan games: %u-%u-%u (rating %d)", + msgtemp = localize(c, "IronMan games: {}-{}-{} (rating {})", account_get_ladder_wins(account, clienttag_uint, ladder_id_ironman), account_get_ladder_losses(account, clienttag_uint, ladder_id_ironman), account_get_ladder_disconnects(account, clienttag_uint, ladder_id_ironman), account_get_ladder_rating(account, clienttag_uint, ladder_id_ironman)); else - std::strcpy(msgtemp, "IronMan games: 0-0-0"); + msgtemp = localize(c, "IronMan games: 0-0-0"); message_send_text(c, message_type_info, c, msgtemp); return 0; case CLIENTTAG_WARCRAFT3_UINT: case CLIENTTAG_WAR3XP_UINT: - snprintf(msgtemp, sizeof(msgtemp), "%.64s's Ladder Record's:", account_get_name(account)); + msgtemp = localize(c, "{}'s Ladder Record's:", account_get_name(account)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Users Solo Level: %u, Experience: %u", + msgtemp = localize(c, "Users Solo Level: {}, Experience: {}", account_get_ladder_level(account, clienttag_uint, ladder_id_solo), account_get_ladder_xp(account, clienttag_uint, ladder_id_solo)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "SOLO Ladder Record: %u-%u-0", + msgtemp = localize(c, "SOLO Ladder Record: {}-{}-0", account_get_ladder_wins(account, clienttag_uint, ladder_id_solo), account_get_ladder_losses(account, clienttag_uint, ladder_id_solo)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "SOLO Rank: %u", + msgtemp = localize(c, "SOLO Rank: {}", account_get_ladder_rank(account, clienttag_uint, ladder_id_solo)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Users Team Level: %u, Experience: %u", + msgtemp = localize(c, "Users Team Level: {}, Experience: {}", account_get_ladder_level(account, clienttag_uint, ladder_id_team), account_get_ladder_xp(account, clienttag_uint, ladder_id_team)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "TEAM Ladder Record: %u-%u-0", + msgtemp = localize(c, "TEAM Ladder Record: {}-{}-0", account_get_ladder_wins(account, clienttag_uint, ladder_id_team), account_get_ladder_losses(account, clienttag_uint, ladder_id_team)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "TEAM Rank: %u", + msgtemp = localize(c, "TEAM Rank: {}", account_get_ladder_rank(account, clienttag_uint, ladder_id_team)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Users FFA Level: %u, Experience: %u", + msgtemp = localize(c, "Users FFA Level: {}, Experience: {}", account_get_ladder_level(account, clienttag_uint, ladder_id_ffa), account_get_ladder_xp(account, clienttag_uint, ladder_id_ffa)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "FFA Ladder Record: %u-%u-0", + msgtemp = localize(c, "FFA Ladder Record: {}-{}-0", account_get_ladder_wins(account, clienttag_uint, ladder_id_ffa), account_get_ladder_losses(account, clienttag_uint, ladder_id_ffa)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "FFA Rank: %u", + msgtemp = localize(c, "FFA Rank: {}", account_get_ladder_rank(account, clienttag_uint, ladder_id_ffa)); message_send_text(c, message_type_info, c, msgtemp); if (account_get_teams(account)) { @@ -2170,36 +2177,36 @@ namespace pvpgn continue; teamcount++; - snprintf(msgtemp, sizeof(msgtemp), "Users AT Team No. %u", teamcount); + msgtemp = localize(c, "Users AT Team No. {}", teamcount); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Users AT TEAM Level: %u, Experience: %u", + msgtemp = localize(c, "Users AT TEAM Level: {}, Experience: {}", team_get_level(team), team_get_xp(team)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "AT TEAM Ladder Record: %u-%u-0", + msgtemp = localize(c, "AT TEAM Ladder Record: {}-{}-0", team_get_wins(team), team_get_losses(team)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "AT TEAM Rank: %u", + msgtemp = localize(c, "AT TEAM Rank: {}", team_get_rank(team)); message_send_text(c, message_type_info, c, msgtemp); } } return 0; default: - snprintf(msgtemp, sizeof(msgtemp), "%.64s's record:", account_get_name(account)); + msgtemp = localize(c, "{}'s record:", account_get_name(account)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Normal games: %u-%u-%u", + msgtemp = localize(c, "Normal games: {}-{}-{}", account_get_normal_wins(account, clienttag_uint), account_get_normal_losses(account, clienttag_uint), account_get_normal_disconnects(account, clienttag_uint)); message_send_text(c, message_type_info, c, msgtemp); if (account_get_ladder_rating(account, clienttag_uint, ladder_id_normal) > 0) - snprintf(msgtemp, sizeof(msgtemp), "Ladder games: %u-%u-%u (rating %d)", + msgtemp = localize(c, "Ladder games: {}-{}-{} (rating {})", account_get_ladder_wins(account, clienttag_uint, ladder_id_normal), account_get_ladder_losses(account, clienttag_uint, ladder_id_normal), account_get_ladder_disconnects(account, clienttag_uint, ladder_id_normal), account_get_ladder_rating(account, clienttag_uint, ladder_id_normal)); else - std::strcpy(msgtemp, "Ladder games: 0-0-0"); + msgtemp = localize(c, "Ladder games: 0-0-0"); message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -2218,18 +2225,20 @@ namespace pvpgn btlocal = bnettime_add_tzbias(btsystem, local_tzbias()); now = bnettime_to_time(btlocal); if (!(tmnow = std::gmtime(&now))) - std::strcpy(msgtemp, "Server Time: ?"); + std::strcpy(msgtemp0, "?"); else - std::strftime(msgtemp, sizeof(msgtemp), "Server Time: %a %b %d %H:%M:%S", tmnow); + std::strftime(msgtemp0, sizeof(msgtemp0), "%a %b %d %H:%M:%S", tmnow); + msgtemp = localize(c, "Server Time: {}", msgtemp0); message_send_text(c, message_type_info, c, msgtemp); if (conn_get_class(c) == conn_class_bnet) { btlocal = bnettime_add_tzbias(btsystem, conn_get_tzbias(c)); now = bnettime_to_time(btlocal); if (!(tmnow = std::gmtime(&now))) - std::strcpy(msgtemp, "Your local time: ?"); + std::strcpy(msgtemp0, "?"); else - std::strftime(msgtemp, sizeof(msgtemp), "Your local time: %a %b %d %H:%M:%S", tmnow); + std::strftime(msgtemp0, sizeof(msgtemp0), "%a %b %d %H:%M:%S", tmnow); + msgtemp = localize(c, "Your local time: {}", msgtemp0); message_send_text(c, message_type_info, c, msgtemp); } @@ -2252,13 +2261,13 @@ namespace pvpgn if (!conn_get_game(c)) { if (strcasecmp(text, "Arranged Teams") == 0) { - message_send_text(c, message_type_error, c, "Channel Arranged Teams is a RESTRICTED Channel!"); + message_send_text(c, message_type_error, c, msgtemp = localize(c, "Channel Arranged Teams is a RESTRICTED Channel!")); return 0; } if (!(std::strlen(text) < MAX_CHANNELNAME_LEN)) { - snprintf(msgtemp, sizeof(msgtemp), "Max channel name length exceeded (max %d symbols)", MAX_CHANNELNAME_LEN - 1); + msgtemp = localize(c, "Max channel name length exceeded (max {} symbols)", MAX_CHANNELNAME_LEN - 1); message_send_text(c, message_type_error, c, msgtemp); return 0; } @@ -2273,7 +2282,7 @@ namespace pvpgn command_set_flags(c); } else - message_send_text(c, message_type_error, c, "Command disabled while inside a game."); + message_send_text(c, message_type_error, c, localize(c, "Command disabled while inside a game.")); return 0; } @@ -2282,7 +2291,7 @@ namespace pvpgn { if (channel_rejoin(c) != 0) - message_send_text(c, message_type_error, c, "You are not in a channel."); + message_send_text(c, message_type_error, c, localize(c, "You are not in a channel.")); if ((conn_get_clienttag(c) == CLIENTTAG_WARCRAFT3_UINT) || (conn_get_clienttag(c) == CLIENTTAG_WAR3XP_UINT)) conn_update_w3_playerinfo(c); command_set_flags(c); @@ -2299,18 +2308,18 @@ namespace pvpgn { if (!conn_get_awaystr(c)) { - message_send_text(c, message_type_info, c, "You are now marked as being away."); + message_send_text(c, message_type_info, c, localize(c, "You are now marked as being away.")); conn_set_awaystr(c, "Currently not available"); } else { - message_send_text(c, message_type_info, c, "You are no longer marked as away."); + message_send_text(c, message_type_info, c, localize(c, "You are no longer marked as away.")); conn_set_awaystr(c, NULL); } } else { - message_send_text(c, message_type_info, c, "You are now marked as being away."); + message_send_text(c, message_type_info, c, localize(c, "You are now marked as being away.")); conn_set_awaystr(c, text); } @@ -2326,18 +2335,18 @@ namespace pvpgn { if (!conn_get_dndstr(c)) { - message_send_text(c, message_type_info, c, "Do Not Disturb mode engaged."); - conn_set_dndstr(c, "Not available"); + message_send_text(c, message_type_info, c, localize(c, "Do Not Disturb mode engaged.")); + conn_set_dndstr(c, localize(c, "Not available").c_str()); } else { - message_send_text(c, message_type_info, c, "Do Not Disturb mode canceled."); + message_send_text(c, message_type_info, c, localize(c, "Do Not Disturb mode canceled.")); conn_set_dndstr(c, NULL); } } else { - message_send_text(c, message_type_info, c, "Do Not Disturb mode engaged."); + message_send_text(c, message_type_info, c, localize(c, "Do Not Disturb mode engaged.")); conn_set_dndstr(c, text); } @@ -2363,21 +2372,21 @@ namespace pvpgn if (!(account = accountlist_find_account(text))) { - message_send_text(c, message_type_error, c, "No such user."); + message_send_text(c, message_type_error, c, localize(c, "No such user.")); return 0; } if (conn_get_account(c) == account) { - message_send_text(c, message_type_error, c, "You can't squelch yourself."); + message_send_text(c, message_type_error, c, localize(c, "You can't squelch yourself.")); return 0; } if (conn_add_ignore(c, account) < 0) - message_send_text(c, message_type_error, c, "Could not squelch user."); + message_send_text(c, message_type_error, c, localize(c, "Could not squelch user.")); else { - snprintf(msgtemp, sizeof(msgtemp), "%-.20s has been squelched.", account_get_name(account)); + msgtemp = localize(c, "{} has been squelched.", account_get_name(account)); message_send_text(c, message_type_info, c, msgtemp); } @@ -2404,17 +2413,17 @@ namespace pvpgn if (!(account = accountlist_find_account(text))) { - message_send_text(c, message_type_info, c, "No such user."); + message_send_text(c, message_type_info, c, localize(c, "No such user.")); return 0; } if (conn_del_ignore(c, account) < 0) - message_send_text(c, message_type_info, c, "User was not being ignored."); + message_send_text(c, message_type_info, c, localize(c, "User was not being ignored.")); else { t_message * message; - message_send_text(c, message_type_info, c, "No longer ignoring."); + message_send_text(c, message_type_info, c, localize(c, "No longer ignoring.")); if ((dest_c = account_get_conn(account))) { @@ -2448,7 +2457,7 @@ namespace pvpgn if (!(channel = conn_get_channel(c))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return 0; } @@ -2459,29 +2468,29 @@ namespace pvpgn account_get_auth_operator(acc, channel_get_name(channel)) != 1 && /* default to false */ !channel_conn_is_tmpOP(channel, account_get_conn(acc))) { - message_send_text(c, message_type_error, c, "You have to be at least a Channel Operator or tempOP to use this command."); + message_send_text(c, message_type_error, c, localize(c, "You have to be at least a Channel Operator or tempOP to use this command.")); return 0; } if (!(kuc = connlist_find_connection_by_accountname(username))) { - message_send_text(c, message_type_error, c, "That user is not logged in."); + message_send_text(c, message_type_error, c, localize(c, "That user is not logged in.")); return 0; } if (conn_get_channel(kuc) != channel) { - message_send_text(c, message_type_error, c, "That user is not in this channel."); + message_send_text(c, message_type_error, c, localize(c, "That user is not in this channel.")); return 0; } if (account_get_auth_admin(conn_get_account(kuc), NULL) == 1 || account_get_auth_admin(conn_get_account(kuc), channel_get_name(channel)) == 1) { - message_send_text(c, message_type_error, c, "You cannot kick administrators."); + message_send_text(c, message_type_error, c, localize(c, "You cannot kick administrators.")); return 0; } else if (account_get_auth_operator(conn_get_account(kuc), NULL) == 1 || account_get_auth_operator(conn_get_account(kuc), channel_get_name(channel)) == 1) { - message_send_text(c, message_type_error, c, "You cannot kick operators."); + message_send_text(c, message_type_error, c, localize(c, "You cannot kick operators.")); return 0; } @@ -2497,10 +2506,10 @@ namespace pvpgn } if (text[0] != '\0') - snprintf(msgtemp, sizeof(msgtemp), "%-.20s has been kicked by %-.20s (%.128s).", tname1, tname2, text); + msgtemp = localize(c, "{} has been kicked by {} ({}).", tname1, tname2, text); else - snprintf(msgtemp, sizeof(msgtemp), "%-.20s has been kicked by %-.20s.", tname1, tname2); - channel_message_send(channel, message_type_info, c, msgtemp); + msgtemp = localize(c, "{} has been kicked by {}.", tname1, tname2); + channel_message_send(channel, message_type_info, c, msgtemp.c_str()); } conn_kick_channel(kuc, "Bye"); if (conn_get_class(kuc) == conn_class_bnet) @@ -2527,7 +2536,7 @@ namespace pvpgn if (!(channel = conn_get_channel(c))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return 0; } if (account_get_auth_admin(conn_get_account(c), NULL) != 1 && /* default to false */ @@ -2535,7 +2544,7 @@ namespace pvpgn account_get_auth_operator(conn_get_account(c), NULL) != 1 && /* default to false */ account_get_auth_operator(conn_get_account(c), channel_get_name(channel)) != 1) /* default to false */ { - message_send_text(c, message_type_error, c, "You have to be at least a Channel Operator to use this command."); + message_send_text(c, message_type_error, c, localize(c, "You have to be at least a Channel Operator to use this command.")); return 0; } { @@ -2543,25 +2552,25 @@ namespace pvpgn if (!(account = accountlist_find_account(username))) { - message_send_text(c, message_type_info, c, "That account doesn't currently exist."); + message_send_text(c, message_type_info, c, localize(c, "That account doesn't currently exist.")); return -1; } else if (account_get_auth_admin(account, NULL) == 1 || account_get_auth_admin(account, channel_get_name(channel)) == 1) { - message_send_text(c, message_type_error, c, "You cannot ban administrators."); + message_send_text(c, message_type_error, c, localize(c, "You cannot ban administrators.")); return 0; } else if (account_get_auth_operator(account, NULL) == 1 || account_get_auth_operator(account, channel_get_name(channel)) == 1) { - message_send_text(c, message_type_error, c, "You cannot ban operators."); + message_send_text(c, message_type_error, c, localize(c, "You cannot ban operators.")); return 0; } } if (channel_ban_user(channel, username) < 0) { - snprintf(msgtemp, sizeof(msgtemp), "Unable to ban %-.20s.", username); + msgtemp = localize(c, "Unable to ban {}.", username); message_send_text(c, message_type_error, c, msgtemp); } else @@ -2570,10 +2579,10 @@ namespace pvpgn tname = conn_get_loggeduser(c); if (text[0] != '\0') - snprintf(msgtemp, sizeof(msgtemp), "%-.20s has been banned by %-.20s (%.128s).", username, tname ? tname : "unknown", text); + msgtemp = localize(c, "{} has been banned by {} ({}).", username, tname ? tname : "unknown", text); else - snprintf(msgtemp, sizeof(msgtemp), "%-.20s has been banned by %-.20s.", username, tname ? tname : "unknown"); - channel_message_send(channel, message_type_info, c, msgtemp); + msgtemp = localize(c, "{} has been banned by {}.", username, tname ? tname : "unknown"); + channel_message_send(channel, message_type_info, c, msgtemp.c_str()); } if ((buc = connlist_find_connection_by_accountname(username)) && conn_get_channel(buc) == channel) @@ -2597,7 +2606,7 @@ namespace pvpgn if (!(channel = conn_get_channel(c))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return 0; } if (account_get_auth_admin(conn_get_account(c), NULL) != 1 && /* default to false */ @@ -2605,15 +2614,15 @@ namespace pvpgn account_get_auth_operator(conn_get_account(c), NULL) != 1 && /* default to false */ account_get_auth_operator(conn_get_account(c), channel_get_name(channel)) != 1) /* default to false */ { - message_send_text(c, message_type_error, c, "You are not a channel operator."); + message_send_text(c, message_type_error, c, localize(c, "You are not a channel operator.")); return 0; } if (channel_unban_user(channel, text) < 0) - message_send_text(c, message_type_error, c, "That user is not banned."); + message_send_text(c, message_type_error, c, localize(c, "That user is not banned.")); else { - snprintf(msgtemp, sizeof(msgtemp), "%.64s is no longer banned from this channel.", text); + msgtemp = localize(c, "{} is no longer banned from this channel.", text); message_send_text(c, message_type_info, c, msgtemp); } @@ -2626,7 +2635,7 @@ namespace pvpgn if (!(dest = conn_get_lastsender(c))) { - message_send_text(c, message_type_error, c, "No one messaged you, use /m instead"); + message_send_text(c, message_type_error, c, localize(c, "No one messaged you, use /m instead")); return 0; } @@ -2652,7 +2661,7 @@ namespace pvpgn t_message * message; if (!(realm = conn_get_realm(c))) { - message_send_text(c, message_type_info, c, "You must join a realm first"); + message_send_text(c, message_type_info, c, localize(c, "You must join a realm first")); return 0; } @@ -2665,8 +2674,8 @@ namespace pvpgn } text = args[1].c_str(); // message - snprintf(msgtemp, sizeof(msgtemp), "Announcement from %.32s@%.32s: %.128s", conn_get_username(c), realm_get_name(realm), text); - if (!(message = message_create(message_type_broadcast, c, msgtemp))) + msgtemp = localize(c, "Announcement from {}@{}: {}", conn_get_username(c), realm_get_name(realm), text); + if (!(message = message_create(message_type_broadcast, c, msgtemp.c_str()))) { message_send_text(c, message_type_info, c, "Could not broadcast message."); } @@ -2701,15 +2710,15 @@ namespace pvpgn if (!(account = accountlist_find_account(text))) { - message_send_text(c, message_type_info, c, "That user does not exist."); + message_send_text(c, message_type_info, c, localize(c, "That user does not exist.")); return 0; } if (conn_add_watch(c, account, 0) < 0) /* FIXME: adds all events for now */ - message_send_text(c, message_type_error, c, "Add to watch list failed."); + message_send_text(c, message_type_error, c, localize(c, "Add to watch list failed.")); else { - snprintf(msgtemp, sizeof(msgtemp), "User %.64s added to your watch list.", text); + msgtemp = localize(c, "User {} added to your watch list.", text); message_send_text(c, message_type_info, c, msgtemp); } @@ -2730,15 +2739,15 @@ namespace pvpgn text = args[1].c_str(); // username if (!(account = accountlist_find_account(text))) { - message_send_text(c, message_type_info, c, "That user does not exist."); + message_send_text(c, message_type_info, c, localize(c, "That user does not exist.")); return 0; } if (conn_del_watch(c, account, 0) < 0) /* FIXME: deletes all events for now */ - message_send_text(c, message_type_error, c, "Removal from watch list failed."); + message_send_text(c, message_type_error, c, localize(c, "Removal from watch list failed.")); else { - snprintf(msgtemp, sizeof(msgtemp), "User %.64s removed from your watch list.", text); + msgtemp = localize(c, "User {} removed from your watch list.", text); message_send_text(c, message_type_info, c, msgtemp); } @@ -2763,15 +2772,14 @@ namespace pvpgn } if (conn_add_watch(c, NULL, clienttag) < 0) /* FIXME: adds all events for now */ - message_send_text(c, message_type_error, c, "Add to watch list failed."); + message_send_text(c, message_type_error, c, localize(c, "Add to watch list failed.")); else if (clienttag) { - char msgtemp[MAX_MESSAGE_LEN]; - snprintf(msgtemp, sizeof(msgtemp), "All %.128s users added to your watch list.", tag_uint_to_str((char*)clienttag_str, clienttag)); + msgtemp = localize(c, "All {} users added to your watch list.", tag_uint_to_str((char*)clienttag_str, clienttag)); message_send_text(c, message_type_info, c, msgtemp); } else - message_send_text(c, message_type_info, c, "All users added to your watch list."); + message_send_text(c, message_type_info, c, localize(c, "All users added to your watch list.")); return 0; } @@ -2794,15 +2802,14 @@ namespace pvpgn } if (conn_del_watch(c, NULL, clienttag) < 0) /* FIXME: deletes all events for now */ - message_send_text(c, message_type_error, c, "Removal from watch list failed."); + message_send_text(c, message_type_error, c, localize(c, "Removal from watch list failed.")); else if (clienttag) { - char msgtemp[MAX_MESSAGE_LEN]; - snprintf(msgtemp, sizeof(msgtemp), "All %.128s users removed from your watch list.", tag_uint_to_str((char*)clienttag_str, clienttag)); + msgtemp = localize(c, "All {} users removed from your watch list.", tag_uint_to_str((char*)clienttag_str, clienttag)); message_send_text(c, message_type_info, c, msgtemp); } else - message_send_text(c, message_type_info, c, "All users removed from your watch list."); + message_send_text(c, message_type_info, c, localize(c, "All users removed from your watch list.")); return 0; } @@ -2816,25 +2823,25 @@ namespace pvpgn if (!(channel = conn_get_channel(c))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return 0; } - std::strcpy(msgtemp, "Banned users:"); - i = std::strlen(msgtemp); + std::strcpy(msgtemp0, localize(c, "Banned users:").c_str()); + i = std::strlen(msgtemp0); LIST_TRAVERSE_CONST(channel_get_banlist(channel), curr) { banned = (char*)elem_get_data(curr); - if (i + std::strlen(banned) + 2 > sizeof(msgtemp)) /* " ", name, '\0' */ + if (i + std::strlen(banned) + 2 > sizeof(msgtemp0)) /* " ", name, '\0' */ { - message_send_text(c, message_type_info, c, msgtemp); + message_send_text(c, message_type_info, c, msgtemp0); i = 0; } - std::sprintf(&msgtemp[i], " %s", banned); - i += std::strlen(&msgtemp[i]); + std::sprintf(&msgtemp0[i], " %s", banned); + i += std::strlen(&msgtemp0[i]); } if (i > 0) - message_send_text(c, message_type_info, c, msgtemp); + message_send_text(c, message_type_info, c, msgtemp0); return 0; } @@ -2848,7 +2855,7 @@ namespace pvpgn tm = std::localtime(&date); if (tm) std::strftime(strdate, 64, "%B %d, %Y", tm); - else std::strcpy(strdate, "(invalid date)"); + else std::strcpy(strdate, localize(c, "(invalid date)").c_str()); message_send_text(c, message_type_info, c, strdate); for (p = lstr_get_str(lstr); *p;) { @@ -2886,7 +2893,7 @@ namespace pvpgn (cbdata->diff == game_difficulty_none || game_get_difficulty(game) == cbdata->diff) && (cbdata->lobby == false || (game_get_status(game) != game_status_started && game_get_status(game) != game_status_done))) { - snprintf(msgtemp, sizeof(msgtemp), " %-16.16s %1.1s %-8.8s %-21.21s %5u ", + snprintf(msgtemp0, sizeof(msgtemp0), " %-16.16s %1.1s %-8.8s %-21.21s %5u ", game_get_name(game), game_get_flag(game) != game_flag_private ? "n" : "y", game_status_get_str(game_get_status(game)), @@ -2896,12 +2903,12 @@ namespace pvpgn if (!cbdata->tag) { - std::strcat(msgtemp, clienttag_uint_to_str(game_get_clienttag(game))); - std::strcat(msgtemp, " "); + std::strcat(msgtemp0, clienttag_uint_to_str(game_get_clienttag(game))); + std::strcat(msgtemp0, " "); } if ((!prefs_get_hide_addr()) || (account_get_command_groups(conn_get_account(cbdata->c)) & command_get_group("/admin-addr"))) /* default to false */ - std::strcat(msgtemp, addr_num_to_addr_str(game_get_addr(game), game_get_port(game))); + std::strcat(msgtemp0, addr_num_to_addr_str(game_get_addr(game), game_get_port(game))); message_send_text(cbdata->c, message_type_info, cbdata->c, msgtemp); } @@ -2941,18 +2948,18 @@ namespace pvpgn if (dest[0] == '\0') { cbdata.tag = conn_get_clienttag(c); - message_send_text(c, message_type_info, c, "Currently accessible games:"); + message_send_text(c, message_type_info, c, localize(c, "Currently accessible games:")); } else if (strcasecmp(dest, "all") == 0) { cbdata.tag = 0; - message_send_text(c, message_type_info, c, "All current games:"); + message_send_text(c, message_type_info, c, localize(c, "All current games:")); } else if (strcasecmp(dest, "lobby") == 0 || strcasecmp(dest, "l") == 0) { cbdata.tag = conn_get_clienttag(c); cbdata.lobby = true; - message_send_text(c, message_type_info, c, "Games in lobby:"); + message_send_text(c, message_type_info, c, localize(c, "Games in lobby:")); } else { @@ -2963,17 +2970,17 @@ namespace pvpgn } if (cbdata.diff == game_difficulty_none) - snprintf(msgtemp, sizeof(msgtemp), "Current games of type %.64s", tag_uint_to_str(clienttag_str, cbdata.tag)); + msgtemp = localize(c, "Current games of type {}", tag_uint_to_str(clienttag_str, cbdata.tag)); else - snprintf(msgtemp, sizeof(msgtemp), "Current games of type %.64s %.128s", tag_uint_to_str(clienttag_str, cbdata.tag), difficulty); + msgtemp = localize(c, "Current games of type {} {}", tag_uint_to_str(clienttag_str, cbdata.tag), difficulty); message_send_text(c, message_type_info, c, msgtemp); } - snprintf(msgtemp, sizeof(msgtemp), " ------name------ p -status- --------type--------- count "); + msgtemp = localize(c, " ------name------ p -status- --------type--------- count "); if (!cbdata.tag) - std::strcat(msgtemp, "ctag "); + msgtemp += localize(c, "ctag "); if ((!prefs_get_hide_addr()) || (account_get_command_groups(conn_get_account(c)) & command_get_group("/admin-addr"))) /* default to false */ - std::strcat(msgtemp, "--------addr--------"); + msgtemp += localize(c, "--------addr--------"); message_send_text(c, message_type_info, c, msgtemp); gamelist_traverse(_glist_cb, &cbdata); @@ -3003,12 +3010,12 @@ namespace pvpgn if (text[0] == '\0') { clienttag = conn_get_clienttag(c); - message_send_text(c, message_type_info, c, "Currently accessible channels:"); + message_send_text(c, message_type_info, c, localize(c, "Currently accessible channels:")); } else if (strcasecmp(text, "all") == 0) { clienttag = 0; - message_send_text(c, message_type_info, c, "All current channels:"); + message_send_text(c, message_type_info, c, localize(c, "All current channels:")); } else { @@ -3017,11 +3024,11 @@ namespace pvpgn describe_command(c, args[0].c_str()); return 0; } - snprintf(msgtemp, sizeof(msgtemp), "Current channels of type %.64s", text); + msgtemp = localize(c, "Current channels of type {}", text); message_send_text(c, message_type_info, c, msgtemp); } - snprintf(msgtemp, sizeof(msgtemp), " -----------name----------- users ----admin/operator----"); + msgtemp = localize(c, " -----------name----------- users ----admin/operator----"); message_send_text(c, message_type_info, c, msgtemp); LIST_TRAVERSE_CONST(channellist(), curr) { @@ -3035,7 +3042,7 @@ namespace pvpgn ) { - snprintf(msgtemp, sizeof(msgtemp), " %-26.26s %5u - ", + snprintf(msgtemp0, sizeof(msgtemp0), " %-26.26s %5u - ", channel_get_name(channel), channel_get_length(channel)); @@ -3048,13 +3055,13 @@ namespace pvpgn channel_conn_is_tmpOP(channel, account_get_conn(acc))) { name = conn_get_loggeduser(conn); - if (std::strlen(msgtemp) + std::strlen(name) + 6 >= MAX_MESSAGE_LEN) break; - if (!first) std::strcat(msgtemp, " ,"); - std::strcat(msgtemp, name); - if (account_get_auth_admin(acc, NULL) == 1) std::strcat(msgtemp, "(A)"); - else if (account_get_auth_operator(acc, NULL) == 1) std::strcat(msgtemp, "(O)"); - else if (account_get_auth_admin(acc, channel_get_name(channel)) == 1) std::strcat(msgtemp, "(a)"); - else if (account_get_auth_operator(acc, channel_get_name(channel)) == 1) std::strcat(msgtemp, "(o)"); + if (std::strlen(msgtemp0) + std::strlen(name) + 6 >= MAX_MESSAGE_LEN) break; + if (!first) std::strcat(msgtemp0, " ,"); + std::strcat(msgtemp0, name); + if (account_get_auth_admin(acc, NULL) == 1) std::strcat(msgtemp0, "(A)"); + else if (account_get_auth_operator(acc, NULL) == 1) std::strcat(msgtemp0, "(O)"); + else if (account_get_auth_admin(acc, channel_get_name(channel)) == 1) std::strcat(msgtemp0, "(a)"); + else if (account_get_auth_operator(acc, channel_get_name(channel)) == 1) std::strcat(msgtemp0, "(o)"); first = 0; } } @@ -3083,13 +3090,13 @@ namespace pvpgn username = args[1].c_str(); // username if (account_check_name(username) < 0) { - message_send_text(c, message_type_error, c, "Account name contains some invalid symbol!"); + message_send_text(c, message_type_error, c, localize(c, "Account name contains some invalid symbol!")); return 0; } if (args[2].length() > MAX_USERPASS_LEN) { - snprintf(msgtemp, sizeof(msgtemp), "Maximum password length allowed is %d", MAX_USERPASS_LEN); + msgtemp = localize(c, "Maximum password length allowed is {}", MAX_USERPASS_LEN); message_send_text(c, message_type_error, c, msgtemp); return 0; } @@ -3100,20 +3107,20 @@ namespace pvpgn bnet_hash(&passhash, std::strlen(pass), pass); - snprintf(msgtemp, sizeof(msgtemp), "Trying to add account \"%.64s\" with password \"%.128s\"", username, pass); + msgtemp = localize(c, "Trying to add account \"{}\" with password \"{}\"", username, pass); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Hash is: %.128s", hash_get_str(passhash)); + msgtemp = localize(c, "Hash is: {}", hash_get_str(passhash)); message_send_text(c, message_type_info, c, msgtemp); temp = accountlist_create_account(username, hash_get_str(passhash)); if (!temp) { - message_send_text(c, message_type_error, c, "Failed to create account!"); + message_send_text(c, message_type_error, c, localize(c, "Failed to create account!")); eventlog(eventlog_level_debug, __FUNCTION__, "[%d] account \"%s\" not created (failed)", conn_get_socket(c), username); return 0; } - snprintf(msgtemp, sizeof(msgtemp), "Account "UID_FORMAT" created.", account_get_uid(temp)); + msgtemp = localize(c, "Account {} created.", account_get_uid(temp)); message_send_text(c, message_type_info, c, msgtemp); eventlog(eventlog_level_debug, __FUNCTION__, "[%d] account \"%s\" created", conn_get_socket(c), username); @@ -3156,19 +3163,19 @@ namespace pvpgn (temp != account && !(account_get_command_groups(conn_get_account(c)) & command_get_group("/admin-chpass")))) /* default to false */ { eventlog(eventlog_level_info, __FUNCTION__, "[%d] password change for \"%s\" refused (no change access)", conn_get_socket(c), username); - message_send_text(c, message_type_error, c, "Only admins may change passwords for other accounts."); + message_send_text(c, message_type_error, c, localize(c, "Only admins may change passwords for other accounts.")); return 0; } if (!temp) { - message_send_text(c, message_type_error, c, "Account does not exist."); + message_send_text(c, message_type_error, c, localize(c, "Account does not exist.")); return 0; } if (pass.length() > MAX_USERPASS_LEN) { - snprintf(msgtemp, sizeof(msgtemp), "Maximum password length allowed is %d", MAX_USERPASS_LEN); + msgtemp = localize(c, "Maximum password length allowed is {}", MAX_USERPASS_LEN); message_send_text(c, message_type_error, c, msgtemp); return 0; } @@ -3178,27 +3185,25 @@ namespace pvpgn bnet_hash(&passhash, pass.length(), pass.c_str()); - snprintf(msgtemp, sizeof(msgtemp), "Trying to change password for account \"%.64s\" to \"%.128s\"", username, pass.c_str()); + msgtemp = localize(c, "Trying to change password for account \"{}\" to \"{}\"", username, pass.c_str()); message_send_text(c, message_type_info, c, msgtemp); if (account_set_pass(temp, hash_get_str(passhash)) < 0) { - message_send_text(c, message_type_error, c, "Unable to set password."); + message_send_text(c, message_type_error, c, localize(c, "Unable to set password.")); return 0; } if (account_get_auth_admin(account, NULL) == 1 || account_get_auth_operator(account, NULL) == 1) { - snprintf(msgtemp, sizeof(msgtemp), - "Password for account "UID_FORMAT" updated.", account_get_uid(temp)); + msgtemp = localize(c, "Password for account {} updated.", account_get_uid(temp)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Hash is: %.128s", hash_get_str(passhash)); + msgtemp = localize(c, "Hash is: {}", hash_get_str(passhash)); message_send_text(c, message_type_info, c, msgtemp); } else { - snprintf(msgtemp, sizeof(msgtemp), - "Password for account %.64s updated.", username); + msgtemp = localize(c, "Password for account {} updated.", username); message_send_text(c, message_type_info, c, msgtemp); } @@ -3217,32 +3222,32 @@ namespace pvpgn if (!prefs_get_enable_conn_all() && !(account_get_command_groups(conn_get_account(c)) & command_get_group("/admin-con"))) /* default to false */ { - message_send_text(c, message_type_error, c, "This command is only enabled for admins."); + message_send_text(c, message_type_error, c, localize(c, "This command is only enabled for admins.")); return 0; } - message_send_text(c, message_type_info, c, "Current connections:"); + message_send_text(c, message_type_info, c, localize(c, "Current connections:")); std::vector args = split_command(text, 1); text = args[1].c_str(); if (text[0] == '\0') { - snprintf(msgtemp, sizeof(msgtemp), " -class -tag -----name------ -lat(ms)- ----channel---- --game--"); + msgtemp = localize(c, " -class -tag -----name------ -lat(ms)- ----channel---- --game--"); message_send_text(c, message_type_info, c, msgtemp); } else if (std::strcmp(&text[i], "all") == 0) /* print extended info */ { if (prefs_get_hide_addr() && !(account_get_command_groups(conn_get_account(c)) & command_get_group("/admin-addr"))) - snprintf(msgtemp, sizeof(msgtemp), " -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game--"); + msgtemp = localize(c, " -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game--"); else - snprintf(msgtemp, sizeof(msgtemp), " -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr--------"); + msgtemp = localize(c, " -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr--------"); message_send_text(c, message_type_info, c, msgtemp); } else { - message_send_text(c, message_type_error, c, "Unknown option."); + message_send_text(c, message_type_error, c, localize(c, "Unknown option.")); return 0; } @@ -3252,17 +3257,17 @@ namespace pvpgn if (conn_get_account(conn)) std::sprintf(name, "\"%.16s\"", conn_get_username(conn)); else - std::strcpy(name, "(none)"); + std::strcpy(name, localize(c, "(none)").c_str()); if (conn_get_channel(conn) != NULL) channel_name = channel_get_name(conn_get_channel(conn)); - else channel_name = "none"; + else channel_name = localize(c, "none").c_str(); if (conn_get_game(conn) != NULL) game_name = game_get_name(conn_get_game(conn)); - else game_name = "none"; + else game_name = localize(c, "none").c_str(); if (text[0] == '\0') - snprintf(msgtemp, sizeof(msgtemp), " %-6.6s %4.4s %-15.15s %9u %-16.16s %-8.8s", + snprintf(msgtemp0, sizeof(msgtemp0), " %-6.6s %4.4s %-15.15s %9u %-16.16s %-8.8s", conn_class_get_str(conn_get_class(conn)), tag_uint_to_str(clienttag_str, conn_get_fake_clienttag(conn)), name, @@ -3271,7 +3276,7 @@ namespace pvpgn game_name); else if (prefs_get_hide_addr() && !(account_get_command_groups(conn_get_account(c)) & command_get_group("/admin-addr"))) /* default to false */ - snprintf(msgtemp, sizeof(msgtemp), " %3d %-6.6s %-12.12s %4.4s %-15.15s 0x%08x 0x%04x %9u %-16.16s %-8.8s", + snprintf(msgtemp0, sizeof(msgtemp0), " %3d %-6.6s %-12.12s %4.4s %-15.15s 0x%08x 0x%04x %9u %-16.16s %-8.8s", conn_get_socket(conn), conn_class_get_str(conn_get_class(conn)), conn_state_get_str(conn_get_state(conn)), @@ -3283,7 +3288,7 @@ namespace pvpgn channel_name, game_name); else - snprintf(msgtemp, sizeof(msgtemp), " %3u %-6.6s %-12.12s %4.4s %-15.15s 0x%08x 0x%04x %9u %-16.16s %-8.8s %.16s", + snprintf(msgtemp0, sizeof(msgtemp0), " %3u %-6.6s %-12.12s %4.4s %-15.15s 0x%08x 0x%04x %9u %-16.16s %-8.8s %.16s", conn_get_socket(conn), conn_class_get_str(conn_get_class(conn)), conn_state_get_str(conn_get_state(conn)), @@ -3296,7 +3301,7 @@ namespace pvpgn game_name, addr_num_to_addr_str(conn_get_addr(conn), conn_get_port(conn))); - message_send_text(c, message_type_info, c, msgtemp); + message_send_text(c, message_type_info, c, msgtemp0); } return 0; @@ -3324,20 +3329,21 @@ namespace pvpgn if (!(account = accountlist_find_account(dest))) { - message_send_text(c, message_type_error, c, "Invalid user."); + message_send_text(c, message_type_error, c, localize(c, "Invalid user.")); return 0; } then = account_get_ll_ctime(account); tmthen = std::localtime(&then); /* FIXME: determine user's timezone */ - snprintf(msgtemp, sizeof(msgtemp), "Login: %-16.16s "UID_FORMAT" Sex: %.14s", + msgtemp = localize(c, "Login: {} {} Sex: {}", account_get_name(account), account_get_uid(account), account_get_sex(account)); message_send_text(c, message_type_info, c, msgtemp); - std::strftime(msgtemp, sizeof(msgtemp), "Created: %a %b %d %H:%M %Y ", tmthen); + std::strftime(msgtemp0, sizeof(msgtemp0), "%a %b %d %H:%M %Y", tmthen); + msgtemp = localize(c, "Created: {}", msgtemp0); message_send_text(c, message_type_info, c, msgtemp); if ((clanmemb = account_get_clanmember(account))) @@ -3347,22 +3353,22 @@ namespace pvpgn if ((clan = clanmember_get_clan(clanmemb))) { - snprintf(msgtemp, sizeof(msgtemp), "Clan : %-64.64s", clan_get_name(clan)); + msgtemp = localize(c, "Clan: {}", clan_get_name(clan)); if ((status = clanmember_get_status(clanmemb))) { switch (status) { case CLAN_CHIEFTAIN: - std::strcat(msgtemp, " Rank: Chieftain"); + msgtemp += localize(c, " Rank: Chieftain"); break; case CLAN_SHAMAN: - std::strcat(msgtemp, " Rank: Shaman"); + msgtemp += localize(c, " Rank: Shaman"); break; case CLAN_GRUNT: - std::strcat(msgtemp, " Rank: Grunt"); + msgtemp += localize(c, " Rank: Grunt"); break; case CLAN_PEON: - std::strcat(msgtemp, " Rank: Peon"); + msgtemp += localize(c, " Rank: Peon"); break; default:; } @@ -3372,14 +3378,14 @@ namespace pvpgn } } - snprintf(msgtemp, sizeof(msgtemp), "Location: %-23.23s Age: %.14s", + msgtemp = localize(c, "Location: {} Age: {}", account_get_loc(account), account_get_age(account)); message_send_text(c, message_type_info, c, msgtemp); if ((conn = connlist_find_connection_by_accountname(dest))) { - snprintf(msgtemp, sizeof(msgtemp), "Client: %.64s Ver: %.32s Country: %.128s", + msgtemp = localize(c, "Client: {} Ver: {} Country: {}", clienttag_get_title(conn_get_clienttag(conn)), conn_get_clientver(conn), conn_get_country(conn)); @@ -3388,24 +3394,23 @@ namespace pvpgn if (!(ip = account_get_ll_ip(account)) || !(account_get_command_groups(conn_get_account(c)) & command_get_group("/admin-addr"))) /* default to false */ - ip = "unknown"; + ip = localize(c, "unknown").c_str(); { then = account_get_ll_time(account); tmthen = std::localtime(&then); /* FIXME: determine user's timezone */ - if (!(conn)) if (tmthen) - std::strftime(msgtemp, sizeof(msgtemp), "Last login %a %b %d %H:%M %Y from ", tmthen); - else - std::strcpy(msgtemp, "Last login ? from "); + std::strftime(msgtemp0, sizeof(msgtemp0), "%a %b %d %H:%M %Y", tmthen); else - if (tmthen) - std::strftime(msgtemp, sizeof(msgtemp), "On since %a %b %d %H:%M %Y from ", tmthen); + std::strcpy(msgtemp0, "?"); + + if (!(conn)) + msgtemp = localize(c, "Last login {} from ", msgtemp0); else - std::strcpy(msgtemp, "On since ? from "); + msgtemp = localize(c, "On since {} from ", msgtemp0); } - std::strncat(msgtemp, ip, 32); + msgtemp += ip; message_send_text(c, message_type_info, c, msgtemp); /* check /admin-addr for admin privileges */ @@ -3414,63 +3419,36 @@ namespace pvpgn /* the player who requested /finger has admin privileges give him more info about the one he queries; is_admin, is_operator, is_locked, email */ - snprintf(msgtemp, sizeof(msgtemp), "Operator: %s, Admin: %s, Locked: %s, Muted: %s", - account_get_auth_operator(account, NULL) == 1 ? "Yes" : "No", - account_get_auth_admin(account, NULL) == 1 ? "Yes" : "No", - account_get_auth_lock(account) == 1 ? "Yes" : "No", - account_get_auth_mute(account) == 1 ? "Yes" : "No"); + msgtemp = localize(c, "Operator: {}, Admin: {}, Locked: {}, Muted: {}", + account_get_auth_operator(account, NULL) == 1 ? localize(c, "Yes") : localize(c, "No"), + account_get_auth_admin(account, NULL) == 1 ? localize(c, "Yes") : localize(c, "No"), + account_get_auth_lock(account) == 1 ? localize(c, "Yes") : localize(c, "No"), + account_get_auth_mute(account) == 1 ? localize(c, "Yes") : localize(c, "No")); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Email: %.128s", - account_get_email(account)); + msgtemp = localize(c, "Email: {}", account_get_email(account)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Last login Owner: %.128s", - account_get_ll_owner(account)); + msgtemp = localize(c, "Last login Owner: {}", account_get_ll_owner(account)); message_send_text(c, message_type_info, c, msgtemp); } if (conn) { - snprintf(msgtemp, sizeof(msgtemp), "Idle %.128s", seconds_to_timestr(conn_get_idletime(conn))); + msgtemp = localize(c, "Idle {}", seconds_to_timestr(conn_get_idletime(conn))); message_send_text(c, message_type_info, c, msgtemp); } - std::strncpy(msgtemp, account_get_desc(account), sizeof(msgtemp)); - msgtemp[sizeof(msgtemp)-1] = '\0'; - for (tok = std::strtok(msgtemp, "\r\n"); tok; tok = std::strtok(NULL, "\r\n")) + std::strncpy(msgtemp0, account_get_desc(account), sizeof(msgtemp0)); + msgtemp0[sizeof(msgtemp0)-1] = '\0'; + for (tok = std::strtok(msgtemp0, "\r\n"); tok; tok = std::strtok(NULL, "\r\n")) message_send_text(c, message_type_info, c, tok); message_send_text(c, message_type_info, c, ""); return 0; } - /* - * rewrote command /operator to add and remove operator status [Omega] - * - * Fixme: rewrite /operators to show Currently logged on Server and/or Channel operators ...?? - */ - /* - static int _handle_operator_command(t_connection * c, char const *text) - { - t_connection const * opr; - t_channel const * channel; - - if (!(channel = conn_get_channel(c))) - { - message_send_text(c,message_type_error,c,"This command can only be used inside a channel."); - return 0; - } - - if (!(opr = channel_get_operator(channel))) - std::strcpy(msgtemp,"There is no operator."); - else - snprintf(msgtemp, sizeof(msgtemp), "%.64s is the operator.",conn_get_username(opr)); - message_send_text(c,message_type_info,c,msgtemp); - return 0; - } - */ /* FIXME: do we want to show just Server Admin or Channel Admin Also? [Omega] */ static int _handle_admins_command(t_connection * c, char const *text) @@ -3480,8 +3458,8 @@ namespace pvpgn t_connection * tc; char const * nick; - std::strcpy(msgtemp, "Currently logged on Administrators:"); - i = std::strlen(msgtemp); + std::strcpy(msgtemp0, localize(c, "Currently logged on Administrators:").c_str()); + i = std::strlen(msgtemp0); LIST_TRAVERSE_CONST(connlist(), curr) { tc = (t_connection*)elem_get_data(curr); @@ -3493,13 +3471,13 @@ namespace pvpgn { if ((nick = conn_get_username(tc))) { - if (i + std::strlen(nick) + 2 > sizeof(msgtemp)) /* " ", name, '\0' */ + if (i + std::strlen(nick) + 2 > sizeof(msgtemp0)) /* " ", name, '\0' */ { - message_send_text(c, message_type_info, c, msgtemp); + message_send_text(c, message_type_info, c, msgtemp0); i = 0; } - std::sprintf(&msgtemp[i], " %s", nick); - i += std::strlen(&msgtemp[i]); + std::sprintf(&msgtemp0[i], " %s", nick); + i += std::strlen(&msgtemp0[i]); } } } @@ -3514,7 +3492,7 @@ namespace pvpgn if (conn_get_game(c)) eventlog(eventlog_level_warn, __FUNCTION__, "[%d] user '%s' tried to disconnect while in game, cheat attempt ?", conn_get_socket(c), conn_get_loggeduser(c)); else { - message_send_text(c, message_type_info, c, "Connection closed."); + message_send_text(c, message_type_info, c, localize(c, "Connection closed.")); conn_set_state(c, conn_state_destroy); } @@ -3538,13 +3516,13 @@ namespace pvpgn if (username[0] == '#') { if (!(user = connlist_find_connection_by_socket(std::atoi(username + 1)))) { - message_send_text(c, message_type_error, c, "That connection doesn't exist."); + message_send_text(c, message_type_error, c, localize(c, "That connection doesn't exist.")); return 0; } } else { if (!(user = connlist_find_connection_by_accountname(username))) { - message_send_text(c, message_type_error, c, "That user is not logged in?"); + message_send_text(c, message_type_error, c, localize(c, "That user is not logged in?")); return 0; } } @@ -3552,13 +3530,13 @@ namespace pvpgn if (min[0] != '\0' && ipbanlist_add(c, addr_num_to_ip_str(conn_get_addr(user)), ipbanlist_str_to_time_t(c, min)) == 0) { ipbanlist_save(prefs_get_ipbanfile()); - message_send_text(user, message_type_info, user, "An admin has closed your connection and banned your IP address."); + message_send_text(user, message_type_info, user, localize(c, "An admin has closed your connection and banned your IP address.")); } else - message_send_text(user, message_type_info, user, "Connection closed by admin."); + message_send_text(user, message_type_info, user, localize(c, "Connection closed by admin.")); conn_set_state(user, conn_state_destroy); - message_send_text(c, message_type_info, c, "Operation successful."); + message_send_text(c, message_type_info, c, localize(c, "Operation successful.")); return 0; } @@ -3581,21 +3559,21 @@ namespace pvpgn if (!std::isxdigit((int)session[0])) { - message_send_text(c, message_type_error, c, "That is not a valid session."); + message_send_text(c, message_type_error, c, localize(c, "That is not a valid session.")); return 0; } if (!(user = connlist_find_connection_by_sessionkey((unsigned int)std::strtoul(session, NULL, 16)))) { - message_send_text(c, message_type_error, c, "That session does not exist."); + message_send_text(c, message_type_error, c, localize(c, "That session does not exist.")); return 0; } if (min[0] != '\0' && ipbanlist_add(c, addr_num_to_ip_str(conn_get_addr(user)), ipbanlist_str_to_time_t(c, min)) == 0) { ipbanlist_save(prefs_get_ipbanfile()); - message_send_text(user, message_type_info, user, "Connection closed by admin and banned your IP's."); + message_send_text(user, message_type_info, user, localize(c, "Connection closed by admin and banned your IP's.")); } else - message_send_text(user, message_type_info, user, "Connection closed by admin."); + message_send_text(user, message_type_info, user, localize(c, "Connection closed by admin.")); conn_set_state(user, conn_state_destroy); return 0; } @@ -3614,18 +3592,18 @@ namespace pvpgn // current user game if (!(game = conn_get_game(c))) { - message_send_text(c, message_type_error, c, "You are not in a game."); + message_send_text(c, message_type_error, c, localize(c, "You are not in a game.")); return 0; } } else if (!(game = gamelist_find_game_available(text, conn_get_clienttag(c), game_type_all))) { - message_send_text(c, message_type_error, c, "That game does not exist."); + message_send_text(c, message_type_error, c, localize(c, "That game does not exist.")); return 0; } - snprintf(msgtemp, sizeof(msgtemp), "Name: %-20.20s ID: "GAMEID_FORMAT" (%.20s)", game_get_name(game), game_get_id(game), game_get_flag(game) != game_flag_private ? "public" : "private"); + msgtemp = localize(c, "Name: {} ID: {} ({})", game_get_name(game), game_get_id(game), game_get_flag(game) != game_flag_private ? localize(c, "public") : localize(c, "private")); message_send_text(c, message_type_info, c, msgtemp); { @@ -3636,15 +3614,15 @@ namespace pvpgn if (!(owner = conn_get_account(game_get_owner(game)))) { tname = NULL; - namestr = "none"; + namestr = localize(c, "none").c_str(); } else if (!(tname = conn_get_loggeduser(game_get_owner(game)))) - namestr = "unknown"; + namestr = localize(c, "unknown").c_str(); else namestr = tname; - snprintf(msgtemp, sizeof(msgtemp), "Owner: %-20.20s", namestr); + msgtemp = localize(c, "Owner: {}", namestr); } message_send_text(c, message_type_info, c, msgtemp); @@ -3661,16 +3639,16 @@ namespace pvpgn trans_net(conn_get_addr(c), &taddr, &tport); if (taddr == addr && tport == port) - snprintf(msgtemp, sizeof(msgtemp), "Address: %.64s", - addr_num_to_addr_str(addr, port)); + msgtemp = localize(c, "Address: {}", + addr_num_to_addr_str(addr, port)); else - snprintf(msgtemp, sizeof(msgtemp), "Address: %.64s (trans %.64s)", - addr_num_to_addr_str(addr, port), - addr_num_to_addr_str(taddr, tport)); + msgtemp = localize(c, "Address: {} (trans {})", + addr_num_to_addr_str(addr, port), + addr_num_to_addr_str(taddr, tport)); message_send_text(c, message_type_info, c, msgtemp); } - snprintf(msgtemp, sizeof(msgtemp), "Client: %4s (version %.64s, startver %u)", tag_uint_to_str(clienttag_str, game_get_clienttag(game)), vernum_to_verstr(game_get_version(game)), game_get_startver(game)); + msgtemp = localize(c, "Client: {} (version {}, startver {})", tag_uint_to_str(clienttag_str, game_get_clienttag(game)), vernum_to_verstr(game_get_version(game)), game_get_startver(game)); message_send_text(c, message_type_info, c, msgtemp); { @@ -3679,56 +3657,58 @@ namespace pvpgn gametime = game_get_create_time(game); if (!(gmgametime = std::localtime(&gametime))) - std::strcpy(msgtemp, "Created: ?"); + std::strcpy(msgtemp0, "?"); else - std::strftime(msgtemp, sizeof(msgtemp), "Created: "GAME_TIME_FORMAT, gmgametime); + std::strftime(msgtemp0, sizeof(msgtemp0), GAME_TIME_FORMAT, gmgametime); + msgtemp = localize(c, "Created: {}", msgtemp0); message_send_text(c, message_type_info, c, msgtemp); gametime = game_get_start_time(game); if (gametime != (std::time_t)0) { if (!(gmgametime = std::localtime(&gametime))) - std::strcpy(msgtemp, "Started: ?"); + std::strcpy(msgtemp0, "?"); else - std::strftime(msgtemp, sizeof(msgtemp), "Started: "GAME_TIME_FORMAT, gmgametime); + std::strftime(msgtemp0, sizeof(msgtemp0), GAME_TIME_FORMAT, gmgametime); } else - std::strcpy(msgtemp, "Started: "); + std::strcpy(msgtemp0, ""); + msgtemp = localize(c, "Started: {}", msgtemp0); message_send_text(c, message_type_info, c, msgtemp); } - snprintf(msgtemp, sizeof(msgtemp), "Status: %.128s", game_status_get_str(game_get_status(game))); + msgtemp = localize(c, "Status: {}", game_status_get_str(game_get_status(game))); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Type: %-20.20s", game_type_get_str(game_get_type(game))); + msgtemp = localize(c, "Type: {}", game_type_get_str(game_get_type(game))); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Speed: %.128s", game_speed_get_str(game_get_speed(game))); + msgtemp = localize(c, "Speed: {}", game_speed_get_str(game_get_speed(game))); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Difficulty: %.128s", game_difficulty_get_str(game_get_difficulty(game))); + msgtemp = localize(c, "Difficulty: {}", game_difficulty_get_str(game_get_difficulty(game))); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Option: %.128s", game_option_get_str(game_get_option(game))); + msgtemp = localize(c, "Option: {}", game_option_get_str(game_get_option(game))); message_send_text(c, message_type_info, c, msgtemp); { char const * mapname; if (!(mapname = game_get_mapname(game))) - mapname = "unknown"; - snprintf(msgtemp, sizeof(msgtemp), "Map: %-20.20s", mapname); + mapname = localize(c, "unknown").c_str(); + msgtemp = localize(c, "Map: {}", mapname); message_send_text(c, message_type_info, c, msgtemp); } - snprintf(msgtemp, sizeof(msgtemp), "Map Size: %ux%u", game_get_mapsize_x(game), game_get_mapsize_y(game)); + msgtemp = localize(c, "Map Size: {}x{}", game_get_mapsize_x(game), game_get_mapsize_y(game)); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Map Tileset: %.128s", game_tileset_get_str(game_get_tileset(game))); + msgtemp = localize(c, "Map Tileset: {}", game_tileset_get_str(game_get_tileset(game))); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Map Type: %.128s", game_maptype_get_str(game_get_maptype(game))); + msgtemp = localize(c, "Map Type: {}", game_maptype_get_str(game_get_maptype(game))); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Players: %u current, %u total, %u max", game_get_ref(game), game_get_count(game), game_get_maxplayers(game)); + msgtemp = localize(c, "Players: {} current, {} total, {} max", game_get_ref(game), game_get_count(game), game_get_maxplayers(game)); message_send_text(c, message_type_info, c, msgtemp); { @@ -3736,7 +3716,7 @@ namespace pvpgn if (!(description = game_get_description(game))) description = ""; - snprintf(msgtemp, sizeof(msgtemp), "Description: %-20.20s", description); + msgtemp = localize(c, "Description: {}", description); } return 0; @@ -3745,7 +3725,7 @@ namespace pvpgn static int _handle_ladderactivate_command(t_connection * c, char const *text) { ladders.activate(); - message_send_text(c, message_type_info, c, "Copied current scores to active scores on all ladders."); + message_send_text(c, message_type_info, c, localize(c, "Copied current scores to active scores on all ladders.")); return 0; } @@ -3802,12 +3782,12 @@ namespace pvpgn mode = restart_mode_lua; else { - message_send_text(c, message_type_info, c, "Invalid mode."); + message_send_text(c, message_type_info, c, localize(c, "Invalid mode.")); return 0; } server_restart_wraper(mode); - std::sprintf(msgtemp, "Rehash [%s] is complete!", mode_str.c_str()); + msgtemp = localize(c, "Rehash of \"{}\" is complete!", mode_str.c_str()); message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -3831,7 +3811,7 @@ namespace pvpgn } text = args[1].c_str(); - std::sprintf(msgtemp, " -- name -- similar to %s", text); + msgtemp = localize(c, " -- name -- similar to {}", text); message_send_text(c, message_type_info, c, msgtemp); @@ -3863,7 +3843,7 @@ namespace pvpgn accountlist_save(FS_FORCE | FS_ALL); accountlist_flush(FS_FORCE | FS_ALL); - message_send_text(c, message_type_info, c, "Account and clan changes has been saved to the database."); + message_send_text(c, message_type_info, c, localize(c, "Pending changes has been saved into the database.")); return 0; } @@ -3881,16 +3861,16 @@ namespace pvpgn else if (clockstr_to_seconds(dest, &delay) < 0) { - message_send_text(c, message_type_error, c, "Invalid delay."); + message_send_text(c, message_type_error, c, localize(c, "Invalid delay.")); return 0; } server_quit_delay(delay); if (delay) - message_send_text(c, message_type_info, c, "You've initialized the shutdown sequence."); + message_send_text(c, message_type_info, c, localize(c, "You've initialized the shutdown sequence.")); else - message_send_text(c, message_type_info, c, "You've canceled the shutdown sequence."); + message_send_text(c, message_type_info, c, localize(c, "You've canceled the shutdown sequence.")); return 0; } @@ -3935,7 +3915,7 @@ namespace pvpgn referencedObject = ladderList->getReferencedObject(rank); if ((referencedObject) && (account = referencedObject->getAccount())) { - snprintf(msgtemp, sizeof(msgtemp), "StarCraft active %5u: %-20.20s %u/%u/%u rating %u", + snprintf(msgtemp0, sizeof(msgtemp0), "StarCraft %s %5u: %-20.20s %u/%u/%u rating %u", rank, account_get_name(account), account_get_ladder_active_wins(account, CLIENTTAG_STARCRAFT_UINT, ladder_id_normal), @@ -3944,14 +3924,14 @@ namespace pvpgn account_get_ladder_active_rating(account, CLIENTTAG_STARCRAFT_UINT, ladder_id_normal)); } else - snprintf(msgtemp, sizeof(msgtemp), "StarCraft active %5u: ", rank); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), "StarCraft active %5u: ", rank); + message_send_text(c, message_type_info, c, msgtemp0); ladderList = ladders.getLadderList(LadderKey(ladder_id_normal, clienttag, ladder_sort_highestrated, ladder_time_current)); referencedObject = ladderList->getReferencedObject(rank); if ((referencedObject) && (account = referencedObject->getAccount())) { - snprintf(msgtemp, sizeof(msgtemp), "StarCraft current %5u: %-20.20s %u/%u/%u rating %u", + snprintf(msgtemp0, sizeof(msgtemp0), "StarCraft current %5u: %-20.20s %u/%u/%u rating %u", rank, account_get_name(account), account_get_ladder_wins(account, CLIENTTAG_STARCRAFT_UINT, ladder_id_normal), @@ -3960,8 +3940,8 @@ namespace pvpgn account_get_ladder_rating(account, CLIENTTAG_STARCRAFT_UINT, ladder_id_normal)); } else - snprintf(msgtemp, sizeof(msgtemp), "StarCraft current %5u: ", rank); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), "StarCraft current %5u: ", rank); + message_send_text(c, message_type_info, c, msgtemp0); } else if (clienttag == CLIENTTAG_BROODWARS_UINT) { @@ -3969,7 +3949,7 @@ namespace pvpgn referencedObject = ladderList->getReferencedObject(rank); if ((referencedObject) && (account = referencedObject->getAccount())) { - snprintf(msgtemp, sizeof(msgtemp), "Brood War active %5u: %-20.20s %u/%u/%u rating %u", + snprintf(msgtemp0, sizeof(msgtemp0), "Brood War active %5u: %-20.20s %u/%u/%u rating %u", rank, account_get_name(account), account_get_ladder_active_wins(account, CLIENTTAG_BROODWARS_UINT, ladder_id_normal), @@ -3978,14 +3958,14 @@ namespace pvpgn account_get_ladder_active_rating(account, CLIENTTAG_BROODWARS_UINT, ladder_id_normal)); } else - snprintf(msgtemp, sizeof(msgtemp), "Brood War active %5u: ", rank); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), "Brood War active %5u: ", rank); + message_send_text(c, message_type_info, c, msgtemp0); ladderList = ladders.getLadderList(LadderKey(ladder_id_normal, clienttag, ladder_sort_highestrated, ladder_time_current)); referencedObject = ladderList->getReferencedObject(rank); if ((referencedObject) && (account = referencedObject->getAccount())) { - snprintf(msgtemp, sizeof(msgtemp), "Brood War current %5u: %-20.20s %u/%u/%u rating %u", + snprintf(msgtemp0, sizeof(msgtemp0), "Brood War current %5u: %-20.20s %u/%u/%u rating %u", rank, account_get_name(account), account_get_ladder_wins(account, CLIENTTAG_BROODWARS_UINT, ladder_id_normal), @@ -3994,8 +3974,8 @@ namespace pvpgn account_get_ladder_rating(account, CLIENTTAG_BROODWARS_UINT, ladder_id_normal)); } else - snprintf(msgtemp, sizeof(msgtemp), "Brood War current %5u: ", rank); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), "Brood War current %5u: ", rank); + message_send_text(c, message_type_info, c, msgtemp0); } else if (clienttag == CLIENTTAG_WARCIIBNE_UINT) { @@ -4003,7 +3983,7 @@ namespace pvpgn referencedObject = ladderList->getReferencedObject(rank); if ((referencedObject) && (account = referencedObject->getAccount())) { - snprintf(msgtemp, sizeof(msgtemp), "WarCraft II standard active %5u: %-20.20s %u/%u/%u rating %u", + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft II standard active %5u: %-20.20s %u/%u/%u rating %u", rank, account_get_name(account), account_get_ladder_active_wins(account, CLIENTTAG_WARCIIBNE_UINT, ladder_id_normal), @@ -4012,14 +3992,14 @@ namespace pvpgn account_get_ladder_active_rating(account, CLIENTTAG_WARCIIBNE_UINT, ladder_id_normal)); } else - snprintf(msgtemp, sizeof(msgtemp), "WarCraft II standard active %5u: ", rank); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft II standard active %5u: ", rank); + message_send_text(c, message_type_info, c, msgtemp0); ladderList = ladders.getLadderList(LadderKey(ladder_id_ironman, clienttag, ladder_sort_highestrated, ladder_time_active)); referencedObject = ladderList->getReferencedObject(rank); if ((referencedObject) && (account = referencedObject->getAccount())) { - snprintf(msgtemp, sizeof(msgtemp), "WarCraft II IronMan active %5u: %-20.20s %u/%u/%u rating %u", + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft II IronMan active %5u: %-20.20s %u/%u/%u rating %u", rank, account_get_name(account), account_get_ladder_active_wins(account, CLIENTTAG_WARCIIBNE_UINT, ladder_id_ironman), @@ -4028,14 +4008,14 @@ namespace pvpgn account_get_ladder_active_rating(account, CLIENTTAG_WARCIIBNE_UINT, ladder_id_ironman)); } else - snprintf(msgtemp, sizeof(msgtemp), "WarCraft II IronMan active %5u: ", rank); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft II IronMan active %5u: ", rank); + message_send_text(c, message_type_info, c, msgtemp0); ladderList = ladders.getLadderList(LadderKey(ladder_id_normal, clienttag, ladder_sort_highestrated, ladder_time_current)); referencedObject = ladderList->getReferencedObject(rank); if ((referencedObject) && (account = referencedObject->getAccount())) { - snprintf(msgtemp, sizeof(msgtemp), "WarCraft II standard current %5u: %-20.20s %u/%u/%u rating %u", + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft II standard current %5u: %-20.20s %u/%u/%u rating %u", rank, account_get_name(account), account_get_ladder_wins(account, CLIENTTAG_WARCIIBNE_UINT, ladder_id_normal), @@ -4044,14 +4024,14 @@ namespace pvpgn account_get_ladder_rating(account, CLIENTTAG_WARCIIBNE_UINT, ladder_id_normal)); } else - snprintf(msgtemp, sizeof(msgtemp), "WarCraft II standard current %5u: ", rank); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft II standard current %5u: ", rank); + message_send_text(c, message_type_info, c, msgtemp0); ladderList = ladders.getLadderList(LadderKey(ladder_id_ironman, clienttag, ladder_sort_highestrated, ladder_time_current)); referencedObject = ladderList->getReferencedObject(rank); if ((referencedObject) && (account = referencedObject->getAccount())) { - snprintf(msgtemp, sizeof(msgtemp), "WarCraft II IronMan current %5u: %-20.20s %u/%u/%u rating %u", + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft II IronMan current %5u: %-20.20s %u/%u/%u rating %u", rank, account_get_name(account), account_get_ladder_wins(account, CLIENTTAG_WARCIIBNE_UINT, ladder_id_ironman), @@ -4060,8 +4040,8 @@ namespace pvpgn account_get_ladder_rating(account, CLIENTTAG_WARCIIBNE_UINT, ladder_id_ironman)); } else - snprintf(msgtemp, sizeof(msgtemp), "WarCraft II IronMan current %5u: ", rank); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft II IronMan current %5u: ", rank); + message_send_text(c, message_type_info, c, msgtemp0); } // --> aaron else if (clienttag == CLIENTTAG_WARCRAFT3_UINT || clienttag == CLIENTTAG_WAR3XP_UINT) @@ -4070,43 +4050,43 @@ namespace pvpgn referencedObject = ladderList->getReferencedObject(rank); if ((referencedObject) && (account = referencedObject->getAccount())) { - snprintf(msgtemp, sizeof(msgtemp), "WarCraft3 Solo %5u: %-20.20s %u/%u/0", + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft3 Solo %5u: %-20.20s %u/%u/0", rank, account_get_name(account), account_get_ladder_wins(account, clienttag, ladder_id_solo), account_get_ladder_losses(account, clienttag, ladder_id_solo)); } else - snprintf(msgtemp, sizeof(msgtemp), "WarCraft3 Solo %5u: ", rank); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft3 Solo %5u: ", rank); + message_send_text(c, message_type_info, c, msgtemp0); ladderList = ladders.getLadderList(LadderKey(ladder_id_team, clienttag, ladder_sort_default, ladder_time_default)); referencedObject = ladderList->getReferencedObject(rank); if ((referencedObject) && (account = referencedObject->getAccount())) { - snprintf(msgtemp, sizeof(msgtemp), "WarCraft3 Team %5u: %-20.20s %u/%u/0", + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft3 Team %5u: %-20.20s %u/%u/0", rank, account_get_name(account), account_get_ladder_wins(account, clienttag, ladder_id_team), account_get_ladder_losses(account, clienttag, ladder_id_team)); } else - snprintf(msgtemp, sizeof(msgtemp), "WarCraft3 Team %5u: ", rank); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft3 Team %5u: ", rank); + message_send_text(c, message_type_info, c, msgtemp0); ladderList = ladders.getLadderList(LadderKey(ladder_id_ffa, clienttag, ladder_sort_default, ladder_time_default)); referencedObject = ladderList->getReferencedObject(rank); if ((referencedObject) && (account = referencedObject->getAccount())) { - snprintf(msgtemp, sizeof(msgtemp), "WarCraft3 FFA %5u: %-20.20s %u/%u/0", + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft3 FFA %5u: %-20.20s %u/%u/0", rank, account_get_name(account), account_get_ladder_wins(account, clienttag, ladder_id_ffa), account_get_ladder_losses(account, clienttag, ladder_id_ffa)); } else - snprintf(msgtemp, sizeof(msgtemp), "WarCraft3 FFA %5u: ", rank); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft3 FFA %5u: ", rank); + message_send_text(c, message_type_info, c, msgtemp0); ladderList = ladders.getLadderList(LadderKey(ladder_id_ateam, clienttag, ladder_sort_default, ladder_time_default)); referencedObject = ladderList->getReferencedObject(rank); @@ -4117,7 +4097,7 @@ namespace pvpgn xstr_cat_str(membernames, account_get_name(team_get_member(team, i))); if ((i)) xstr_cat_char(membernames, ','); } - snprintf(msgtemp, sizeof(msgtemp), "WarCraft3 AT Team %5u: %-80.80s %u/%u/0", + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft3 AT Team %5u: %-80.80s %u/%u/0", rank, xstr_get_str(membernames), team_get_wins(team), @@ -4125,15 +4105,15 @@ namespace pvpgn xstr_free(membernames); } else - snprintf(msgtemp, sizeof(msgtemp), "WarCraft3 AT Team %5u: ", rank); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), "WarCraft3 AT Team %5u: ", rank); + message_send_text(c, message_type_info, c, msgtemp0); } //<--- else { - message_send_text(c, message_type_error, c, "This game does not support win/loss records."); - message_send_text(c, message_type_error, c, "You must supply a rank and a valid program ID."); - message_send_text(c, message_type_error, c, "Example: /ladderinfo 1 STAR"); + message_send_text(c, message_type_error, c, localize(c, "This game does not support win/loss records.")); + message_send_text(c, message_type_error, c, localize(c, "You must supply a rank and a valid program ID.")); + message_send_text(c, message_type_error, c, localize(c, "Example: /ladderinfo 1 STAR")); } return 0; @@ -4156,12 +4136,12 @@ namespace pvpgn if (clockstr_to_seconds(delta_s, &delta) < 0) { - message_send_text(c, message_type_error, c, "Invalid duration."); + message_send_text(c, message_type_error, c, localize(c, "Invalid duration.")); return 0; } if (msgtext_s[0] == '\0') - data.p = xstrdup("Your timer has expired."); + data.p = xstrdup(localize(c, "Your timer has expired.").c_str()); else data.p = xstrdup(msgtext_s); @@ -4169,11 +4149,11 @@ namespace pvpgn { eventlog(eventlog_level_error, __FUNCTION__, "Could not add timer"); xfree(data.p); - message_send_text(c, message_type_error, c, "Could not set timer."); + message_send_text(c, message_type_error, c, localize(c, "Could not set timer.")); } else { - snprintf(msgtemp, sizeof(msgtemp), "Timer set for %.128s", seconds_to_timestr(delta)); + msgtemp = localize(c, "Timer set for {} second(s)", seconds_to_timestr(delta)); message_send_text(c, message_type_info, c, msgtemp); } @@ -4195,19 +4175,19 @@ namespace pvpgn if (!(dest_c = connlist_find_connection_by_accountname(username))) { - message_send_text(c, message_type_error, c, "That user is not logged on."); + message_send_text(c, message_type_error, c, localize(c, "That user is not logged on.")); return 0; } - snprintf(msgtemp, sizeof(msgtemp), "Banning %.64s who is using IP address %.64s", conn_get_username(dest_c), addr_num_to_ip_str(conn_get_game_addr(dest_c))); + msgtemp = localize(c, "Banning {} who is using IP address {}", conn_get_username(dest_c), addr_num_to_ip_str(conn_get_game_addr(dest_c))); message_send_text(c, message_type_info, c, msgtemp); - message_send_text(c, message_type_info, c, "User's account is also LOCKED! Only an admin can unlock it!"); - snprintf(msgtemp, sizeof(msgtemp), "/ipban a %.64s", addr_num_to_ip_str(conn_get_game_addr(dest_c))); - handle_ipban_command(c, msgtemp); + message_send_text(c, message_type_info, c, localize(c, "User's account is also LOCKED! Only an admin can unlock it!")); + msgtemp = localize(c, "/ipban a {}", addr_num_to_ip_str(conn_get_game_addr(dest_c))); + handle_ipban_command(c, msgtemp.c_str()); account_set_auth_lock(conn_get_account(dest_c), 1); //now kill the connection - snprintf(msgtemp, sizeof(msgtemp), "You have been banned by Admin: %.64s", conn_get_username(c)); + msgtemp = localize(c, "You have been banned by Admin: {}", conn_get_username(c)); message_send_text(dest_c, message_type_error, dest_c, msgtemp); - message_send_text(dest_c, message_type_error, dest_c, "Your account is also LOCKED! Only an admin can UNLOCK it!"); + message_send_text(dest_c, message_type_error, dest_c, localize(c, "Your account is also LOCKED! Only an admin can UNLOCK it!")); conn_set_state(dest_c, conn_state_destroy); return 0; } @@ -4231,21 +4211,21 @@ namespace pvpgn if (!(conn = connlist_find_connection_by_accountname(username))) { - message_send_text(c, message_type_error, c, "That user is not logged on."); + message_send_text(c, message_type_error, c, localize(c, "That user is not logged on.")); return 0; } if (conn_get_account(conn) != conn_get_account(c) && prefs_get_hide_addr() && !(account_get_command_groups(conn_get_account(c)) & command_get_group("/admin-addr"))) // default to false { - message_send_text(c, message_type_error, c, "Address information for other users is only available to admins."); + message_send_text(c, message_type_error, c, localize(c, "Address information for other users is only available to admins.")); return 0; } - snprintf(msgtemp, sizeof(msgtemp), "Server TCP: %.64s (bind %.64s)", addr_num_to_addr_str(conn_get_real_local_addr(conn), conn_get_real_local_port(conn)), addr_num_to_addr_str(conn_get_local_addr(conn), conn_get_local_port(conn))); + msgtemp = localize(c, "Server TCP: {} (bind {})", addr_num_to_addr_str(conn_get_real_local_addr(conn), conn_get_real_local_port(conn)), addr_num_to_addr_str(conn_get_local_addr(conn), conn_get_local_port(conn))); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Client TCP: %.64s", addr_num_to_addr_str(conn_get_addr(conn), conn_get_port(conn))); + msgtemp = localize(c, "Client TCP: {}", addr_num_to_addr_str(conn_get_addr(conn), conn_get_port(conn))); message_send_text(c, message_type_info, c, msgtemp); taddr = addr = conn_get_game_addr(conn); @@ -4253,10 +4233,10 @@ namespace pvpgn trans_net(conn_get_addr(c), &taddr, &tport); if (taddr == addr && tport == port) - snprintf(msgtemp, sizeof(msgtemp), "Client UDP: %.64s", + msgtemp = localize(c, "Client UDP: {}", addr_num_to_addr_str(addr, port)); else - snprintf(msgtemp, sizeof(msgtemp), "Client UDP: %.64s (trans %.64s)", + msgtemp = localize(c, "Client UDP: {} (trans {})", addr_num_to_addr_str(addr, port), addr_num_to_addr_str(taddr, tport)); message_send_text(c, message_type_info, c, msgtemp); @@ -4268,15 +4248,15 @@ namespace pvpgn trans_net(conn_get_addr(c), &taddr, &tport); if (taddr == addr && tport == port) - snprintf(msgtemp, sizeof(msgtemp), "Game UDP: %.64s", + msgtemp = localize(c, "Game UDP: {}", addr_num_to_addr_str(addr, port)); else - snprintf(msgtemp, sizeof(msgtemp), "Game UDP: %.64s (trans %.64s)", + msgtemp = localize(c, "Game UDP: {} (trans {})", addr_num_to_addr_str(addr, port), addr_num_to_addr_str(taddr, tport)); } else - std::strcpy(msgtemp, "Game UDP: none"); + msgtemp = localize(c, "Game UDP: none"); message_send_text(c, message_type_info, c, msgtemp); return 0; @@ -4284,11 +4264,11 @@ namespace pvpgn static int _handle_quota_command(t_connection * c, char const * text) { - snprintf(msgtemp, sizeof(msgtemp), "Your quota allows you to write %u line(s) per %u second(s).", prefs_get_quota_lines(), prefs_get_quota_time()); + msgtemp = localize(c, "Your quota allows you to write {} line(s) per {} second(s).", prefs_get_quota_lines(), prefs_get_quota_time()); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Long lines will be wrapped every %u characters.", prefs_get_quota_wrapline()); + msgtemp = localize(c, "Long lines will be wrapped every {} characters.", prefs_get_quota_wrapline()); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "You are not allowed to send lines with more than %u characters.", prefs_get_quota_maxline()); + msgtemp = localize(c, "You are not allowed to send lines with more than {} characters.", prefs_get_quota_maxline()); message_send_text(c, message_type_info, c, msgtemp); return 0; @@ -4315,7 +4295,7 @@ namespace pvpgn if (!(account = accountlist_find_account(username))) { - message_send_text(c, message_type_error, c, "Invalid user."); + message_send_text(c, message_type_error, c, localize(c, "Invalid user.")); return 0; } @@ -4327,13 +4307,15 @@ namespace pvpgn // send message to author - snprintf(msgtemp, sizeof(msgtemp), "Account %s is now locked%s", account_get_name(account), account_get_locktext(account, false)); + msgtemp = localize(c, "Account {} is now locked", account_get_name(account)); + msgtemp += account_get_locktext(account, false); message_send_text(c, message_type_error, c, msgtemp); // send message to locked user if ((user = connlist_find_connection_by_accountname(username))) { - snprintf(msgtemp, sizeof(msgtemp), "Your account has just been locked%s", account_get_locktext(account, true)); + msgtemp = localize(c, "Your account has just been locked"); + msgtemp += account_get_locktext(account, true); message_send_text(user, message_type_error, user, msgtemp); } @@ -4355,18 +4337,18 @@ namespace pvpgn if (!(account = accountlist_find_account(text))) { - message_send_text(c, message_type_error, c, "Invalid user."); + message_send_text(c, message_type_error, c, localize(c, "Invalid user.")); return 0; } if ((user = connlist_find_connection_by_accountname(text))) { - snprintf(msgtemp, sizeof(msgtemp), "Your account has just been unlocked by %s", conn_get_username(c)); + msgtemp = localize(c, "Your account has just been unlocked by {}", conn_get_username(c)); message_send_text(user, message_type_info, user, msgtemp); } account_set_auth_lock(account, 0); - message_send_text(c, message_type_error, c, "That user's account is now unlocked."); + message_send_text(c, message_type_error, c, localize(c, "That user's account is now unlocked.")); return 0; } @@ -4392,7 +4374,7 @@ namespace pvpgn if (!(account = accountlist_find_account(username))) { - message_send_text(c, message_type_error, c, "Invalid user."); + message_send_text(c, message_type_error, c, localize(c, "Invalid user.")); return 0; } @@ -4404,13 +4386,15 @@ namespace pvpgn account_set_auth_muteby(account, conn_get_username(c)); // send message to author - snprintf(msgtemp, sizeof(msgtemp), "Account %s is now muted%s", account_get_name(account), account_get_locktext(account, false)); + msgtemp = localize(c, "Account {} is now muted", account_get_name(account)); + msgtemp += account_get_locktext(account, false); message_send_text(c, message_type_error, c, msgtemp); // send message to muted user if ((user = connlist_find_connection_by_accountname(username))) { - snprintf(msgtemp, sizeof(msgtemp), "Your account has just been muted%s", account_get_locktext(account, true)); + msgtemp = localize(c, "Your account has just been muted"); + msgtemp += account_get_locktext(account, true); message_send_text(user, message_type_error, user, msgtemp); } @@ -4432,18 +4416,18 @@ namespace pvpgn if (!(account = accountlist_find_account(text))) { - message_send_text(c, message_type_error, c, "Invalid user."); + message_send_text(c, message_type_error, c, localize(c, "Invalid user.")); return 0; } if ((user = connlist_find_connection_by_accountname(text))) { - snprintf(msgtemp, sizeof(msgtemp), "Your account has just been unmuted by %s", conn_get_username(c)); + msgtemp = localize(c, "Your account has just been unmuted by {}", conn_get_username(c)); message_send_text(user, message_type_info, user, msgtemp); } account_set_auth_mute(account, 0); - message_send_text(c, message_type_error, c, "That user's account is now unmuted."); + message_send_text(c, message_type_error, c, localize(c, "That user's account is now unmuted.")); return 0; } @@ -4464,7 +4448,9 @@ namespace pvpgn newflag = std::strtoul(flag_s, NULL, 0); conn_set_flags(c, newflag); - snprintf(msgtemp, sizeof(msgtemp), "Flags set to 0x%08x.", newflag); + snprintf(msgtemp0, sizeof(msgtemp0), "0x%08x.", newflag); + + msgtemp = localize(c, "Flags set to {}.", msgtemp0); message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -4491,10 +4477,10 @@ namespace pvpgn channel_rejoin(c); conn_set_flags(c, oldflags); channel_update_userflags(c); - snprintf(msgtemp, sizeof(msgtemp), "Client tag set to %.128s.", tag_s); + msgtemp = localize(c, "Client tag set to {}.", tag_s); } else - snprintf(msgtemp, sizeof(msgtemp), "Invalid clienttag %.128s specified", tag_s); + msgtemp = localize(c, "Invalid clienttag {} specified", tag_s); message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -4527,9 +4513,9 @@ namespace pvpgn ip = addr_num_to_ip_str(conn_get_addr(conn)); } else { - message_send_text(c, message_type_info, c, "Warning: That user is not online, using last known address."); + message_send_text(c, message_type_info, c, localize(c, "Warning: That user is not online, using last known address.")); if (!(ip = account_get_ll_ip(account))) { - message_send_text(c, message_type_error, c, "Sorry, no IP address could be retrieved."); + message_send_text(c, message_type_error, c, localize(c, "Sorry, no IP address could be retrieved.")); return 0; } } @@ -4538,7 +4524,7 @@ namespace pvpgn ip = text; } - snprintf(msgtemp, sizeof(msgtemp), "Scanning online users for IP %s...", ip); + msgtemp = localize(c, "Scanning online users for IP {}...", ip); message_send_text(c, message_type_error, c, msgtemp); t_elem const * curr; @@ -4551,14 +4537,14 @@ namespace pvpgn } if (std::strcmp(ip, addr_num_to_ip_str(conn_get_addr(conn))) == 0) { - snprintf(msgtemp, sizeof(msgtemp), " %s", conn_get_loggeduser(conn)); - message_send_text(c, message_type_info, c, msgtemp); + snprintf(msgtemp0, sizeof(msgtemp0), " %s", conn_get_loggeduser(conn)); + message_send_text(c, message_type_info, c, msgtemp0); count++; } } if (count == 0) { - message_send_text(c, message_type_error, c, "There are no online users with that IP address"); + message_send_text(c, message_type_error, c, localize(c, "There are no online users with that IP address")); } return 0; @@ -4583,13 +4569,13 @@ namespace pvpgn // disallow get/set value for password hash and username (hash can be cracked easily, account name should be permanent) if (strcasecmp(key, "bnet\\acct\\passhash1") == 0 || strcasecmp(key, "bnet\\acct\\username") == 0 || strcasecmp(key, "bnet\\username") == 0) { - message_send_text(c, message_type_info, c, "Access denied due to security reasons."); + message_send_text(c, message_type_info, c, localize(c, "Access denied due to security reasons.")); return 0; } if (!(account = accountlist_find_account(username))) { - message_send_text(c, message_type_error, c, "Invalid user."); + message_send_text(c, message_type_error, c, localize(c, "Invalid user.")); return 0; } @@ -4597,11 +4583,11 @@ namespace pvpgn { if (account_get_strattr(account, key)) { - snprintf(msgtemp, sizeof(msgtemp), "Current value of %.64s is \"%.128s\"", key, account_get_strattr(account, key)); + msgtemp = localize(c, "Current value of {} is \"{}\"", key, account_get_strattr(account, key)); message_send_text(c, message_type_error, c, msgtemp); } else - message_send_text(c, message_type_error, c, "Value currently not set"); + message_send_text(c, message_type_error, c, localize(c, "Value currently not set")); return 0; } @@ -4609,18 +4595,20 @@ namespace pvpgn if (strcasecmp(value, "null") == 0) value = NULL; - std::sprintf(msgtemp, "for \"%s\" (%.64s = \"%.128s\")", account_get_name(account), key, value); + std::sprintf(msgtemp0, " \"%.64s\" (%.128s = \"%.128s\")", account_get_name(account), key, value); if (account_set_strattr(account, key, value) < 0) { - std::sprintf(msgtemp2, "Unable to set key %s", msgtemp); - message_send_text(c, message_type_error, c, msgtemp2); + msgtemp = localize(c, "Unable to set key for"); + msgtemp += msgtemp0; + message_send_text(c, message_type_error, c, msgtemp); } else { - std::sprintf(msgtemp2, "Key set successfully %s", msgtemp); - message_send_text(c, message_type_error, c, msgtemp2); - eventlog(eventlog_level_warn, __FUNCTION__, "Key set by \"%s\" %s", account_get_name(conn_get_account(c)), msgtemp); + msgtemp = localize(c, "Key set successfully for"); + msgtemp += msgtemp0; + message_send_text(c, message_type_error, c, msgtemp); + eventlog(eventlog_level_warn, __FUNCTION__, "Key set by \"%s\" for%s", account_get_name(conn_get_account(c)),msgtemp0); } return 0; } @@ -4640,12 +4628,12 @@ namespace pvpgn else { eventlog(eventlog_level_error, __FUNCTION__, "could not open motd file \"%s\" for reading (std::fopen: %s)", filename, std::strerror(errno)); - message_send_text(c, message_type_error, c, "Unable to open motd."); + message_send_text(c, message_type_error, c, localize(c, "Unable to open motd.")); } return 0; } else { - message_send_text(c, message_type_error, c, "No motd."); + message_send_text(c, message_type_error, c, localize(c, "No motd.")); return 0; } } @@ -4680,11 +4668,11 @@ namespace pvpgn while (len > MAX_MESSAGE_LEN - 1) { - std::strncpy(msgtemp, buff, MAX_MESSAGE_LEN - 1); - msgtemp[MAX_MESSAGE_LEN] = '\0'; + std::strncpy(msgtemp0, buff, MAX_MESSAGE_LEN - 1); + msgtemp0[MAX_MESSAGE_LEN] = '\0'; buff += MAX_MESSAGE_LEN - 1; len -= MAX_MESSAGE_LEN - 1; - message_send_text(c, message_type_info, c, msgtemp); + message_send_text(c, message_type_info, c, msgtemp0); } if (len > 0) /* does it exist a small last part ? */ @@ -4700,7 +4688,7 @@ namespace pvpgn else { eventlog(eventlog_level_error, __FUNCTION__, "could not open tos file \"%s\" for reading (std::fopen: %s)", filename, std::strerror(errno)); - message_send_text(c, message_type_error, c, "Unable to send TOS (Terms of Service)."); + message_send_text(c, message_type_error, c, localize(c, "Unable to send TOS (Terms of Service).")); } xfree((void *)filename); return 0; @@ -4725,18 +4713,18 @@ namespace pvpgn { if ((user = game_get_player_conn(game, i))) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s latency: %9u", conn_get_username(user), conn_get_latency(user)); + msgtemp = localize(c, "{} latency: {}", conn_get_username(user), conn_get_latency(user)); message_send_text(c, message_type_info, c, msgtemp); } } return 0; } - snprintf(msgtemp, sizeof(msgtemp), "Your latency %9u", conn_get_latency(c)); + msgtemp = localize(c, "Your latency {}", conn_get_latency(c)); } else if ((user = connlist_find_connection_by_accountname(text))) - snprintf(msgtemp, sizeof(msgtemp), "%.64s latency %9u", text, conn_get_latency(user)); + msgtemp = localize(c, "{} latency ()", text, conn_get_latency(user)); else - snprintf(msgtemp, sizeof(msgtemp), "Invalid user."); + msgtemp = localize(c, "Invalid user."); message_send_text(c, message_type_info, c, msgtemp); return 0; @@ -4764,7 +4752,7 @@ namespace pvpgn if (!(account = accountlist_find_account(username))) { - message_send_text(c, message_type_error, c, "Invalid user."); + message_send_text(c, message_type_error, c, localize(c, "Invalid user.")); return 0; } @@ -4780,7 +4768,7 @@ namespace pvpgn if (usergroups & 64) tempgroups[6] = '7'; else tempgroups[6] = ' '; if (usergroups & 128) tempgroups[7] = '8'; else tempgroups[7] = ' '; tempgroups[8] = '\0'; - snprintf(msgtemp, sizeof(msgtemp), "%.64s's command group(s): %.64s", username, tempgroups); + msgtemp = localize(c, "{}'s command group(s): {}", username, tempgroups); message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -4796,7 +4784,7 @@ namespace pvpgn else if (*g == '7') groups |= 64; else if (*g == '8') groups |= 128; else { - snprintf(msgtemp, sizeof(msgtemp), "Got bad group: %c", *g); + msgtemp = localize(c, "Got bad group: {}", *g); message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -4804,19 +4792,19 @@ namespace pvpgn if (!std::strcmp(command, "add") || !std::strcmp(command, "a")) { account_set_command_groups(account, usergroups | groups); - snprintf(msgtemp, sizeof(msgtemp), "Groups %.64s has been added to %.64s", args[3].c_str(), username); + msgtemp = localize(c, "Groups {} has been added to {}", args[3].c_str(), username); message_send_text(c, message_type_info, c, msgtemp); return 0; } if (!std::strcmp(command, "del") || !std::strcmp(command, "d")) { account_set_command_groups(account, usergroups & (255 - groups)); - snprintf(msgtemp, sizeof(msgtemp), "Groups %.64s has been deleted from %.64s", args[3].c_str(), username); + msgtemp = localize(c, "Groups {} has been deleted from {}", args[3].c_str(), username); message_send_text(c, message_type_info, c, msgtemp); return 0; } - snprintf(msgtemp, sizeof(msgtemp), "Got unknown command: %.128s", command); + msgtemp = localize(c, "Got unknown command: {}", command); message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -4832,7 +4820,7 @@ namespace pvpgn topic = args[1].c_str(); if (!(channel = conn_get_channel(c))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return -1; } @@ -4843,13 +4831,13 @@ namespace pvpgn { if (std::strlen(topic) >= MAX_TOPIC_LEN) { - snprintf(msgtemp, sizeof(msgtemp), "Max topic length exceeded (max %d symbols)", MAX_TOPIC_LEN); + msgtemp = localize(c, "Max topic length exceeded (max {} symbols)", MAX_TOPIC_LEN); message_send_text(c, message_type_error, c, msgtemp); return -1; } if (!(account_is_operator_or_admin(conn_get_account(c), channel_name))) { - snprintf(msgtemp, sizeof(msgtemp), "You must be at least a Channel Operator of %.64s to set the topic", channel_name); + msgtemp = localize(c, "You must be at least a Channel Operator of {} to set the topic", channel_name); message_send_text(c, message_type_error, c, msgtemp); return -1; } @@ -4863,7 +4851,7 @@ namespace pvpgn // display channel topic if (channel_display_topic(c, channel_name) < 0) { - snprintf(msgtemp, sizeof(msgtemp), "%.64s topic: no topic", channel_name); + msgtemp = localize(c, "{} topic: no topic", channel_name); message_send_text(c, message_type_info, c, msgtemp); } @@ -4876,12 +4864,12 @@ namespace pvpgn t_channel * channel; if (!(channel = conn_get_channel(c))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return -1; } if (!(account_is_operator_or_admin(conn_get_account(c), channel_get_name(channel)))) { - message_send_text(c, message_type_error, c, "You must be at least a Channel Operator to use this command."); + message_send_text(c, message_type_error, c, localize(c, "You must be at least a Channel Operator to use this command.")); return -1; } @@ -4889,14 +4877,14 @@ namespace pvpgn if (channel_set_flags(channel, oldflags ^ channel_flags_moderated)) { eventlog(eventlog_level_error, __FUNCTION__, "could not set channel %s flags", channel_get_name(channel)); - message_send_text(c, message_type_error, c, "Unable to change channel flags."); + message_send_text(c, message_type_error, c, localize(c, "Unable to change channel flags.")); return -1; } else { if (oldflags & channel_flags_moderated) - channel_message_send(channel, message_type_info, c, "Channel is now unmoderated."); + channel_message_send(channel, message_type_info, c, localize(c, "Channel is now unmoderated.").c_str()); else - channel_message_send(channel, message_type_info, c, "Channel is now moderated."); + channel_message_send(channel, message_type_info, c, localize(c, "Channel is now moderated.").c_str()); } return 0; @@ -4911,7 +4899,7 @@ namespace pvpgn account_set_normal_vitality(account, ctag, 0), account_set_normal_gold(account, ctag, 0); - snprintf(msgtemp, sizeof(msgtemp), "Reseted %.64s's %.64s Stats", account_get_name(account), clienttag_get_title(ctag)); + msgtemp = localize(c, "Reset {}'s {} stats", account_get_name(account), clienttag_get_title(ctag)); message_send_text(c, message_type_info, c, msgtemp); } @@ -4997,7 +4985,7 @@ namespace pvpgn ladderList->delEntry(uid); } - snprintf(msgtemp, sizeof(msgtemp), "Resetted %.64s's %.64s Stats", account_get_name(account), clienttag_get_title(ctag)); + msgtemp = localize(c, "Reset {}'s {} stats", account_get_name(account), clienttag_get_title(ctag)); message_send_text(c, message_type_info, c, msgtemp); } @@ -5035,7 +5023,7 @@ namespace pvpgn // this would now need a way to delete the team for all members now //account_set_atteamcount(account,ctag,0); - snprintf(msgtemp, sizeof(msgtemp), "Reseted %.64s's %.64s Stats", account_get_name(account), clienttag_get_title(ctag)); + msgtemp = localize(c, "Reset {}'s {} stats", account_get_name(account), clienttag_get_title(ctag)); message_send_text(c, message_type_info, c, msgtemp); } @@ -5057,7 +5045,7 @@ namespace pvpgn account = accountlist_find_account(username); if (!account) { - message_send_text(c, message_type_error, c, "Invalid user."); + message_send_text(c, message_type_error, c, localize(c, "Invalid user.")); return 0; } @@ -5111,7 +5099,7 @@ namespace pvpgn clienttag != CLIENTTAG_DIABLORTL_UINT && clienttag != CLIENTTAG_DIABLOSHR_UINT && clienttag != CLIENTTAG_WARCIIBNE_UINT && clienttag != CLIENTTAG_BNCHATBOT_UINT) { - message_send_text(c, message_type_error, c, "Your game client doesn't support MessageBox."); + message_send_text(c, message_type_error, c, localize(c, "Your game client doesn't support MessageBox.")); return -1; } @@ -5123,10 +5111,11 @@ namespace pvpgn } // reduntant line - it adds a caption to message box - std::string goodtext = args[1] + "\n\n***************************\nBy " + conn_get_username(c); + std::string goodtext = args[1] + localize(c, "\n\n***************************\nBy {}", conn_get_username(c)); // caption - snprintf(msgtemp, sizeof(msgtemp), "Information from %.64s", prefs_get_servername()); + msgtemp = localize(c, "Information from {}", prefs_get_servername()); + msgtemp = localize(c, " for {}", prefs_get_servername()); t_connection * conn; t_elem const * curr; @@ -5142,7 +5131,7 @@ namespace pvpgn clienttag_dest != CLIENTTAG_WARCIIBNE_UINT && clienttag_dest != CLIENTTAG_BNCHATBOT_UINT) { continue; } - messagebox_show(conn, goodtext.c_str(), msgtemp); + messagebox_show(conn, goodtext.c_str(), msgtemp.c_str()); } } diff --git a/src/bnetd/connection.cpp b/src/bnetd/connection.cpp index a37462a56..72845fe4b 100644 --- a/src/bnetd/connection.cpp +++ b/src/bnetd/connection.cpp @@ -73,8 +73,9 @@ #include "command_groups.h" #include "attrlayer.h" #include "anongame_wol.h" -#include "common/setup_after.h" #include "icons.h" +#include "i18n.h" +#include "common/setup_after.h" #ifdef WITH_LUA #include "luainterface.h" @@ -128,43 +129,9 @@ namespace pvpgn } if (filename = prefs_get_motdfile()) { t_tag gamelang = conn_get_gamelang(c); - char lang_str[sizeof(t_tag)+1]; - char * lang_filename; - char * tempmotdfile; - char * def_langtag; - char * extention; - - std::memset(lang_str, 0, sizeof(lang_str)); - tag_uint_to_str(lang_str, gamelang); - - tempmotdfile = xstrdup(filename); - def_langtag = std::strrchr(tempmotdfile, '-'); - if (!def_langtag) { - extention = std::strrchr(tempmotdfile, '.'); - } - else { - *def_langtag = '\0'; - def_langtag++; - extention = std::strrchr(def_langtag, '.'); - } - lang_filename = (char*)xmalloc(std::strlen(tempmotdfile) + 1 + std::strlen(lang_str) + 1 + std::strlen(extention) + 1); - - if (extention) { - *extention = '\0'; - extention++; - } - - if ((gamelang) && (lang_str)) - if (extention) - std::sprintf(lang_filename, "%s-%s.%s", tempmotdfile, lang_str, extention); - else - std::sprintf(lang_filename, "%s-%s", tempmotdfile, lang_str); - else { - INFO0("client does not specifed proper gamelang, sending default motd"); - std::sprintf(lang_filename, "%s", filename); - } + std::string lang_filename = i18n_filename(filename, gamelang); - if (fp = std::fopen(lang_filename, "r")) { + if (fp = std::fopen(lang_filename.c_str(), "r")) { message_send_file(c, fp); if (std::fclose(fp) < 0) { eventlog(eventlog_level_error, __FUNCTION__, "could not close MOTD file \"%s\" after reading (std::fopen: %s)", lang_filename, std::strerror(errno)); @@ -182,10 +149,6 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "could not open MOTD file \"%s\" for reading (std::fopen: %s)", filename, std::strerror(errno)); } } - if (tempmotdfile) - xfree((void *)tempmotdfile); - if (lang_filename) - xfree((void *)lang_filename); } c->protocol.cflags |= conn_flags_welcomed; } diff --git a/src/bnetd/handle_bnet.cpp b/src/bnetd/handle_bnet.cpp index bd6611ea0..bbfb955ef 100644 --- a/src/bnetd/handle_bnet.cpp +++ b/src/bnetd/handle_bnet.cpp @@ -73,6 +73,7 @@ #include "friends.h" #include "autoupdate.h" #include "anongame.h" +#include "i18n.h" #ifdef WIN32_GUI #include #endif @@ -1691,9 +1692,9 @@ namespace pvpgn if (supports_locked_reply) { bn_int_set(&rpacket->u.server_loginreply1.message, SERVER_LOGINREPLY2_MESSAGE_LOCKED); - char msgtemp[MAX_MESSAGE_LEN]; - snprintf(msgtemp, sizeof(msgtemp), "This account has been locked%s", account_get_locktext(account, true)); - packet_append_string(rpacket, msgtemp); + std::string msgtemp = localize(c, "This account has been locked"); + msgtemp += account_get_locktext(account, true); + packet_append_string(rpacket, msgtemp.c_str()); } else { bn_int_set(&rpacket->u.server_loginreply1.message, SERVER_LOGINREPLY2_MESSAGE_BADPASS); @@ -2115,9 +2116,9 @@ namespace pvpgn else if (account_get_auth_lock(account) == 1) { /* default to false */ eventlog(eventlog_level_info, __FUNCTION__, "[%d] login for \"%s\" refused (this account is locked)", conn_get_socket(c), username); bn_int_set(&rpacket->u.server_logonproofreply.response, SERVER_LOGONPROOFREPLY_RESPONSE_CUSTOM); - char msgtemp[MAX_MESSAGE_LEN]; - snprintf(msgtemp, sizeof(msgtemp), "This account has been locked%s", account_get_locktext(account, true)); - packet_append_string(rpacket, msgtemp); + std::string msgtemp = localize(c, "This account has been locked"); + msgtemp += account_get_locktext(account, true); + packet_append_string(rpacket, msgtemp.c_str()); } else { t_hash serverhash; diff --git a/src/bnetd/helpfile.cpp b/src/bnetd/helpfile.cpp index 81d77fc7a..98b03d041 100644 --- a/src/bnetd/helpfile.cpp +++ b/src/bnetd/helpfile.cpp @@ -32,6 +32,7 @@ #include "command_groups.h" #include "account_wrap.h" #include "connection.h" +#include "i18n.h" #include "common/setup_after.h" namespace pvpgn @@ -80,7 +81,7 @@ namespace pvpgn if (hfd == NULL) { /* an error ocured opening readonly the help file, helpfile_unload was called, or helpfile_init hasn't been called */ - message_send_text(c, message_type_error, c, "Oops ! There is a problem with the help file. Please contact the administrator of the server."); + message_send_text(c, message_type_error, c, localize(c, "Oops ! There is a problem with the help file. Please contact the administrator of the server.")); return 0; } diff --git a/src/bnetd/icons.cpp b/src/bnetd/icons.cpp index 9b541c018..690152c1f 100644 --- a/src/bnetd/icons.cpp +++ b/src/bnetd/icons.cpp @@ -44,11 +44,13 @@ #include "connection.h" #include "icons.h" #include "account_wrap.h" -#include "common/setup_after.h" + #include "message.h" #include "helpfile.h" #include "channel.h" #include "command.h" +#include "i18n.h" +#include "common/setup_after.h" namespace pvpgn { @@ -84,7 +86,7 @@ namespace pvpgn char msgtemp[MAX_MESSAGE_LEN]; if (!(conn_get_channel(c))) { - message_send_text(c, message_type_error, c, "This command can only be used inside a channel."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); return -1; } else { @@ -95,7 +97,7 @@ namespace pvpgn clienttag = conn_get_clienttag(c); if (!clienttag || clienttag == CLIENTTAG_BNCHATBOT_UINT) { - message_send_text(c, message_type_error, c, "This command can only be used from the game."); + message_send_text(c, message_type_error, c, localize(c, "This command can only be used from the game.")); return -1; } @@ -177,7 +179,7 @@ namespace pvpgn } if (!is_found || strlen(iconcode) != 4) { - message_send_text(c, message_type_error, c, "Bad icon."); + message_send_text(c, message_type_error, c, localize(c, "Bad icon.")); return -1; } snprintf(msgtemp, sizeof(msgtemp), "Set new icon is succeed.", account_get_name(account)); diff --git a/src/bnetd/ipban.cpp b/src/bnetd/ipban.cpp index a62625269..5c69b43be 100644 --- a/src/bnetd/ipban.cpp +++ b/src/bnetd/ipban.cpp @@ -41,9 +41,11 @@ #include "server.h" #include "prefs.h" #include "connection.h" -#include "common/setup_after.h" + #include "helpfile.h" #include "command.h" +#include "i18n.h" +#include "common/setup_after.h" namespace pvpgn { @@ -393,7 +395,7 @@ namespace pvpgn extern int ipbanlist_add(t_connection * c, char const * cp, std::time_t endtime) { t_ipban_entry * entry; - char tstr[MAX_MESSAGE_LEN]; + std::string msgtemp; if (!(entry = ipban_str_to_ipban_entry(cp))) { @@ -411,19 +413,19 @@ namespace pvpgn if (endtime == 0) { - std::sprintf(tstr, "%s banned permamently by %s.", cp, conn_get_username(c)); - eventlog(eventlog_level_info, __FUNCTION__, "%s", tstr); - message_send_admins(c, message_type_info, tstr); - std::sprintf(tstr, "%s banned permamently.", cp); - message_send_text(c, message_type_info, c, tstr); + msgtemp = localize(c, "{} banned permamently by {}.", cp, conn_get_username(c)); + eventlog(eventlog_level_info, __FUNCTION__, msgtemp.c_str()); + message_send_admins(c, message_type_info, msgtemp.c_str()); + msgtemp = localize(c, "{} banned permamently.", cp); + message_send_text(c, message_type_info, c, msgtemp); } else { - std::sprintf(tstr, "%s banned for %.48s by %s.", cp, seconds_to_timestr(entry->endtime - now), conn_get_username(c)); - eventlog(eventlog_level_info, __FUNCTION__, "%s", tstr); - message_send_admins(c, message_type_info, tstr); - std::sprintf(tstr, "%s banned for %.48s.", cp, seconds_to_timestr(entry->endtime - now)); - message_send_text(c, message_type_info, c, tstr); + msgtemp = localize(c, "{} banned for {} by {}.", cp, seconds_to_timestr(entry->endtime - now), conn_get_username(c)); + eventlog(eventlog_level_info, __FUNCTION__, msgtemp.c_str()); + message_send_admins(c, message_type_info, msgtemp.c_str()); + msgtemp = localize(c, "{} banned for {}.", cp, seconds_to_timestr(entry->endtime - now)); + message_send_text(c, message_type_info, c, msgtemp); } } @@ -466,7 +468,7 @@ namespace pvpgn unsigned int bmin; char minstr[MAX_TIME_STR]; unsigned int i; - char tstr[MAX_MESSAGE_LEN]; + std::string msgtemp; for (i = 0; std::isdigit((int)timestr[i]) && i < sizeof(minstr)-1; i++) minstr[i] = timestr[i]; @@ -476,12 +478,14 @@ namespace pvpgn { if (c) { - if (std::strlen(minstr) < 1) - message_send_text(c, message_type_info, c, "There was an error in std::time."); - else + msgtemp = "There was an error in std::time."; + //if (std::strlen(minstr) < 1) + // message_send_text(c, message_type_info, c, localize(c, msgtemp)); + //else { - std::sprintf(tstr, "There was an error in std::time. Banning only for: %s minutes.", minstr); - message_send_text(c, message_type_info, c, tstr); + msgtemp += " "; + msgtemp += localize(c, "Banning only for: {} minutes.", minstr); + message_send_text(c, message_type_info, c, msgtemp); } } } diff --git a/src/bnetd/mail.cpp b/src/bnetd/mail.cpp index 44180d690..e91c41918 100644 --- a/src/bnetd/mail.cpp +++ b/src/bnetd/mail.cpp @@ -39,9 +39,10 @@ #include "message.h" #include "prefs.h" #include "connection.h" -#include "common/setup_after.h" #include "helpfile.h" #include "command.h" +#include "i18n.h" +#include "common/setup_after.h" namespace pvpgn @@ -251,7 +252,7 @@ namespace pvpgn extern int handle_mail_command(t_connection * c, char const * text) { if (!prefs_get_mail_support()) { - message_send_text(c, message_type_error, c, "This server has NO mail support."); + message_send_text(c, message_type_error, c, localize(c, "This server has NO mail support.")); return -1; } @@ -331,22 +332,22 @@ namespace pvpgn t_account * recv = accountlist_find_account(receiver); if (!recv) { - message_send_text(c, message_type_error, c, "Receiver UNKNOWN!"); + message_send_text(c, message_type_error, c, localize(c, "Receiver UNKNOWN!")); return; } Mailbox mbox(account_get_uid(recv)); if (get_mail_quota(recv) <= mbox.size()) { - message_send_text(c, message_type_error, c, "Receiver has reached his mail quota. Your message will NOT be sent."); + message_send_text(c, message_type_error, c, localize(c, "Receiver has reached his mail quota. Your message will NOT be sent.")); return; } try { mbox.deliver(conn_get_username(c), message); - message_send_text(c, message_type_info, c, "Your mail has been sent successfully."); + message_send_text(c, message_type_info, c, localize(c, "Your mail has been sent successfully.")); } catch (const Mailbox::DeliverError&) { - message_send_text(c, message_type_error, c, "There was an error completing your request!"); + message_send_text(c, message_type_error, c, localize(c, "There was an error completing your request!")); } } @@ -368,7 +369,7 @@ namespace pvpgn if (token.empty()) { /* user wants to see the mail summary */ if (mbox.empty()) { - message_send_text(c, message_type_info, c, "You have no mail."); + message_send_text(c, message_type_info, c, localize(c, "You have no mail.")); return; } @@ -412,7 +413,7 @@ namespace pvpgn message_send_text(c, message_type_info, c, mail.message().c_str()); } catch (const Mailbox::ReadError&) { - message_send_text(c, message_type_error, c, "There was an error completing your request."); + message_send_text(c, message_type_error, c, localize(c, "There was an error completing your request.")); } } } @@ -425,7 +426,7 @@ namespace pvpgn } if (token.empty()) { - message_send_text(c, message_type_error, c, "Please specify which message to delete. Use the following syntax: /mail delete {|all} ."); + message_send_text(c, message_type_error, c, localize(c, "Please specify which message to delete. Use the following syntax: /mail delete {|all} .")); return; } @@ -434,16 +435,16 @@ namespace pvpgn if (token == "all") { mbox.clear(); - message_send_text(c, message_type_info, c, "Successfully deleted messages."); + message_send_text(c, message_type_info, c, localize(c, "Successfully deleted messages.")); } else { if (std::find_if(token.begin(), token.end(), NonNumericChar) != token.end()) { - message_send_text(c, message_type_error, c, "Invalid index. Please use /mail delete {|all} where is a number."); + message_send_text(c, message_type_error, c, localize(c, "Invalid index. Please use /mail delete {|all} where is a number.")); return; } mbox.erase(std::atoi(token.c_str())); - message_send_text(c, message_type_info, c, "Succesfully deleted message."); + message_send_text(c, message_type_info, c, localize(c, "Succesfully deleted message.")); } } diff --git a/src/bnetd/message.cpp b/src/bnetd/message.cpp index d71e62a8c..c5e22acad 100644 --- a/src/bnetd/message.cpp +++ b/src/bnetd/message.cpp @@ -987,6 +987,7 @@ namespace pvpgn return -1; } + // empty messages are needed to separate text (or example, in bnhelp output) if (text && text[0] == '\0') text = " "; /* empty messages crash some clients, just send whitespace */ @@ -994,7 +995,6 @@ namespace pvpgn if (text && (std::strlen(text) > MAX_MESSAGE_LEN)) { /* PELISH: We are trying to support MAX_IRC_MESSAGE_LEN for IRC and also MAX_MESSAGE_LEN for bnet */ - eventlog(eventlog_level_warn, __FUNCTION__, "line too long, truncation..."); temp = std::string(text, text + MAX_MESSAGE_LEN); text = temp.c_str(); } @@ -1595,6 +1595,10 @@ namespace pvpgn return rez; } + extern int message_send_text(t_connection * dst, t_message_type type, t_connection * src, std::string text) + { + return message_send_text(dst, type, src, text.c_str()); + } extern int message_send_text(t_connection * dst, t_message_type type, t_connection * src, char const * text) { diff --git a/src/bnetd/message.h b/src/bnetd/message.h index 8ebcfb2e7..ea769c8ba 100644 --- a/src/bnetd/message.h +++ b/src/bnetd/message.h @@ -120,6 +120,7 @@ namespace pvpgn #include #define JUST_NEED_TYPES +#include #include "connection.h" #include "common/bnet_protocol.h" #undef JUST_NEED_TYPES @@ -138,6 +139,7 @@ namespace pvpgn extern int message_send_admins(t_connection * src, t_message_type type, char const * text); /* the following are "shortcuts" to avoid calling message_create(), message_send(), message_destroy() */ + extern int message_send_text(t_connection * dst, t_message_type type, t_connection * src, std::string text); extern int message_send_text(t_connection * dst, t_message_type type, t_connection * src, char const * text); extern int message_send_formatted(t_connection * dst, char const * text); extern int message_send_file(t_connection * dst, std::FILE * fd); From f40ac4b0081b3b558d155d202461048375ea3007 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 28 Jun 2014 21:33:09 +0400 Subject: [PATCH 061/144] add localize function for Lua and localize exist strings --- lua/command/redirect.lua | 2 +- lua/extend/message.lua | 3 +++ lua/handle_command.lua | 2 +- lua/quiz/command.lua | 22 +++++++++++----------- src/bnetd/luafunctions.cpp | 37 ++++++++++++++++++++++++++++++++++++- src/bnetd/luafunctions.h | 2 ++ src/bnetd/luainterface.cpp | 2 ++ 7 files changed, 56 insertions(+), 14 deletions(-) diff --git a/lua/command/redirect.lua b/lua/command/redirect.lua index 428ad4d50..c6ac1f84e 100644 --- a/lua/command/redirect.lua +++ b/lua/command/redirect.lua @@ -22,7 +22,7 @@ function command_redirect(account, text) local dest = api.account_get_by_name(args[1]) if next(dest) == nil or dest.online == "false" then - api.message_send_text(account.name, message_type_error, account.name, "User '" ..args[1].. "' is offline") + api.message_send_text(account.name, message_type_error, account.name, localize(account.name, "User \"{}\" is offline", args[1])) return 1 end diff --git a/lua/extend/message.lua b/lua/extend/message.lua index 62767b3cd..2247e8d53 100644 --- a/lua/extend/message.lua +++ b/lua/extend/message.lua @@ -13,3 +13,6 @@ function message_send_all(text) end end +function localize(username, arg1, arg2, arg3, arg4, arg5) + return api.localize(username, arg1, arg2, arg3, arg4, arg5) +end \ No newline at end of file diff --git a/lua/handle_command.lua b/lua/handle_command.lua index 5012553cb..43aae10e5 100644 --- a/lua/handle_command.lua +++ b/lua/handle_command.lua @@ -31,7 +31,7 @@ function handle_command(account, text) -- check if command group is in account.commandgroups if math_and(account.commandgroups, cg) == 0 then - api.message_send_text(account.name, message_type_error, account.name, "This command is reserved for admins.") + api.message_send_text(account.name, message_type_error, account.name, localize(account.name, "This command is reserved for admins.")) return 1 end diff --git a/lua/quiz/command.lua b/lua/quiz/command.lua index d61b448ac..eacb8710a 100644 --- a/lua/quiz/command.lua +++ b/lua/quiz/command.lua @@ -37,24 +37,24 @@ end function q_command_start(account, filename) if not account_is_operator_or_admin(account.name) then - api.message_send_text(account.name, message_type_error, account.name, "You must be at least a Channel Operator to use this command.") + api.message_send_text(account.name, message_type_error, account.name, localize(account.name, "You must be at least a Channel Operator to use this command.")) return 1 end local channel = api.channel_get_by_id(account.channel_id) if not channel then - api.message_send_text(account.name, message_type_error, account.name, "This command can only be used inside a channel.") + api.message_send_text(account.name, message_type_error, account.name, localize(account.name, "This command can only be used inside a channel.")) return 1 end if config.quiz_channel then - api.message_send_text(account.name, message_type_error, account.name, 'Quiz has already ran in channel "'..config.quiz_channel..'". Use /qstop to force finish.') + api.message_send_text(account.name, message_type_error, account.name, localize(account.name, "Quiz has already ran in channel \"{}\". Use /quiz stop to force finish.", config.quiz_channel)) return 1 end -- check if file exists if not filename or not file_exists(q_directory() .. "/questions/" .. filename .. ".txt") then - api.message_send_text(account.name, message_type_error, account.name, "Available Quiz dictionaries: ") + api.message_send_text(account.name, message_type_error, account.name, localize(account.name, "Available Quiz dictionaries: ")) api.message_send_text(account.name, message_type_error, account.name, " " .. config.quiz_filelist) return 1 end @@ -67,12 +67,12 @@ end function q_command_stop(account) if not account_is_operator_or_admin(account.name) then - api.message_send_text(account.name, message_type_error, account.name, "You must be at least a Channel Operator to use this command.") + api.message_send_text(account.name, message_type_error, account.name, localize(account.name, "You must be at least a Channel Operator to use this command.")) return 1 end if not config.quiz_channel then - api.message_send_text(account.name, message_type_error, account.name, 'Quiz is not running.') + api.message_send_text(account.name, message_type_error, account.name, localize(account.name, "Quiz is not running.")) return 1 end @@ -89,14 +89,14 @@ function q_command_toplist(account) return 0 end - local output = "Top " .. config.quiz_users_in_top .. " Quiz records:" + local output = localize(account.name, "Top {} Quiz records:", config.quiz_users_in_top) api.message_send_text(account.name, message_type_info, account.name, output) -- display TOP of total records for i,t in pairs(q_records_total) do if (i > config.quiz_users_in_top) then break end - local output = string.format(" %d. %s [%d points]", i, t.username, t.points) + local output = string.format(" %d. %s [%d %s]", i, t.username, t.points, localize(account.name, "points")) api.message_send_text(account.name, message_type_info, account.name, output) end @@ -116,9 +116,9 @@ function q_command_stats(account, username) -- find user in records for i,t in pairs(q_records_total) do if string.upper(t.username) == string.upper(username) then - api.message_send_text(account.name, message_type_info, account.name, t.username.. "'s Quiz record:") + api.message_send_text(account.name, message_type_info, account.name, localize(account.name, "{}'s Quiz record:", t.username)) - local output = string.format(" %d. %s [%d points]", i, t.username, t.points) + local output = string.format(" %d. %s [%d %s]", i, t.username, t.points, localize(account.name, "points")) api.message_send_text(account.name, message_type_info, account.name, output) found = true @@ -126,7 +126,7 @@ function q_command_stats(account, username) end if not found then - api.message_send_text(account.name, message_type_info, account.name, username .. " has never played Quiz.") + api.message_send_text(account.name, message_type_info, account.name, localize(account.name, "{} has never played Quiz.", username)) end return 1 diff --git a/src/bnetd/luafunctions.cpp b/src/bnetd/luafunctions.cpp index b2a4362d1..074b37848 100644 --- a/src/bnetd/luafunctions.cpp +++ b/src/bnetd/luafunctions.cpp @@ -48,6 +48,7 @@ #include "attrlayer.h" #include "icons.h" #include "helpfile.h" +#include "i18n.h" #include "luawrapper.h" #include "luaobjects.h" @@ -129,6 +130,7 @@ namespace pvpgn st.at(1, loglevel); st.at(2, function); st.at(3, text); + eventlog(t_eventlog_level(loglevel), function, text); } catch (const std::exception& e) { @@ -138,7 +140,6 @@ namespace pvpgn { eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); } - eventlog(t_eventlog_level(loglevel), function, text); return 0; } @@ -766,7 +767,41 @@ namespace pvpgn return 0; } + /* Localize text */ + extern int __localize(lua_State* L) + { + const char *username, *text; + const char *arg1, *arg2, *arg3, *arg4, *arg5; + try + { + lua::stack st(L); + // get args + st.at(1, username); + st.at(2, text); + st.at(3, arg1); + st.at(4, arg2); + st.at(5, arg3); + st.at(6, arg4); + st.at(7, arg5); + if (t_account * account = accountlist_find_account(username)) + { + if (t_connection * c = account_get_conn(account)) + { + st.push(localize(c, text, arg1, arg2, arg3, arg4, arg5)); + } + } + } + catch (const std::exception& e) + { + eventlog(eventlog_level_error, __FUNCTION__, e.what()); + } + catch (...) + { + eventlog(eventlog_level_error, __FUNCTION__, "lua exception\n"); + } + return 1; + } } } #endif \ No newline at end of file diff --git a/src/bnetd/luafunctions.h b/src/bnetd/luafunctions.h index 0b81605cf..d99c2d181 100644 --- a/src/bnetd/luafunctions.h +++ b/src/bnetd/luafunctions.h @@ -58,6 +58,8 @@ namespace pvpgn extern int __icon_get_rank(lua_State* L); extern int __describe_command(lua_State* L); extern int __messagebox_show(lua_State* L); + + extern int __localize(lua_State* L); } } diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index ff30364cc..96e24a61f 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -147,6 +147,8 @@ namespace pvpgn { "describe_command", __describe_command }, { "messagebox_show", __messagebox_show }, + { "localize", __localize }, + { 0, 0 } }; vm.reg("api", api); From 671c5ad9c75ee108220887182d3e5d9a9f4aca7d Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 28 Jun 2014 21:46:30 +0400 Subject: [PATCH 062/144] utility that generates localization files by extracting localized strings from the code files (*.cpp, *.h, *.lua) https://github.com/HarpyWar/pvpgn/issues/13 --- scripts/localize/pvpgn_localize_generator.cs | 311 ++++++++++++++++++ scripts/localize/pvpgn_localize_generator.exe | Bin 0 -> 12288 bytes scripts/localize/update.bat | 15 + 3 files changed, 326 insertions(+) create mode 100644 scripts/localize/pvpgn_localize_generator.cs create mode 100644 scripts/localize/pvpgn_localize_generator.exe create mode 100644 scripts/localize/update.bat diff --git a/scripts/localize/pvpgn_localize_generator.cs b/scripts/localize/pvpgn_localize_generator.cs new file mode 100644 index 000000000..b83b54e38 --- /dev/null +++ b/scripts/localize/pvpgn_localize_generator.cs @@ -0,0 +1,311 @@ +/* +Copyright (c) 2014 HarpyWar (harpywar@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.Text; +using System.Xml.Serialization; + +namespace pvpgn_localize_generator +{ + class Program + { + /// + /// C++ localization function name + /// + private const string func_name = "localize"; + private const string outfile = "output.xml"; + + static Root _data = new Root(); + + static void Main(string[] args) + { + if (args.Length != 1) + { + Console.WriteLine("This utility generates XML file for next translation from hardcoded text arguments in function {0}(...) that in *.cpp files\n(c) 2014 HarpyWar (harpywar@gmail.com)", func_name); + Console.WriteLine("\nUsage: {0} [path to 'src/bnetd']\n", AppDomain.CurrentDomain.FriendlyName); + + Environment.Exit(0); + } + var dirpath = args[0]; + + // process all files in directory + foreach(var f in Directory.GetFiles(dirpath)) + { + parse_file(f); + } + + // serialize data to xml + var ser = new XmlSerializer(typeof(Root)); + using (var fs = new FileStream(outfile, FileMode.Create)) + { + ser.Serialize(fs, _data); + } + + Console.WriteLine("\n{0} items saved in {1}: ", _data.Items.Count, outfile); + Console.WriteLine("\nPress any key to exit..."); + Console.ReadKey(); + } + + /// + /// Parse a single file + /// + /// + private static void parse_file(string filepath) + { + string[] lines = File.ReadAllLines(filepath); + string filename = Path.GetFileName(filepath); + + string text, f, function = string.Empty; + int i = 0; + foreach (string s in lines) + { + i++; + try + { + if ((f = is_function(s)) != null) + function = f; // remember last function + + if ((text = find_localize_text(s)) == null) + continue; + + _data.Items.Add(new Root.StringItem() + { + File = filename, + Function = function, + Original = text, + Translate = " " + }); + + Console.WriteLine("{0}, {1}(): {2}", filename, function, text); + } + catch(Exception e) + { + Console.WriteLine("Error on parse file \"{0}\" on line #{1}: {2}", filename, i, s); + Console.WriteLine(e.Message); + } + } + } + + /// + /// Return a text from the first string argument of the func_name + /// + /// + /// text or null + private static string find_localize_text(string line) + { + int func_pos, bracket1_pos, quote1_pos, quote2_pos; + func_pos = bracket1_pos = quote1_pos = quote2_pos = -1; + + string text = null; + + for (int i = 0; i < line.Length; i++) + { + if (func_pos >= 0) + { + if (bracket1_pos > 0) + { + if (quote1_pos > 0) + { + if (quote2_pos > 0) + { + text = line.Substring(quote1_pos, quote2_pos - quote1_pos); + break; + } + // 3) find last quote + if (line.Substring(i, 1) == "\"" && line.Substring(i-1, 1) != "\\") + quote2_pos = i; + continue; + } + // 3) find first quote + if (line.Substring(i, 1) == "\"") + quote1_pos = ++i; + continue; + } + // 2) find first bracket + if (line.Substring(i, 1) == "(") + bracket1_pos = i; + continue; + } + // 1) find function name + if (line.Substring(i, (i+func_name.Length > line.Length) ? line.Length-i : func_name.Length) == func_name) + func_pos = i; + } + return escape_text(text); + } + + /// + /// Filter text corresponding XML rules + /// + /// + /// text or null (if null passed) + private static string escape_text(string text) + { + if (text == null) + return null; + + text = text.Replace("\\\"", "\""); + text = text.Replace("<", "<"); + text = text.Replace(">", ">"); + return text; + } + + + /// + /// Is word a function? + /// + /// + /// string or null + private static string is_function(string line) + { + int j; + line = line.Trim(); + if (line.Length == 0) + return null; + + // last line must have ) or { + if (line[line.Length - 1] == ')' || line[line.Length - 1] == '{') + { + string[] words = line.Split(); + if (words.Length > 0) + { + bool bad = false; + // exclude small words and reserved words that can not be at the beginning of the function definition + foreach (string r in reserved_words) + if (r.Length > words[0].Length) + continue; + else if (words[0].Substring(0, r.Length) == r) + bad = true; + + if (!bad) + { + // find function name in words + for (int i = 0; i < words.Length; i++) + { + if (words[i].Trim() == string.Empty) + continue; + + if (words[i][0] == '(') + return words[i - 1]; + else if ((j = words[i].IndexOf("(", 0)) != -1) + return words[i].Substring(0, j); + } + + } + } + } + return null; + } + + static string[] reserved_words = new string[] { + + "while", + "switch", + "class", + "new", + "goto", + "for", + "sizeof", + "struct", + "throw", + "try", + "catch", + "typedef", + "enum", + "if", "else", + "{","}", + "(",")", + "<<",">>", + "||","|", + "&&","&", + "//", "/", "*", // comments + "!", + }; + } + +#region Serializer Class + + [XmlRoot("root")] + public class Root + { + public Root() + { + Items = new List(); + } + + [XmlElement("meta")] + public Meta meta = new Meta(); + + [XmlArray("items"), XmlArrayItem(typeof(StringItem), ElementName = "item")] + public List Items { get; set; } + + public class Meta + { + public Meta() + { + language = new LanguageItem(); + Authors = new List() { + new AuthorItem() + }; + } + + [XmlElement("language"), DefaultValue("change_me")] + public LanguageItem language { get; set; } + + [XmlArray("authors"), XmlArrayItem(typeof(AuthorItem), ElementName = "author")] + public List Authors { get; set; } + + public class LanguageItem + { + [XmlAttribute("tag")] + public string Tag = "enUS"; + [XmlText] + public string Default = "English"; + } + public class AuthorItem + { + [XmlAttribute("name")] + public string Name = "nomad"; + [XmlAttribute("email")] + public string Email="nomad@example.com"; + } + } + + + public class StringItem + { + [XmlAttribute("file")] + public string File; + [XmlAttribute("function")] + public string Function; + [XmlElement("original")] + public string Original; + [XmlElement("translate")] + public string Translate; + } + +#endregion + + } +} diff --git a/scripts/localize/pvpgn_localize_generator.exe b/scripts/localize/pvpgn_localize_generator.exe new file mode 100644 index 0000000000000000000000000000000000000000..688e347543273b0b5ead2a06813a9aeaba56feea GIT binary patch literal 12288 zcmeHNeQ;dWbwBs*?%NMZYpqt6WLvh^vJJ8&Et33!4f2POWl&;cV+q?Nrt)g{Nm|(5 zw|;L|SO__yycW7wnFbQ#!nJG6Y!XeKMO?lp#Ob{sC_a2*Wrn(>mnHfebu5m$&z)t1o}f8 z0Z=Aw_521UPXb;g9oI>N65mb&G4XcdUG(flK$4D?vmwa7(gI%AmBhQ~*-LcAB2v&I z+RqRBW>A3MxrylXN+JasFI#(4&l+Q{3B9oy-xz;a_4?_{P=tRm`{xb|ZTTtHJ{|t(a z&Q{=V8$d+L+!a9U%%F|tMM^BOfUNfi?Ny-9utMkE1{GU7(a({3&A6w^XwZzaRYu$& z3U{IzT`|9WI$^&n9*70v;g)!$t2q{qMb5^}n8^iZEYf;B9*IR_;XAYa-#f#G1=vV) z^9;i5?};_PW(GmIYhizZS;FsxXI*Ddpd~OKJPBqAUnDxAvdc#Io98t?9+cL%xgAg& z55A;O4IrL(9zyGCZrRAq$On*YO2_shkeiVW3PZ}Ecd5n?D@nIC zM(4#`^s;XbUFbLF5OaSg>P5OY`XmjEIrN3cYVt{j7<1?j&Dz|u`JM}_F7wSH7yNVR zaewn`3PQi-n}cP)aSJ-o--$$xh!M%LZ3r^{#hT;c=6IwzUgshc%y_-g36CR@7?3U? z^Xx~g{!BOH>_AI>tiE-g6`JvemUwi>_c&7;E6=L9_ zN6d}!W%Jz5*s`9$3lF1GEpD-J&$3wkYbI=&ZVxQQ!?Cc9!5HZdyl`fzXhe%blP8KC z5z)B63raT5v1_fz#luAw>U1@-G@_P$Dom*LsVo?mmXe=6QxHG#a_S(5~oYRBeV6dJKWtI*E7;i9DN&foR;*LfwkbIEqp>3&Bn(9m`B>(uGCpy&9;c%Z)P z?X}`ND=NG9#{zX-gD8mwWOB7Hg}UR0e0u9^tgf);#RA$(Jrm1_^~C}aHo|$Mh4!pE zckUb}IRwGn{4=A+Xx?l%_rRvK#ohrEjbu3YGUxXIs+@VWii9v zsq2b=TJPg5ei_(3O@=n#dYyea=(U@Y%g^J??foK$u;mVnF=Y=xs4jSCwq^H6!ELEO zgOTfx2U_B0*ER&iJlhZ!JHeK-Ivy*4wP>DnO;}G^Mr(b{MEg181DLG86zVzAg3)*w znSWM1mf1sud$uvNMLXEJB?zkZy0e>^>2R;K*t_7>#>nzyy$G6OXfvda$Ne!syzPIu zc{9i4GQJG+Uj&fz*R$oAa`KS2(ZAccp{4 zg1^d%%D3HFDc{vjhkVyK-SS-YWoBX>c+ci8@7%EOX!v)UR!H zZr4c6xl1EW&RLDbo%=M>ECGPlIXNUQURM%tWDXk>-+ghp06pVP=H=P8Y} zJAbK>)y`jQWR3HTM%Fst5@dmU8aocX3e6a910pxila6K??jH0)C$EjXFA1}BhvAzS zWTqm6xzFsxd}A8!5Q}4G6mfKe78eBdv0`h6ATx&Z9K4u^cE90#mr~l<$boq<0DYpl}`$_`L6{z9ISvufw#~e-1Kx z1m56hi}wotkAnYP;D!M6Usc-zChZset$-2wVBltO9tbf1F@awf_-()_`OKe#A2pY$ zD0K;b$Yja42}}ztnXLI9fv*Z&9b}oULFSJLd=M}~p9|g`h|tplUlRBVU=yvyS`ndb zAufF@AjeSWg3gIXx){+9fX9E0*r_uWf<^<>K}ZLHHwbk^sCsG=YFwx&#f7>-s77iQ zsw~uUT24M}=k7)K1*jE?aLvM5Xp7Mw3VcN1368J-bKNa|@z+VV743?}j&H^qMT-W*&lle*EJTCa>&4<*< z1e~V3=`+*;TYu4^sV`uiHfX~}O?{1eke|I5Y3c<~7?B?J15g3_S|^viyUnk*!^Yu+ zmb~8oNl?c<>XV>?^iJ$*VXy5|!M7M8dUjF05dB0`p+2=6eetgzb-B6{l)`LXu@I)U znhH&*35>3bJ<3*7pn5&(7L`Y&cX-r$)eNXXO^Kg%G`@tIT0+@NsC^O_-M%_HpecIN zd>AL{_juH^pz7%nkNO8tJk}MhG8iTVZW5SWgim9DE7EX_@E60yrPKZuwU~in@$FF9v>Zup97?f_;FG26q^z;OBktjUzKF_^krp2l##3 zApE<9^AUj$0B)x!#zq5eqPXE0n=lHej3mub*`K8Kv<$FIpi4R6x8Zz~q&j-PFNyi& zr+}-Zbc^7Z({hv!31?K`+i4p(H`2I&gw`8R8YAR0K53-s6*X#PVe1*dxbcGVB)y-W zq8A0eB#;zyl=2zZ8|wsLFK|%cNr5SW3j%LdUB*V=18R%$6n#-RPlA*5y(sugz<2n_ z5S>PsG2}}Kz7F_XeS?74`cj6^Nc(ODJmq@;oCV*L25Y-heNVL+yN#<2AM)OhSq5vb zx(@Iw>H~n!sJp?d!+fK#Zo>#7%JcLxK%Sd}z+-@&>K64`^=;)};PJEg;Z;?ynwqN+ zXMUFQY*`bQ@_zU_Jobs}`e5IW*~|~y*lh!b;m_sNqITgOq{C{6rr42zgLbBzvvyN) zrZ`m?#|2UDzzY>q}Uw4Z~yzY>f?PIf9=Nad*7D|Ez~gjmYK){;XjLC<9i7D*&$Qn|8KiPVvD zp_I*A$)lFzB3x)YOgm`Veq8@ri0_SqCG1is%B5NrYtjoY4Z5zCpUBOQWlK4$CRkzb zLkBw9BKO0Eg+q2>GCNg9j=n*0zL+Y^URV#QoGGVE7ZwcJ#aYB+`gMvBnv9iCEpAN3 z$DwkrRCX3Q@1;;BFe8PM<=DkhBwRLaxin9i!=$$lCd-7v6w=lJ+gDm`sw1`Bp!HgA_*OdZp9W}lU_ zrZ6u+%=1J>A2^HRQ`Oq{nzA#EdiWqm!8kqaXw=wJH+#pT^t`iRYu%P?7qk3=nm#`oFpzC z=GDfFpErdTA$%A?$RaWpVzeKt4h?29$b__|1CGgW{GjE!SOaOaJmFTYjTEekJ(f9O z6{ev7h=n$$Elj`JJcqo5taNoerm?!w5Fm{f;U+?pu}&YF#DXO&77~S*-P&jbV>oAV zo-W}@_g%>0<*CN?GLy%hU4RDex*VpE$rL8Iqdeu;WMQXDR1wZw&d(ZyZoPhtrm>ZG zDM4i_0n6bn(JbgGvZ#R9p%gfl$Q;K}_5jKzMbZ+?hD1UnPeU$&munOtpOczdvO#ej z2Us51H24l>C=EIT%^9g>VG82l`TV(xSj5f}4jM^Y~K>cW@iD5%&5< zROkLLq9=4;Cs273Jnj?D4vsixVsNyYTFf}A>^L?^z}T@$Ekml+Bp)HYWkXXNk`fQ7XI0K3`>%N{tkIfSYm3(;X3TOqlFN2%4 z8on2GPKy^s1jMTL7p>J@!7b97I^m!0qJHS5W5e*6bC~m8=d^ASx3U(I1TH?brjDu{ z_dk!N1P*OAFXxbD(Ch2Kdjc=+Cjuu>n|!z?4_^fDN;nXZZ?{lW9tF?<2(i4;39uHrfKk~E)A~kNeZ&JH=!P8VU*kW znIKrt9IGcpHMZM${zLl#S)Z zeipF3X*Nv0)zN4)ws31(qcWB^Exb>yfv<}{zKDu8G@{+rf}m$DkT6tx+loemE8elV z;x)z^TB8CH_NftdISke6{s@8;L|vHuFn^mCKGN<*3J!-%TyaL*+gpQmO{bd5tE2ia z3S!~z)zOe)hTuCiqn$=HiU^a{tCB2O(hiEOUNK{J_TNAoM!mGbpQQI5E1mlPY6RlOW zvU=J~JoRwms+3clJ(hA3{k?to1!j|?4Sf^o-rjBfm-h6hw)ggIo#^ZD*|~jNx@Y^g z$xHhuGZUFDTQS9Pcl6PRLo3BGyWHX6T>y9&M=;+(TlOl|E*fg zBO1pcZ1}Xr$77P~FUv}1a>#W&=QdJeuVDW(fNw3OIScrI6@*{*7nb^=e~~);27D}n z7szw{^O)f1?7Iut{U?d`VtT7QFQ$oJt|TXzdwu+?a2pyuUL5~3L2hPvu z{Xc$9>#bDQU;Oebj~}p7;<0F-@Qz|*;y{nyxQt*?=j{kTxHktJL+OQw4iTU~_1}+y zqu?EHN%ThcLQS`bOfRu0K;7}eq~iv%loi#aj}_UJw@o#2NAYY+pCXb8?|)X zKQ6od+F^>fko@%W?@(3UN1@w+_L|NE&pub; z&lDdA{(HWUNgo}C4L(rn&1fwuZ(cXYW2^MdQl01b(E0tdL+T8o5BW%tM+W8OjP~p5 z{rIzA7}#?OWIu>STZ^iRv~R?a1pYrvOkYPLpDJW0Ew@xz zUBwzyB@$I-BN;5QxOZ9N5iepL310qpbsU_<4PA~eS#Y_VOcjeAmuL+or|gzS3X}G4 z=udx#)Prr;N|$l}H|x>hIJl01pH}9ulbylRKV`YUq1G)GtqD9eJ($wdW%l@hHDl!x zIflDBQtn7$#=g;VIuhmVU>cXe2;*cb=UQH)M9C$u<4wi&OP2UPa7i@?5E!_m(nBCP Xv;GUuUj2Vg?!tdo`~T Date: Sat, 28 Jun 2014 22:01:01 +0400 Subject: [PATCH 063/144] files to be translated https://github.com/HarpyWar/pvpgn/issues/13 --- conf/i18n/bnmotd-csCZ.txt | 14 + conf/i18n/bnmotd-deDE.txt | 11 + conf/i18n/bnmotd-enUS.txt | 13 + conf/i18n/bnmotd-esES.txt | 11 + conf/i18n/bnmotd-frFR.txt | 11 + conf/i18n/bnmotd-nlNL.txt | 11 + conf/i18n/bnmotd-plPL.txt | 11 + conf/i18n/bnmotd-ptBR.txt | 11 + conf/i18n/bnmotd-ruRU.txt | 11 + conf/i18n/bnmotd-zhCN.txt | 11 + conf/i18n/bnmotd-zhTW.txt | 10 + conf/i18n/chathelp-war3-csCZ.txt | 15 + conf/i18n/chathelp-war3-deDE.txt | 15 + conf/i18n/chathelp-war3-enUS.txt | 15 + conf/i18n/chathelp-war3-esES.txt | 15 + conf/i18n/chathelp-war3-frFR.txt | 15 + conf/i18n/chathelp-war3-itIT.txt | 15 + conf/i18n/chathelp-war3-jaJA.txt | 15 + conf/i18n/chathelp-war3-koKR.txt | 15 + conf/i18n/chathelp-war3-plPL.txt | 15 + conf/i18n/chathelp-war3-ruRU.txt | 15 + conf/i18n/chathelp-war3-zhCN.txt | 15 + conf/i18n/chathelp-war3-zhTW.txt | 15 + conf/i18n/common-csCZ.xml | 1819 +++++++++++++++++++++++++++++ conf/i18n/common-deDE.xml | 1819 +++++++++++++++++++++++++++++ conf/i18n/common-enUS.xml | 1819 +++++++++++++++++++++++++++++ conf/i18n/common-esES.xml | 1819 +++++++++++++++++++++++++++++ conf/i18n/common-frFR.xml | 1819 +++++++++++++++++++++++++++++ conf/i18n/common-itIT.xml | 1819 +++++++++++++++++++++++++++++ conf/i18n/common-jaJA.xml | 1819 +++++++++++++++++++++++++++++ conf/i18n/common-koKR.xml | 1819 +++++++++++++++++++++++++++++ conf/i18n/common-plPL.xml | 1819 +++++++++++++++++++++++++++++ conf/i18n/common-ruRU.xml | 1819 +++++++++++++++++++++++++++++ conf/i18n/common-zhCN.xml | 1819 +++++++++++++++++++++++++++++ conf/i18n/common-zhTW.xml | 1819 +++++++++++++++++++++++++++++ conf/i18n/newaccount-csCZ.txt | 21 + conf/i18n/newaccount-deDE.txt | 21 + conf/i18n/newaccount-enUS.txt | 21 + conf/i18n/newaccount-esES.txt | 21 + conf/i18n/newaccount-frFR.txt | 21 + conf/i18n/newaccount-itIT.txt | 21 + conf/i18n/newaccount-jaJA.txt | 21 + conf/i18n/newaccount-koKR.txt | 21 + conf/i18n/newaccount-plPL.txt | 21 + conf/i18n/newaccount-ruRU.txt | 21 + conf/i18n/newaccount-zhCN.txt | 21 + conf/i18n/newaccount-zhTW.txt | 21 + conf/i18n/termsofservice-csCZ.txt | 21 + conf/i18n/termsofservice-deDE.txt | 21 + conf/i18n/termsofservice-enUS.txt | 21 + conf/i18n/termsofservice-esES.txt | 21 + conf/i18n/termsofservice-frFR.txt | 21 + conf/i18n/termsofservice-itIT.txt | 21 + conf/i18n/termsofservice-jaJA.txt | 21 + conf/i18n/termsofservice-koKR.txt | 21 + conf/i18n/termsofservice-plPL.txt | 21 + conf/i18n/termsofservice-ruRU.txt | 21 + conf/i18n/termsofservice-zhCN.txt | 21 + conf/i18n/termsofservice-zhTW.txt | 21 + 59 files changed, 22637 insertions(+) create mode 100644 conf/i18n/bnmotd-csCZ.txt create mode 100644 conf/i18n/bnmotd-deDE.txt create mode 100644 conf/i18n/bnmotd-enUS.txt create mode 100644 conf/i18n/bnmotd-esES.txt create mode 100644 conf/i18n/bnmotd-frFR.txt create mode 100644 conf/i18n/bnmotd-nlNL.txt create mode 100644 conf/i18n/bnmotd-plPL.txt create mode 100644 conf/i18n/bnmotd-ptBR.txt create mode 100644 conf/i18n/bnmotd-ruRU.txt create mode 100644 conf/i18n/bnmotd-zhCN.txt create mode 100644 conf/i18n/bnmotd-zhTW.txt create mode 100644 conf/i18n/chathelp-war3-csCZ.txt create mode 100644 conf/i18n/chathelp-war3-deDE.txt create mode 100644 conf/i18n/chathelp-war3-enUS.txt create mode 100644 conf/i18n/chathelp-war3-esES.txt create mode 100644 conf/i18n/chathelp-war3-frFR.txt create mode 100644 conf/i18n/chathelp-war3-itIT.txt create mode 100644 conf/i18n/chathelp-war3-jaJA.txt create mode 100644 conf/i18n/chathelp-war3-koKR.txt create mode 100644 conf/i18n/chathelp-war3-plPL.txt create mode 100644 conf/i18n/chathelp-war3-ruRU.txt create mode 100644 conf/i18n/chathelp-war3-zhCN.txt create mode 100644 conf/i18n/chathelp-war3-zhTW.txt create mode 100644 conf/i18n/common-csCZ.xml create mode 100644 conf/i18n/common-deDE.xml create mode 100644 conf/i18n/common-enUS.xml create mode 100644 conf/i18n/common-esES.xml create mode 100644 conf/i18n/common-frFR.xml create mode 100644 conf/i18n/common-itIT.xml create mode 100644 conf/i18n/common-jaJA.xml create mode 100644 conf/i18n/common-koKR.xml create mode 100644 conf/i18n/common-plPL.xml create mode 100644 conf/i18n/common-ruRU.xml create mode 100644 conf/i18n/common-zhCN.xml create mode 100644 conf/i18n/common-zhTW.xml create mode 100644 conf/i18n/newaccount-csCZ.txt create mode 100644 conf/i18n/newaccount-deDE.txt create mode 100644 conf/i18n/newaccount-enUS.txt create mode 100644 conf/i18n/newaccount-esES.txt create mode 100644 conf/i18n/newaccount-frFR.txt create mode 100644 conf/i18n/newaccount-itIT.txt create mode 100644 conf/i18n/newaccount-jaJA.txt create mode 100644 conf/i18n/newaccount-koKR.txt create mode 100644 conf/i18n/newaccount-plPL.txt create mode 100644 conf/i18n/newaccount-ruRU.txt create mode 100644 conf/i18n/newaccount-zhCN.txt create mode 100644 conf/i18n/newaccount-zhTW.txt create mode 100644 conf/i18n/termsofservice-csCZ.txt create mode 100644 conf/i18n/termsofservice-deDE.txt create mode 100644 conf/i18n/termsofservice-enUS.txt create mode 100644 conf/i18n/termsofservice-esES.txt create mode 100644 conf/i18n/termsofservice-frFR.txt create mode 100644 conf/i18n/termsofservice-itIT.txt create mode 100644 conf/i18n/termsofservice-jaJA.txt create mode 100644 conf/i18n/termsofservice-koKR.txt create mode 100644 conf/i18n/termsofservice-plPL.txt create mode 100644 conf/i18n/termsofservice-ruRU.txt create mode 100644 conf/i18n/termsofservice-zhCN.txt create mode 100644 conf/i18n/termsofservice-zhTW.txt diff --git a/conf/i18n/bnmotd-csCZ.txt b/conf/i18n/bnmotd-csCZ.txt new file mode 100644 index 000000000..64658c7c3 --- /dev/null +++ b/conf/i18n/bnmotd-csCZ.txt @@ -0,0 +1,14 @@ +%IAhoj %l, +%IVitej na serveru %s, verze %v. +%I +%I +%IMomentalne je zde registrovanych %a uzivatelu, z toho je %u online, hrajicich %g hry. +%I +%I%N si muzes zahrat s %U hraci, v %G prave probihajicich hrach nebo si muzes pokecat v %c chatech. +%I +%I +%INevis si rady ? Napis /help pro napovedu. +%I +%I +%ITvoje IP adresa: %r, tvoje ID %i a tvuj klient %t. +%ICZ MOTD by Machy_CZ diff --git a/conf/i18n/bnmotd-deDE.txt b/conf/i18n/bnmotd-deDE.txt new file mode 100644 index 000000000..f34beb1b4 --- /dev/null +++ b/conf/i18n/bnmotd-deDE.txt @@ -0,0 +1,11 @@ +%IHallo %l, willkommen zu %s! +%ILaufende Version %v auf %h. +%IDer Server ist von %H gehostet +%I +%IEs sind %a Benutzerprofile auf dem server. +%IAktuell sind %U Spieler in %G Spielen von %N, +%Iund %u Spieler spielen %g Spiele und chatten in %c Channels. +%IEin Problem mit den Kommandos? Schreibe /help und +%Ilerne mehr über die Kommandos. +%I +%I%m diff --git a/conf/i18n/bnmotd-enUS.txt b/conf/i18n/bnmotd-enUS.txt new file mode 100644 index 000000000..a9ad2b36a --- /dev/null +++ b/conf/i18n/bnmotd-enUS.txt @@ -0,0 +1,13 @@ +%Eпривет %l, welcome to %s! +%IRunning version %v on %h. +%IThis server is hosted by %H +%I +%IThere are %a user accounts on this server. +%IThere are currently %U users in %G games of %N, +%Iand %u users playing %g games and chatting in %c channels. +%IHaving trouble with a command? Type /help to +%Ilearn more about it. +%I +%I(edit this text in conf/bnmotd-enUS.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-esES.txt b/conf/i18n/bnmotd-esES.txt new file mode 100644 index 000000000..193fd0d9e --- /dev/null +++ b/conf/i18n/bnmotd-esES.txt @@ -0,0 +1,11 @@ +%IHola %l, bienvenido a %s! +%IEn %h se usa la versión %v +%IEste servidor es alojado por %H +%I +%IEn este servidor hay %a cuentas registradas. +%IActualmente hay %U usuarios en %G partidas de %N, +%Iy %u usuarios jugando %g partidas y conversando en %c salas. +%ITiene problemas con algun comando? Teclee "/help" para +%Iaprender más sobre los comandos. +%I +%I%m diff --git a/conf/i18n/bnmotd-frFR.txt b/conf/i18n/bnmotd-frFR.txt new file mode 100644 index 000000000..e54325740 --- /dev/null +++ b/conf/i18n/bnmotd-frFR.txt @@ -0,0 +1,11 @@ +%IBonjour %l, bienvenue sur %s! +%IUtilisant la version %v sur %h. +%ICe serveur est hébergé par %H +%I +%IIl y à %a comptes utilisateur sur ce serveur. +%IIl y à en ce moment %U ultilisateurs dans %G parties de %N, +%Iainsi que %u utilisateurs jouant dans %g parties et discutant dans %c canaux. +%IUn problème avec une commande ? Tappez /help pour +%Ien savoir plus. +%I +%I%m diff --git a/conf/i18n/bnmotd-nlNL.txt b/conf/i18n/bnmotd-nlNL.txt new file mode 100644 index 000000000..f061481c6 --- /dev/null +++ b/conf/i18n/bnmotd-nlNL.txt @@ -0,0 +1,11 @@ +%IHallo %l, welom bij %s! +%IWe draaien versie %v op %h. +%IDeze server wordt gehost bij %H +%I +%IEr zijn %a gebruikers accounts op deze server. +%IEr zijn momenteel %U gebruikers in %G games van %N, +%Ien %u gebruikers spelen %g spellen en chatten in %c channels. +%IProblemen met een commando? Type /help om +%Ier meer te weten over te komen. +%I +%I%m diff --git a/conf/i18n/bnmotd-plPL.txt b/conf/i18n/bnmotd-plPL.txt new file mode 100644 index 000000000..71d3da62e --- /dev/null +++ b/conf/i18n/bnmotd-plPL.txt @@ -0,0 +1,11 @@ +%ICześć %l, witaj w %s! +%IWersja serwera %v uruchomiona na %h. +%ISerwer obsługuje %H +%I +%IDo tej pory zarejestrowaliśmy %a kont. +%IAktualnie jest %U użytkowników zalogowanych, w %G grach, z pośród %N, +%I%u użytkowników gra w %g gier, i rozmawia na %c kanałach. +%IJeśli masz jakieś problemy z poleceniami, to napiszsz /help aby +%Idowiedzieć się wiecej. +%I +%I%m diff --git a/conf/i18n/bnmotd-ptBR.txt b/conf/i18n/bnmotd-ptBR.txt new file mode 100644 index 000000000..4a8b6c267 --- /dev/null +++ b/conf/i18n/bnmotd-ptBR.txt @@ -0,0 +1,11 @@ +%IOlá %l, Bem vindo a %s! +%IRodando a versão %v em %h. +%IEste servidor é hosteado por %H +%I +%IExistem %a contas criadas nesse servidor. +%IAtuamente existe %U usuarios %G jogos de %N, +%IE %u usuários jogando %g jogos e conversando em %c canais. +%ITendo algum problema com comando? Digite /help ra +%Aprender mais sobre. +%I +%I%m diff --git a/conf/i18n/bnmotd-ruRU.txt b/conf/i18n/bnmotd-ruRU.txt new file mode 100644 index 000000000..d10b83c15 --- /dev/null +++ b/conf/i18n/bnmotd-ruRU.txt @@ -0,0 +1,11 @@ +%EПривет %l, добро пожаловать на %s! +%IВерсия сервера %v. +%IСервер расположен у %H (%h) +%I +%IНа сервере зарегистрировано %a аккаунтов. +%IСейчас %G игр и %U игроков в %N +%Iиз них %u находятся в %g играх и общаются на %c каналах. +%I +%IВведите /help для получения помощи по командам чата +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-zhCN.txt b/conf/i18n/bnmotd-zhCN.txt new file mode 100644 index 000000000..4d21275c2 --- /dev/null +++ b/conf/i18n/bnmotd-zhCN.txt @@ -0,0 +1,11 @@ +%I%l,你好。欢迎来到 %s! +%I现在 %h 正在运行的版本为 %v +%I本服务器由 %H 管理维护 +%I +%I本服务器现在有 %a 个用户账号 +%I当前有 %U 人登陆到 %G 个 %N 游戏中 +%I有 %u 人在玩 %g 个游戏,以及在 %c 个频道中聊天 +%I还不了解可以使用哪些命令? +%I输入 /help 就可以学习了 +%I +%I%m diff --git a/conf/i18n/bnmotd-zhTW.txt b/conf/i18n/bnmotd-zhTW.txt new file mode 100644 index 000000000..d5de5764a --- /dev/null +++ b/conf/i18n/bnmotd-zhTW.txt @@ -0,0 +1,10 @@ +%I哈囉! %l, 歡迎蒞臨 %s! +%I本伺服器由 %H 架設於 %h. +%I現行的伺服器版本是 %v. +%I +%I本伺服器已有 %a 個使用者帳號. +%I共有 %U 個玩家在玩 %N 的 %G 個遊戲, +%I其中有 %u 個玩家一邊在玩 %g 個遊戲一邊在 %c 個聊天頻道. +%I不懂使用指令? 請輸入 /help 來了解更多... +%I +%I%m diff --git a/conf/i18n/chathelp-war3-csCZ.txt b/conf/i18n/chathelp-war3-csCZ.txt new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/chathelp-war3-csCZ.txt @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-deDE.txt b/conf/i18n/chathelp-war3-deDE.txt new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/chathelp-war3-deDE.txt @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-enUS.txt b/conf/i18n/chathelp-war3-enUS.txt new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/chathelp-war3-enUS.txt @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-esES.txt b/conf/i18n/chathelp-war3-esES.txt new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/chathelp-war3-esES.txt @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-frFR.txt b/conf/i18n/chathelp-war3-frFR.txt new file mode 100644 index 000000000..07fde45bd --- /dev/null +++ b/conf/i18n/chathelp-war3-frFR.txt @@ -0,0 +1,15 @@ +Commandes d'aides du salon de discussions de PvPGN(serveur Emulateur Bnet) + +Nouvelles commandes: + +utiliser /f pour afficher la liste d'amis +utiliser /users pour voir les utilisateur en ligne +utiliser /w ou /msg pour chuchoter a une personne +utiliser /join pour joindre un canal de discussions + +Pour les oprateurs du canal: + +utiliser /ban banni l'utilisateur du canal de discussions +utiliser /kick pour sortir un utilisateur du canal de discussions + +pour une aide plus dtaill taper: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-itIT.txt b/conf/i18n/chathelp-war3-itIT.txt new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/chathelp-war3-itIT.txt @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-jaJA.txt b/conf/i18n/chathelp-war3-jaJA.txt new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/chathelp-war3-jaJA.txt @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-koKR.txt b/conf/i18n/chathelp-war3-koKR.txt new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/chathelp-war3-koKR.txt @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-plPL.txt b/conf/i18n/chathelp-war3-plPL.txt new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/chathelp-war3-plPL.txt @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-ruRU.txt b/conf/i18n/chathelp-war3-ruRU.txt new file mode 100644 index 000000000..53dff7bae --- /dev/null +++ b/conf/i18n/chathelp-war3-ruRU.txt @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +Новые команды: + +наберите /f help для вызова справки списке друзей +наберите /users для просмотра пользоватей в онлайне +наберите /w или /msg <имяпользователя> для личного сообщения +наберите /join <канал> для присоединения к каналу + +Для операторов каналов: + +наберите /ban <имяпользователя> чтобы забанить игрока на данном канале +наберите /kick <имяпользователя> чтобы выкинуть пользователя с этого канала + +Для дальнейшей помощи наберите: /help diff --git a/conf/i18n/chathelp-war3-zhCN.txt b/conf/i18n/chathelp-war3-zhCN.txt new file mode 100644 index 000000000..197ddc02f --- /dev/null +++ b/conf/i18n/chathelp-war3-zhCN.txt @@ -0,0 +1,15 @@ +PvPGN模拟战网聊天命令帮助 + +新命令: + +使用 /f help 显示朋友命令帮助 +使用 /users 显示在线玩家数 +使用 /w 或者 /msg <玩家名称> 发送消息给玩家 +使用 /join <频道> 加入指定的频道 + +频道管理员: + +使用 /ban <玩家名称> 把玩家从该频道中踢出,并禁止玩家再次进入此频道 +使用 /kick <玩家名称> 把玩家从该频道中踢出 + +更多的帮助:输入/help diff --git a/conf/i18n/chathelp-war3-zhTW.txt b/conf/i18n/chathelp-war3-zhTW.txt new file mode 100644 index 000000000..197ddc02f --- /dev/null +++ b/conf/i18n/chathelp-war3-zhTW.txt @@ -0,0 +1,15 @@ +PvPGN模拟战网聊天命令帮助 + +新命令: + +使用 /f help 显示朋友命令帮助 +使用 /users 显示在线玩家数 +使用 /w 或者 /msg <玩家名称> 发送消息给玩家 +使用 /join <频道> 加入指定的频道 + +频道管理员: + +使用 /ban <玩家名称> 把玩家从该频道中踢出,并禁止玩家再次进入此频道 +使用 /kick <玩家名称> 把玩家从该频道中踢出 + +更多的帮助:输入/help diff --git a/conf/i18n/common-csCZ.xml b/conf/i18n/common-csCZ.xml new file mode 100644 index 000000000..44380df2a --- /dev/null +++ b/conf/i18n/common-csCZ.xml @@ -0,0 +1,1819 @@ + + + + Czech + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This account has been locked + + + + This account has been locked + + + + This command is reserved for admins. + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/common-deDE.xml b/conf/i18n/common-deDE.xml new file mode 100644 index 000000000..247ecec3c --- /dev/null +++ b/conf/i18n/common-deDE.xml @@ -0,0 +1,1819 @@ + + + + German + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This account has been locked + + + + This account has been locked + + + + This command is reserved for admins. + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/common-enUS.xml b/conf/i18n/common-enUS.xml new file mode 100644 index 000000000..e601272f4 --- /dev/null +++ b/conf/i18n/common-enUS.xml @@ -0,0 +1,1819 @@ + + + + English + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This account has been locked + + + + This account has been locked + + + + This command is reserved for admins. + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/common-esES.xml b/conf/i18n/common-esES.xml new file mode 100644 index 000000000..6ccf66db0 --- /dev/null +++ b/conf/i18n/common-esES.xml @@ -0,0 +1,1819 @@ + + + + Spanish + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This account has been locked + + + + This account has been locked + + + + This command is reserved for admins. + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/common-frFR.xml b/conf/i18n/common-frFR.xml new file mode 100644 index 000000000..7f969d83f --- /dev/null +++ b/conf/i18n/common-frFR.xml @@ -0,0 +1,1819 @@ + + + + French + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This account has been locked + + + + This account has been locked + + + + This command is reserved for admins. + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/common-itIT.xml b/conf/i18n/common-itIT.xml new file mode 100644 index 000000000..d0d3061b2 --- /dev/null +++ b/conf/i18n/common-itIT.xml @@ -0,0 +1,1819 @@ + + + + Italy + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This account has been locked + + + + This account has been locked + + + + This command is reserved for admins. + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/common-jaJA.xml b/conf/i18n/common-jaJA.xml new file mode 100644 index 000000000..1b0311274 --- /dev/null +++ b/conf/i18n/common-jaJA.xml @@ -0,0 +1,1819 @@ + + + + Japanese + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This account has been locked + + + + This account has been locked + + + + This command is reserved for admins. + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/common-koKR.xml b/conf/i18n/common-koKR.xml new file mode 100644 index 000000000..a3cb100d5 --- /dev/null +++ b/conf/i18n/common-koKR.xml @@ -0,0 +1,1819 @@ + + + + Korean + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This account has been locked + + + + This account has been locked + + + + This command is reserved for admins. + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/common-plPL.xml b/conf/i18n/common-plPL.xml new file mode 100644 index 000000000..fc788e606 --- /dev/null +++ b/conf/i18n/common-plPL.xml @@ -0,0 +1,1819 @@ + + + + Polish + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This account has been locked + + + + This account has been locked + + + + This command is reserved for admins. + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/common-ruRU.xml b/conf/i18n/common-ruRU.xml new file mode 100644 index 000000000..91c043fb0 --- /dev/null +++ b/conf/i18n/common-ruRU.xml @@ -0,0 +1,1819 @@ + + + + Russian + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This account has been locked + + + + This account has been locked + + + + This command is reserved for admins. + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/common-zhCN.xml b/conf/i18n/common-zhCN.xml new file mode 100644 index 000000000..e0692d83d --- /dev/null +++ b/conf/i18n/common-zhCN.xml @@ -0,0 +1,1819 @@ + + + + Chinese Simple + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This account has been locked + + + + This account has been locked + + + + This command is reserved for admins. + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/common-zhTW.xml b/conf/i18n/common-zhTW.xml new file mode 100644 index 000000000..6f9a583fd --- /dev/null +++ b/conf/i18n/common-zhTW.xml @@ -0,0 +1,1819 @@ + + + + Chinese Traditional + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This account has been locked + + + + This account has been locked + + + + This command is reserved for admins. + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/newaccount-csCZ.txt b/conf/i18n/newaccount-csCZ.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/newaccount-csCZ.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-deDE.txt b/conf/i18n/newaccount-deDE.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/newaccount-deDE.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-enUS.txt b/conf/i18n/newaccount-enUS.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/newaccount-enUS.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-esES.txt b/conf/i18n/newaccount-esES.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/newaccount-esES.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-frFR.txt b/conf/i18n/newaccount-frFR.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/newaccount-frFR.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-itIT.txt b/conf/i18n/newaccount-itIT.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/newaccount-itIT.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-jaJA.txt b/conf/i18n/newaccount-jaJA.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/newaccount-jaJA.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-koKR.txt b/conf/i18n/newaccount-koKR.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/newaccount-koKR.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-plPL.txt b/conf/i18n/newaccount-plPL.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/newaccount-plPL.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-ruRU.txt b/conf/i18n/newaccount-ruRU.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/newaccount-ruRU.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-zhCN.txt b/conf/i18n/newaccount-zhCN.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/newaccount-zhCN.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-zhTW.txt b/conf/i18n/newaccount-zhTW.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/newaccount-zhTW.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-csCZ.txt b/conf/i18n/termsofservice-csCZ.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice-csCZ.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-deDE.txt b/conf/i18n/termsofservice-deDE.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice-deDE.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-enUS.txt b/conf/i18n/termsofservice-enUS.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice-enUS.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-esES.txt b/conf/i18n/termsofservice-esES.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice-esES.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-frFR.txt b/conf/i18n/termsofservice-frFR.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice-frFR.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-itIT.txt b/conf/i18n/termsofservice-itIT.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice-itIT.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-jaJA.txt b/conf/i18n/termsofservice-jaJA.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice-jaJA.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-koKR.txt b/conf/i18n/termsofservice-koKR.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice-koKR.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-plPL.txt b/conf/i18n/termsofservice-plPL.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice-plPL.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-ruRU.txt b/conf/i18n/termsofservice-ruRU.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice-ruRU.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-zhCN.txt b/conf/i18n/termsofservice-zhCN.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice-zhCN.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-zhTW.txt b/conf/i18n/termsofservice-zhTW.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice-zhTW.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ From 06bbc58c4dc2ffbd99158c918c14505f983eb945 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 28 Jun 2014 23:17:59 +0400 Subject: [PATCH 064/144] keep Lua translations at the end of xml, remove enUS because it is already defined in code --- conf/i18n/common-csCZ.xml | 194 +- conf/i18n/common-deDE.xml | 194 +- conf/i18n/common-enUS.xml | 1819 ----------------- conf/i18n/common-esES.xml | 194 +- conf/i18n/common-frFR.xml | 80 +- conf/i18n/common-itIT.xml | 80 +- conf/i18n/common-jaJA.xml | 80 +- conf/i18n/common-koKR.xml | 80 +- conf/i18n/common-plPL.xml | 80 +- conf/i18n/common-ruRU.xml | 196 +- conf/i18n/common-zhCN.xml | 80 +- conf/i18n/common-zhTW.xml | 80 +- scripts/localize/pvpgn_localize_generator.cs | 130 +- scripts/localize/pvpgn_localize_generator.exe | Bin 12288 -> 12800 bytes 14 files changed, 764 insertions(+), 2523 deletions(-) delete mode 100644 conf/i18n/common-enUS.xml diff --git a/conf/i18n/common-csCZ.xml b/conf/i18n/common-csCZ.xml index 44380df2a..0fa30051a 100644 --- a/conf/i18n/common-csCZ.xml +++ b/conf/i18n/common-csCZ.xml @@ -109,7 +109,7 @@ for {} - + Announcement from {}: {} @@ -129,7 +129,7 @@ There's no account with username {}. - + {} is already a Channel Admin @@ -153,7 +153,7 @@ This command can only be used inside a channel. - + You have to be at least a Channel Operator to use this command. @@ -209,7 +209,7 @@ Maximum password length allowed is {} - + Trying to change password for account "{}" to "{}" @@ -317,11 +317,11 @@ Invalid user. - + Invalid user. - + {}'s command group(s): {} @@ -377,15 +377,15 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. - + You must be at least a Channel Admin to demote another Channel Admin @@ -429,15 +429,15 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator to use this command. - + There's no account with username {}. - + {} has been removed from VOP list. @@ -481,7 +481,7 @@ Invalid user. - + Login: {} {} Sex: {} @@ -661,11 +661,11 @@ none - + unknown - + Owner: {} @@ -685,7 +685,7 @@ Created: {} - + Started: {} @@ -785,7 +785,7 @@ This command can only be used inside a channel. - + You have to be at least a Channel Operator or tempOP to use this command. @@ -833,7 +833,7 @@ Connection closed by admin. - + Copied current scores to active scores on all ladders. @@ -841,7 +841,7 @@ This game does not support win/loss records. - + You must supply a rank and a valid program ID. @@ -853,7 +853,7 @@ Invalid user. - + Account {} is now locked @@ -865,7 +865,7 @@ This command can only be used inside a channel. - + Banned users: @@ -877,11 +877,11 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator to use this command. - + Unable to change channel flags. @@ -905,7 +905,7 @@ Invalid user. - + Account {} is now muted @@ -917,7 +917,7 @@ That user is not logged on. - + Address information for other users is only available to admins. @@ -957,7 +957,7 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator or tempOP to use this command. @@ -965,7 +965,7 @@ There's no account with username {}. - + {} is already a Channel Operator @@ -997,11 +997,11 @@ You must supply a username. - + There's no account with username {}. - + {} is already a Server Operator @@ -1037,7 +1037,7 @@ Invalid user. - + Connection closed. @@ -1073,7 +1073,7 @@ You are not in a channel. - + No one messaged you, use /m instead @@ -1085,7 +1085,7 @@ That user is not logged on. - + Banning {} who is using IP address {} @@ -1113,7 +1113,7 @@ Invalid user. - + Current value of {} is "{}" @@ -1317,7 +1317,7 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator or tmpOP to use this command. @@ -1325,7 +1325,7 @@ There's no account with username {}. - + {} has already tmpOP in this channel @@ -1333,11 +1333,11 @@ {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to tmpOP in this channel @@ -1345,11 +1345,11 @@ {} has promoted you to a tempOP in this channel - + This command can only be used inside a channel. - + Max topic length exceeded (max {} symbols) @@ -1369,7 +1369,7 @@ This command can only be used inside a channel. - + You are not a channel operator. @@ -1385,7 +1385,7 @@ Invalid user. - + Your account has just been unlocked by {} @@ -1397,7 +1397,7 @@ Invalid user. - + Your account has just been unmuted by {} @@ -1409,7 +1409,7 @@ No such user. - + User was not being ignored. @@ -1421,7 +1421,7 @@ That user does not exist. - + Removal from watch list failed. @@ -1433,7 +1433,7 @@ Removal from watch list failed. - + All {} users removed from your watch list. @@ -1449,7 +1449,7 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator to use this command. @@ -1457,7 +1457,7 @@ There's no account with username {}. - + {} is already on VOP list, no need to Voice him @@ -1485,15 +1485,15 @@ This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. - + {} is already on VOP list @@ -1509,7 +1509,7 @@ That user does not exist. - + Add to watch list failed. @@ -1521,7 +1521,7 @@ Add to watch list failed. - + All {} users added to your watch list. @@ -1561,11 +1561,11 @@ Reset {}'s {} stats - + Reset {}'s {} stats - + You cannot kick administrators. @@ -1605,7 +1605,7 @@ Hash is: {} - + Your account has been muted, you can't whisper to other users. @@ -1683,53 +1683,13 @@ Unknown command. - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - This account has been locked This account has been locked - - - - This command is reserved for admins. - + Oops ! There is a problem with the help file. Please contact the administrator of the server. @@ -1737,7 +1697,7 @@ This command can only be used inside a channel. - + This command can only be used from the game. @@ -1811,6 +1771,46 @@ There was an error completing your request! + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + User "{}" is offline diff --git a/conf/i18n/common-deDE.xml b/conf/i18n/common-deDE.xml index 247ecec3c..2ab0e831d 100644 --- a/conf/i18n/common-deDE.xml +++ b/conf/i18n/common-deDE.xml @@ -109,7 +109,7 @@ for {} - + Announcement from {}: {} @@ -129,7 +129,7 @@ There's no account with username {}. - + {} is already a Channel Admin @@ -153,7 +153,7 @@ This command can only be used inside a channel. - + You have to be at least a Channel Operator to use this command. @@ -209,7 +209,7 @@ Maximum password length allowed is {} - + Trying to change password for account "{}" to "{}" @@ -317,11 +317,11 @@ Invalid user. - + Invalid user. - + {}'s command group(s): {} @@ -377,15 +377,15 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. - + You must be at least a Channel Admin to demote another Channel Admin @@ -429,15 +429,15 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator to use this command. - + There's no account with username {}. - + {} has been removed from VOP list. @@ -481,7 +481,7 @@ Invalid user. - + Login: {} {} Sex: {} @@ -661,11 +661,11 @@ none - + unknown - + Owner: {} @@ -685,7 +685,7 @@ Created: {} - + Started: {} @@ -785,7 +785,7 @@ This command can only be used inside a channel. - + You have to be at least a Channel Operator or tempOP to use this command. @@ -833,7 +833,7 @@ Connection closed by admin. - + Copied current scores to active scores on all ladders. @@ -841,7 +841,7 @@ This game does not support win/loss records. - + You must supply a rank and a valid program ID. @@ -853,7 +853,7 @@ Invalid user. - + Account {} is now locked @@ -865,7 +865,7 @@ This command can only be used inside a channel. - + Banned users: @@ -877,11 +877,11 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator to use this command. - + Unable to change channel flags. @@ -905,7 +905,7 @@ Invalid user. - + Account {} is now muted @@ -917,7 +917,7 @@ That user is not logged on. - + Address information for other users is only available to admins. @@ -957,7 +957,7 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator or tempOP to use this command. @@ -965,7 +965,7 @@ There's no account with username {}. - + {} is already a Channel Operator @@ -997,11 +997,11 @@ You must supply a username. - + There's no account with username {}. - + {} is already a Server Operator @@ -1037,7 +1037,7 @@ Invalid user. - + Connection closed. @@ -1073,7 +1073,7 @@ You are not in a channel. - + No one messaged you, use /m instead @@ -1085,7 +1085,7 @@ That user is not logged on. - + Banning {} who is using IP address {} @@ -1113,7 +1113,7 @@ Invalid user. - + Current value of {} is "{}" @@ -1317,7 +1317,7 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator or tmpOP to use this command. @@ -1325,7 +1325,7 @@ There's no account with username {}. - + {} has already tmpOP in this channel @@ -1333,11 +1333,11 @@ {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to tmpOP in this channel @@ -1345,11 +1345,11 @@ {} has promoted you to a tempOP in this channel - + This command can only be used inside a channel. - + Max topic length exceeded (max {} symbols) @@ -1369,7 +1369,7 @@ This command can only be used inside a channel. - + You are not a channel operator. @@ -1385,7 +1385,7 @@ Invalid user. - + Your account has just been unlocked by {} @@ -1397,7 +1397,7 @@ Invalid user. - + Your account has just been unmuted by {} @@ -1409,7 +1409,7 @@ No such user. - + User was not being ignored. @@ -1421,7 +1421,7 @@ That user does not exist. - + Removal from watch list failed. @@ -1433,7 +1433,7 @@ Removal from watch list failed. - + All {} users removed from your watch list. @@ -1449,7 +1449,7 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator to use this command. @@ -1457,7 +1457,7 @@ There's no account with username {}. - + {} is already on VOP list, no need to Voice him @@ -1485,15 +1485,15 @@ This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. - + {} is already on VOP list @@ -1509,7 +1509,7 @@ That user does not exist. - + Add to watch list failed. @@ -1521,7 +1521,7 @@ Add to watch list failed. - + All {} users added to your watch list. @@ -1561,11 +1561,11 @@ Reset {}'s {} stats - + Reset {}'s {} stats - + You cannot kick administrators. @@ -1605,7 +1605,7 @@ Hash is: {} - + Your account has been muted, you can't whisper to other users. @@ -1683,53 +1683,13 @@ Unknown command. - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - This account has been locked This account has been locked - - - - This command is reserved for admins. - + Oops ! There is a problem with the help file. Please contact the administrator of the server. @@ -1737,7 +1697,7 @@ This command can only be used inside a channel. - + This command can only be used from the game. @@ -1811,6 +1771,46 @@ There was an error completing your request! + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + User "{}" is offline diff --git a/conf/i18n/common-enUS.xml b/conf/i18n/common-enUS.xml deleted file mode 100644 index e601272f4..000000000 --- a/conf/i18n/common-enUS.xml +++ /dev/null @@ -1,1819 +0,0 @@ - - - - English - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This account has been locked - - - - This account has been locked - - - - This command is reserved for admins. - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/common-esES.xml b/conf/i18n/common-esES.xml index 6ccf66db0..dc4b65a75 100644 --- a/conf/i18n/common-esES.xml +++ b/conf/i18n/common-esES.xml @@ -109,7 +109,7 @@ for {} - + Announcement from {}: {} @@ -129,7 +129,7 @@ There's no account with username {}. - + {} is already a Channel Admin @@ -153,7 +153,7 @@ This command can only be used inside a channel. - + You have to be at least a Channel Operator to use this command. @@ -209,7 +209,7 @@ Maximum password length allowed is {} - + Trying to change password for account "{}" to "{}" @@ -317,11 +317,11 @@ Invalid user. - + Invalid user. - + {}'s command group(s): {} @@ -377,15 +377,15 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. - + You must be at least a Channel Admin to demote another Channel Admin @@ -429,15 +429,15 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator to use this command. - + There's no account with username {}. - + {} has been removed from VOP list. @@ -481,7 +481,7 @@ Invalid user. - + Login: {} {} Sex: {} @@ -661,11 +661,11 @@ none - + unknown - + Owner: {} @@ -685,7 +685,7 @@ Created: {} - + Started: {} @@ -785,7 +785,7 @@ This command can only be used inside a channel. - + You have to be at least a Channel Operator or tempOP to use this command. @@ -833,7 +833,7 @@ Connection closed by admin. - + Copied current scores to active scores on all ladders. @@ -841,7 +841,7 @@ This game does not support win/loss records. - + You must supply a rank and a valid program ID. @@ -853,7 +853,7 @@ Invalid user. - + Account {} is now locked @@ -865,7 +865,7 @@ This command can only be used inside a channel. - + Banned users: @@ -877,11 +877,11 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator to use this command. - + Unable to change channel flags. @@ -905,7 +905,7 @@ Invalid user. - + Account {} is now muted @@ -917,7 +917,7 @@ That user is not logged on. - + Address information for other users is only available to admins. @@ -957,7 +957,7 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator or tempOP to use this command. @@ -965,7 +965,7 @@ There's no account with username {}. - + {} is already a Channel Operator @@ -997,11 +997,11 @@ You must supply a username. - + There's no account with username {}. - + {} is already a Server Operator @@ -1037,7 +1037,7 @@ Invalid user. - + Connection closed. @@ -1073,7 +1073,7 @@ You are not in a channel. - + No one messaged you, use /m instead @@ -1085,7 +1085,7 @@ That user is not logged on. - + Banning {} who is using IP address {} @@ -1113,7 +1113,7 @@ Invalid user. - + Current value of {} is "{}" @@ -1317,7 +1317,7 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator or tmpOP to use this command. @@ -1325,7 +1325,7 @@ There's no account with username {}. - + {} has already tmpOP in this channel @@ -1333,11 +1333,11 @@ {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to tmpOP in this channel @@ -1345,11 +1345,11 @@ {} has promoted you to a tempOP in this channel - + This command can only be used inside a channel. - + Max topic length exceeded (max {} symbols) @@ -1369,7 +1369,7 @@ This command can only be used inside a channel. - + You are not a channel operator. @@ -1385,7 +1385,7 @@ Invalid user. - + Your account has just been unlocked by {} @@ -1397,7 +1397,7 @@ Invalid user. - + Your account has just been unmuted by {} @@ -1409,7 +1409,7 @@ No such user. - + User was not being ignored. @@ -1421,7 +1421,7 @@ That user does not exist. - + Removal from watch list failed. @@ -1433,7 +1433,7 @@ Removal from watch list failed. - + All {} users removed from your watch list. @@ -1449,7 +1449,7 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator to use this command. @@ -1457,7 +1457,7 @@ There's no account with username {}. - + {} is already on VOP list, no need to Voice him @@ -1485,15 +1485,15 @@ This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. - + {} is already on VOP list @@ -1509,7 +1509,7 @@ That user does not exist. - + Add to watch list failed. @@ -1521,7 +1521,7 @@ Add to watch list failed. - + All {} users added to your watch list. @@ -1561,11 +1561,11 @@ Reset {}'s {} stats - + Reset {}'s {} stats - + You cannot kick administrators. @@ -1605,7 +1605,7 @@ Hash is: {} - + Your account has been muted, you can't whisper to other users. @@ -1683,53 +1683,13 @@ Unknown command. - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - This account has been locked This account has been locked - - - - This command is reserved for admins. - + Oops ! There is a problem with the help file. Please contact the administrator of the server. @@ -1737,7 +1697,7 @@ This command can only be used inside a channel. - + This command can only be used from the game. @@ -1811,6 +1771,46 @@ There was an error completing your request! + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + User "{}" is offline diff --git a/conf/i18n/common-frFR.xml b/conf/i18n/common-frFR.xml index 7f969d83f..b2c2bff5c 100644 --- a/conf/i18n/common-frFR.xml +++ b/conf/i18n/common-frFR.xml @@ -1683,42 +1683,6 @@ Unknown command. - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - This account has been locked @@ -1727,10 +1691,6 @@ This account has been locked - - This command is reserved for admins. - - Oops ! There is a problem with the help file. Please contact the administrator of the server. @@ -1811,6 +1771,46 @@ There was an error completing your request! + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + User "{}" is offline diff --git a/conf/i18n/common-itIT.xml b/conf/i18n/common-itIT.xml index d0d3061b2..b6d42ad4a 100644 --- a/conf/i18n/common-itIT.xml +++ b/conf/i18n/common-itIT.xml @@ -1683,42 +1683,6 @@ Unknown command. - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - This account has been locked @@ -1727,10 +1691,6 @@ This account has been locked - - This command is reserved for admins. - - Oops ! There is a problem with the help file. Please contact the administrator of the server. @@ -1811,6 +1771,46 @@ There was an error completing your request! + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + User "{}" is offline diff --git a/conf/i18n/common-jaJA.xml b/conf/i18n/common-jaJA.xml index 1b0311274..f4ba62c29 100644 --- a/conf/i18n/common-jaJA.xml +++ b/conf/i18n/common-jaJA.xml @@ -1683,42 +1683,6 @@ Unknown command. - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - This account has been locked @@ -1727,10 +1691,6 @@ This account has been locked - - This command is reserved for admins. - - Oops ! There is a problem with the help file. Please contact the administrator of the server. @@ -1811,6 +1771,46 @@ There was an error completing your request! + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + User "{}" is offline diff --git a/conf/i18n/common-koKR.xml b/conf/i18n/common-koKR.xml index a3cb100d5..9a984ab95 100644 --- a/conf/i18n/common-koKR.xml +++ b/conf/i18n/common-koKR.xml @@ -1683,42 +1683,6 @@ Unknown command. - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - This account has been locked @@ -1727,10 +1691,6 @@ This account has been locked - - This command is reserved for admins. - - Oops ! There is a problem with the help file. Please contact the administrator of the server. @@ -1811,6 +1771,46 @@ There was an error completing your request! + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + User "{}" is offline diff --git a/conf/i18n/common-plPL.xml b/conf/i18n/common-plPL.xml index fc788e606..a9b5fd7ad 100644 --- a/conf/i18n/common-plPL.xml +++ b/conf/i18n/common-plPL.xml @@ -1683,42 +1683,6 @@ Unknown command. - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - This account has been locked @@ -1727,10 +1691,6 @@ This account has been locked - - This command is reserved for admins. - - Oops ! There is a problem with the help file. Please contact the administrator of the server. @@ -1811,6 +1771,46 @@ There was an error completing your request! + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + User "{}" is offline diff --git a/conf/i18n/common-ruRU.xml b/conf/i18n/common-ruRU.xml index 91c043fb0..cf0c87e32 100644 --- a/conf/i18n/common-ruRU.xml +++ b/conf/i18n/common-ruRU.xml @@ -13,7 +13,7 @@ for {} - + permanently @@ -109,7 +109,7 @@ for {} - + Announcement from {}: {} @@ -129,7 +129,7 @@ There's no account with username {}. - + {} is already a Channel Admin @@ -153,7 +153,7 @@ This command can only be used inside a channel. - + You have to be at least a Channel Operator to use this command. @@ -209,7 +209,7 @@ Maximum password length allowed is {} - + Trying to change password for account "{}" to "{}" @@ -317,11 +317,11 @@ Invalid user. - + Invalid user. - + {}'s command group(s): {} @@ -377,15 +377,15 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. - + You must be at least a Channel Admin to demote another Channel Admin @@ -429,15 +429,15 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator to use this command. - + There's no account with username {}. - + {} has been removed from VOP list. @@ -481,7 +481,7 @@ Invalid user. - + Login: {} {} Sex: {} @@ -661,11 +661,11 @@ none - + unknown - + Owner: {} @@ -685,7 +685,7 @@ Created: {} - + Started: {} @@ -785,7 +785,7 @@ This command can only be used inside a channel. - + You have to be at least a Channel Operator or tempOP to use this command. @@ -833,7 +833,7 @@ Connection closed by admin. - + Copied current scores to active scores on all ladders. @@ -841,7 +841,7 @@ This game does not support win/loss records. - + You must supply a rank and a valid program ID. @@ -853,7 +853,7 @@ Invalid user. - + Account {} is now locked @@ -865,7 +865,7 @@ This command can only be used inside a channel. - + Banned users: @@ -877,11 +877,11 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator to use this command. - + Unable to change channel flags. @@ -905,7 +905,7 @@ Invalid user. - + Account {} is now muted @@ -917,7 +917,7 @@ That user is not logged on. - + Address information for other users is only available to admins. @@ -957,7 +957,7 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator or tempOP to use this command. @@ -965,7 +965,7 @@ There's no account with username {}. - + {} is already a Channel Operator @@ -997,11 +997,11 @@ You must supply a username. - + There's no account with username {}. - + {} is already a Server Operator @@ -1037,7 +1037,7 @@ Invalid user. - + Connection closed. @@ -1073,7 +1073,7 @@ You are not in a channel. - + No one messaged you, use /m instead @@ -1085,7 +1085,7 @@ That user is not logged on. - + Banning {} who is using IP address {} @@ -1113,7 +1113,7 @@ Invalid user. - + Current value of {} is "{}" @@ -1317,7 +1317,7 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator or tmpOP to use this command. @@ -1325,7 +1325,7 @@ There's no account with username {}. - + {} has already tmpOP in this channel @@ -1333,11 +1333,11 @@ {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to tmpOP in this channel @@ -1345,11 +1345,11 @@ {} has promoted you to a tempOP in this channel - + This command can only be used inside a channel. - + Max topic length exceeded (max {} symbols) @@ -1369,7 +1369,7 @@ This command can only be used inside a channel. - + You are not a channel operator. @@ -1385,7 +1385,7 @@ Invalid user. - + Your account has just been unlocked by {} @@ -1397,7 +1397,7 @@ Invalid user. - + Your account has just been unmuted by {} @@ -1409,7 +1409,7 @@ No such user. - + User was not being ignored. @@ -1421,7 +1421,7 @@ That user does not exist. - + Removal from watch list failed. @@ -1433,7 +1433,7 @@ Removal from watch list failed. - + All {} users removed from your watch list. @@ -1449,7 +1449,7 @@ This command can only be used inside a channel. - + You must be at least a Channel Operator to use this command. @@ -1457,7 +1457,7 @@ There's no account with username {}. - + {} is already on VOP list, no need to Voice him @@ -1485,15 +1485,15 @@ This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. - + {} is already on VOP list @@ -1509,7 +1509,7 @@ That user does not exist. - + Add to watch list failed. @@ -1521,7 +1521,7 @@ Add to watch list failed. - + All {} users added to your watch list. @@ -1561,11 +1561,11 @@ Reset {}'s {} stats - + Reset {}'s {} stats - + You cannot kick administrators. @@ -1605,7 +1605,7 @@ Hash is: {} - + Your account has been muted, you can't whisper to other users. @@ -1683,53 +1683,13 @@ Unknown command. - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - This account has been locked This account has been locked - - - - This command is reserved for admins. - + Oops ! There is a problem with the help file. Please contact the administrator of the server. @@ -1737,7 +1697,7 @@ This command can only be used inside a channel. - + This command can only be used from the game. @@ -1811,6 +1771,46 @@ There was an error completing your request! + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + User "{}" is offline diff --git a/conf/i18n/common-zhCN.xml b/conf/i18n/common-zhCN.xml index e0692d83d..390b31240 100644 --- a/conf/i18n/common-zhCN.xml +++ b/conf/i18n/common-zhCN.xml @@ -1683,42 +1683,6 @@ Unknown command. - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - This account has been locked @@ -1727,10 +1691,6 @@ This account has been locked - - This command is reserved for admins. - - Oops ! There is a problem with the help file. Please contact the administrator of the server. @@ -1811,6 +1771,46 @@ There was an error completing your request! + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + User "{}" is offline diff --git a/conf/i18n/common-zhTW.xml b/conf/i18n/common-zhTW.xml index 6f9a583fd..427af0d2a 100644 --- a/conf/i18n/common-zhTW.xml +++ b/conf/i18n/common-zhTW.xml @@ -1683,42 +1683,6 @@ Unknown command. - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - This account has been locked @@ -1727,10 +1691,6 @@ This account has been locked - - This command is reserved for admins. - - Oops ! There is a problem with the help file. Please contact the administrator of the server. @@ -1811,6 +1771,46 @@ There was an error completing your request! + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + User "{}" is offline diff --git a/scripts/localize/pvpgn_localize_generator.cs b/scripts/localize/pvpgn_localize_generator.cs index b83b54e38..2af4c3b57 100644 --- a/scripts/localize/pvpgn_localize_generator.cs +++ b/scripts/localize/pvpgn_localize_generator.cs @@ -25,6 +25,7 @@ THE SOFTWARE. using System.ComponentModel; using System.IO; using System.Text; +using System.Linq; using System.Xml.Serialization; namespace pvpgn_localize_generator @@ -34,38 +35,60 @@ class Program /// /// C++ localization function name /// - private const string func_name = "localize"; - private const string outfile = "output.xml"; + const string func_name = "localize"; + static string outfile = "output.xml"; + static string dirpath; static Root _data = new Root(); static void Main(string[] args) { - if (args.Length != 1) + if (args.Length == 0 || args.Length > 2) { - Console.WriteLine("This utility generates XML file for next translation from hardcoded text arguments in function {0}(...) that in *.cpp files\n(c) 2014 HarpyWar (harpywar@gmail.com)", func_name); - Console.WriteLine("\nUsage: {0} [path to 'src/bnetd']\n", AppDomain.CurrentDomain.FriendlyName); + Console.WriteLine("This utility generates XML file for next translation from hardcoded text arguments in function {0}(...) that in *.cpp, *.h, *.lua files\n(c) 2014 HarpyWar (harpywar@gmail.com)", func_name); + Console.WriteLine("\nUsage: {0} [path to 'pvpgn' repository directory] {{output.xml}}", AppDomain.CurrentDomain.FriendlyName); + Console.WriteLine(" (to make update of existing xml file, pass it in a second parameter)\n", AppDomain.CurrentDomain.FriendlyName); Environment.Exit(0); } - var dirpath = args[0]; + dirpath = args[0]; + if (args.Length == 2) + outfile = args[1]; - // process all files in directory - foreach(var f in Directory.GetFiles(dirpath)) + + if (File.Exists(outfile)) + { + // deserialize xml to data + var xsr = new XmlSerializer(typeof(Root)); + var reader = new StreamReader(outfile); + _data = (Root)xsr.Deserialize(reader); + reader.Close(); + } + + string[] cppfiles = Directory.GetFiles(dirpath, "*.cpp", SearchOption.AllDirectories); + string[] hfiles = Directory.GetFiles(dirpath, "*.h", SearchOption.AllDirectories); + string[] luafiles = Directory.GetFiles(dirpath, "*.lua", SearchOption.AllDirectories); + string[] allfiles = cppfiles.Concat(hfiles).Concat(luafiles).ToArray(); + + // process each file + foreach (var f in allfiles) { parse_file(f); } + // sort items by file -> function + _data.Items = _data.Items.OrderBy(x => x.Function).OrderBy(x => x.File).OrderBy(x => Path.GetExtension(x.File)).ToList(); + // serialize data to xml - var ser = new XmlSerializer(typeof(Root)); + var xsw = new XmlSerializer(typeof(Root)); using (var fs = new FileStream(outfile, FileMode.Create)) { - ser.Serialize(fs, _data); + xsw.Serialize(fs, _data); } Console.WriteLine("\n{0} items saved in {1}: ", _data.Items.Count, outfile); - Console.WriteLine("\nPress any key to exit..."); - Console.ReadKey(); + //Console.WriteLine("\nPress any key to exit..."); + //Console.ReadKey(); } /// @@ -78,31 +101,54 @@ private static void parse_file(string filepath) string filename = Path.GetFileName(filepath); string text, f, function = string.Empty; - int i = 0; - foreach (string s in lines) + int ln = 0; // line number + int uid = 1; + foreach (string l in lines) { - i++; + ln++; try { - if ((f = is_function(s)) != null) + if ((f = is_function(l)) != null) function = f; // remember last function - if ((text = find_localize_text(s)) == null) + if ((text = find_localize_text(l)) == null) continue; + // ignore duplicate strings in the same file and function + if (_data.Items.Find(x => x.Original == text && x.File == filename && x.Function == function) != null) + continue; + + // find the original text in list for reference + var reference = _data.Items.Find(x => x.Original == text && x.Translate.RefId == null); + + // set unique Id + while (_data.Items.Find(x => x.Id == uid.ToString()) != null) + { + uid++; + } + _data.Items.Add(new Root.StringItem() { + Id = uid.ToString(), File = filename, Function = function, Original = text, - Translate = " " + Translate = new Root.StringItem.TranslateItem() + { + // reference to exist translation + RefId = (reference != null) ? reference.Id : null, + InnerText = (reference != null) ? null : " ", + } }); + // insert example author + if (_data.meta.Authors.Count == 0) + _data.meta.Authors.Add(new Root.Meta.AuthorItem() { Name = "nomad" , Email = "nomad@example.com"}); Console.WriteLine("{0}, {1}(): {2}", filename, function, text); } - catch(Exception e) + catch (Exception e) { - Console.WriteLine("Error on parse file \"{0}\" on line #{1}: {2}", filename, i, s); + Console.WriteLine("Error on parse file \"{0}\" on line #{1}: {2}", filename, ln, l); Console.WriteLine(e.Message); } } @@ -134,7 +180,7 @@ private static string find_localize_text(string line) break; } // 3) find last quote - if (line.Substring(i, 1) == "\"" && line.Substring(i-1, 1) != "\\") + if (line.Substring(i, 1) == "\"" && line.Substring(i - 1, 1) != "\\") quote2_pos = i; continue; } @@ -149,14 +195,14 @@ private static string find_localize_text(string line) continue; } // 1) find function name - if (line.Substring(i, (i+func_name.Length > line.Length) ? line.Length-i : func_name.Length) == func_name) + if (line.Substring(i, (i + func_name.Length > line.Length) ? line.Length - i : func_name.Length) == func_name) func_pos = i; } return escape_text(text); } /// - /// Filter text corresponding XML rules + /// Filter text corresponding to XML rules /// /// /// text or null (if null passed) @@ -185,7 +231,7 @@ private static string is_function(string line) return null; // last line must have ) or { - if (line[line.Length - 1] == ')' || line[line.Length - 1] == '{') + if (!line.Contains(";") && line[line.Length - 1] == ')' || line[line.Length - 1] == '{') { string[] words = line.Split(); if (words.Length > 0) @@ -218,8 +264,14 @@ private static string is_function(string line) return null; } - static string[] reserved_words = new string[] { - + /// + /// Ignore these words when find a function name + /// + static string[] reserved_words = new string[] + { + func_name, // function definition + "LIST_TRAVERSE", + "type", "while", "switch", "class", @@ -244,7 +296,7 @@ private static string is_function(string line) }; } -#region Serializer Class + #region Serializer Class [XmlRoot("root")] public class Root @@ -265,9 +317,7 @@ public class Meta public Meta() { language = new LanguageItem(); - Authors = new List() { - new AuthorItem() - }; + Authors = new List(); } [XmlElement("language"), DefaultValue("change_me")] @@ -281,20 +331,22 @@ public class LanguageItem [XmlAttribute("tag")] public string Tag = "enUS"; [XmlText] - public string Default = "English"; + public string InnerText = "English"; } public class AuthorItem { [XmlAttribute("name")] - public string Name = "nomad"; + public string Name; [XmlAttribute("email")] - public string Email="nomad@example.com"; + public string Email; } } public class StringItem { + [XmlAttribute("id")] + public string Id; [XmlAttribute("file")] public string File; [XmlAttribute("function")] @@ -302,10 +354,18 @@ public class StringItem [XmlElement("original")] public string Original; [XmlElement("translate")] - public string Translate; + public TranslateItem Translate; + + public class TranslateItem + { + [XmlAttribute("refid")] + public string RefId; + [XmlText] + public string InnerText = " "; // default value is " " to save empty values when updating xml file + } } -#endregion + #endregion } } diff --git a/scripts/localize/pvpgn_localize_generator.exe b/scripts/localize/pvpgn_localize_generator.exe index 688e347543273b0b5ead2a06813a9aeaba56feea..2f5e5ad4034120721353e440cda67facda1f8233 100644 GIT binary patch delta 3628 zcmZu!dvKK16+icWuYF~cZ+Ej zyK%6TB4EQeww787GYmfdsKYGP)<4i_XFAqCz(3Tsz<^V0aoSP~Gg=*KfA@YHUhTr3 zdw#!r?m73Kd+xoPv4OF#e{WBtH~3ONl|L7VGcWTJSs+{vIjwK}#RvSS7ZWWL!~oH0 zZM-4q8zb@oKeLFa&Tilddo64A%xD1>#n-a;vN(&`FSAzGZl7n3QR)MY&pr5Z(&%Ix z(VwRhF<^Xk`)EshaT?DBiPRX{fM`3N)&lUvU|8F((nqkyf0G{=PUsMkj(Hj2k<0+2 z5evgT8Q>8s1T9?+;c%b+FBi7L=;q-=V+w-7mHiqwi#6a9ou@%@D*`<`1;SI{Fv()R z9VBW^EO zIzz~;UeMt$X@;)p22eI?Kdm$rqi{S1tQLf@5HeoCMmctFX(ucMC3$IKVUqE51$u8= zRnU;jie#HGDCjZ`(^U`)O3wg3?=xKqFzIH1vzg?C=Qy&ElYHKtmLpAD$gO8s)bRWM6)8dnCFn=G8Itd?(-bd>`<|A?BLBq z6VBL5C5MewbJ#vLbdAC4VI^k*@SWHh)k3LwtTy{~b!rm3sRw=Bii7f)P!dq`BBtpp zB!w=5g?*;4CSPkCT1!!2)8`hM)0=~pc`;?PGO3+=0bAvyM>Co4_gH65<>YzmHo zZquE<14=?WSGd*G8zwGUglyPS_-hrdARE*8drk7=oWQ%|Xo<|LTqI z1CuTjeWvD(_oBztG6Rco;iPB7-x@BPcAvbVq#k!WoT;sKrX}w#c`g)F^N1*7M`2_~ zU5&*#@KQxQ^9&+oo`pzHGRFn;;!O-nKiIC23k8U?YV!15&R7{X$wM)oIVsG0Kqmv- znMTdp^jzTSZK>+pnB0Qb(Lp@CA7_Q7=h<(&nxbM+M);7kswvRIZmG+qxN-3O?#5mb zR~|5#?c^*J)S<8w#_BSFYStc#2{I${7f#QIeY2-J<&%bby4&9Bj#c0-(&ZgHJ-RJ;8PRi61k=!jnqjd;#AH`(6HZ?&PKd z(J{2o3cY_cGrVO(7F9?KaA>Y#yP8(_(@Y#VOpuzEtX_&K(xR~afw!|7R|DZF5Teo& ze6hdOVYm5C6dSY}O{XqxAL+DM%8Zm(nc(+I{V7Nfy{DZ5^P#l=mz0&du$cnsrzLui zuG31rlKCkubzAlxmhw3%f3Axt?@Bq_5PH^W_DFCM(nDVur!)`wTtY^r?1T)^!>)T= z9vYR*Ue_smyrT6%H+k`3RMCA{jt1Q?(MpLbC@9f7i7F{1(ME|(s+MS*L}3b(g16@^ zo=lA*RAX2AW;r&W0J zMBlF|NeT_%sT1fNkV;3&=n{}dpW9dbZN-78WAUL{!q29Ycne`4xoX_Y-NbRKiFQX+ z)=h4TI>^<*<^zeNfj(CcTLRQ^lck52m;2VU^~mXiWt3(cfCkEFC)gF^n+W_Pi{e@G6l{=eYDd-q!}+TAH7mWVW0{+TSl!wq8@EuRl@G9I#6uU zlJpDe(SAh}v|RfwHry+sA>T{=U%v_H`w=%{vqE|JPUqE8?XL;q6yJN=v7dN(oF zqF*7C4d`D&ZqTP9w949<$)3==A@}JIur{W$P3#i=R3Bx%?3Wl7qTlGd7~&SS?=Uw8 zbkhoUxA78N%9a`LAn+>VXY2$G8cFb*4G+~xry(jDZ?X_QVf>!WkS=COT`b@%8)OGD zR_GQ+9X0}d1$!PoSFo3jU62z-1DLm9vx5E3Xodcs;Z30Vi_ro3H~USqx1*M4u>C>4 zfu|@(+td{8!Y_yvHt9(vh3ftUvX&~rG)Wn^djhQuDaz6&bt!pyi7%x%pWu(s7p$KT z!_#TVT00-8uX&Q*pePfvfqD5uyh-Z4_K84nP_RcNKFYdyvogVY_#1RVG8e(%`Q*Ze z@h(1FiAucz`a)%a)O(>XQwAYdE01$8e?&P7xmB3}Gp1bRJ@%Af+jJk!2BQi{PL((d z4Ch#bZju2#U=IcthD(~La9nNIKaB3s?N@{C74s;}?#6c^-Om=6J`MgzWnH!%`HFWY z&Ao4Mc+33t>(<%dh_u$vqW&G((V@+$rOWC5!O_QP$S69GW{an8^;UdvtiykZ>`0JF(urJT+FDR@=i$YwE75Ro_*LhZi2{>)m&3 zQ&S|ev(Nro!FB0`75dzt9Lr=#~UNA@v@bDv~k)3F+}ySK%Eig46c4C+Q8V4>-6e?8#E^2(s8r- z>*{I@Z(v(sN4?+q=LZ;jy7Zq$rX(l-g5$_>9o~hLcs5SrmRi}rsDEy;aOLujx`pGB zGokSNk-zGtWQ)N9pW)BB$&bGeT6DajhV|JSTaT5ZsS#H4Tc2w@+FdeJm)Ur`@n4`Y BL=6A{ delta 3482 zcmZu!4RBP|6+ZXAzumW+P2RpuHsn89lDzC@*ANHV3#@#?G z>t>@UA_^K_?NGFxp);kUtvF1yQ#(2(woa=KBQkA=vBH3zPDdR^9cZz&W%}LwHu7VW zyzidx+;h*l_uO;udl|obeCVlNO-C;s?x*6<8R9I!0z@rP_&nv_-ihb$2+ipwx>G2I zh>mL$jdpOHCt8mKQDPCWwfKhwraRn1`qL8zd0CS8ZVs-|^fNrEQGjmi}jH^%^ z>1yyXa5b}&(@4~*0S|hLeP1d{JjH=86}Ia0JD6<3Qf1>HM#3FbIwMH3KBmK8(u!Qt z4X|vz`%|T{P!GrB;OdwF2O$##9vp1A85cWIC==WB2rGMtn^uX5*UEd{}?pkL%pZ?;SG zV#-!&Qakk=w&HRQEPt}p3SQFTO3xp zeVNo{6Q8U@za#okuCviNbKE-P-a;2dTkW1g9db*HrUlRJ#7J3y^M6p(4-|WLi=Mf# zX)jn>Nn-o|8PmQIepWZzS}^g=%iVjYUA8Z`v_PTcth3o(F%cxokRu^3IWR z!td!UZNQtByp80!P%O<9QN)hI$X)4cDs;n38S%`1M9Mr1NKb1H3C;6YXi(>NheAFS zAkMPI)APNtGHjAZ;ym+`Fuxw^WSD!?hz_I|fY-OB%CFJnmK;R~@rpetahATp{lXV( z5Q{P@4tT4Y0ja_-Ww{hT4&EYvQ;&!%517n$vI_-upu!8|%r?NH0|(+lnGyM`NH2ta zvss=BN<%%}{4NlgCWfk$1|4##^ajv6jIp6GbdHlDZF>8JoAB&5x*E3 z@w{tpy1kjpvmy@)y4=Ho`1L_dH8zH~7TPsJ?jOwz-@7S`Dx^Q+&|JWF#a8vxA8_D6 zDR$$kzGY}nmb>9#XF0A0!cibZrR8|AzjU2D5Ij=&oB9OlbW!3=O~@Bmm!{KlDX##U zVrR#0wH@4Pi5<+YlXn z5`O|T=~ZL9X3{Z);oQoxUk+^u^bI@iDX}sEJ$I= z1|3PEX_87brjhH zYzs2fU1Yo1Hn5(8M`geO4PM1IUB%K@v1M}6-b4d*i^ph6e-0mTj~3Ypups@S$o>i@ zs*h1M7uX=ty{oLweW+|#;hg$=dWD#F3}|a7Xo@Oi0YqX2?76C6S^4J+7os*Pj8a-ABT$)qND> zQ@oE9KFK%GdDhQ|;psTgc8`T?qY7Wk8`jXRNE~vRZLdo3X5}E8&0nXZQai;G zJf)nG@>$5;3UM)#@dRJ0G)TD-@(QH~xJp^a6}~}v5O|+*5SnpiiqCep+HLg#oCJms zb~vCADxXm)P@G!>vgN*JFJ)<$MQrx5K-Y=Xl`NnNwh&Jbtz=6l`yKoYPKWfgaWu1$v-Z}rH=&i5L_;|q!|J2vGpEthy^|eX^g;Zk92jC%{ zSa{glqBStIz?$&=eo|^fp^!EHU}YKO<>B$iSRGy6C?*S)lrdK8b-1;$O5dKMmAf!j zw?qt4O%|>(8aRWir$rkc|6z?@9`-|xN%(Z!O`)2as1XR?7v5SM@_s`g;}et5#F$b( z{a+ML6xHBnuf)Y)=^kl`GHvqB7K4S>6#xAZSH@Vcd%CrXkMvG7MqKVZI~j`qTjNi4 MO Date: Sun, 29 Jun 2014 00:32:09 +0400 Subject: [PATCH 065/144] bnhelp.conf also needed a translation, rename all files to *.in (cmake install extension) --- conf/i18n/bnhelp-csCZ.conf.in | 615 ++++++++++++++++++ conf/i18n/bnhelp-deDE.conf.in | 615 ++++++++++++++++++ conf/i18n/bnhelp-enUS.conf.in | 615 ++++++++++++++++++ conf/i18n/bnhelp-esES.conf.in | 615 ++++++++++++++++++ conf/i18n/bnhelp-frFR.conf.in | 615 ++++++++++++++++++ conf/i18n/bnhelp-itIT.conf.in | 615 ++++++++++++++++++ conf/i18n/bnhelp-jaJA.conf.in | 615 ++++++++++++++++++ conf/i18n/bnhelp-koKR.conf.in | 615 ++++++++++++++++++ conf/i18n/bnhelp-plPL.conf.in | 615 ++++++++++++++++++ conf/i18n/bnhelp-ruRU.conf.in | 615 ++++++++++++++++++ conf/i18n/bnhelp-zhCN.conf.in | 615 ++++++++++++++++++ conf/i18n/bnhelp-zhTW.conf.in | 615 ++++++++++++++++++ conf/i18n/bnmotd-bgBG.txt.in | 13 + .../{bnmotd-csCZ.txt => bnmotd-csCZ.txt.in} | 10 +- .../{bnmotd-deDE.txt => bnmotd-deDE.txt.in} | 6 +- conf/i18n/bnmotd-enUS.txt.in | 13 + .../{bnmotd-esES.txt => bnmotd-esES.txt.in} | 6 +- .../{bnmotd-frFR.txt => bnmotd-frFR.txt.in} | 6 +- .../{bnmotd-enUS.txt => bnmotd-jaJA.txt.in} | 0 conf/i18n/bnmotd-jpJA.txt.in | 13 + conf/i18n/bnmotd-koKR.txt.in | 13 + .../{bnmotd-nlNL.txt => bnmotd-nlNL.txt.in} | 6 +- .../{bnmotd-plPL.txt => bnmotd-plPL.txt.in} | 6 +- .../{bnmotd-ptBR.txt => bnmotd-ptBR.txt.in} | 6 +- .../{bnmotd-ruRU.txt => bnmotd-ruRU.txt.in} | 4 +- conf/i18n/bnmotd-svSE.txt.in | 13 + .../{bnmotd-zhCN.txt => bnmotd-zhCN.txt.in} | 6 +- .../{bnmotd-zhTW.txt => bnmotd-zhTW.txt.in} | 6 +- ...ar3-csCZ.txt => chathelp-war3-csCZ.txt.in} | 0 ...ar3-deDE.txt => chathelp-war3-deDE.txt.in} | 0 ...ar3-enUS.txt => chathelp-war3-enUS.txt.in} | 0 ...ar3-esES.txt => chathelp-war3-esES.txt.in} | 0 ...ar3-frFR.txt => chathelp-war3-frFR.txt.in} | 0 ...ar3-itIT.txt => chathelp-war3-itIT.txt.in} | 0 ...ar3-jaJA.txt => chathelp-war3-jaJA.txt.in} | 0 ...ar3-koKR.txt => chathelp-war3-koKR.txt.in} | 0 ...ar3-plPL.txt => chathelp-war3-plPL.txt.in} | 0 ...ar3-ruRU.txt => chathelp-war3-ruRU.txt.in} | 0 ...ar3-zhCN.txt => chathelp-war3-zhCN.txt.in} | 0 ...ar3-zhTW.txt => chathelp-war3-zhTW.txt.in} | 0 .../{common-csCZ.xml => common-csCZ.xml.in} | 0 .../{common-deDE.xml => common-deDE.xml.in} | 0 .../{common-esES.xml => common-esES.xml.in} | 0 .../{common-frFR.xml => common-frFR.xml.in} | 0 .../{common-itIT.xml => common-itIT.xml.in} | 0 .../{common-jaJA.xml => common-jaJA.xml.in} | 0 .../{common-koKR.xml => common-koKR.xml.in} | 0 .../{common-plPL.xml => common-plPL.xml.in} | 0 .../{common-ruRU.xml => common-ruRU.xml.in} | 0 .../{common-zhCN.xml => common-zhCN.xml.in} | 0 .../{common-zhTW.xml => common-zhTW.xml.in} | 0 ...ccount-csCZ.txt => newaccount-csCZ.txt.in} | 0 ...ccount-deDE.txt => newaccount-deDE.txt.in} | 0 ...ccount-enUS.txt => newaccount-enUS.txt.in} | 0 ...ccount-esES.txt => newaccount-esES.txt.in} | 0 ...ccount-frFR.txt => newaccount-frFR.txt.in} | 0 ...ccount-itIT.txt => newaccount-itIT.txt.in} | 0 ...ccount-jaJA.txt => newaccount-jaJA.txt.in} | 0 ...ccount-koKR.txt => newaccount-koKR.txt.in} | 0 ...ccount-plPL.txt => newaccount-plPL.txt.in} | 0 ...ccount-ruRU.txt => newaccount-ruRU.txt.in} | 0 ...ccount-zhCN.txt => newaccount-zhCN.txt.in} | 0 ...ccount-zhTW.txt => newaccount-zhTW.txt.in} | 0 ...ce-csCZ.txt => termsofservice-csCZ.txt.in} | 0 ...ce-deDE.txt => termsofservice-deDE.txt.in} | 0 ...ce-enUS.txt => termsofservice-enUS.txt.in} | 0 ...ce-esES.txt => termsofservice-esES.txt.in} | 0 ...ce-frFR.txt => termsofservice-frFR.txt.in} | 0 ...ce-itIT.txt => termsofservice-itIT.txt.in} | 0 ...ce-jaJA.txt => termsofservice-jaJA.txt.in} | 0 ...ce-koKR.txt => termsofservice-koKR.txt.in} | 0 ...ce-plPL.txt => termsofservice-plPL.txt.in} | 0 ...ce-ruRU.txt => termsofservice-ruRU.txt.in} | 0 ...ce-zhCN.txt => termsofservice-zhCN.txt.in} | 0 ...ce-zhTW.txt => termsofservice-zhTW.txt.in} | 0 75 files changed, 7485 insertions(+), 22 deletions(-) create mode 100644 conf/i18n/bnhelp-csCZ.conf.in create mode 100644 conf/i18n/bnhelp-deDE.conf.in create mode 100644 conf/i18n/bnhelp-enUS.conf.in create mode 100644 conf/i18n/bnhelp-esES.conf.in create mode 100644 conf/i18n/bnhelp-frFR.conf.in create mode 100644 conf/i18n/bnhelp-itIT.conf.in create mode 100644 conf/i18n/bnhelp-jaJA.conf.in create mode 100644 conf/i18n/bnhelp-koKR.conf.in create mode 100644 conf/i18n/bnhelp-plPL.conf.in create mode 100644 conf/i18n/bnhelp-ruRU.conf.in create mode 100644 conf/i18n/bnhelp-zhCN.conf.in create mode 100644 conf/i18n/bnhelp-zhTW.conf.in create mode 100644 conf/i18n/bnmotd-bgBG.txt.in rename conf/i18n/{bnmotd-csCZ.txt => bnmotd-csCZ.txt.in} (85%) rename conf/i18n/{bnmotd-deDE.txt => bnmotd-deDE.txt.in} (79%) create mode 100644 conf/i18n/bnmotd-enUS.txt.in rename conf/i18n/{bnmotd-esES.txt => bnmotd-esES.txt.in} (80%) rename conf/i18n/{bnmotd-frFR.txt => bnmotd-frFR.txt.in} (80%) rename conf/i18n/{bnmotd-enUS.txt => bnmotd-jaJA.txt.in} (100%) create mode 100644 conf/i18n/bnmotd-jpJA.txt.in create mode 100644 conf/i18n/bnmotd-koKR.txt.in rename conf/i18n/{bnmotd-nlNL.txt => bnmotd-nlNL.txt.in} (79%) rename conf/i18n/{bnmotd-plPL.txt => bnmotd-plPL.txt.in} (81%) rename conf/i18n/{bnmotd-ptBR.txt => bnmotd-ptBR.txt.in} (79%) rename conf/i18n/{bnmotd-ruRU.txt => bnmotd-ruRU.txt.in} (80%) create mode 100644 conf/i18n/bnmotd-svSE.txt.in rename conf/i18n/{bnmotd-zhCN.txt => bnmotd-zhCN.txt.in} (78%) rename conf/i18n/{bnmotd-zhTW.txt => bnmotd-zhTW.txt.in} (78%) rename conf/i18n/{chathelp-war3-csCZ.txt => chathelp-war3-csCZ.txt.in} (100%) rename conf/i18n/{chathelp-war3-deDE.txt => chathelp-war3-deDE.txt.in} (100%) rename conf/i18n/{chathelp-war3-enUS.txt => chathelp-war3-enUS.txt.in} (100%) rename conf/i18n/{chathelp-war3-esES.txt => chathelp-war3-esES.txt.in} (100%) rename conf/i18n/{chathelp-war3-frFR.txt => chathelp-war3-frFR.txt.in} (100%) rename conf/i18n/{chathelp-war3-itIT.txt => chathelp-war3-itIT.txt.in} (100%) rename conf/i18n/{chathelp-war3-jaJA.txt => chathelp-war3-jaJA.txt.in} (100%) rename conf/i18n/{chathelp-war3-koKR.txt => chathelp-war3-koKR.txt.in} (100%) rename conf/i18n/{chathelp-war3-plPL.txt => chathelp-war3-plPL.txt.in} (100%) rename conf/i18n/{chathelp-war3-ruRU.txt => chathelp-war3-ruRU.txt.in} (100%) rename conf/i18n/{chathelp-war3-zhCN.txt => chathelp-war3-zhCN.txt.in} (100%) rename conf/i18n/{chathelp-war3-zhTW.txt => chathelp-war3-zhTW.txt.in} (100%) rename conf/i18n/{common-csCZ.xml => common-csCZ.xml.in} (100%) rename conf/i18n/{common-deDE.xml => common-deDE.xml.in} (100%) rename conf/i18n/{common-esES.xml => common-esES.xml.in} (100%) rename conf/i18n/{common-frFR.xml => common-frFR.xml.in} (100%) rename conf/i18n/{common-itIT.xml => common-itIT.xml.in} (100%) rename conf/i18n/{common-jaJA.xml => common-jaJA.xml.in} (100%) rename conf/i18n/{common-koKR.xml => common-koKR.xml.in} (100%) rename conf/i18n/{common-plPL.xml => common-plPL.xml.in} (100%) rename conf/i18n/{common-ruRU.xml => common-ruRU.xml.in} (100%) rename conf/i18n/{common-zhCN.xml => common-zhCN.xml.in} (100%) rename conf/i18n/{common-zhTW.xml => common-zhTW.xml.in} (100%) rename conf/i18n/{newaccount-csCZ.txt => newaccount-csCZ.txt.in} (100%) rename conf/i18n/{newaccount-deDE.txt => newaccount-deDE.txt.in} (100%) rename conf/i18n/{newaccount-enUS.txt => newaccount-enUS.txt.in} (100%) rename conf/i18n/{newaccount-esES.txt => newaccount-esES.txt.in} (100%) rename conf/i18n/{newaccount-frFR.txt => newaccount-frFR.txt.in} (100%) rename conf/i18n/{newaccount-itIT.txt => newaccount-itIT.txt.in} (100%) rename conf/i18n/{newaccount-jaJA.txt => newaccount-jaJA.txt.in} (100%) rename conf/i18n/{newaccount-koKR.txt => newaccount-koKR.txt.in} (100%) rename conf/i18n/{newaccount-plPL.txt => newaccount-plPL.txt.in} (100%) rename conf/i18n/{newaccount-ruRU.txt => newaccount-ruRU.txt.in} (100%) rename conf/i18n/{newaccount-zhCN.txt => newaccount-zhCN.txt.in} (100%) rename conf/i18n/{newaccount-zhTW.txt => newaccount-zhTW.txt.in} (100%) rename conf/i18n/{termsofservice-csCZ.txt => termsofservice-csCZ.txt.in} (100%) rename conf/i18n/{termsofservice-deDE.txt => termsofservice-deDE.txt.in} (100%) rename conf/i18n/{termsofservice-enUS.txt => termsofservice-enUS.txt.in} (100%) rename conf/i18n/{termsofservice-esES.txt => termsofservice-esES.txt.in} (100%) rename conf/i18n/{termsofservice-frFR.txt => termsofservice-frFR.txt.in} (100%) rename conf/i18n/{termsofservice-itIT.txt => termsofservice-itIT.txt.in} (100%) rename conf/i18n/{termsofservice-jaJA.txt => termsofservice-jaJA.txt.in} (100%) rename conf/i18n/{termsofservice-koKR.txt => termsofservice-koKR.txt.in} (100%) rename conf/i18n/{termsofservice-plPL.txt => termsofservice-plPL.txt.in} (100%) rename conf/i18n/{termsofservice-ruRU.txt => termsofservice-ruRU.txt.in} (100%) rename conf/i18n/{termsofservice-zhCN.txt => termsofservice-zhCN.txt.in} (100%) rename conf/i18n/{termsofservice-zhTW.txt => termsofservice-zhTW.txt.in} (100%) diff --git a/conf/i18n/bnhelp-csCZ.conf.in b/conf/i18n/bnhelp-csCZ.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/bnhelp-csCZ.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/bnhelp-deDE.conf.in b/conf/i18n/bnhelp-deDE.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/bnhelp-deDE.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/bnhelp-enUS.conf.in b/conf/i18n/bnhelp-enUS.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/bnhelp-enUS.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/bnhelp-esES.conf.in b/conf/i18n/bnhelp-esES.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/bnhelp-esES.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/bnhelp-frFR.conf.in b/conf/i18n/bnhelp-frFR.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/bnhelp-frFR.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/bnhelp-itIT.conf.in b/conf/i18n/bnhelp-itIT.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/bnhelp-itIT.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/bnhelp-jaJA.conf.in b/conf/i18n/bnhelp-jaJA.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/bnhelp-jaJA.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/bnhelp-koKR.conf.in b/conf/i18n/bnhelp-koKR.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/bnhelp-koKR.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/bnhelp-plPL.conf.in b/conf/i18n/bnhelp-plPL.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/bnhelp-plPL.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/bnhelp-ruRU.conf.in b/conf/i18n/bnhelp-ruRU.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/bnhelp-ruRU.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/bnhelp-zhCN.conf.in b/conf/i18n/bnhelp-zhCN.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/bnhelp-zhCN.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/bnhelp-zhTW.conf.in b/conf/i18n/bnhelp-zhTW.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/bnhelp-zhTW.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/bnmotd-bgBG.txt.in b/conf/i18n/bnmotd-bgBG.txt.in new file mode 100644 index 000000000..c21507fb0 --- /dev/null +++ b/conf/i18n/bnmotd-bgBG.txt.in @@ -0,0 +1,13 @@ +%EЗдравей %l, добре дошъл в %s! +%IВерсията на сървъра е %v на %h. +%IТози сървър се хоства от %H +%I +%IИма %a потребителски акаунти на този сървър. +%IВ момента има %U потребители в %G игри на %N +%Iи общо %u потребители играещи общо %g игри и разговарящи в общо %c канала. +%IИмате проблем с команда? Въведете /help за да +%Iнаучите повече за нея. +%I +%I(edit this text in conf/bnmotd-bgBG.txt) +%I +%I%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-csCZ.txt b/conf/i18n/bnmotd-csCZ.txt.in similarity index 85% rename from conf/i18n/bnmotd-csCZ.txt rename to conf/i18n/bnmotd-csCZ.txt.in index 64658c7c3..879d6f964 100644 --- a/conf/i18n/bnmotd-csCZ.txt +++ b/conf/i18n/bnmotd-csCZ.txt.in @@ -1,14 +1,14 @@ -%IAhoj %l, +%EAhoj %l, %IVitej na serveru %s, verze %v. %I -%I %IMomentalne je zde registrovanych %a uzivatelu, z toho je %u online, hrajicich %g hry. %I %I%N si muzes zahrat s %U hraci, v %G prave probihajicich hrach nebo si muzes pokecat v %c chatech. %I -%I %INevis si rady ? Napis /help pro napovedu. %I -%I %ITvoje IP adresa: %r, tvoje ID %i a tvuj klient %t. -%ICZ MOTD by Machy_CZ +%I +%I(edit this text in conf/bnmotd-csCZ.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-deDE.txt b/conf/i18n/bnmotd-deDE.txt.in similarity index 79% rename from conf/i18n/bnmotd-deDE.txt rename to conf/i18n/bnmotd-deDE.txt.in index f34beb1b4..b28467b15 100644 --- a/conf/i18n/bnmotd-deDE.txt +++ b/conf/i18n/bnmotd-deDE.txt.in @@ -1,4 +1,4 @@ -%IHallo %l, willkommen zu %s! +%EHallo %l, willkommen zu %s! %ILaufende Version %v auf %h. %IDer Server ist von %H gehostet %I @@ -8,4 +8,6 @@ %IEin Problem mit den Kommandos? Schreibe /help und %Ilerne mehr über die Kommandos. %I -%I%m +%I(edit this text in conf/bnmotd-deDE.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-enUS.txt.in b/conf/i18n/bnmotd-enUS.txt.in new file mode 100644 index 000000000..43d8600f4 --- /dev/null +++ b/conf/i18n/bnmotd-enUS.txt.in @@ -0,0 +1,13 @@ +%EHello %l, welcome to %s! +%IRunning version %v on %h. +%IThis server is hosted by %H +%I +%IThere are %a user accounts on this server. +%IThere are currently %U users in %G games of %N, +%Iand %u users playing %g games and chatting in %c channels. +%IHaving trouble with a command? Type /help to +%Ilearn more about it. +%I +%I(edit this text in conf/bnmotd-enUS.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-esES.txt b/conf/i18n/bnmotd-esES.txt.in similarity index 80% rename from conf/i18n/bnmotd-esES.txt rename to conf/i18n/bnmotd-esES.txt.in index 193fd0d9e..de6fe58e7 100644 --- a/conf/i18n/bnmotd-esES.txt +++ b/conf/i18n/bnmotd-esES.txt.in @@ -1,4 +1,4 @@ -%IHola %l, bienvenido a %s! +%EHola %l, bienvenido a %s! %IEn %h se usa la versión %v %IEste servidor es alojado por %H %I @@ -8,4 +8,6 @@ %ITiene problemas con algun comando? Teclee "/help" para %Iaprender más sobre los comandos. %I -%I%m +%I(edit this text in conf/bnmotd-ptBR.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-frFR.txt b/conf/i18n/bnmotd-frFR.txt.in similarity index 80% rename from conf/i18n/bnmotd-frFR.txt rename to conf/i18n/bnmotd-frFR.txt.in index e54325740..974fa78b9 100644 --- a/conf/i18n/bnmotd-frFR.txt +++ b/conf/i18n/bnmotd-frFR.txt.in @@ -1,4 +1,4 @@ -%IBonjour %l, bienvenue sur %s! +%EBonjour %l, bienvenue sur %s! %IUtilisant la version %v sur %h. %ICe serveur est hébergé par %H %I @@ -8,4 +8,6 @@ %IUn problème avec une commande ? Tappez /help pour %Ien savoir plus. %I -%I%m +%I(edit this text in conf/bnmotd-ptBR.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-enUS.txt b/conf/i18n/bnmotd-jaJA.txt.in similarity index 100% rename from conf/i18n/bnmotd-enUS.txt rename to conf/i18n/bnmotd-jaJA.txt.in diff --git a/conf/i18n/bnmotd-jpJA.txt.in b/conf/i18n/bnmotd-jpJA.txt.in new file mode 100644 index 000000000..d9db62914 --- /dev/null +++ b/conf/i18n/bnmotd-jpJA.txt.in @@ -0,0 +1,13 @@ +%E%l さん, PvPGN サーバへようこそ! +%I%h さんが %v を運用します。 +%Iこのサーバは今 %H さんがホスティング中です。 +%I +%I登録ユーザの数は %a 名です。 +%I今 %U 名のユーザさんが %N に %G 個のゲームをプレー中です。 +%Iすべては %u 名のユーザさんが %g 個のゲームをプレーします。 +%I%c 個のチャンネが生成しました。 +%Iコマンド・リストは「/help」をタイプして下さい。 +%I +%I(edit this text in conf/bnmotd-ptBR.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-koKR.txt.in b/conf/i18n/bnmotd-koKR.txt.in new file mode 100644 index 000000000..902c6a35d --- /dev/null +++ b/conf/i18n/bnmotd-koKR.txt.in @@ -0,0 +1,13 @@ +%E안녕하세요 %l 님, PvPGN 서버에 오신것을 환영합니다! +%I%h 님이 %v 를 구동하고 계십니다. +%I본 서버는 %H 님이 호스팅하고 계십니다. +%I +%I현재 %a 개의 계정이 저장되어 있습니다. +%I현재 %U 명의 유저들이 %N 에서 %G 개의 게임을 즐기시고 계십니다. +%I모두 %u 명의 유저가 %g 개의 게임을 즐기고 있으며 %c 개의 채널이 있습니다. +%I명령어의 대해 궁금한 사항이 있으시다구요? +%I/help 명령어를 이용해 보세요. +%I +%I(edit this text in conf/bnmotd-ptBR.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-nlNL.txt b/conf/i18n/bnmotd-nlNL.txt.in similarity index 79% rename from conf/i18n/bnmotd-nlNL.txt rename to conf/i18n/bnmotd-nlNL.txt.in index f061481c6..cbf3f506e 100644 --- a/conf/i18n/bnmotd-nlNL.txt +++ b/conf/i18n/bnmotd-nlNL.txt.in @@ -1,5 +1,5 @@ %IHallo %l, welom bij %s! -%IWe draaien versie %v op %h. +%EWe draaien versie %v op %h. %IDeze server wordt gehost bij %H %I %IEr zijn %a gebruikers accounts op deze server. @@ -8,4 +8,6 @@ %IProblemen met een commando? Type /help om %Ier meer te weten over te komen. %I -%I%m +%I(edit this text in conf/bnmotd-nlNL.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-plPL.txt b/conf/i18n/bnmotd-plPL.txt.in similarity index 81% rename from conf/i18n/bnmotd-plPL.txt rename to conf/i18n/bnmotd-plPL.txt.in index 71d3da62e..818bc5383 100644 --- a/conf/i18n/bnmotd-plPL.txt +++ b/conf/i18n/bnmotd-plPL.txt.in @@ -1,4 +1,4 @@ -%ICześć %l, witaj w %s! +%ECześć %l, witaj w %s! %IWersja serwera %v uruchomiona na %h. %ISerwer obsługuje %H %I @@ -8,4 +8,6 @@ %IJeśli masz jakieś problemy z poleceniami, to napiszsz /help aby %Idowiedzieć się wiecej. %I -%I%m +%I(edit this text in conf/bnmotd-plPL.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-ptBR.txt b/conf/i18n/bnmotd-ptBR.txt.in similarity index 79% rename from conf/i18n/bnmotd-ptBR.txt rename to conf/i18n/bnmotd-ptBR.txt.in index 4a8b6c267..527def542 100644 --- a/conf/i18n/bnmotd-ptBR.txt +++ b/conf/i18n/bnmotd-ptBR.txt.in @@ -1,4 +1,4 @@ -%IOlá %l, Bem vindo a %s! +%EOlá %l, Bem vindo a %s! %IRodando a versão %v em %h. %IEste servidor é hosteado por %H %I @@ -8,4 +8,6 @@ %ITendo algum problema com comando? Digite /help ra %Aprender mais sobre. %I -%I%m +%I(edit this text in conf/bnmotd-ptBR.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-ruRU.txt b/conf/i18n/bnmotd-ruRU.txt.in similarity index 80% rename from conf/i18n/bnmotd-ruRU.txt rename to conf/i18n/bnmotd-ruRU.txt.in index d10b83c15..65344ea07 100644 --- a/conf/i18n/bnmotd-ruRU.txt +++ b/conf/i18n/bnmotd-ruRU.txt.in @@ -6,6 +6,8 @@ %IСейчас %G игр и %U игроков в %N %Iиз них %u находятся в %g играх и общаются на %c каналах. %I -%IВведите /help для получения помощи по командам чата +%IВведите /help для получения помощи по командам чата +%I +%I(измените этот текст в файле conf/bnmotd-ruRU.txt) %I %M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-svSE.txt.in b/conf/i18n/bnmotd-svSE.txt.in new file mode 100644 index 000000000..29ded5911 --- /dev/null +++ b/conf/i18n/bnmotd-svSE.txt.in @@ -0,0 +1,13 @@ +%EHej %l, välkommen till %s! +%IKör version %v på %h. +%IVärden för den här servern är %H +%I +%IDet finns %a användarkonton på denna server. +%IDet finns förnärvarande %U användare i %G spel av %N, +%Ioch %u användare som spelar %g spel och chattar i %c kanaler. +%IHar du problem med ett kommando? Skriv /help för +%Iatt lära dig mer om det. +%I +%I(edit this text in conf/bnmotd-svSE.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-zhCN.txt b/conf/i18n/bnmotd-zhCN.txt.in similarity index 78% rename from conf/i18n/bnmotd-zhCN.txt rename to conf/i18n/bnmotd-zhCN.txt.in index 4d21275c2..716cccbc2 100644 --- a/conf/i18n/bnmotd-zhCN.txt +++ b/conf/i18n/bnmotd-zhCN.txt.in @@ -1,4 +1,4 @@ -%I%l,你好。欢迎来到 %s! +%E%l,你好。欢迎来到 %s! %I现在 %h 正在运行的版本为 %v %I本服务器由 %H 管理维护 %I @@ -8,4 +8,6 @@ %I还不了解可以使用哪些命令? %I输入 /help 就可以学习了 %I -%I%m +%I(edit this text in conf/bnmotd-zhCB.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-zhTW.txt b/conf/i18n/bnmotd-zhTW.txt.in similarity index 78% rename from conf/i18n/bnmotd-zhTW.txt rename to conf/i18n/bnmotd-zhTW.txt.in index d5de5764a..54c5a5f9e 100644 --- a/conf/i18n/bnmotd-zhTW.txt +++ b/conf/i18n/bnmotd-zhTW.txt.in @@ -1,4 +1,4 @@ -%I哈囉! %l, 歡迎蒞臨 %s! +%E哈囉! %l, 歡迎蒞臨 %s! %I本伺服器由 %H 架設於 %h. %I現行的伺服器版本是 %v. %I @@ -7,4 +7,6 @@ %I其中有 %u 個玩家一邊在玩 %g 個遊戲一邊在 %c 個聊天頻道. %I不懂使用指令? 請輸入 /help 來了解更多... %I -%I%m +%I(edit this text in conf/bnmotd-zhTW.txt) +%I +%M%m \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-csCZ.txt b/conf/i18n/chathelp-war3-csCZ.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-csCZ.txt rename to conf/i18n/chathelp-war3-csCZ.txt.in diff --git a/conf/i18n/chathelp-war3-deDE.txt b/conf/i18n/chathelp-war3-deDE.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-deDE.txt rename to conf/i18n/chathelp-war3-deDE.txt.in diff --git a/conf/i18n/chathelp-war3-enUS.txt b/conf/i18n/chathelp-war3-enUS.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-enUS.txt rename to conf/i18n/chathelp-war3-enUS.txt.in diff --git a/conf/i18n/chathelp-war3-esES.txt b/conf/i18n/chathelp-war3-esES.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-esES.txt rename to conf/i18n/chathelp-war3-esES.txt.in diff --git a/conf/i18n/chathelp-war3-frFR.txt b/conf/i18n/chathelp-war3-frFR.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-frFR.txt rename to conf/i18n/chathelp-war3-frFR.txt.in diff --git a/conf/i18n/chathelp-war3-itIT.txt b/conf/i18n/chathelp-war3-itIT.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-itIT.txt rename to conf/i18n/chathelp-war3-itIT.txt.in diff --git a/conf/i18n/chathelp-war3-jaJA.txt b/conf/i18n/chathelp-war3-jaJA.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-jaJA.txt rename to conf/i18n/chathelp-war3-jaJA.txt.in diff --git a/conf/i18n/chathelp-war3-koKR.txt b/conf/i18n/chathelp-war3-koKR.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-koKR.txt rename to conf/i18n/chathelp-war3-koKR.txt.in diff --git a/conf/i18n/chathelp-war3-plPL.txt b/conf/i18n/chathelp-war3-plPL.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-plPL.txt rename to conf/i18n/chathelp-war3-plPL.txt.in diff --git a/conf/i18n/chathelp-war3-ruRU.txt b/conf/i18n/chathelp-war3-ruRU.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-ruRU.txt rename to conf/i18n/chathelp-war3-ruRU.txt.in diff --git a/conf/i18n/chathelp-war3-zhCN.txt b/conf/i18n/chathelp-war3-zhCN.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-zhCN.txt rename to conf/i18n/chathelp-war3-zhCN.txt.in diff --git a/conf/i18n/chathelp-war3-zhTW.txt b/conf/i18n/chathelp-war3-zhTW.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-zhTW.txt rename to conf/i18n/chathelp-war3-zhTW.txt.in diff --git a/conf/i18n/common-csCZ.xml b/conf/i18n/common-csCZ.xml.in similarity index 100% rename from conf/i18n/common-csCZ.xml rename to conf/i18n/common-csCZ.xml.in diff --git a/conf/i18n/common-deDE.xml b/conf/i18n/common-deDE.xml.in similarity index 100% rename from conf/i18n/common-deDE.xml rename to conf/i18n/common-deDE.xml.in diff --git a/conf/i18n/common-esES.xml b/conf/i18n/common-esES.xml.in similarity index 100% rename from conf/i18n/common-esES.xml rename to conf/i18n/common-esES.xml.in diff --git a/conf/i18n/common-frFR.xml b/conf/i18n/common-frFR.xml.in similarity index 100% rename from conf/i18n/common-frFR.xml rename to conf/i18n/common-frFR.xml.in diff --git a/conf/i18n/common-itIT.xml b/conf/i18n/common-itIT.xml.in similarity index 100% rename from conf/i18n/common-itIT.xml rename to conf/i18n/common-itIT.xml.in diff --git a/conf/i18n/common-jaJA.xml b/conf/i18n/common-jaJA.xml.in similarity index 100% rename from conf/i18n/common-jaJA.xml rename to conf/i18n/common-jaJA.xml.in diff --git a/conf/i18n/common-koKR.xml b/conf/i18n/common-koKR.xml.in similarity index 100% rename from conf/i18n/common-koKR.xml rename to conf/i18n/common-koKR.xml.in diff --git a/conf/i18n/common-plPL.xml b/conf/i18n/common-plPL.xml.in similarity index 100% rename from conf/i18n/common-plPL.xml rename to conf/i18n/common-plPL.xml.in diff --git a/conf/i18n/common-ruRU.xml b/conf/i18n/common-ruRU.xml.in similarity index 100% rename from conf/i18n/common-ruRU.xml rename to conf/i18n/common-ruRU.xml.in diff --git a/conf/i18n/common-zhCN.xml b/conf/i18n/common-zhCN.xml.in similarity index 100% rename from conf/i18n/common-zhCN.xml rename to conf/i18n/common-zhCN.xml.in diff --git a/conf/i18n/common-zhTW.xml b/conf/i18n/common-zhTW.xml.in similarity index 100% rename from conf/i18n/common-zhTW.xml rename to conf/i18n/common-zhTW.xml.in diff --git a/conf/i18n/newaccount-csCZ.txt b/conf/i18n/newaccount-csCZ.txt.in similarity index 100% rename from conf/i18n/newaccount-csCZ.txt rename to conf/i18n/newaccount-csCZ.txt.in diff --git a/conf/i18n/newaccount-deDE.txt b/conf/i18n/newaccount-deDE.txt.in similarity index 100% rename from conf/i18n/newaccount-deDE.txt rename to conf/i18n/newaccount-deDE.txt.in diff --git a/conf/i18n/newaccount-enUS.txt b/conf/i18n/newaccount-enUS.txt.in similarity index 100% rename from conf/i18n/newaccount-enUS.txt rename to conf/i18n/newaccount-enUS.txt.in diff --git a/conf/i18n/newaccount-esES.txt b/conf/i18n/newaccount-esES.txt.in similarity index 100% rename from conf/i18n/newaccount-esES.txt rename to conf/i18n/newaccount-esES.txt.in diff --git a/conf/i18n/newaccount-frFR.txt b/conf/i18n/newaccount-frFR.txt.in similarity index 100% rename from conf/i18n/newaccount-frFR.txt rename to conf/i18n/newaccount-frFR.txt.in diff --git a/conf/i18n/newaccount-itIT.txt b/conf/i18n/newaccount-itIT.txt.in similarity index 100% rename from conf/i18n/newaccount-itIT.txt rename to conf/i18n/newaccount-itIT.txt.in diff --git a/conf/i18n/newaccount-jaJA.txt b/conf/i18n/newaccount-jaJA.txt.in similarity index 100% rename from conf/i18n/newaccount-jaJA.txt rename to conf/i18n/newaccount-jaJA.txt.in diff --git a/conf/i18n/newaccount-koKR.txt b/conf/i18n/newaccount-koKR.txt.in similarity index 100% rename from conf/i18n/newaccount-koKR.txt rename to conf/i18n/newaccount-koKR.txt.in diff --git a/conf/i18n/newaccount-plPL.txt b/conf/i18n/newaccount-plPL.txt.in similarity index 100% rename from conf/i18n/newaccount-plPL.txt rename to conf/i18n/newaccount-plPL.txt.in diff --git a/conf/i18n/newaccount-ruRU.txt b/conf/i18n/newaccount-ruRU.txt.in similarity index 100% rename from conf/i18n/newaccount-ruRU.txt rename to conf/i18n/newaccount-ruRU.txt.in diff --git a/conf/i18n/newaccount-zhCN.txt b/conf/i18n/newaccount-zhCN.txt.in similarity index 100% rename from conf/i18n/newaccount-zhCN.txt rename to conf/i18n/newaccount-zhCN.txt.in diff --git a/conf/i18n/newaccount-zhTW.txt b/conf/i18n/newaccount-zhTW.txt.in similarity index 100% rename from conf/i18n/newaccount-zhTW.txt rename to conf/i18n/newaccount-zhTW.txt.in diff --git a/conf/i18n/termsofservice-csCZ.txt b/conf/i18n/termsofservice-csCZ.txt.in similarity index 100% rename from conf/i18n/termsofservice-csCZ.txt rename to conf/i18n/termsofservice-csCZ.txt.in diff --git a/conf/i18n/termsofservice-deDE.txt b/conf/i18n/termsofservice-deDE.txt.in similarity index 100% rename from conf/i18n/termsofservice-deDE.txt rename to conf/i18n/termsofservice-deDE.txt.in diff --git a/conf/i18n/termsofservice-enUS.txt b/conf/i18n/termsofservice-enUS.txt.in similarity index 100% rename from conf/i18n/termsofservice-enUS.txt rename to conf/i18n/termsofservice-enUS.txt.in diff --git a/conf/i18n/termsofservice-esES.txt b/conf/i18n/termsofservice-esES.txt.in similarity index 100% rename from conf/i18n/termsofservice-esES.txt rename to conf/i18n/termsofservice-esES.txt.in diff --git a/conf/i18n/termsofservice-frFR.txt b/conf/i18n/termsofservice-frFR.txt.in similarity index 100% rename from conf/i18n/termsofservice-frFR.txt rename to conf/i18n/termsofservice-frFR.txt.in diff --git a/conf/i18n/termsofservice-itIT.txt b/conf/i18n/termsofservice-itIT.txt.in similarity index 100% rename from conf/i18n/termsofservice-itIT.txt rename to conf/i18n/termsofservice-itIT.txt.in diff --git a/conf/i18n/termsofservice-jaJA.txt b/conf/i18n/termsofservice-jaJA.txt.in similarity index 100% rename from conf/i18n/termsofservice-jaJA.txt rename to conf/i18n/termsofservice-jaJA.txt.in diff --git a/conf/i18n/termsofservice-koKR.txt b/conf/i18n/termsofservice-koKR.txt.in similarity index 100% rename from conf/i18n/termsofservice-koKR.txt rename to conf/i18n/termsofservice-koKR.txt.in diff --git a/conf/i18n/termsofservice-plPL.txt b/conf/i18n/termsofservice-plPL.txt.in similarity index 100% rename from conf/i18n/termsofservice-plPL.txt rename to conf/i18n/termsofservice-plPL.txt.in diff --git a/conf/i18n/termsofservice-ruRU.txt b/conf/i18n/termsofservice-ruRU.txt.in similarity index 100% rename from conf/i18n/termsofservice-ruRU.txt rename to conf/i18n/termsofservice-ruRU.txt.in diff --git a/conf/i18n/termsofservice-zhCN.txt b/conf/i18n/termsofservice-zhCN.txt.in similarity index 100% rename from conf/i18n/termsofservice-zhCN.txt rename to conf/i18n/termsofservice-zhCN.txt.in diff --git a/conf/i18n/termsofservice-zhTW.txt b/conf/i18n/termsofservice-zhTW.txt.in similarity index 100% rename from conf/i18n/termsofservice-zhTW.txt rename to conf/i18n/termsofservice-zhTW.txt.in From dd157be15d77a8140d1bf32ed1ac5e9bb887975d Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 29 Jun 2014 12:50:29 +0400 Subject: [PATCH 066/144] replace empty spaces " " -> "" (for comfort further translation) https://github.com/HarpyWar/pvpgn/issues/13 --- conf/i18n/common-csCZ.xml.in | 784 +++++++++--------- conf/i18n/common-deDE.xml.in | 784 +++++++++--------- conf/i18n/common-esES.xml.in | 784 +++++++++--------- conf/i18n/common-frFR.xml.in | 784 +++++++++--------- conf/i18n/common-itIT.xml.in | 784 +++++++++--------- conf/i18n/common-jaJA.xml.in | 784 +++++++++--------- conf/i18n/common-koKR.xml.in | 784 +++++++++--------- conf/i18n/common-plPL.xml.in | 784 +++++++++--------- conf/i18n/common-ruRU.xml.in | 784 +++++++++--------- conf/i18n/common-zhCN.xml.in | 784 +++++++++--------- conf/i18n/common-zhTW.xml.in | 784 +++++++++--------- scripts/localize/pvpgn_localize_generator.cs | 7 +- scripts/localize/pvpgn_localize_generator.exe | Bin 12800 -> 12800 bytes scripts/localize/update.bat | 22 +- 14 files changed, 4329 insertions(+), 4324 deletions(-) diff --git a/conf/i18n/common-csCZ.xml.in b/conf/i18n/common-csCZ.xml.in index 0fa30051a..cbb517f26 100644 --- a/conf/i18n/common-csCZ.xml.in +++ b/conf/i18n/common-csCZ.xml.in @@ -9,103 +9,103 @@ by {} - + for {} - + permanently - + with a reason "{}" - + No such alias. Use // to show the list. - + Alias list: - + you are now tempOP for this channel - + Account name contains some invalid symbol! - + Maximum password length allowed is {} - + Trying to add account "{}" with password "{}" - + Hash is: {} - + Failed to create account! - + Account {} created. - + You must supply a username. - + There's no account with username {}. - + {} is already a Server Admin - + {} has been promoted to a Server Admin - + {} has promoted you to a Server Admin - + {} is not a Server Admin. - + {} has been demoted from a Server Admin - + {} has demoted you from a Server Admin - + Currently logged on Administrators: - + Your game client doesn't support MessageBox. - + \n\n***************************\nBy {} - + Information from {} - + for {} @@ -113,19 +113,19 @@ Announcement from {}: {} - + Could not broadcast message. - + This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. @@ -133,23 +133,23 @@ {} is already a Channel Admin - + {} has been promoted to a Channel Admin - + {} has promoted you to a Channel Admin for channel "{}" - + You are now marked as being away. - + You are no longer marked as away. - + This command can only be used inside a channel. @@ -157,55 +157,55 @@ You have to be at least a Channel Operator to use this command. - + That account doesn't currently exist. - + You cannot ban administrators. - + Audible notification on. - + Channel Arranged Teams is a RESTRICTED Channel! - + Max channel name length exceeded (max {} symbols) - + Command disabled while inside a game. - + Currently accessible channels: - + All current channels: - + Current channels of type {} - + -----------name----------- users ----admin/operator---- - + Only admins may change passwords for other accounts. - + Account does not exist. - + Maximum password length allowed is {} @@ -213,107 +213,107 @@ Trying to change password for account "{}" to "{}" - + Unable to set password. - + Message was sent to all currently available clan members. - + All fellow members of your clan are currently offline. - + Clan channel is opened up! - + Clan channel has already been opened up! - + Clan channel is closed! - + Clan channel has already been closed! - + Clan message of day is updated! - + User {} was invited to your clan! - + You are invited to {} by {}! - + User {} is not online or is already member of clan! - + This is one-way action! If you really want - + to disband your clan, type /clan disband yes - + Your clan was disbanded. - + You have been invited to {} - + You are now a clan member of {} - + Clan {} was be created - + You are no longer ivited to {} - + You are already in clan "{}" - + Clan with your specified &lt;clantag&gt; already exist! - + Please choice another one. - + Clan {} is created! - + Clan {} is pre-created, please invite - + at least {} players to your clan by using - + /clan invite &lt;username&gt; command. - + Invalid user. @@ -325,55 +325,55 @@ {}'s command group(s): {} - + Got bad group: {} - + Groups {} has been added to {} - + Groups {} has been deleted from {} - + Got unknown command: {} - + This command is only enabled for admins. - + Current connections: - + -class -tag -----name------ -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - + Unknown option. - + (none) - + none - + This command can only be used inside a channel. @@ -389,43 +389,43 @@ You must be at least a Channel Admin to demote another Channel Admin - + {} has been demoted from a Channel Admin. - + {} has demoted you from a Channel Admin of channel "{}" - + {} has been demoted from a Channel Operator - + {} has demoted you from a Channel Operator of channel "{}" - + {} has been demoted from a tempOP of this channel - + {} has demoted you from a tmpOP of channel "{}" - + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - + {} has demoted you from a tempOP of channel "{}" - + {} is no tempOP in this channel, so you can't demote him - + This command can only be used inside a channel. @@ -441,43 +441,43 @@ {} has been removed from VOP list. - + {} has removed you from VOP list of channel "{}" - + You must be at least Channel Admin to remove {} from the VOP list - + Voice has been taken from {} in this channel - + {} has taken your Voice in channel "{}" - + {} has no Voice in this channel, so it can't be taken away - + Do Not Disturb mode engaged. - + Not available - + Do Not Disturb mode canceled. - + -- name -- similar to {} - + Invalid user. @@ -485,179 +485,179 @@ Login: {} {} Sex: {} - + Created: {} - + Clan: {} - + Rank: Chieftain - + Rank: Shaman - + Rank: Grunt - + Rank: Peon - + Location: {} Age: {} - + Client: {} Ver: {} Country: {} - + unknown - + Last login {} from - + On since {} from - + Operator: {}, Admin: {}, Locked: {}, Muted: {} - + Yes - + Email: {} - + Last login Owner: {} - + Idle {} - + Flags set to {}. - + That user does not exist. - + Server error. - + You can't add yourself to your friends list. - + You can only have a maximum of {} friends. - + {} is already on your friends list! - + Added {} to your friends list. - + {} added you to his/her friends list. - + All of your friends are offline. - + {} was not found on your friends list. - + Removed {} from your friends list. - + Promoted {} in your friends list. - + Demoted {} in your friends list. - + Your {} - Friends List - + Your {} - Online Friends List - + , offline - + using {} - + , in game "{}" - + , in game AT Preparation - + , in channel "{}", - + , is in AT Preparation - + , is in a game - + , is in a chat channel - + End of Friends List - + You are not in a game. - + That game does not exist. - + Name: {} ID: {} ({}) - + none @@ -669,19 +669,19 @@ Owner: {} - + Address: {} - + Address: {} (trans {}) - + Client: {} (version {}, startver {}) - + Created: {} @@ -689,99 +689,99 @@ Started: {} - + Status: {} - + Type: {} - + Speed: {} - + Difficulty: {} - + Option: {} - + Map: {} - + Map Size: {}x{} - + Map Tileset: {} - + Map Type: {} - + Players: {} current, {} total, {} max - + Description: {} - + Currently accessible games: - + All current games: - + Games in lobby: - + Current games of type {} - + Current games of type {} {} - + ------name------ p -status- --------type--------- count - + ctag - + --------addr-------- - + Warning: That user is not online, using last known address. - + Sorry, no IP address could be retrieved. - + Scanning online users for IP {}... - + There are no online users with that IP address - + This command can only be used inside a channel. @@ -789,47 +789,47 @@ You have to be at least a Channel Operator or tempOP to use this command. - + That user is not logged in. - + That user is not in this channel. - + That connection doesn't exist. - + That user is not logged in? - + An admin has closed your connection and banned your IP address. - + Connection closed by admin. - + Operation successful. - + That is not a valid session. - + That session does not exist. - + Connection closed by admin and banned your IP's. - + Connection closed by admin. @@ -837,7 +837,7 @@ Copied current scores to active scores on all ladders. - + This game does not support win/loss records. @@ -845,11 +845,11 @@ You must supply a rank and a valid program ID. - + Example: /ladderinfo 1 STAR - + Invalid user. @@ -857,11 +857,11 @@ Account {} is now locked - + Your account has just been locked - + This command can only be used inside a channel. @@ -869,11 +869,11 @@ Banned users: - + You are not in a channel. - + This command can only be used inside a channel. @@ -885,23 +885,23 @@ Unable to change channel flags. - + Channel is now unmoderated. - + Channel is now moderated. - + Unable to open motd. - + No motd. - + Invalid user. @@ -909,11 +909,11 @@ Account {} is now muted - + Your account has just been muted - + That user is not logged on. @@ -921,39 +921,39 @@ Address information for other users is only available to admins. - + Server TCP: {} (bind {}) - + Client TCP: {} - + Client UDP: {} - + Client UDP: {} (trans {}) - + Game UDP: {} - + Game UDP: {} (trans {}) - + Game UDP: none - + Audible notification off. - + This command can only be used inside a channel. @@ -961,7 +961,7 @@ You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. @@ -969,31 +969,31 @@ {} is already a Channel Operator - + {} has been promoted to a Channel Operator - + {} has promoted you to a Channel Operator in channel "{}" - + {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to a tempOP - + {} has promoted you to a tempOP in this channel - + You must supply a username. @@ -1005,35 +1005,35 @@ {} is already a Server Operator - + {} has been promoted to a Server Operator - + {} has promoted you to a Server Operator - + {} is no Server Operator, so you can't demote him - + {} has been demoted from a Server Operator - + {} latency: {} - + Your latency {} - + {} latency () - + Invalid user. @@ -1041,35 +1041,35 @@ Connection closed. - + Your quota allows you to write {} line(s) per {} second(s). - + Long lines will be wrapped every {} characters. - + You are not allowed to send lines with more than {} characters. - + You must join a realm first - + Announcement from {}@{}: {} - + Invalid mode. - + Rehash of "{}" is complete! - + You are not in a channel. @@ -1077,11 +1077,11 @@ No one messaged you, use /m instead - + Pending changes has been saved into the database. - + That user is not logged on. @@ -1089,27 +1089,27 @@ Banning {} who is using IP address {} - + User's account is also LOCKED! Only an admin can unlock it! - + /ipban a {} - + You have been banned by Admin: {} - + Your account is also LOCKED! Only an admin can UNLOCK it! - + Access denied due to security reasons. - + Invalid user. @@ -1117,203 +1117,203 @@ Current value of {} is "{}" - + Value currently not set - + Unable to set key for - + Key set successfully for - + Invalid delay. - + You've initialized the shutdown sequence. - + You've canceled the shutdown sequence. - + No such user. - + You can't squelch yourself. - + Could not squelch user. - + {} has been squelched. - + Invalid user. - + Unable to determine client game. - + This game does not support win/loss records. - + You must supply a user name and a valid program ID. - + Example: /stats joe STAR - + {}'s record: - + level: {} - + class: {} - + stats: {} str {} mag {} dex {} vit {} gld - + Diablo kills: {} - + Normal games: {}-{}-{} - + Ladder games: {}-{}-{} (rating {}) - + Ladder games: 0-0-0 - + IronMan games: {}-{}-{} (rating {}) - + IronMan games: 0-0-0 - + {}'s Ladder Record's: - + Users Solo Level: {}, Experience: {} - + SOLO Ladder Record: {}-{}-0 - + SOLO Rank: {} - + Users Team Level: {}, Experience: {} - + TEAM Ladder Record: {}-{}-0 - + TEAM Rank: {} - + Users FFA Level: {}, Experience: {} - + FFA Ladder Record: {}-{}-0 - + FFA Rank: {} - + Users AT Team No. {} - + Users AT TEAM Level: {}, Experience: {} - + AT TEAM Ladder Record: {}-{}-0 - + AT TEAM Rank: {} - + There are currently {} user(s) in {} games of {} - + There are currently {} users online, in {} games, and in {} channels. - + Client tag set to {}. - + Invalid clienttag {} specified - + Server Time: {} - + Your local time: {} - + Invalid duration. - + Your timer has expired. - + Could not set timer. - + Timer set for {} second(s) - + This command can only be used inside a channel. @@ -1321,7 +1321,7 @@ You must be at least a Channel Operator or tmpOP to use this command. - + There's no account with username {}. @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - + {} must be on the same channel to tempOP him @@ -1341,7 +1341,7 @@ {} has been promoted to tmpOP in this channel - + {} has promoted you to a tempOP in this channel @@ -1353,19 +1353,19 @@ Max topic length exceeded (max {} symbols) - + You must be at least a Channel Operator of {} to set the topic - + {} topic: no topic - + Unable to send TOS (Terms of Service). - + This command can only be used inside a channel. @@ -1373,15 +1373,15 @@ You are not a channel operator. - + That user is not banned. - + {} is no longer banned from this channel. - + Invalid user. @@ -1389,11 +1389,11 @@ Your account has just been unlocked by {} - + That user's account is now unlocked. - + Invalid user. @@ -1401,11 +1401,11 @@ Your account has just been unmuted by {} - + That user's account is now unmuted. - + No such user. @@ -1413,11 +1413,11 @@ User was not being ignored. - + No longer ignoring. - + That user does not exist. @@ -1425,11 +1425,11 @@ Removal from watch list failed. - + User {} removed from your watch list. - + Removal from watch list failed. @@ -1437,15 +1437,15 @@ All {} users removed from your watch list. - + All users removed from your watch list. - + Uptime: {} - + This command can only be used inside a channel. @@ -1453,7 +1453,7 @@ You must be at least a Channel Operator to use this command. - + There's no account with username {}. @@ -1461,27 +1461,27 @@ {} is already on VOP list, no need to Voice him - + {} must be on the same channel to voice him - + {} already has Voice in this channel - + {} is already an operator or admin. - + {} has been granted Voice in this channel - + {} has granted you Voice in this channel - + This command can only be used inside a channel. @@ -1497,15 +1497,15 @@ {} is already on VOP list - + {} has been added to the VOP list - + {} has added you to the VOP list of channel "{}" - + That user does not exist. @@ -1513,11 +1513,11 @@ Add to watch list failed. - + User {} added to your watch list. - + Add to watch list failed. @@ -1525,39 +1525,39 @@ All {} users added to your watch list. - + All users added to your watch list. - + That channel does not exist. - + (If you are trying to search for a user, use the /whois command.) - + You are banned from that channel. - + Users in channel {}: - + Unable to obtain your account name. - + (invalid date) - + Reset {}'s {} stats - + Reset {}'s {} stats @@ -1569,39 +1569,39 @@ You cannot kick administrators. - + You cannot kick operators. - + {} has been kicked by {} ({}). - + {} has been kicked by {}. - + You cannot ban operators. - + Unable to ban {}. - + {} has been banned by {} ({}). - + {} has been banned by {}. - + Password for account {} updated. - + Hash is: {} @@ -1609,83 +1609,83 @@ Your account has been muted, you can't whisper to other users. - + That user is not logged on. - + {} is unavailable ({}) - + {} is away ({}) - + Unknown user. - + User was last seen on: {} - + User is offline - + You - + are - + is - + {} {} using {} and {} currently in {} game "{}". - + {} {} using {} and {} currently in channel "{}". - + {} {} using {}. - + {} {} refusing messages ({}) - + {} away ({}) - + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - + This command has been deactivated - + This command is reserved for admins. - + Unknown command. - + This account has been locked - + This account has been locked @@ -1693,7 +1693,7 @@ Oops ! There is a problem with the help file. Please contact the administrator of the server. - + This command can only be used inside a channel. @@ -1701,75 +1701,75 @@ This command can only be used from the game. - + Bad icon. - + {} banned permamently by {}. - + {} banned permamently. - + {} banned for {} by {}. - + {} banned for {}. - + Banning only for: {} minutes. - + This server has NO mail support. - + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - + Successfully deleted messages. - + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - + Succesfully deleted message. - + You have no mail. - + There was an error completing your request. - + Receiver UNKNOWN! - + Receiver has reached his mail quota. Your message will NOT be sent. - + Your mail has been sent successfully. - + There was an error completing your request! - + You must be at least a Channel Operator to use this command. @@ -1781,31 +1781,31 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - + Available Quiz dictionaries: - + Quiz is not running. - + {}'s Quiz record: - + {} has never played Quiz. - + Top {} Quiz records: - + points - + This command is reserved for admins. @@ -1813,7 +1813,7 @@ User "{}" is offline - + \ No newline at end of file diff --git a/conf/i18n/common-deDE.xml.in b/conf/i18n/common-deDE.xml.in index 2ab0e831d..22cba0d73 100644 --- a/conf/i18n/common-deDE.xml.in +++ b/conf/i18n/common-deDE.xml.in @@ -9,103 +9,103 @@ by {} - + for {} - + permanently - + with a reason "{}" - + No such alias. Use // to show the list. - + Alias list: - + you are now tempOP for this channel - + Account name contains some invalid symbol! - + Maximum password length allowed is {} - + Trying to add account "{}" with password "{}" - + Hash is: {} - + Failed to create account! - + Account {} created. - + You must supply a username. - + There's no account with username {}. - + {} is already a Server Admin - + {} has been promoted to a Server Admin - + {} has promoted you to a Server Admin - + {} is not a Server Admin. - + {} has been demoted from a Server Admin - + {} has demoted you from a Server Admin - + Currently logged on Administrators: - + Your game client doesn't support MessageBox. - + \n\n***************************\nBy {} - + Information from {} - + for {} @@ -113,19 +113,19 @@ Announcement from {}: {} - + Could not broadcast message. - + This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. @@ -133,23 +133,23 @@ {} is already a Channel Admin - + {} has been promoted to a Channel Admin - + {} has promoted you to a Channel Admin for channel "{}" - + You are now marked as being away. - + You are no longer marked as away. - + This command can only be used inside a channel. @@ -157,55 +157,55 @@ You have to be at least a Channel Operator to use this command. - + That account doesn't currently exist. - + You cannot ban administrators. - + Audible notification on. - + Channel Arranged Teams is a RESTRICTED Channel! - + Max channel name length exceeded (max {} symbols) - + Command disabled while inside a game. - + Currently accessible channels: - + All current channels: - + Current channels of type {} - + -----------name----------- users ----admin/operator---- - + Only admins may change passwords for other accounts. - + Account does not exist. - + Maximum password length allowed is {} @@ -213,107 +213,107 @@ Trying to change password for account "{}" to "{}" - + Unable to set password. - + Message was sent to all currently available clan members. - + All fellow members of your clan are currently offline. - + Clan channel is opened up! - + Clan channel has already been opened up! - + Clan channel is closed! - + Clan channel has already been closed! - + Clan message of day is updated! - + User {} was invited to your clan! - + You are invited to {} by {}! - + User {} is not online or is already member of clan! - + This is one-way action! If you really want - + to disband your clan, type /clan disband yes - + Your clan was disbanded. - + You have been invited to {} - + You are now a clan member of {} - + Clan {} was be created - + You are no longer ivited to {} - + You are already in clan "{}" - + Clan with your specified &lt;clantag&gt; already exist! - + Please choice another one. - + Clan {} is created! - + Clan {} is pre-created, please invite - + at least {} players to your clan by using - + /clan invite &lt;username&gt; command. - + Invalid user. @@ -325,55 +325,55 @@ {}'s command group(s): {} - + Got bad group: {} - + Groups {} has been added to {} - + Groups {} has been deleted from {} - + Got unknown command: {} - + This command is only enabled for admins. - + Current connections: - + -class -tag -----name------ -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - + Unknown option. - + (none) - + none - + This command can only be used inside a channel. @@ -389,43 +389,43 @@ You must be at least a Channel Admin to demote another Channel Admin - + {} has been demoted from a Channel Admin. - + {} has demoted you from a Channel Admin of channel "{}" - + {} has been demoted from a Channel Operator - + {} has demoted you from a Channel Operator of channel "{}" - + {} has been demoted from a tempOP of this channel - + {} has demoted you from a tmpOP of channel "{}" - + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - + {} has demoted you from a tempOP of channel "{}" - + {} is no tempOP in this channel, so you can't demote him - + This command can only be used inside a channel. @@ -441,43 +441,43 @@ {} has been removed from VOP list. - + {} has removed you from VOP list of channel "{}" - + You must be at least Channel Admin to remove {} from the VOP list - + Voice has been taken from {} in this channel - + {} has taken your Voice in channel "{}" - + {} has no Voice in this channel, so it can't be taken away - + Do Not Disturb mode engaged. - + Not available - + Do Not Disturb mode canceled. - + -- name -- similar to {} - + Invalid user. @@ -485,179 +485,179 @@ Login: {} {} Sex: {} - + Created: {} - + Clan: {} - + Rank: Chieftain - + Rank: Shaman - + Rank: Grunt - + Rank: Peon - + Location: {} Age: {} - + Client: {} Ver: {} Country: {} - + unknown - + Last login {} from - + On since {} from - + Operator: {}, Admin: {}, Locked: {}, Muted: {} - + Yes - + Email: {} - + Last login Owner: {} - + Idle {} - + Flags set to {}. - + That user does not exist. - + Server error. - + You can't add yourself to your friends list. - + You can only have a maximum of {} friends. - + {} is already on your friends list! - + Added {} to your friends list. - + {} added you to his/her friends list. - + All of your friends are offline. - + {} was not found on your friends list. - + Removed {} from your friends list. - + Promoted {} in your friends list. - + Demoted {} in your friends list. - + Your {} - Friends List - + Your {} - Online Friends List - + , offline - + using {} - + , in game "{}" - + , in game AT Preparation - + , in channel "{}", - + , is in AT Preparation - + , is in a game - + , is in a chat channel - + End of Friends List - + You are not in a game. - + That game does not exist. - + Name: {} ID: {} ({}) - + none @@ -669,19 +669,19 @@ Owner: {} - + Address: {} - + Address: {} (trans {}) - + Client: {} (version {}, startver {}) - + Created: {} @@ -689,99 +689,99 @@ Started: {} - + Status: {} - + Type: {} - + Speed: {} - + Difficulty: {} - + Option: {} - + Map: {} - + Map Size: {}x{} - + Map Tileset: {} - + Map Type: {} - + Players: {} current, {} total, {} max - + Description: {} - + Currently accessible games: - + All current games: - + Games in lobby: - + Current games of type {} - + Current games of type {} {} - + ------name------ p -status- --------type--------- count - + ctag - + --------addr-------- - + Warning: That user is not online, using last known address. - + Sorry, no IP address could be retrieved. - + Scanning online users for IP {}... - + There are no online users with that IP address - + This command can only be used inside a channel. @@ -789,47 +789,47 @@ You have to be at least a Channel Operator or tempOP to use this command. - + That user is not logged in. - + That user is not in this channel. - + That connection doesn't exist. - + That user is not logged in? - + An admin has closed your connection and banned your IP address. - + Connection closed by admin. - + Operation successful. - + That is not a valid session. - + That session does not exist. - + Connection closed by admin and banned your IP's. - + Connection closed by admin. @@ -837,7 +837,7 @@ Copied current scores to active scores on all ladders. - + This game does not support win/loss records. @@ -845,11 +845,11 @@ You must supply a rank and a valid program ID. - + Example: /ladderinfo 1 STAR - + Invalid user. @@ -857,11 +857,11 @@ Account {} is now locked - + Your account has just been locked - + This command can only be used inside a channel. @@ -869,11 +869,11 @@ Banned users: - + You are not in a channel. - + This command can only be used inside a channel. @@ -885,23 +885,23 @@ Unable to change channel flags. - + Channel is now unmoderated. - + Channel is now moderated. - + Unable to open motd. - + No motd. - + Invalid user. @@ -909,11 +909,11 @@ Account {} is now muted - + Your account has just been muted - + That user is not logged on. @@ -921,39 +921,39 @@ Address information for other users is only available to admins. - + Server TCP: {} (bind {}) - + Client TCP: {} - + Client UDP: {} - + Client UDP: {} (trans {}) - + Game UDP: {} - + Game UDP: {} (trans {}) - + Game UDP: none - + Audible notification off. - + This command can only be used inside a channel. @@ -961,7 +961,7 @@ You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. @@ -969,31 +969,31 @@ {} is already a Channel Operator - + {} has been promoted to a Channel Operator - + {} has promoted you to a Channel Operator in channel "{}" - + {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to a tempOP - + {} has promoted you to a tempOP in this channel - + You must supply a username. @@ -1005,35 +1005,35 @@ {} is already a Server Operator - + {} has been promoted to a Server Operator - + {} has promoted you to a Server Operator - + {} is no Server Operator, so you can't demote him - + {} has been demoted from a Server Operator - + {} latency: {} - + Your latency {} - + {} latency () - + Invalid user. @@ -1041,35 +1041,35 @@ Connection closed. - + Your quota allows you to write {} line(s) per {} second(s). - + Long lines will be wrapped every {} characters. - + You are not allowed to send lines with more than {} characters. - + You must join a realm first - + Announcement from {}@{}: {} - + Invalid mode. - + Rehash of "{}" is complete! - + You are not in a channel. @@ -1077,11 +1077,11 @@ No one messaged you, use /m instead - + Pending changes has been saved into the database. - + That user is not logged on. @@ -1089,27 +1089,27 @@ Banning {} who is using IP address {} - + User's account is also LOCKED! Only an admin can unlock it! - + /ipban a {} - + You have been banned by Admin: {} - + Your account is also LOCKED! Only an admin can UNLOCK it! - + Access denied due to security reasons. - + Invalid user. @@ -1117,203 +1117,203 @@ Current value of {} is "{}" - + Value currently not set - + Unable to set key for - + Key set successfully for - + Invalid delay. - + You've initialized the shutdown sequence. - + You've canceled the shutdown sequence. - + No such user. - + You can't squelch yourself. - + Could not squelch user. - + {} has been squelched. - + Invalid user. - + Unable to determine client game. - + This game does not support win/loss records. - + You must supply a user name and a valid program ID. - + Example: /stats joe STAR - + {}'s record: - + level: {} - + class: {} - + stats: {} str {} mag {} dex {} vit {} gld - + Diablo kills: {} - + Normal games: {}-{}-{} - + Ladder games: {}-{}-{} (rating {}) - + Ladder games: 0-0-0 - + IronMan games: {}-{}-{} (rating {}) - + IronMan games: 0-0-0 - + {}'s Ladder Record's: - + Users Solo Level: {}, Experience: {} - + SOLO Ladder Record: {}-{}-0 - + SOLO Rank: {} - + Users Team Level: {}, Experience: {} - + TEAM Ladder Record: {}-{}-0 - + TEAM Rank: {} - + Users FFA Level: {}, Experience: {} - + FFA Ladder Record: {}-{}-0 - + FFA Rank: {} - + Users AT Team No. {} - + Users AT TEAM Level: {}, Experience: {} - + AT TEAM Ladder Record: {}-{}-0 - + AT TEAM Rank: {} - + There are currently {} user(s) in {} games of {} - + There are currently {} users online, in {} games, and in {} channels. - + Client tag set to {}. - + Invalid clienttag {} specified - + Server Time: {} - + Your local time: {} - + Invalid duration. - + Your timer has expired. - + Could not set timer. - + Timer set for {} second(s) - + This command can only be used inside a channel. @@ -1321,7 +1321,7 @@ You must be at least a Channel Operator or tmpOP to use this command. - + There's no account with username {}. @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - + {} must be on the same channel to tempOP him @@ -1341,7 +1341,7 @@ {} has been promoted to tmpOP in this channel - + {} has promoted you to a tempOP in this channel @@ -1353,19 +1353,19 @@ Max topic length exceeded (max {} symbols) - + You must be at least a Channel Operator of {} to set the topic - + {} topic: no topic - + Unable to send TOS (Terms of Service). - + This command can only be used inside a channel. @@ -1373,15 +1373,15 @@ You are not a channel operator. - + That user is not banned. - + {} is no longer banned from this channel. - + Invalid user. @@ -1389,11 +1389,11 @@ Your account has just been unlocked by {} - + That user's account is now unlocked. - + Invalid user. @@ -1401,11 +1401,11 @@ Your account has just been unmuted by {} - + That user's account is now unmuted. - + No such user. @@ -1413,11 +1413,11 @@ User was not being ignored. - + No longer ignoring. - + That user does not exist. @@ -1425,11 +1425,11 @@ Removal from watch list failed. - + User {} removed from your watch list. - + Removal from watch list failed. @@ -1437,15 +1437,15 @@ All {} users removed from your watch list. - + All users removed from your watch list. - + Uptime: {} - + This command can only be used inside a channel. @@ -1453,7 +1453,7 @@ You must be at least a Channel Operator to use this command. - + There's no account with username {}. @@ -1461,27 +1461,27 @@ {} is already on VOP list, no need to Voice him - + {} must be on the same channel to voice him - + {} already has Voice in this channel - + {} is already an operator or admin. - + {} has been granted Voice in this channel - + {} has granted you Voice in this channel - + This command can only be used inside a channel. @@ -1497,15 +1497,15 @@ {} is already on VOP list - + {} has been added to the VOP list - + {} has added you to the VOP list of channel "{}" - + That user does not exist. @@ -1513,11 +1513,11 @@ Add to watch list failed. - + User {} added to your watch list. - + Add to watch list failed. @@ -1525,39 +1525,39 @@ All {} users added to your watch list. - + All users added to your watch list. - + That channel does not exist. - + (If you are trying to search for a user, use the /whois command.) - + You are banned from that channel. - + Users in channel {}: - + Unable to obtain your account name. - + (invalid date) - + Reset {}'s {} stats - + Reset {}'s {} stats @@ -1569,39 +1569,39 @@ You cannot kick administrators. - + You cannot kick operators. - + {} has been kicked by {} ({}). - + {} has been kicked by {}. - + You cannot ban operators. - + Unable to ban {}. - + {} has been banned by {} ({}). - + {} has been banned by {}. - + Password for account {} updated. - + Hash is: {} @@ -1609,83 +1609,83 @@ Your account has been muted, you can't whisper to other users. - + That user is not logged on. - + {} is unavailable ({}) - + {} is away ({}) - + Unknown user. - + User was last seen on: {} - + User is offline - + You - + are - + is - + {} {} using {} and {} currently in {} game "{}". - + {} {} using {} and {} currently in channel "{}". - + {} {} using {}. - + {} {} refusing messages ({}) - + {} away ({}) - + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - + This command has been deactivated - + This command is reserved for admins. - + Unknown command. - + This account has been locked - + This account has been locked @@ -1693,7 +1693,7 @@ Oops ! There is a problem with the help file. Please contact the administrator of the server. - + This command can only be used inside a channel. @@ -1701,75 +1701,75 @@ This command can only be used from the game. - + Bad icon. - + {} banned permamently by {}. - + {} banned permamently. - + {} banned for {} by {}. - + {} banned for {}. - + Banning only for: {} minutes. - + This server has NO mail support. - + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - + Successfully deleted messages. - + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - + Succesfully deleted message. - + You have no mail. - + There was an error completing your request. - + Receiver UNKNOWN! - + Receiver has reached his mail quota. Your message will NOT be sent. - + Your mail has been sent successfully. - + There was an error completing your request! - + You must be at least a Channel Operator to use this command. @@ -1781,31 +1781,31 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - + Available Quiz dictionaries: - + Quiz is not running. - + {}'s Quiz record: - + {} has never played Quiz. - + Top {} Quiz records: - + points - + This command is reserved for admins. @@ -1813,7 +1813,7 @@ User "{}" is offline - + \ No newline at end of file diff --git a/conf/i18n/common-esES.xml.in b/conf/i18n/common-esES.xml.in index dc4b65a75..8b7e41540 100644 --- a/conf/i18n/common-esES.xml.in +++ b/conf/i18n/common-esES.xml.in @@ -9,103 +9,103 @@ by {} - + for {} - + permanently - + with a reason "{}" - + No such alias. Use // to show the list. - + Alias list: - + you are now tempOP for this channel - + Account name contains some invalid symbol! - + Maximum password length allowed is {} - + Trying to add account "{}" with password "{}" - + Hash is: {} - + Failed to create account! - + Account {} created. - + You must supply a username. - + There's no account with username {}. - + {} is already a Server Admin - + {} has been promoted to a Server Admin - + {} has promoted you to a Server Admin - + {} is not a Server Admin. - + {} has been demoted from a Server Admin - + {} has demoted you from a Server Admin - + Currently logged on Administrators: - + Your game client doesn't support MessageBox. - + \n\n***************************\nBy {} - + Information from {} - + for {} @@ -113,19 +113,19 @@ Announcement from {}: {} - + Could not broadcast message. - + This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. @@ -133,23 +133,23 @@ {} is already a Channel Admin - + {} has been promoted to a Channel Admin - + {} has promoted you to a Channel Admin for channel "{}" - + You are now marked as being away. - + You are no longer marked as away. - + This command can only be used inside a channel. @@ -157,55 +157,55 @@ You have to be at least a Channel Operator to use this command. - + That account doesn't currently exist. - + You cannot ban administrators. - + Audible notification on. - + Channel Arranged Teams is a RESTRICTED Channel! - + Max channel name length exceeded (max {} symbols) - + Command disabled while inside a game. - + Currently accessible channels: - + All current channels: - + Current channels of type {} - + -----------name----------- users ----admin/operator---- - + Only admins may change passwords for other accounts. - + Account does not exist. - + Maximum password length allowed is {} @@ -213,107 +213,107 @@ Trying to change password for account "{}" to "{}" - + Unable to set password. - + Message was sent to all currently available clan members. - + All fellow members of your clan are currently offline. - + Clan channel is opened up! - + Clan channel has already been opened up! - + Clan channel is closed! - + Clan channel has already been closed! - + Clan message of day is updated! - + User {} was invited to your clan! - + You are invited to {} by {}! - + User {} is not online or is already member of clan! - + This is one-way action! If you really want - + to disband your clan, type /clan disband yes - + Your clan was disbanded. - + You have been invited to {} - + You are now a clan member of {} - + Clan {} was be created - + You are no longer ivited to {} - + You are already in clan "{}" - + Clan with your specified &lt;clantag&gt; already exist! - + Please choice another one. - + Clan {} is created! - + Clan {} is pre-created, please invite - + at least {} players to your clan by using - + /clan invite &lt;username&gt; command. - + Invalid user. @@ -325,55 +325,55 @@ {}'s command group(s): {} - + Got bad group: {} - + Groups {} has been added to {} - + Groups {} has been deleted from {} - + Got unknown command: {} - + This command is only enabled for admins. - + Current connections: - + -class -tag -----name------ -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - + Unknown option. - + (none) - + none - + This command can only be used inside a channel. @@ -389,43 +389,43 @@ You must be at least a Channel Admin to demote another Channel Admin - + {} has been demoted from a Channel Admin. - + {} has demoted you from a Channel Admin of channel "{}" - + {} has been demoted from a Channel Operator - + {} has demoted you from a Channel Operator of channel "{}" - + {} has been demoted from a tempOP of this channel - + {} has demoted you from a tmpOP of channel "{}" - + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - + {} has demoted you from a tempOP of channel "{}" - + {} is no tempOP in this channel, so you can't demote him - + This command can only be used inside a channel. @@ -441,43 +441,43 @@ {} has been removed from VOP list. - + {} has removed you from VOP list of channel "{}" - + You must be at least Channel Admin to remove {} from the VOP list - + Voice has been taken from {} in this channel - + {} has taken your Voice in channel "{}" - + {} has no Voice in this channel, so it can't be taken away - + Do Not Disturb mode engaged. - + Not available - + Do Not Disturb mode canceled. - + -- name -- similar to {} - + Invalid user. @@ -485,179 +485,179 @@ Login: {} {} Sex: {} - + Created: {} - + Clan: {} - + Rank: Chieftain - + Rank: Shaman - + Rank: Grunt - + Rank: Peon - + Location: {} Age: {} - + Client: {} Ver: {} Country: {} - + unknown - + Last login {} from - + On since {} from - + Operator: {}, Admin: {}, Locked: {}, Muted: {} - + Yes - + Email: {} - + Last login Owner: {} - + Idle {} - + Flags set to {}. - + That user does not exist. - + Server error. - + You can't add yourself to your friends list. - + You can only have a maximum of {} friends. - + {} is already on your friends list! - + Added {} to your friends list. - + {} added you to his/her friends list. - + All of your friends are offline. - + {} was not found on your friends list. - + Removed {} from your friends list. - + Promoted {} in your friends list. - + Demoted {} in your friends list. - + Your {} - Friends List - + Your {} - Online Friends List - + , offline - + using {} - + , in game "{}" - + , in game AT Preparation - + , in channel "{}", - + , is in AT Preparation - + , is in a game - + , is in a chat channel - + End of Friends List - + You are not in a game. - + That game does not exist. - + Name: {} ID: {} ({}) - + none @@ -669,19 +669,19 @@ Owner: {} - + Address: {} - + Address: {} (trans {}) - + Client: {} (version {}, startver {}) - + Created: {} @@ -689,99 +689,99 @@ Started: {} - + Status: {} - + Type: {} - + Speed: {} - + Difficulty: {} - + Option: {} - + Map: {} - + Map Size: {}x{} - + Map Tileset: {} - + Map Type: {} - + Players: {} current, {} total, {} max - + Description: {} - + Currently accessible games: - + All current games: - + Games in lobby: - + Current games of type {} - + Current games of type {} {} - + ------name------ p -status- --------type--------- count - + ctag - + --------addr-------- - + Warning: That user is not online, using last known address. - + Sorry, no IP address could be retrieved. - + Scanning online users for IP {}... - + There are no online users with that IP address - + This command can only be used inside a channel. @@ -789,47 +789,47 @@ You have to be at least a Channel Operator or tempOP to use this command. - + That user is not logged in. - + That user is not in this channel. - + That connection doesn't exist. - + That user is not logged in? - + An admin has closed your connection and banned your IP address. - + Connection closed by admin. - + Operation successful. - + That is not a valid session. - + That session does not exist. - + Connection closed by admin and banned your IP's. - + Connection closed by admin. @@ -837,7 +837,7 @@ Copied current scores to active scores on all ladders. - + This game does not support win/loss records. @@ -845,11 +845,11 @@ You must supply a rank and a valid program ID. - + Example: /ladderinfo 1 STAR - + Invalid user. @@ -857,11 +857,11 @@ Account {} is now locked - + Your account has just been locked - + This command can only be used inside a channel. @@ -869,11 +869,11 @@ Banned users: - + You are not in a channel. - + This command can only be used inside a channel. @@ -885,23 +885,23 @@ Unable to change channel flags. - + Channel is now unmoderated. - + Channel is now moderated. - + Unable to open motd. - + No motd. - + Invalid user. @@ -909,11 +909,11 @@ Account {} is now muted - + Your account has just been muted - + That user is not logged on. @@ -921,39 +921,39 @@ Address information for other users is only available to admins. - + Server TCP: {} (bind {}) - + Client TCP: {} - + Client UDP: {} - + Client UDP: {} (trans {}) - + Game UDP: {} - + Game UDP: {} (trans {}) - + Game UDP: none - + Audible notification off. - + This command can only be used inside a channel. @@ -961,7 +961,7 @@ You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. @@ -969,31 +969,31 @@ {} is already a Channel Operator - + {} has been promoted to a Channel Operator - + {} has promoted you to a Channel Operator in channel "{}" - + {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to a tempOP - + {} has promoted you to a tempOP in this channel - + You must supply a username. @@ -1005,35 +1005,35 @@ {} is already a Server Operator - + {} has been promoted to a Server Operator - + {} has promoted you to a Server Operator - + {} is no Server Operator, so you can't demote him - + {} has been demoted from a Server Operator - + {} latency: {} - + Your latency {} - + {} latency () - + Invalid user. @@ -1041,35 +1041,35 @@ Connection closed. - + Your quota allows you to write {} line(s) per {} second(s). - + Long lines will be wrapped every {} characters. - + You are not allowed to send lines with more than {} characters. - + You must join a realm first - + Announcement from {}@{}: {} - + Invalid mode. - + Rehash of "{}" is complete! - + You are not in a channel. @@ -1077,11 +1077,11 @@ No one messaged you, use /m instead - + Pending changes has been saved into the database. - + That user is not logged on. @@ -1089,27 +1089,27 @@ Banning {} who is using IP address {} - + User's account is also LOCKED! Only an admin can unlock it! - + /ipban a {} - + You have been banned by Admin: {} - + Your account is also LOCKED! Only an admin can UNLOCK it! - + Access denied due to security reasons. - + Invalid user. @@ -1117,203 +1117,203 @@ Current value of {} is "{}" - + Value currently not set - + Unable to set key for - + Key set successfully for - + Invalid delay. - + You've initialized the shutdown sequence. - + You've canceled the shutdown sequence. - + No such user. - + You can't squelch yourself. - + Could not squelch user. - + {} has been squelched. - + Invalid user. - + Unable to determine client game. - + This game does not support win/loss records. - + You must supply a user name and a valid program ID. - + Example: /stats joe STAR - + {}'s record: - + level: {} - + class: {} - + stats: {} str {} mag {} dex {} vit {} gld - + Diablo kills: {} - + Normal games: {}-{}-{} - + Ladder games: {}-{}-{} (rating {}) - + Ladder games: 0-0-0 - + IronMan games: {}-{}-{} (rating {}) - + IronMan games: 0-0-0 - + {}'s Ladder Record's: - + Users Solo Level: {}, Experience: {} - + SOLO Ladder Record: {}-{}-0 - + SOLO Rank: {} - + Users Team Level: {}, Experience: {} - + TEAM Ladder Record: {}-{}-0 - + TEAM Rank: {} - + Users FFA Level: {}, Experience: {} - + FFA Ladder Record: {}-{}-0 - + FFA Rank: {} - + Users AT Team No. {} - + Users AT TEAM Level: {}, Experience: {} - + AT TEAM Ladder Record: {}-{}-0 - + AT TEAM Rank: {} - + There are currently {} user(s) in {} games of {} - + There are currently {} users online, in {} games, and in {} channels. - + Client tag set to {}. - + Invalid clienttag {} specified - + Server Time: {} - + Your local time: {} - + Invalid duration. - + Your timer has expired. - + Could not set timer. - + Timer set for {} second(s) - + This command can only be used inside a channel. @@ -1321,7 +1321,7 @@ You must be at least a Channel Operator or tmpOP to use this command. - + There's no account with username {}. @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - + {} must be on the same channel to tempOP him @@ -1341,7 +1341,7 @@ {} has been promoted to tmpOP in this channel - + {} has promoted you to a tempOP in this channel @@ -1353,19 +1353,19 @@ Max topic length exceeded (max {} symbols) - + You must be at least a Channel Operator of {} to set the topic - + {} topic: no topic - + Unable to send TOS (Terms of Service). - + This command can only be used inside a channel. @@ -1373,15 +1373,15 @@ You are not a channel operator. - + That user is not banned. - + {} is no longer banned from this channel. - + Invalid user. @@ -1389,11 +1389,11 @@ Your account has just been unlocked by {} - + That user's account is now unlocked. - + Invalid user. @@ -1401,11 +1401,11 @@ Your account has just been unmuted by {} - + That user's account is now unmuted. - + No such user. @@ -1413,11 +1413,11 @@ User was not being ignored. - + No longer ignoring. - + That user does not exist. @@ -1425,11 +1425,11 @@ Removal from watch list failed. - + User {} removed from your watch list. - + Removal from watch list failed. @@ -1437,15 +1437,15 @@ All {} users removed from your watch list. - + All users removed from your watch list. - + Uptime: {} - + This command can only be used inside a channel. @@ -1453,7 +1453,7 @@ You must be at least a Channel Operator to use this command. - + There's no account with username {}. @@ -1461,27 +1461,27 @@ {} is already on VOP list, no need to Voice him - + {} must be on the same channel to voice him - + {} already has Voice in this channel - + {} is already an operator or admin. - + {} has been granted Voice in this channel - + {} has granted you Voice in this channel - + This command can only be used inside a channel. @@ -1497,15 +1497,15 @@ {} is already on VOP list - + {} has been added to the VOP list - + {} has added you to the VOP list of channel "{}" - + That user does not exist. @@ -1513,11 +1513,11 @@ Add to watch list failed. - + User {} added to your watch list. - + Add to watch list failed. @@ -1525,39 +1525,39 @@ All {} users added to your watch list. - + All users added to your watch list. - + That channel does not exist. - + (If you are trying to search for a user, use the /whois command.) - + You are banned from that channel. - + Users in channel {}: - + Unable to obtain your account name. - + (invalid date) - + Reset {}'s {} stats - + Reset {}'s {} stats @@ -1569,39 +1569,39 @@ You cannot kick administrators. - + You cannot kick operators. - + {} has been kicked by {} ({}). - + {} has been kicked by {}. - + You cannot ban operators. - + Unable to ban {}. - + {} has been banned by {} ({}). - + {} has been banned by {}. - + Password for account {} updated. - + Hash is: {} @@ -1609,83 +1609,83 @@ Your account has been muted, you can't whisper to other users. - + That user is not logged on. - + {} is unavailable ({}) - + {} is away ({}) - + Unknown user. - + User was last seen on: {} - + User is offline - + You - + are - + is - + {} {} using {} and {} currently in {} game "{}". - + {} {} using {} and {} currently in channel "{}". - + {} {} using {}. - + {} {} refusing messages ({}) - + {} away ({}) - + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - + This command has been deactivated - + This command is reserved for admins. - + Unknown command. - + This account has been locked - + This account has been locked @@ -1693,7 +1693,7 @@ Oops ! There is a problem with the help file. Please contact the administrator of the server. - + This command can only be used inside a channel. @@ -1701,75 +1701,75 @@ This command can only be used from the game. - + Bad icon. - + {} banned permamently by {}. - + {} banned permamently. - + {} banned for {} by {}. - + {} banned for {}. - + Banning only for: {} minutes. - + This server has NO mail support. - + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - + Successfully deleted messages. - + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - + Succesfully deleted message. - + You have no mail. - + There was an error completing your request. - + Receiver UNKNOWN! - + Receiver has reached his mail quota. Your message will NOT be sent. - + Your mail has been sent successfully. - + There was an error completing your request! - + You must be at least a Channel Operator to use this command. @@ -1781,31 +1781,31 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - + Available Quiz dictionaries: - + Quiz is not running. - + {}'s Quiz record: - + {} has never played Quiz. - + Top {} Quiz records: - + points - + This command is reserved for admins. @@ -1813,7 +1813,7 @@ User "{}" is offline - + \ No newline at end of file diff --git a/conf/i18n/common-frFR.xml.in b/conf/i18n/common-frFR.xml.in index b2c2bff5c..9d4ffa6e0 100644 --- a/conf/i18n/common-frFR.xml.in +++ b/conf/i18n/common-frFR.xml.in @@ -9,103 +9,103 @@ by {} - + for {} - + permanently - + with a reason "{}" - + No such alias. Use // to show the list. - + Alias list: - + you are now tempOP for this channel - + Account name contains some invalid symbol! - + Maximum password length allowed is {} - + Trying to add account "{}" with password "{}" - + Hash is: {} - + Failed to create account! - + Account {} created. - + You must supply a username. - + There's no account with username {}. - + {} is already a Server Admin - + {} has been promoted to a Server Admin - + {} has promoted you to a Server Admin - + {} is not a Server Admin. - + {} has been demoted from a Server Admin - + {} has demoted you from a Server Admin - + Currently logged on Administrators: - + Your game client doesn't support MessageBox. - + \n\n***************************\nBy {} - + Information from {} - + for {} @@ -113,19 +113,19 @@ Announcement from {}: {} - + Could not broadcast message. - + This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. @@ -133,23 +133,23 @@ {} is already a Channel Admin - + {} has been promoted to a Channel Admin - + {} has promoted you to a Channel Admin for channel "{}" - + You are now marked as being away. - + You are no longer marked as away. - + This command can only be used inside a channel. @@ -157,55 +157,55 @@ You have to be at least a Channel Operator to use this command. - + That account doesn't currently exist. - + You cannot ban administrators. - + Audible notification on. - + Channel Arranged Teams is a RESTRICTED Channel! - + Max channel name length exceeded (max {} symbols) - + Command disabled while inside a game. - + Currently accessible channels: - + All current channels: - + Current channels of type {} - + -----------name----------- users ----admin/operator---- - + Only admins may change passwords for other accounts. - + Account does not exist. - + Maximum password length allowed is {} @@ -213,107 +213,107 @@ Trying to change password for account "{}" to "{}" - + Unable to set password. - + Message was sent to all currently available clan members. - + All fellow members of your clan are currently offline. - + Clan channel is opened up! - + Clan channel has already been opened up! - + Clan channel is closed! - + Clan channel has already been closed! - + Clan message of day is updated! - + User {} was invited to your clan! - + You are invited to {} by {}! - + User {} is not online or is already member of clan! - + This is one-way action! If you really want - + to disband your clan, type /clan disband yes - + Your clan was disbanded. - + You have been invited to {} - + You are now a clan member of {} - + Clan {} was be created - + You are no longer ivited to {} - + You are already in clan "{}" - + Clan with your specified &lt;clantag&gt; already exist! - + Please choice another one. - + Clan {} is created! - + Clan {} is pre-created, please invite - + at least {} players to your clan by using - + /clan invite &lt;username&gt; command. - + Invalid user. @@ -325,55 +325,55 @@ {}'s command group(s): {} - + Got bad group: {} - + Groups {} has been added to {} - + Groups {} has been deleted from {} - + Got unknown command: {} - + This command is only enabled for admins. - + Current connections: - + -class -tag -----name------ -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - + Unknown option. - + (none) - + none - + This command can only be used inside a channel. @@ -389,43 +389,43 @@ You must be at least a Channel Admin to demote another Channel Admin - + {} has been demoted from a Channel Admin. - + {} has demoted you from a Channel Admin of channel "{}" - + {} has been demoted from a Channel Operator - + {} has demoted you from a Channel Operator of channel "{}" - + {} has been demoted from a tempOP of this channel - + {} has demoted you from a tmpOP of channel "{}" - + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - + {} has demoted you from a tempOP of channel "{}" - + {} is no tempOP in this channel, so you can't demote him - + This command can only be used inside a channel. @@ -441,43 +441,43 @@ {} has been removed from VOP list. - + {} has removed you from VOP list of channel "{}" - + You must be at least Channel Admin to remove {} from the VOP list - + Voice has been taken from {} in this channel - + {} has taken your Voice in channel "{}" - + {} has no Voice in this channel, so it can't be taken away - + Do Not Disturb mode engaged. - + Not available - + Do Not Disturb mode canceled. - + -- name -- similar to {} - + Invalid user. @@ -485,179 +485,179 @@ Login: {} {} Sex: {} - + Created: {} - + Clan: {} - + Rank: Chieftain - + Rank: Shaman - + Rank: Grunt - + Rank: Peon - + Location: {} Age: {} - + Client: {} Ver: {} Country: {} - + unknown - + Last login {} from - + On since {} from - + Operator: {}, Admin: {}, Locked: {}, Muted: {} - + Yes - + Email: {} - + Last login Owner: {} - + Idle {} - + Flags set to {}. - + That user does not exist. - + Server error. - + You can't add yourself to your friends list. - + You can only have a maximum of {} friends. - + {} is already on your friends list! - + Added {} to your friends list. - + {} added you to his/her friends list. - + All of your friends are offline. - + {} was not found on your friends list. - + Removed {} from your friends list. - + Promoted {} in your friends list. - + Demoted {} in your friends list. - + Your {} - Friends List - + Your {} - Online Friends List - + , offline - + using {} - + , in game "{}" - + , in game AT Preparation - + , in channel "{}", - + , is in AT Preparation - + , is in a game - + , is in a chat channel - + End of Friends List - + You are not in a game. - + That game does not exist. - + Name: {} ID: {} ({}) - + none @@ -669,19 +669,19 @@ Owner: {} - + Address: {} - + Address: {} (trans {}) - + Client: {} (version {}, startver {}) - + Created: {} @@ -689,99 +689,99 @@ Started: {} - + Status: {} - + Type: {} - + Speed: {} - + Difficulty: {} - + Option: {} - + Map: {} - + Map Size: {}x{} - + Map Tileset: {} - + Map Type: {} - + Players: {} current, {} total, {} max - + Description: {} - + Currently accessible games: - + All current games: - + Games in lobby: - + Current games of type {} - + Current games of type {} {} - + ------name------ p -status- --------type--------- count - + ctag - + --------addr-------- - + Warning: That user is not online, using last known address. - + Sorry, no IP address could be retrieved. - + Scanning online users for IP {}... - + There are no online users with that IP address - + This command can only be used inside a channel. @@ -789,47 +789,47 @@ You have to be at least a Channel Operator or tempOP to use this command. - + That user is not logged in. - + That user is not in this channel. - + That connection doesn't exist. - + That user is not logged in? - + An admin has closed your connection and banned your IP address. - + Connection closed by admin. - + Operation successful. - + That is not a valid session. - + That session does not exist. - + Connection closed by admin and banned your IP's. - + Connection closed by admin. @@ -837,7 +837,7 @@ Copied current scores to active scores on all ladders. - + This game does not support win/loss records. @@ -845,11 +845,11 @@ You must supply a rank and a valid program ID. - + Example: /ladderinfo 1 STAR - + Invalid user. @@ -857,11 +857,11 @@ Account {} is now locked - + Your account has just been locked - + This command can only be used inside a channel. @@ -869,11 +869,11 @@ Banned users: - + You are not in a channel. - + This command can only be used inside a channel. @@ -885,23 +885,23 @@ Unable to change channel flags. - + Channel is now unmoderated. - + Channel is now moderated. - + Unable to open motd. - + No motd. - + Invalid user. @@ -909,11 +909,11 @@ Account {} is now muted - + Your account has just been muted - + That user is not logged on. @@ -921,39 +921,39 @@ Address information for other users is only available to admins. - + Server TCP: {} (bind {}) - + Client TCP: {} - + Client UDP: {} - + Client UDP: {} (trans {}) - + Game UDP: {} - + Game UDP: {} (trans {}) - + Game UDP: none - + Audible notification off. - + This command can only be used inside a channel. @@ -961,7 +961,7 @@ You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. @@ -969,31 +969,31 @@ {} is already a Channel Operator - + {} has been promoted to a Channel Operator - + {} has promoted you to a Channel Operator in channel "{}" - + {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to a tempOP - + {} has promoted you to a tempOP in this channel - + You must supply a username. @@ -1005,35 +1005,35 @@ {} is already a Server Operator - + {} has been promoted to a Server Operator - + {} has promoted you to a Server Operator - + {} is no Server Operator, so you can't demote him - + {} has been demoted from a Server Operator - + {} latency: {} - + Your latency {} - + {} latency () - + Invalid user. @@ -1041,35 +1041,35 @@ Connection closed. - + Your quota allows you to write {} line(s) per {} second(s). - + Long lines will be wrapped every {} characters. - + You are not allowed to send lines with more than {} characters. - + You must join a realm first - + Announcement from {}@{}: {} - + Invalid mode. - + Rehash of "{}" is complete! - + You are not in a channel. @@ -1077,11 +1077,11 @@ No one messaged you, use /m instead - + Pending changes has been saved into the database. - + That user is not logged on. @@ -1089,27 +1089,27 @@ Banning {} who is using IP address {} - + User's account is also LOCKED! Only an admin can unlock it! - + /ipban a {} - + You have been banned by Admin: {} - + Your account is also LOCKED! Only an admin can UNLOCK it! - + Access denied due to security reasons. - + Invalid user. @@ -1117,203 +1117,203 @@ Current value of {} is "{}" - + Value currently not set - + Unable to set key for - + Key set successfully for - + Invalid delay. - + You've initialized the shutdown sequence. - + You've canceled the shutdown sequence. - + No such user. - + You can't squelch yourself. - + Could not squelch user. - + {} has been squelched. - + Invalid user. - + Unable to determine client game. - + This game does not support win/loss records. - + You must supply a user name and a valid program ID. - + Example: /stats joe STAR - + {}'s record: - + level: {} - + class: {} - + stats: {} str {} mag {} dex {} vit {} gld - + Diablo kills: {} - + Normal games: {}-{}-{} - + Ladder games: {}-{}-{} (rating {}) - + Ladder games: 0-0-0 - + IronMan games: {}-{}-{} (rating {}) - + IronMan games: 0-0-0 - + {}'s Ladder Record's: - + Users Solo Level: {}, Experience: {} - + SOLO Ladder Record: {}-{}-0 - + SOLO Rank: {} - + Users Team Level: {}, Experience: {} - + TEAM Ladder Record: {}-{}-0 - + TEAM Rank: {} - + Users FFA Level: {}, Experience: {} - + FFA Ladder Record: {}-{}-0 - + FFA Rank: {} - + Users AT Team No. {} - + Users AT TEAM Level: {}, Experience: {} - + AT TEAM Ladder Record: {}-{}-0 - + AT TEAM Rank: {} - + There are currently {} user(s) in {} games of {} - + There are currently {} users online, in {} games, and in {} channels. - + Client tag set to {}. - + Invalid clienttag {} specified - + Server Time: {} - + Your local time: {} - + Invalid duration. - + Your timer has expired. - + Could not set timer. - + Timer set for {} second(s) - + This command can only be used inside a channel. @@ -1321,7 +1321,7 @@ You must be at least a Channel Operator or tmpOP to use this command. - + There's no account with username {}. @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - + {} must be on the same channel to tempOP him @@ -1341,7 +1341,7 @@ {} has been promoted to tmpOP in this channel - + {} has promoted you to a tempOP in this channel @@ -1353,19 +1353,19 @@ Max topic length exceeded (max {} symbols) - + You must be at least a Channel Operator of {} to set the topic - + {} topic: no topic - + Unable to send TOS (Terms of Service). - + This command can only be used inside a channel. @@ -1373,15 +1373,15 @@ You are not a channel operator. - + That user is not banned. - + {} is no longer banned from this channel. - + Invalid user. @@ -1389,11 +1389,11 @@ Your account has just been unlocked by {} - + That user's account is now unlocked. - + Invalid user. @@ -1401,11 +1401,11 @@ Your account has just been unmuted by {} - + That user's account is now unmuted. - + No such user. @@ -1413,11 +1413,11 @@ User was not being ignored. - + No longer ignoring. - + That user does not exist. @@ -1425,11 +1425,11 @@ Removal from watch list failed. - + User {} removed from your watch list. - + Removal from watch list failed. @@ -1437,15 +1437,15 @@ All {} users removed from your watch list. - + All users removed from your watch list. - + Uptime: {} - + This command can only be used inside a channel. @@ -1453,7 +1453,7 @@ You must be at least a Channel Operator to use this command. - + There's no account with username {}. @@ -1461,27 +1461,27 @@ {} is already on VOP list, no need to Voice him - + {} must be on the same channel to voice him - + {} already has Voice in this channel - + {} is already an operator or admin. - + {} has been granted Voice in this channel - + {} has granted you Voice in this channel - + This command can only be used inside a channel. @@ -1497,15 +1497,15 @@ {} is already on VOP list - + {} has been added to the VOP list - + {} has added you to the VOP list of channel "{}" - + That user does not exist. @@ -1513,11 +1513,11 @@ Add to watch list failed. - + User {} added to your watch list. - + Add to watch list failed. @@ -1525,39 +1525,39 @@ All {} users added to your watch list. - + All users added to your watch list. - + That channel does not exist. - + (If you are trying to search for a user, use the /whois command.) - + You are banned from that channel. - + Users in channel {}: - + Unable to obtain your account name. - + (invalid date) - + Reset {}'s {} stats - + Reset {}'s {} stats @@ -1569,39 +1569,39 @@ You cannot kick administrators. - + You cannot kick operators. - + {} has been kicked by {} ({}). - + {} has been kicked by {}. - + You cannot ban operators. - + Unable to ban {}. - + {} has been banned by {} ({}). - + {} has been banned by {}. - + Password for account {} updated. - + Hash is: {} @@ -1609,83 +1609,83 @@ Your account has been muted, you can't whisper to other users. - + That user is not logged on. - + {} is unavailable ({}) - + {} is away ({}) - + Unknown user. - + User was last seen on: {} - + User is offline - + You - + are - + is - + {} {} using {} and {} currently in {} game "{}". - + {} {} using {} and {} currently in channel "{}". - + {} {} using {}. - + {} {} refusing messages ({}) - + {} away ({}) - + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - + This command has been deactivated - + This command is reserved for admins. - + Unknown command. - + This account has been locked - + This account has been locked @@ -1693,7 +1693,7 @@ Oops ! There is a problem with the help file. Please contact the administrator of the server. - + This command can only be used inside a channel. @@ -1701,75 +1701,75 @@ This command can only be used from the game. - + Bad icon. - + {} banned permamently by {}. - + {} banned permamently. - + {} banned for {} by {}. - + {} banned for {}. - + Banning only for: {} minutes. - + This server has NO mail support. - + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - + Successfully deleted messages. - + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - + Succesfully deleted message. - + You have no mail. - + There was an error completing your request. - + Receiver UNKNOWN! - + Receiver has reached his mail quota. Your message will NOT be sent. - + Your mail has been sent successfully. - + There was an error completing your request! - + You must be at least a Channel Operator to use this command. @@ -1781,31 +1781,31 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - + Available Quiz dictionaries: - + Quiz is not running. - + {}'s Quiz record: - + {} has never played Quiz. - + Top {} Quiz records: - + points - + This command is reserved for admins. @@ -1813,7 +1813,7 @@ User "{}" is offline - + \ No newline at end of file diff --git a/conf/i18n/common-itIT.xml.in b/conf/i18n/common-itIT.xml.in index b6d42ad4a..b2843e0f2 100644 --- a/conf/i18n/common-itIT.xml.in +++ b/conf/i18n/common-itIT.xml.in @@ -9,103 +9,103 @@ by {} - + for {} - + permanently - + with a reason "{}" - + No such alias. Use // to show the list. - + Alias list: - + you are now tempOP for this channel - + Account name contains some invalid symbol! - + Maximum password length allowed is {} - + Trying to add account "{}" with password "{}" - + Hash is: {} - + Failed to create account! - + Account {} created. - + You must supply a username. - + There's no account with username {}. - + {} is already a Server Admin - + {} has been promoted to a Server Admin - + {} has promoted you to a Server Admin - + {} is not a Server Admin. - + {} has been demoted from a Server Admin - + {} has demoted you from a Server Admin - + Currently logged on Administrators: - + Your game client doesn't support MessageBox. - + \n\n***************************\nBy {} - + Information from {} - + for {} @@ -113,19 +113,19 @@ Announcement from {}: {} - + Could not broadcast message. - + This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. @@ -133,23 +133,23 @@ {} is already a Channel Admin - + {} has been promoted to a Channel Admin - + {} has promoted you to a Channel Admin for channel "{}" - + You are now marked as being away. - + You are no longer marked as away. - + This command can only be used inside a channel. @@ -157,55 +157,55 @@ You have to be at least a Channel Operator to use this command. - + That account doesn't currently exist. - + You cannot ban administrators. - + Audible notification on. - + Channel Arranged Teams is a RESTRICTED Channel! - + Max channel name length exceeded (max {} symbols) - + Command disabled while inside a game. - + Currently accessible channels: - + All current channels: - + Current channels of type {} - + -----------name----------- users ----admin/operator---- - + Only admins may change passwords for other accounts. - + Account does not exist. - + Maximum password length allowed is {} @@ -213,107 +213,107 @@ Trying to change password for account "{}" to "{}" - + Unable to set password. - + Message was sent to all currently available clan members. - + All fellow members of your clan are currently offline. - + Clan channel is opened up! - + Clan channel has already been opened up! - + Clan channel is closed! - + Clan channel has already been closed! - + Clan message of day is updated! - + User {} was invited to your clan! - + You are invited to {} by {}! - + User {} is not online or is already member of clan! - + This is one-way action! If you really want - + to disband your clan, type /clan disband yes - + Your clan was disbanded. - + You have been invited to {} - + You are now a clan member of {} - + Clan {} was be created - + You are no longer ivited to {} - + You are already in clan "{}" - + Clan with your specified &lt;clantag&gt; already exist! - + Please choice another one. - + Clan {} is created! - + Clan {} is pre-created, please invite - + at least {} players to your clan by using - + /clan invite &lt;username&gt; command. - + Invalid user. @@ -325,55 +325,55 @@ {}'s command group(s): {} - + Got bad group: {} - + Groups {} has been added to {} - + Groups {} has been deleted from {} - + Got unknown command: {} - + This command is only enabled for admins. - + Current connections: - + -class -tag -----name------ -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - + Unknown option. - + (none) - + none - + This command can only be used inside a channel. @@ -389,43 +389,43 @@ You must be at least a Channel Admin to demote another Channel Admin - + {} has been demoted from a Channel Admin. - + {} has demoted you from a Channel Admin of channel "{}" - + {} has been demoted from a Channel Operator - + {} has demoted you from a Channel Operator of channel "{}" - + {} has been demoted from a tempOP of this channel - + {} has demoted you from a tmpOP of channel "{}" - + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - + {} has demoted you from a tempOP of channel "{}" - + {} is no tempOP in this channel, so you can't demote him - + This command can only be used inside a channel. @@ -441,43 +441,43 @@ {} has been removed from VOP list. - + {} has removed you from VOP list of channel "{}" - + You must be at least Channel Admin to remove {} from the VOP list - + Voice has been taken from {} in this channel - + {} has taken your Voice in channel "{}" - + {} has no Voice in this channel, so it can't be taken away - + Do Not Disturb mode engaged. - + Not available - + Do Not Disturb mode canceled. - + -- name -- similar to {} - + Invalid user. @@ -485,179 +485,179 @@ Login: {} {} Sex: {} - + Created: {} - + Clan: {} - + Rank: Chieftain - + Rank: Shaman - + Rank: Grunt - + Rank: Peon - + Location: {} Age: {} - + Client: {} Ver: {} Country: {} - + unknown - + Last login {} from - + On since {} from - + Operator: {}, Admin: {}, Locked: {}, Muted: {} - + Yes - + Email: {} - + Last login Owner: {} - + Idle {} - + Flags set to {}. - + That user does not exist. - + Server error. - + You can't add yourself to your friends list. - + You can only have a maximum of {} friends. - + {} is already on your friends list! - + Added {} to your friends list. - + {} added you to his/her friends list. - + All of your friends are offline. - + {} was not found on your friends list. - + Removed {} from your friends list. - + Promoted {} in your friends list. - + Demoted {} in your friends list. - + Your {} - Friends List - + Your {} - Online Friends List - + , offline - + using {} - + , in game "{}" - + , in game AT Preparation - + , in channel "{}", - + , is in AT Preparation - + , is in a game - + , is in a chat channel - + End of Friends List - + You are not in a game. - + That game does not exist. - + Name: {} ID: {} ({}) - + none @@ -669,19 +669,19 @@ Owner: {} - + Address: {} - + Address: {} (trans {}) - + Client: {} (version {}, startver {}) - + Created: {} @@ -689,99 +689,99 @@ Started: {} - + Status: {} - + Type: {} - + Speed: {} - + Difficulty: {} - + Option: {} - + Map: {} - + Map Size: {}x{} - + Map Tileset: {} - + Map Type: {} - + Players: {} current, {} total, {} max - + Description: {} - + Currently accessible games: - + All current games: - + Games in lobby: - + Current games of type {} - + Current games of type {} {} - + ------name------ p -status- --------type--------- count - + ctag - + --------addr-------- - + Warning: That user is not online, using last known address. - + Sorry, no IP address could be retrieved. - + Scanning online users for IP {}... - + There are no online users with that IP address - + This command can only be used inside a channel. @@ -789,47 +789,47 @@ You have to be at least a Channel Operator or tempOP to use this command. - + That user is not logged in. - + That user is not in this channel. - + That connection doesn't exist. - + That user is not logged in? - + An admin has closed your connection and banned your IP address. - + Connection closed by admin. - + Operation successful. - + That is not a valid session. - + That session does not exist. - + Connection closed by admin and banned your IP's. - + Connection closed by admin. @@ -837,7 +837,7 @@ Copied current scores to active scores on all ladders. - + This game does not support win/loss records. @@ -845,11 +845,11 @@ You must supply a rank and a valid program ID. - + Example: /ladderinfo 1 STAR - + Invalid user. @@ -857,11 +857,11 @@ Account {} is now locked - + Your account has just been locked - + This command can only be used inside a channel. @@ -869,11 +869,11 @@ Banned users: - + You are not in a channel. - + This command can only be used inside a channel. @@ -885,23 +885,23 @@ Unable to change channel flags. - + Channel is now unmoderated. - + Channel is now moderated. - + Unable to open motd. - + No motd. - + Invalid user. @@ -909,11 +909,11 @@ Account {} is now muted - + Your account has just been muted - + That user is not logged on. @@ -921,39 +921,39 @@ Address information for other users is only available to admins. - + Server TCP: {} (bind {}) - + Client TCP: {} - + Client UDP: {} - + Client UDP: {} (trans {}) - + Game UDP: {} - + Game UDP: {} (trans {}) - + Game UDP: none - + Audible notification off. - + This command can only be used inside a channel. @@ -961,7 +961,7 @@ You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. @@ -969,31 +969,31 @@ {} is already a Channel Operator - + {} has been promoted to a Channel Operator - + {} has promoted you to a Channel Operator in channel "{}" - + {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to a tempOP - + {} has promoted you to a tempOP in this channel - + You must supply a username. @@ -1005,35 +1005,35 @@ {} is already a Server Operator - + {} has been promoted to a Server Operator - + {} has promoted you to a Server Operator - + {} is no Server Operator, so you can't demote him - + {} has been demoted from a Server Operator - + {} latency: {} - + Your latency {} - + {} latency () - + Invalid user. @@ -1041,35 +1041,35 @@ Connection closed. - + Your quota allows you to write {} line(s) per {} second(s). - + Long lines will be wrapped every {} characters. - + You are not allowed to send lines with more than {} characters. - + You must join a realm first - + Announcement from {}@{}: {} - + Invalid mode. - + Rehash of "{}" is complete! - + You are not in a channel. @@ -1077,11 +1077,11 @@ No one messaged you, use /m instead - + Pending changes has been saved into the database. - + That user is not logged on. @@ -1089,27 +1089,27 @@ Banning {} who is using IP address {} - + User's account is also LOCKED! Only an admin can unlock it! - + /ipban a {} - + You have been banned by Admin: {} - + Your account is also LOCKED! Only an admin can UNLOCK it! - + Access denied due to security reasons. - + Invalid user. @@ -1117,203 +1117,203 @@ Current value of {} is "{}" - + Value currently not set - + Unable to set key for - + Key set successfully for - + Invalid delay. - + You've initialized the shutdown sequence. - + You've canceled the shutdown sequence. - + No such user. - + You can't squelch yourself. - + Could not squelch user. - + {} has been squelched. - + Invalid user. - + Unable to determine client game. - + This game does not support win/loss records. - + You must supply a user name and a valid program ID. - + Example: /stats joe STAR - + {}'s record: - + level: {} - + class: {} - + stats: {} str {} mag {} dex {} vit {} gld - + Diablo kills: {} - + Normal games: {}-{}-{} - + Ladder games: {}-{}-{} (rating {}) - + Ladder games: 0-0-0 - + IronMan games: {}-{}-{} (rating {}) - + IronMan games: 0-0-0 - + {}'s Ladder Record's: - + Users Solo Level: {}, Experience: {} - + SOLO Ladder Record: {}-{}-0 - + SOLO Rank: {} - + Users Team Level: {}, Experience: {} - + TEAM Ladder Record: {}-{}-0 - + TEAM Rank: {} - + Users FFA Level: {}, Experience: {} - + FFA Ladder Record: {}-{}-0 - + FFA Rank: {} - + Users AT Team No. {} - + Users AT TEAM Level: {}, Experience: {} - + AT TEAM Ladder Record: {}-{}-0 - + AT TEAM Rank: {} - + There are currently {} user(s) in {} games of {} - + There are currently {} users online, in {} games, and in {} channels. - + Client tag set to {}. - + Invalid clienttag {} specified - + Server Time: {} - + Your local time: {} - + Invalid duration. - + Your timer has expired. - + Could not set timer. - + Timer set for {} second(s) - + This command can only be used inside a channel. @@ -1321,7 +1321,7 @@ You must be at least a Channel Operator or tmpOP to use this command. - + There's no account with username {}. @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - + {} must be on the same channel to tempOP him @@ -1341,7 +1341,7 @@ {} has been promoted to tmpOP in this channel - + {} has promoted you to a tempOP in this channel @@ -1353,19 +1353,19 @@ Max topic length exceeded (max {} symbols) - + You must be at least a Channel Operator of {} to set the topic - + {} topic: no topic - + Unable to send TOS (Terms of Service). - + This command can only be used inside a channel. @@ -1373,15 +1373,15 @@ You are not a channel operator. - + That user is not banned. - + {} is no longer banned from this channel. - + Invalid user. @@ -1389,11 +1389,11 @@ Your account has just been unlocked by {} - + That user's account is now unlocked. - + Invalid user. @@ -1401,11 +1401,11 @@ Your account has just been unmuted by {} - + That user's account is now unmuted. - + No such user. @@ -1413,11 +1413,11 @@ User was not being ignored. - + No longer ignoring. - + That user does not exist. @@ -1425,11 +1425,11 @@ Removal from watch list failed. - + User {} removed from your watch list. - + Removal from watch list failed. @@ -1437,15 +1437,15 @@ All {} users removed from your watch list. - + All users removed from your watch list. - + Uptime: {} - + This command can only be used inside a channel. @@ -1453,7 +1453,7 @@ You must be at least a Channel Operator to use this command. - + There's no account with username {}. @@ -1461,27 +1461,27 @@ {} is already on VOP list, no need to Voice him - + {} must be on the same channel to voice him - + {} already has Voice in this channel - + {} is already an operator or admin. - + {} has been granted Voice in this channel - + {} has granted you Voice in this channel - + This command can only be used inside a channel. @@ -1497,15 +1497,15 @@ {} is already on VOP list - + {} has been added to the VOP list - + {} has added you to the VOP list of channel "{}" - + That user does not exist. @@ -1513,11 +1513,11 @@ Add to watch list failed. - + User {} added to your watch list. - + Add to watch list failed. @@ -1525,39 +1525,39 @@ All {} users added to your watch list. - + All users added to your watch list. - + That channel does not exist. - + (If you are trying to search for a user, use the /whois command.) - + You are banned from that channel. - + Users in channel {}: - + Unable to obtain your account name. - + (invalid date) - + Reset {}'s {} stats - + Reset {}'s {} stats @@ -1569,39 +1569,39 @@ You cannot kick administrators. - + You cannot kick operators. - + {} has been kicked by {} ({}). - + {} has been kicked by {}. - + You cannot ban operators. - + Unable to ban {}. - + {} has been banned by {} ({}). - + {} has been banned by {}. - + Password for account {} updated. - + Hash is: {} @@ -1609,83 +1609,83 @@ Your account has been muted, you can't whisper to other users. - + That user is not logged on. - + {} is unavailable ({}) - + {} is away ({}) - + Unknown user. - + User was last seen on: {} - + User is offline - + You - + are - + is - + {} {} using {} and {} currently in {} game "{}". - + {} {} using {} and {} currently in channel "{}". - + {} {} using {}. - + {} {} refusing messages ({}) - + {} away ({}) - + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - + This command has been deactivated - + This command is reserved for admins. - + Unknown command. - + This account has been locked - + This account has been locked @@ -1693,7 +1693,7 @@ Oops ! There is a problem with the help file. Please contact the administrator of the server. - + This command can only be used inside a channel. @@ -1701,75 +1701,75 @@ This command can only be used from the game. - + Bad icon. - + {} banned permamently by {}. - + {} banned permamently. - + {} banned for {} by {}. - + {} banned for {}. - + Banning only for: {} minutes. - + This server has NO mail support. - + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - + Successfully deleted messages. - + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - + Succesfully deleted message. - + You have no mail. - + There was an error completing your request. - + Receiver UNKNOWN! - + Receiver has reached his mail quota. Your message will NOT be sent. - + Your mail has been sent successfully. - + There was an error completing your request! - + You must be at least a Channel Operator to use this command. @@ -1781,31 +1781,31 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - + Available Quiz dictionaries: - + Quiz is not running. - + {}'s Quiz record: - + {} has never played Quiz. - + Top {} Quiz records: - + points - + This command is reserved for admins. @@ -1813,7 +1813,7 @@ User "{}" is offline - + \ No newline at end of file diff --git a/conf/i18n/common-jaJA.xml.in b/conf/i18n/common-jaJA.xml.in index f4ba62c29..e18275b73 100644 --- a/conf/i18n/common-jaJA.xml.in +++ b/conf/i18n/common-jaJA.xml.in @@ -9,103 +9,103 @@ by {} - + for {} - + permanently - + with a reason "{}" - + No such alias. Use // to show the list. - + Alias list: - + you are now tempOP for this channel - + Account name contains some invalid symbol! - + Maximum password length allowed is {} - + Trying to add account "{}" with password "{}" - + Hash is: {} - + Failed to create account! - + Account {} created. - + You must supply a username. - + There's no account with username {}. - + {} is already a Server Admin - + {} has been promoted to a Server Admin - + {} has promoted you to a Server Admin - + {} is not a Server Admin. - + {} has been demoted from a Server Admin - + {} has demoted you from a Server Admin - + Currently logged on Administrators: - + Your game client doesn't support MessageBox. - + \n\n***************************\nBy {} - + Information from {} - + for {} @@ -113,19 +113,19 @@ Announcement from {}: {} - + Could not broadcast message. - + This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. @@ -133,23 +133,23 @@ {} is already a Channel Admin - + {} has been promoted to a Channel Admin - + {} has promoted you to a Channel Admin for channel "{}" - + You are now marked as being away. - + You are no longer marked as away. - + This command can only be used inside a channel. @@ -157,55 +157,55 @@ You have to be at least a Channel Operator to use this command. - + That account doesn't currently exist. - + You cannot ban administrators. - + Audible notification on. - + Channel Arranged Teams is a RESTRICTED Channel! - + Max channel name length exceeded (max {} symbols) - + Command disabled while inside a game. - + Currently accessible channels: - + All current channels: - + Current channels of type {} - + -----------name----------- users ----admin/operator---- - + Only admins may change passwords for other accounts. - + Account does not exist. - + Maximum password length allowed is {} @@ -213,107 +213,107 @@ Trying to change password for account "{}" to "{}" - + Unable to set password. - + Message was sent to all currently available clan members. - + All fellow members of your clan are currently offline. - + Clan channel is opened up! - + Clan channel has already been opened up! - + Clan channel is closed! - + Clan channel has already been closed! - + Clan message of day is updated! - + User {} was invited to your clan! - + You are invited to {} by {}! - + User {} is not online or is already member of clan! - + This is one-way action! If you really want - + to disband your clan, type /clan disband yes - + Your clan was disbanded. - + You have been invited to {} - + You are now a clan member of {} - + Clan {} was be created - + You are no longer ivited to {} - + You are already in clan "{}" - + Clan with your specified &lt;clantag&gt; already exist! - + Please choice another one. - + Clan {} is created! - + Clan {} is pre-created, please invite - + at least {} players to your clan by using - + /clan invite &lt;username&gt; command. - + Invalid user. @@ -325,55 +325,55 @@ {}'s command group(s): {} - + Got bad group: {} - + Groups {} has been added to {} - + Groups {} has been deleted from {} - + Got unknown command: {} - + This command is only enabled for admins. - + Current connections: - + -class -tag -----name------ -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - + Unknown option. - + (none) - + none - + This command can only be used inside a channel. @@ -389,43 +389,43 @@ You must be at least a Channel Admin to demote another Channel Admin - + {} has been demoted from a Channel Admin. - + {} has demoted you from a Channel Admin of channel "{}" - + {} has been demoted from a Channel Operator - + {} has demoted you from a Channel Operator of channel "{}" - + {} has been demoted from a tempOP of this channel - + {} has demoted you from a tmpOP of channel "{}" - + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - + {} has demoted you from a tempOP of channel "{}" - + {} is no tempOP in this channel, so you can't demote him - + This command can only be used inside a channel. @@ -441,43 +441,43 @@ {} has been removed from VOP list. - + {} has removed you from VOP list of channel "{}" - + You must be at least Channel Admin to remove {} from the VOP list - + Voice has been taken from {} in this channel - + {} has taken your Voice in channel "{}" - + {} has no Voice in this channel, so it can't be taken away - + Do Not Disturb mode engaged. - + Not available - + Do Not Disturb mode canceled. - + -- name -- similar to {} - + Invalid user. @@ -485,179 +485,179 @@ Login: {} {} Sex: {} - + Created: {} - + Clan: {} - + Rank: Chieftain - + Rank: Shaman - + Rank: Grunt - + Rank: Peon - + Location: {} Age: {} - + Client: {} Ver: {} Country: {} - + unknown - + Last login {} from - + On since {} from - + Operator: {}, Admin: {}, Locked: {}, Muted: {} - + Yes - + Email: {} - + Last login Owner: {} - + Idle {} - + Flags set to {}. - + That user does not exist. - + Server error. - + You can't add yourself to your friends list. - + You can only have a maximum of {} friends. - + {} is already on your friends list! - + Added {} to your friends list. - + {} added you to his/her friends list. - + All of your friends are offline. - + {} was not found on your friends list. - + Removed {} from your friends list. - + Promoted {} in your friends list. - + Demoted {} in your friends list. - + Your {} - Friends List - + Your {} - Online Friends List - + , offline - + using {} - + , in game "{}" - + , in game AT Preparation - + , in channel "{}", - + , is in AT Preparation - + , is in a game - + , is in a chat channel - + End of Friends List - + You are not in a game. - + That game does not exist. - + Name: {} ID: {} ({}) - + none @@ -669,19 +669,19 @@ Owner: {} - + Address: {} - + Address: {} (trans {}) - + Client: {} (version {}, startver {}) - + Created: {} @@ -689,99 +689,99 @@ Started: {} - + Status: {} - + Type: {} - + Speed: {} - + Difficulty: {} - + Option: {} - + Map: {} - + Map Size: {}x{} - + Map Tileset: {} - + Map Type: {} - + Players: {} current, {} total, {} max - + Description: {} - + Currently accessible games: - + All current games: - + Games in lobby: - + Current games of type {} - + Current games of type {} {} - + ------name------ p -status- --------type--------- count - + ctag - + --------addr-------- - + Warning: That user is not online, using last known address. - + Sorry, no IP address could be retrieved. - + Scanning online users for IP {}... - + There are no online users with that IP address - + This command can only be used inside a channel. @@ -789,47 +789,47 @@ You have to be at least a Channel Operator or tempOP to use this command. - + That user is not logged in. - + That user is not in this channel. - + That connection doesn't exist. - + That user is not logged in? - + An admin has closed your connection and banned your IP address. - + Connection closed by admin. - + Operation successful. - + That is not a valid session. - + That session does not exist. - + Connection closed by admin and banned your IP's. - + Connection closed by admin. @@ -837,7 +837,7 @@ Copied current scores to active scores on all ladders. - + This game does not support win/loss records. @@ -845,11 +845,11 @@ You must supply a rank and a valid program ID. - + Example: /ladderinfo 1 STAR - + Invalid user. @@ -857,11 +857,11 @@ Account {} is now locked - + Your account has just been locked - + This command can only be used inside a channel. @@ -869,11 +869,11 @@ Banned users: - + You are not in a channel. - + This command can only be used inside a channel. @@ -885,23 +885,23 @@ Unable to change channel flags. - + Channel is now unmoderated. - + Channel is now moderated. - + Unable to open motd. - + No motd. - + Invalid user. @@ -909,11 +909,11 @@ Account {} is now muted - + Your account has just been muted - + That user is not logged on. @@ -921,39 +921,39 @@ Address information for other users is only available to admins. - + Server TCP: {} (bind {}) - + Client TCP: {} - + Client UDP: {} - + Client UDP: {} (trans {}) - + Game UDP: {} - + Game UDP: {} (trans {}) - + Game UDP: none - + Audible notification off. - + This command can only be used inside a channel. @@ -961,7 +961,7 @@ You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. @@ -969,31 +969,31 @@ {} is already a Channel Operator - + {} has been promoted to a Channel Operator - + {} has promoted you to a Channel Operator in channel "{}" - + {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to a tempOP - + {} has promoted you to a tempOP in this channel - + You must supply a username. @@ -1005,35 +1005,35 @@ {} is already a Server Operator - + {} has been promoted to a Server Operator - + {} has promoted you to a Server Operator - + {} is no Server Operator, so you can't demote him - + {} has been demoted from a Server Operator - + {} latency: {} - + Your latency {} - + {} latency () - + Invalid user. @@ -1041,35 +1041,35 @@ Connection closed. - + Your quota allows you to write {} line(s) per {} second(s). - + Long lines will be wrapped every {} characters. - + You are not allowed to send lines with more than {} characters. - + You must join a realm first - + Announcement from {}@{}: {} - + Invalid mode. - + Rehash of "{}" is complete! - + You are not in a channel. @@ -1077,11 +1077,11 @@ No one messaged you, use /m instead - + Pending changes has been saved into the database. - + That user is not logged on. @@ -1089,27 +1089,27 @@ Banning {} who is using IP address {} - + User's account is also LOCKED! Only an admin can unlock it! - + /ipban a {} - + You have been banned by Admin: {} - + Your account is also LOCKED! Only an admin can UNLOCK it! - + Access denied due to security reasons. - + Invalid user. @@ -1117,203 +1117,203 @@ Current value of {} is "{}" - + Value currently not set - + Unable to set key for - + Key set successfully for - + Invalid delay. - + You've initialized the shutdown sequence. - + You've canceled the shutdown sequence. - + No such user. - + You can't squelch yourself. - + Could not squelch user. - + {} has been squelched. - + Invalid user. - + Unable to determine client game. - + This game does not support win/loss records. - + You must supply a user name and a valid program ID. - + Example: /stats joe STAR - + {}'s record: - + level: {} - + class: {} - + stats: {} str {} mag {} dex {} vit {} gld - + Diablo kills: {} - + Normal games: {}-{}-{} - + Ladder games: {}-{}-{} (rating {}) - + Ladder games: 0-0-0 - + IronMan games: {}-{}-{} (rating {}) - + IronMan games: 0-0-0 - + {}'s Ladder Record's: - + Users Solo Level: {}, Experience: {} - + SOLO Ladder Record: {}-{}-0 - + SOLO Rank: {} - + Users Team Level: {}, Experience: {} - + TEAM Ladder Record: {}-{}-0 - + TEAM Rank: {} - + Users FFA Level: {}, Experience: {} - + FFA Ladder Record: {}-{}-0 - + FFA Rank: {} - + Users AT Team No. {} - + Users AT TEAM Level: {}, Experience: {} - + AT TEAM Ladder Record: {}-{}-0 - + AT TEAM Rank: {} - + There are currently {} user(s) in {} games of {} - + There are currently {} users online, in {} games, and in {} channels. - + Client tag set to {}. - + Invalid clienttag {} specified - + Server Time: {} - + Your local time: {} - + Invalid duration. - + Your timer has expired. - + Could not set timer. - + Timer set for {} second(s) - + This command can only be used inside a channel. @@ -1321,7 +1321,7 @@ You must be at least a Channel Operator or tmpOP to use this command. - + There's no account with username {}. @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - + {} must be on the same channel to tempOP him @@ -1341,7 +1341,7 @@ {} has been promoted to tmpOP in this channel - + {} has promoted you to a tempOP in this channel @@ -1353,19 +1353,19 @@ Max topic length exceeded (max {} symbols) - + You must be at least a Channel Operator of {} to set the topic - + {} topic: no topic - + Unable to send TOS (Terms of Service). - + This command can only be used inside a channel. @@ -1373,15 +1373,15 @@ You are not a channel operator. - + That user is not banned. - + {} is no longer banned from this channel. - + Invalid user. @@ -1389,11 +1389,11 @@ Your account has just been unlocked by {} - + That user's account is now unlocked. - + Invalid user. @@ -1401,11 +1401,11 @@ Your account has just been unmuted by {} - + That user's account is now unmuted. - + No such user. @@ -1413,11 +1413,11 @@ User was not being ignored. - + No longer ignoring. - + That user does not exist. @@ -1425,11 +1425,11 @@ Removal from watch list failed. - + User {} removed from your watch list. - + Removal from watch list failed. @@ -1437,15 +1437,15 @@ All {} users removed from your watch list. - + All users removed from your watch list. - + Uptime: {} - + This command can only be used inside a channel. @@ -1453,7 +1453,7 @@ You must be at least a Channel Operator to use this command. - + There's no account with username {}. @@ -1461,27 +1461,27 @@ {} is already on VOP list, no need to Voice him - + {} must be on the same channel to voice him - + {} already has Voice in this channel - + {} is already an operator or admin. - + {} has been granted Voice in this channel - + {} has granted you Voice in this channel - + This command can only be used inside a channel. @@ -1497,15 +1497,15 @@ {} is already on VOP list - + {} has been added to the VOP list - + {} has added you to the VOP list of channel "{}" - + That user does not exist. @@ -1513,11 +1513,11 @@ Add to watch list failed. - + User {} added to your watch list. - + Add to watch list failed. @@ -1525,39 +1525,39 @@ All {} users added to your watch list. - + All users added to your watch list. - + That channel does not exist. - + (If you are trying to search for a user, use the /whois command.) - + You are banned from that channel. - + Users in channel {}: - + Unable to obtain your account name. - + (invalid date) - + Reset {}'s {} stats - + Reset {}'s {} stats @@ -1569,39 +1569,39 @@ You cannot kick administrators. - + You cannot kick operators. - + {} has been kicked by {} ({}). - + {} has been kicked by {}. - + You cannot ban operators. - + Unable to ban {}. - + {} has been banned by {} ({}). - + {} has been banned by {}. - + Password for account {} updated. - + Hash is: {} @@ -1609,83 +1609,83 @@ Your account has been muted, you can't whisper to other users. - + That user is not logged on. - + {} is unavailable ({}) - + {} is away ({}) - + Unknown user. - + User was last seen on: {} - + User is offline - + You - + are - + is - + {} {} using {} and {} currently in {} game "{}". - + {} {} using {} and {} currently in channel "{}". - + {} {} using {}. - + {} {} refusing messages ({}) - + {} away ({}) - + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - + This command has been deactivated - + This command is reserved for admins. - + Unknown command. - + This account has been locked - + This account has been locked @@ -1693,7 +1693,7 @@ Oops ! There is a problem with the help file. Please contact the administrator of the server. - + This command can only be used inside a channel. @@ -1701,75 +1701,75 @@ This command can only be used from the game. - + Bad icon. - + {} banned permamently by {}. - + {} banned permamently. - + {} banned for {} by {}. - + {} banned for {}. - + Banning only for: {} minutes. - + This server has NO mail support. - + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - + Successfully deleted messages. - + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - + Succesfully deleted message. - + You have no mail. - + There was an error completing your request. - + Receiver UNKNOWN! - + Receiver has reached his mail quota. Your message will NOT be sent. - + Your mail has been sent successfully. - + There was an error completing your request! - + You must be at least a Channel Operator to use this command. @@ -1781,31 +1781,31 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - + Available Quiz dictionaries: - + Quiz is not running. - + {}'s Quiz record: - + {} has never played Quiz. - + Top {} Quiz records: - + points - + This command is reserved for admins. @@ -1813,7 +1813,7 @@ User "{}" is offline - + \ No newline at end of file diff --git a/conf/i18n/common-koKR.xml.in b/conf/i18n/common-koKR.xml.in index 9a984ab95..5d4ce7110 100644 --- a/conf/i18n/common-koKR.xml.in +++ b/conf/i18n/common-koKR.xml.in @@ -9,103 +9,103 @@ by {} - + for {} - + permanently - + with a reason "{}" - + No such alias. Use // to show the list. - + Alias list: - + you are now tempOP for this channel - + Account name contains some invalid symbol! - + Maximum password length allowed is {} - + Trying to add account "{}" with password "{}" - + Hash is: {} - + Failed to create account! - + Account {} created. - + You must supply a username. - + There's no account with username {}. - + {} is already a Server Admin - + {} has been promoted to a Server Admin - + {} has promoted you to a Server Admin - + {} is not a Server Admin. - + {} has been demoted from a Server Admin - + {} has demoted you from a Server Admin - + Currently logged on Administrators: - + Your game client doesn't support MessageBox. - + \n\n***************************\nBy {} - + Information from {} - + for {} @@ -113,19 +113,19 @@ Announcement from {}: {} - + Could not broadcast message. - + This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. @@ -133,23 +133,23 @@ {} is already a Channel Admin - + {} has been promoted to a Channel Admin - + {} has promoted you to a Channel Admin for channel "{}" - + You are now marked as being away. - + You are no longer marked as away. - + This command can only be used inside a channel. @@ -157,55 +157,55 @@ You have to be at least a Channel Operator to use this command. - + That account doesn't currently exist. - + You cannot ban administrators. - + Audible notification on. - + Channel Arranged Teams is a RESTRICTED Channel! - + Max channel name length exceeded (max {} symbols) - + Command disabled while inside a game. - + Currently accessible channels: - + All current channels: - + Current channels of type {} - + -----------name----------- users ----admin/operator---- - + Only admins may change passwords for other accounts. - + Account does not exist. - + Maximum password length allowed is {} @@ -213,107 +213,107 @@ Trying to change password for account "{}" to "{}" - + Unable to set password. - + Message was sent to all currently available clan members. - + All fellow members of your clan are currently offline. - + Clan channel is opened up! - + Clan channel has already been opened up! - + Clan channel is closed! - + Clan channel has already been closed! - + Clan message of day is updated! - + User {} was invited to your clan! - + You are invited to {} by {}! - + User {} is not online or is already member of clan! - + This is one-way action! If you really want - + to disband your clan, type /clan disband yes - + Your clan was disbanded. - + You have been invited to {} - + You are now a clan member of {} - + Clan {} was be created - + You are no longer ivited to {} - + You are already in clan "{}" - + Clan with your specified &lt;clantag&gt; already exist! - + Please choice another one. - + Clan {} is created! - + Clan {} is pre-created, please invite - + at least {} players to your clan by using - + /clan invite &lt;username&gt; command. - + Invalid user. @@ -325,55 +325,55 @@ {}'s command group(s): {} - + Got bad group: {} - + Groups {} has been added to {} - + Groups {} has been deleted from {} - + Got unknown command: {} - + This command is only enabled for admins. - + Current connections: - + -class -tag -----name------ -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - + Unknown option. - + (none) - + none - + This command can only be used inside a channel. @@ -389,43 +389,43 @@ You must be at least a Channel Admin to demote another Channel Admin - + {} has been demoted from a Channel Admin. - + {} has demoted you from a Channel Admin of channel "{}" - + {} has been demoted from a Channel Operator - + {} has demoted you from a Channel Operator of channel "{}" - + {} has been demoted from a tempOP of this channel - + {} has demoted you from a tmpOP of channel "{}" - + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - + {} has demoted you from a tempOP of channel "{}" - + {} is no tempOP in this channel, so you can't demote him - + This command can only be used inside a channel. @@ -441,43 +441,43 @@ {} has been removed from VOP list. - + {} has removed you from VOP list of channel "{}" - + You must be at least Channel Admin to remove {} from the VOP list - + Voice has been taken from {} in this channel - + {} has taken your Voice in channel "{}" - + {} has no Voice in this channel, so it can't be taken away - + Do Not Disturb mode engaged. - + Not available - + Do Not Disturb mode canceled. - + -- name -- similar to {} - + Invalid user. @@ -485,179 +485,179 @@ Login: {} {} Sex: {} - + Created: {} - + Clan: {} - + Rank: Chieftain - + Rank: Shaman - + Rank: Grunt - + Rank: Peon - + Location: {} Age: {} - + Client: {} Ver: {} Country: {} - + unknown - + Last login {} from - + On since {} from - + Operator: {}, Admin: {}, Locked: {}, Muted: {} - + Yes - + Email: {} - + Last login Owner: {} - + Idle {} - + Flags set to {}. - + That user does not exist. - + Server error. - + You can't add yourself to your friends list. - + You can only have a maximum of {} friends. - + {} is already on your friends list! - + Added {} to your friends list. - + {} added you to his/her friends list. - + All of your friends are offline. - + {} was not found on your friends list. - + Removed {} from your friends list. - + Promoted {} in your friends list. - + Demoted {} in your friends list. - + Your {} - Friends List - + Your {} - Online Friends List - + , offline - + using {} - + , in game "{}" - + , in game AT Preparation - + , in channel "{}", - + , is in AT Preparation - + , is in a game - + , is in a chat channel - + End of Friends List - + You are not in a game. - + That game does not exist. - + Name: {} ID: {} ({}) - + none @@ -669,19 +669,19 @@ Owner: {} - + Address: {} - + Address: {} (trans {}) - + Client: {} (version {}, startver {}) - + Created: {} @@ -689,99 +689,99 @@ Started: {} - + Status: {} - + Type: {} - + Speed: {} - + Difficulty: {} - + Option: {} - + Map: {} - + Map Size: {}x{} - + Map Tileset: {} - + Map Type: {} - + Players: {} current, {} total, {} max - + Description: {} - + Currently accessible games: - + All current games: - + Games in lobby: - + Current games of type {} - + Current games of type {} {} - + ------name------ p -status- --------type--------- count - + ctag - + --------addr-------- - + Warning: That user is not online, using last known address. - + Sorry, no IP address could be retrieved. - + Scanning online users for IP {}... - + There are no online users with that IP address - + This command can only be used inside a channel. @@ -789,47 +789,47 @@ You have to be at least a Channel Operator or tempOP to use this command. - + That user is not logged in. - + That user is not in this channel. - + That connection doesn't exist. - + That user is not logged in? - + An admin has closed your connection and banned your IP address. - + Connection closed by admin. - + Operation successful. - + That is not a valid session. - + That session does not exist. - + Connection closed by admin and banned your IP's. - + Connection closed by admin. @@ -837,7 +837,7 @@ Copied current scores to active scores on all ladders. - + This game does not support win/loss records. @@ -845,11 +845,11 @@ You must supply a rank and a valid program ID. - + Example: /ladderinfo 1 STAR - + Invalid user. @@ -857,11 +857,11 @@ Account {} is now locked - + Your account has just been locked - + This command can only be used inside a channel. @@ -869,11 +869,11 @@ Banned users: - + You are not in a channel. - + This command can only be used inside a channel. @@ -885,23 +885,23 @@ Unable to change channel flags. - + Channel is now unmoderated. - + Channel is now moderated. - + Unable to open motd. - + No motd. - + Invalid user. @@ -909,11 +909,11 @@ Account {} is now muted - + Your account has just been muted - + That user is not logged on. @@ -921,39 +921,39 @@ Address information for other users is only available to admins. - + Server TCP: {} (bind {}) - + Client TCP: {} - + Client UDP: {} - + Client UDP: {} (trans {}) - + Game UDP: {} - + Game UDP: {} (trans {}) - + Game UDP: none - + Audible notification off. - + This command can only be used inside a channel. @@ -961,7 +961,7 @@ You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. @@ -969,31 +969,31 @@ {} is already a Channel Operator - + {} has been promoted to a Channel Operator - + {} has promoted you to a Channel Operator in channel "{}" - + {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to a tempOP - + {} has promoted you to a tempOP in this channel - + You must supply a username. @@ -1005,35 +1005,35 @@ {} is already a Server Operator - + {} has been promoted to a Server Operator - + {} has promoted you to a Server Operator - + {} is no Server Operator, so you can't demote him - + {} has been demoted from a Server Operator - + {} latency: {} - + Your latency {} - + {} latency () - + Invalid user. @@ -1041,35 +1041,35 @@ Connection closed. - + Your quota allows you to write {} line(s) per {} second(s). - + Long lines will be wrapped every {} characters. - + You are not allowed to send lines with more than {} characters. - + You must join a realm first - + Announcement from {}@{}: {} - + Invalid mode. - + Rehash of "{}" is complete! - + You are not in a channel. @@ -1077,11 +1077,11 @@ No one messaged you, use /m instead - + Pending changes has been saved into the database. - + That user is not logged on. @@ -1089,27 +1089,27 @@ Banning {} who is using IP address {} - + User's account is also LOCKED! Only an admin can unlock it! - + /ipban a {} - + You have been banned by Admin: {} - + Your account is also LOCKED! Only an admin can UNLOCK it! - + Access denied due to security reasons. - + Invalid user. @@ -1117,203 +1117,203 @@ Current value of {} is "{}" - + Value currently not set - + Unable to set key for - + Key set successfully for - + Invalid delay. - + You've initialized the shutdown sequence. - + You've canceled the shutdown sequence. - + No such user. - + You can't squelch yourself. - + Could not squelch user. - + {} has been squelched. - + Invalid user. - + Unable to determine client game. - + This game does not support win/loss records. - + You must supply a user name and a valid program ID. - + Example: /stats joe STAR - + {}'s record: - + level: {} - + class: {} - + stats: {} str {} mag {} dex {} vit {} gld - + Diablo kills: {} - + Normal games: {}-{}-{} - + Ladder games: {}-{}-{} (rating {}) - + Ladder games: 0-0-0 - + IronMan games: {}-{}-{} (rating {}) - + IronMan games: 0-0-0 - + {}'s Ladder Record's: - + Users Solo Level: {}, Experience: {} - + SOLO Ladder Record: {}-{}-0 - + SOLO Rank: {} - + Users Team Level: {}, Experience: {} - + TEAM Ladder Record: {}-{}-0 - + TEAM Rank: {} - + Users FFA Level: {}, Experience: {} - + FFA Ladder Record: {}-{}-0 - + FFA Rank: {} - + Users AT Team No. {} - + Users AT TEAM Level: {}, Experience: {} - + AT TEAM Ladder Record: {}-{}-0 - + AT TEAM Rank: {} - + There are currently {} user(s) in {} games of {} - + There are currently {} users online, in {} games, and in {} channels. - + Client tag set to {}. - + Invalid clienttag {} specified - + Server Time: {} - + Your local time: {} - + Invalid duration. - + Your timer has expired. - + Could not set timer. - + Timer set for {} second(s) - + This command can only be used inside a channel. @@ -1321,7 +1321,7 @@ You must be at least a Channel Operator or tmpOP to use this command. - + There's no account with username {}. @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - + {} must be on the same channel to tempOP him @@ -1341,7 +1341,7 @@ {} has been promoted to tmpOP in this channel - + {} has promoted you to a tempOP in this channel @@ -1353,19 +1353,19 @@ Max topic length exceeded (max {} symbols) - + You must be at least a Channel Operator of {} to set the topic - + {} topic: no topic - + Unable to send TOS (Terms of Service). - + This command can only be used inside a channel. @@ -1373,15 +1373,15 @@ You are not a channel operator. - + That user is not banned. - + {} is no longer banned from this channel. - + Invalid user. @@ -1389,11 +1389,11 @@ Your account has just been unlocked by {} - + That user's account is now unlocked. - + Invalid user. @@ -1401,11 +1401,11 @@ Your account has just been unmuted by {} - + That user's account is now unmuted. - + No such user. @@ -1413,11 +1413,11 @@ User was not being ignored. - + No longer ignoring. - + That user does not exist. @@ -1425,11 +1425,11 @@ Removal from watch list failed. - + User {} removed from your watch list. - + Removal from watch list failed. @@ -1437,15 +1437,15 @@ All {} users removed from your watch list. - + All users removed from your watch list. - + Uptime: {} - + This command can only be used inside a channel. @@ -1453,7 +1453,7 @@ You must be at least a Channel Operator to use this command. - + There's no account with username {}. @@ -1461,27 +1461,27 @@ {} is already on VOP list, no need to Voice him - + {} must be on the same channel to voice him - + {} already has Voice in this channel - + {} is already an operator or admin. - + {} has been granted Voice in this channel - + {} has granted you Voice in this channel - + This command can only be used inside a channel. @@ -1497,15 +1497,15 @@ {} is already on VOP list - + {} has been added to the VOP list - + {} has added you to the VOP list of channel "{}" - + That user does not exist. @@ -1513,11 +1513,11 @@ Add to watch list failed. - + User {} added to your watch list. - + Add to watch list failed. @@ -1525,39 +1525,39 @@ All {} users added to your watch list. - + All users added to your watch list. - + That channel does not exist. - + (If you are trying to search for a user, use the /whois command.) - + You are banned from that channel. - + Users in channel {}: - + Unable to obtain your account name. - + (invalid date) - + Reset {}'s {} stats - + Reset {}'s {} stats @@ -1569,39 +1569,39 @@ You cannot kick administrators. - + You cannot kick operators. - + {} has been kicked by {} ({}). - + {} has been kicked by {}. - + You cannot ban operators. - + Unable to ban {}. - + {} has been banned by {} ({}). - + {} has been banned by {}. - + Password for account {} updated. - + Hash is: {} @@ -1609,83 +1609,83 @@ Your account has been muted, you can't whisper to other users. - + That user is not logged on. - + {} is unavailable ({}) - + {} is away ({}) - + Unknown user. - + User was last seen on: {} - + User is offline - + You - + are - + is - + {} {} using {} and {} currently in {} game "{}". - + {} {} using {} and {} currently in channel "{}". - + {} {} using {}. - + {} {} refusing messages ({}) - + {} away ({}) - + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - + This command has been deactivated - + This command is reserved for admins. - + Unknown command. - + This account has been locked - + This account has been locked @@ -1693,7 +1693,7 @@ Oops ! There is a problem with the help file. Please contact the administrator of the server. - + This command can only be used inside a channel. @@ -1701,75 +1701,75 @@ This command can only be used from the game. - + Bad icon. - + {} banned permamently by {}. - + {} banned permamently. - + {} banned for {} by {}. - + {} banned for {}. - + Banning only for: {} minutes. - + This server has NO mail support. - + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - + Successfully deleted messages. - + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - + Succesfully deleted message. - + You have no mail. - + There was an error completing your request. - + Receiver UNKNOWN! - + Receiver has reached his mail quota. Your message will NOT be sent. - + Your mail has been sent successfully. - + There was an error completing your request! - + You must be at least a Channel Operator to use this command. @@ -1781,31 +1781,31 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - + Available Quiz dictionaries: - + Quiz is not running. - + {}'s Quiz record: - + {} has never played Quiz. - + Top {} Quiz records: - + points - + This command is reserved for admins. @@ -1813,7 +1813,7 @@ User "{}" is offline - + \ No newline at end of file diff --git a/conf/i18n/common-plPL.xml.in b/conf/i18n/common-plPL.xml.in index a9b5fd7ad..a356ad1b1 100644 --- a/conf/i18n/common-plPL.xml.in +++ b/conf/i18n/common-plPL.xml.in @@ -9,103 +9,103 @@ by {} - + for {} - + permanently - + with a reason "{}" - + No such alias. Use // to show the list. - + Alias list: - + you are now tempOP for this channel - + Account name contains some invalid symbol! - + Maximum password length allowed is {} - + Trying to add account "{}" with password "{}" - + Hash is: {} - + Failed to create account! - + Account {} created. - + You must supply a username. - + There's no account with username {}. - + {} is already a Server Admin - + {} has been promoted to a Server Admin - + {} has promoted you to a Server Admin - + {} is not a Server Admin. - + {} has been demoted from a Server Admin - + {} has demoted you from a Server Admin - + Currently logged on Administrators: - + Your game client doesn't support MessageBox. - + \n\n***************************\nBy {} - + Information from {} - + for {} @@ -113,19 +113,19 @@ Announcement from {}: {} - + Could not broadcast message. - + This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. @@ -133,23 +133,23 @@ {} is already a Channel Admin - + {} has been promoted to a Channel Admin - + {} has promoted you to a Channel Admin for channel "{}" - + You are now marked as being away. - + You are no longer marked as away. - + This command can only be used inside a channel. @@ -157,55 +157,55 @@ You have to be at least a Channel Operator to use this command. - + That account doesn't currently exist. - + You cannot ban administrators. - + Audible notification on. - + Channel Arranged Teams is a RESTRICTED Channel! - + Max channel name length exceeded (max {} symbols) - + Command disabled while inside a game. - + Currently accessible channels: - + All current channels: - + Current channels of type {} - + -----------name----------- users ----admin/operator---- - + Only admins may change passwords for other accounts. - + Account does not exist. - + Maximum password length allowed is {} @@ -213,107 +213,107 @@ Trying to change password for account "{}" to "{}" - + Unable to set password. - + Message was sent to all currently available clan members. - + All fellow members of your clan are currently offline. - + Clan channel is opened up! - + Clan channel has already been opened up! - + Clan channel is closed! - + Clan channel has already been closed! - + Clan message of day is updated! - + User {} was invited to your clan! - + You are invited to {} by {}! - + User {} is not online or is already member of clan! - + This is one-way action! If you really want - + to disband your clan, type /clan disband yes - + Your clan was disbanded. - + You have been invited to {} - + You are now a clan member of {} - + Clan {} was be created - + You are no longer ivited to {} - + You are already in clan "{}" - + Clan with your specified &lt;clantag&gt; already exist! - + Please choice another one. - + Clan {} is created! - + Clan {} is pre-created, please invite - + at least {} players to your clan by using - + /clan invite &lt;username&gt; command. - + Invalid user. @@ -325,55 +325,55 @@ {}'s command group(s): {} - + Got bad group: {} - + Groups {} has been added to {} - + Groups {} has been deleted from {} - + Got unknown command: {} - + This command is only enabled for admins. - + Current connections: - + -class -tag -----name------ -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - + Unknown option. - + (none) - + none - + This command can only be used inside a channel. @@ -389,43 +389,43 @@ You must be at least a Channel Admin to demote another Channel Admin - + {} has been demoted from a Channel Admin. - + {} has demoted you from a Channel Admin of channel "{}" - + {} has been demoted from a Channel Operator - + {} has demoted you from a Channel Operator of channel "{}" - + {} has been demoted from a tempOP of this channel - + {} has demoted you from a tmpOP of channel "{}" - + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - + {} has demoted you from a tempOP of channel "{}" - + {} is no tempOP in this channel, so you can't demote him - + This command can only be used inside a channel. @@ -441,43 +441,43 @@ {} has been removed from VOP list. - + {} has removed you from VOP list of channel "{}" - + You must be at least Channel Admin to remove {} from the VOP list - + Voice has been taken from {} in this channel - + {} has taken your Voice in channel "{}" - + {} has no Voice in this channel, so it can't be taken away - + Do Not Disturb mode engaged. - + Not available - + Do Not Disturb mode canceled. - + -- name -- similar to {} - + Invalid user. @@ -485,179 +485,179 @@ Login: {} {} Sex: {} - + Created: {} - + Clan: {} - + Rank: Chieftain - + Rank: Shaman - + Rank: Grunt - + Rank: Peon - + Location: {} Age: {} - + Client: {} Ver: {} Country: {} - + unknown - + Last login {} from - + On since {} from - + Operator: {}, Admin: {}, Locked: {}, Muted: {} - + Yes - + Email: {} - + Last login Owner: {} - + Idle {} - + Flags set to {}. - + That user does not exist. - + Server error. - + You can't add yourself to your friends list. - + You can only have a maximum of {} friends. - + {} is already on your friends list! - + Added {} to your friends list. - + {} added you to his/her friends list. - + All of your friends are offline. - + {} was not found on your friends list. - + Removed {} from your friends list. - + Promoted {} in your friends list. - + Demoted {} in your friends list. - + Your {} - Friends List - + Your {} - Online Friends List - + , offline - + using {} - + , in game "{}" - + , in game AT Preparation - + , in channel "{}", - + , is in AT Preparation - + , is in a game - + , is in a chat channel - + End of Friends List - + You are not in a game. - + That game does not exist. - + Name: {} ID: {} ({}) - + none @@ -669,19 +669,19 @@ Owner: {} - + Address: {} - + Address: {} (trans {}) - + Client: {} (version {}, startver {}) - + Created: {} @@ -689,99 +689,99 @@ Started: {} - + Status: {} - + Type: {} - + Speed: {} - + Difficulty: {} - + Option: {} - + Map: {} - + Map Size: {}x{} - + Map Tileset: {} - + Map Type: {} - + Players: {} current, {} total, {} max - + Description: {} - + Currently accessible games: - + All current games: - + Games in lobby: - + Current games of type {} - + Current games of type {} {} - + ------name------ p -status- --------type--------- count - + ctag - + --------addr-------- - + Warning: That user is not online, using last known address. - + Sorry, no IP address could be retrieved. - + Scanning online users for IP {}... - + There are no online users with that IP address - + This command can only be used inside a channel. @@ -789,47 +789,47 @@ You have to be at least a Channel Operator or tempOP to use this command. - + That user is not logged in. - + That user is not in this channel. - + That connection doesn't exist. - + That user is not logged in? - + An admin has closed your connection and banned your IP address. - + Connection closed by admin. - + Operation successful. - + That is not a valid session. - + That session does not exist. - + Connection closed by admin and banned your IP's. - + Connection closed by admin. @@ -837,7 +837,7 @@ Copied current scores to active scores on all ladders. - + This game does not support win/loss records. @@ -845,11 +845,11 @@ You must supply a rank and a valid program ID. - + Example: /ladderinfo 1 STAR - + Invalid user. @@ -857,11 +857,11 @@ Account {} is now locked - + Your account has just been locked - + This command can only be used inside a channel. @@ -869,11 +869,11 @@ Banned users: - + You are not in a channel. - + This command can only be used inside a channel. @@ -885,23 +885,23 @@ Unable to change channel flags. - + Channel is now unmoderated. - + Channel is now moderated. - + Unable to open motd. - + No motd. - + Invalid user. @@ -909,11 +909,11 @@ Account {} is now muted - + Your account has just been muted - + That user is not logged on. @@ -921,39 +921,39 @@ Address information for other users is only available to admins. - + Server TCP: {} (bind {}) - + Client TCP: {} - + Client UDP: {} - + Client UDP: {} (trans {}) - + Game UDP: {} - + Game UDP: {} (trans {}) - + Game UDP: none - + Audible notification off. - + This command can only be used inside a channel. @@ -961,7 +961,7 @@ You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. @@ -969,31 +969,31 @@ {} is already a Channel Operator - + {} has been promoted to a Channel Operator - + {} has promoted you to a Channel Operator in channel "{}" - + {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to a tempOP - + {} has promoted you to a tempOP in this channel - + You must supply a username. @@ -1005,35 +1005,35 @@ {} is already a Server Operator - + {} has been promoted to a Server Operator - + {} has promoted you to a Server Operator - + {} is no Server Operator, so you can't demote him - + {} has been demoted from a Server Operator - + {} latency: {} - + Your latency {} - + {} latency () - + Invalid user. @@ -1041,35 +1041,35 @@ Connection closed. - + Your quota allows you to write {} line(s) per {} second(s). - + Long lines will be wrapped every {} characters. - + You are not allowed to send lines with more than {} characters. - + You must join a realm first - + Announcement from {}@{}: {} - + Invalid mode. - + Rehash of "{}" is complete! - + You are not in a channel. @@ -1077,11 +1077,11 @@ No one messaged you, use /m instead - + Pending changes has been saved into the database. - + That user is not logged on. @@ -1089,27 +1089,27 @@ Banning {} who is using IP address {} - + User's account is also LOCKED! Only an admin can unlock it! - + /ipban a {} - + You have been banned by Admin: {} - + Your account is also LOCKED! Only an admin can UNLOCK it! - + Access denied due to security reasons. - + Invalid user. @@ -1117,203 +1117,203 @@ Current value of {} is "{}" - + Value currently not set - + Unable to set key for - + Key set successfully for - + Invalid delay. - + You've initialized the shutdown sequence. - + You've canceled the shutdown sequence. - + No such user. - + You can't squelch yourself. - + Could not squelch user. - + {} has been squelched. - + Invalid user. - + Unable to determine client game. - + This game does not support win/loss records. - + You must supply a user name and a valid program ID. - + Example: /stats joe STAR - + {}'s record: - + level: {} - + class: {} - + stats: {} str {} mag {} dex {} vit {} gld - + Diablo kills: {} - + Normal games: {}-{}-{} - + Ladder games: {}-{}-{} (rating {}) - + Ladder games: 0-0-0 - + IronMan games: {}-{}-{} (rating {}) - + IronMan games: 0-0-0 - + {}'s Ladder Record's: - + Users Solo Level: {}, Experience: {} - + SOLO Ladder Record: {}-{}-0 - + SOLO Rank: {} - + Users Team Level: {}, Experience: {} - + TEAM Ladder Record: {}-{}-0 - + TEAM Rank: {} - + Users FFA Level: {}, Experience: {} - + FFA Ladder Record: {}-{}-0 - + FFA Rank: {} - + Users AT Team No. {} - + Users AT TEAM Level: {}, Experience: {} - + AT TEAM Ladder Record: {}-{}-0 - + AT TEAM Rank: {} - + There are currently {} user(s) in {} games of {} - + There are currently {} users online, in {} games, and in {} channels. - + Client tag set to {}. - + Invalid clienttag {} specified - + Server Time: {} - + Your local time: {} - + Invalid duration. - + Your timer has expired. - + Could not set timer. - + Timer set for {} second(s) - + This command can only be used inside a channel. @@ -1321,7 +1321,7 @@ You must be at least a Channel Operator or tmpOP to use this command. - + There's no account with username {}. @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - + {} must be on the same channel to tempOP him @@ -1341,7 +1341,7 @@ {} has been promoted to tmpOP in this channel - + {} has promoted you to a tempOP in this channel @@ -1353,19 +1353,19 @@ Max topic length exceeded (max {} symbols) - + You must be at least a Channel Operator of {} to set the topic - + {} topic: no topic - + Unable to send TOS (Terms of Service). - + This command can only be used inside a channel. @@ -1373,15 +1373,15 @@ You are not a channel operator. - + That user is not banned. - + {} is no longer banned from this channel. - + Invalid user. @@ -1389,11 +1389,11 @@ Your account has just been unlocked by {} - + That user's account is now unlocked. - + Invalid user. @@ -1401,11 +1401,11 @@ Your account has just been unmuted by {} - + That user's account is now unmuted. - + No such user. @@ -1413,11 +1413,11 @@ User was not being ignored. - + No longer ignoring. - + That user does not exist. @@ -1425,11 +1425,11 @@ Removal from watch list failed. - + User {} removed from your watch list. - + Removal from watch list failed. @@ -1437,15 +1437,15 @@ All {} users removed from your watch list. - + All users removed from your watch list. - + Uptime: {} - + This command can only be used inside a channel. @@ -1453,7 +1453,7 @@ You must be at least a Channel Operator to use this command. - + There's no account with username {}. @@ -1461,27 +1461,27 @@ {} is already on VOP list, no need to Voice him - + {} must be on the same channel to voice him - + {} already has Voice in this channel - + {} is already an operator or admin. - + {} has been granted Voice in this channel - + {} has granted you Voice in this channel - + This command can only be used inside a channel. @@ -1497,15 +1497,15 @@ {} is already on VOP list - + {} has been added to the VOP list - + {} has added you to the VOP list of channel "{}" - + That user does not exist. @@ -1513,11 +1513,11 @@ Add to watch list failed. - + User {} added to your watch list. - + Add to watch list failed. @@ -1525,39 +1525,39 @@ All {} users added to your watch list. - + All users added to your watch list. - + That channel does not exist. - + (If you are trying to search for a user, use the /whois command.) - + You are banned from that channel. - + Users in channel {}: - + Unable to obtain your account name. - + (invalid date) - + Reset {}'s {} stats - + Reset {}'s {} stats @@ -1569,39 +1569,39 @@ You cannot kick administrators. - + You cannot kick operators. - + {} has been kicked by {} ({}). - + {} has been kicked by {}. - + You cannot ban operators. - + Unable to ban {}. - + {} has been banned by {} ({}). - + {} has been banned by {}. - + Password for account {} updated. - + Hash is: {} @@ -1609,83 +1609,83 @@ Your account has been muted, you can't whisper to other users. - + That user is not logged on. - + {} is unavailable ({}) - + {} is away ({}) - + Unknown user. - + User was last seen on: {} - + User is offline - + You - + are - + is - + {} {} using {} and {} currently in {} game "{}". - + {} {} using {} and {} currently in channel "{}". - + {} {} using {}. - + {} {} refusing messages ({}) - + {} away ({}) - + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - + This command has been deactivated - + This command is reserved for admins. - + Unknown command. - + This account has been locked - + This account has been locked @@ -1693,7 +1693,7 @@ Oops ! There is a problem with the help file. Please contact the administrator of the server. - + This command can only be used inside a channel. @@ -1701,75 +1701,75 @@ This command can only be used from the game. - + Bad icon. - + {} banned permamently by {}. - + {} banned permamently. - + {} banned for {} by {}. - + {} banned for {}. - + Banning only for: {} minutes. - + This server has NO mail support. - + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - + Successfully deleted messages. - + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - + Succesfully deleted message. - + You have no mail. - + There was an error completing your request. - + Receiver UNKNOWN! - + Receiver has reached his mail quota. Your message will NOT be sent. - + Your mail has been sent successfully. - + There was an error completing your request! - + You must be at least a Channel Operator to use this command. @@ -1781,31 +1781,31 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - + Available Quiz dictionaries: - + Quiz is not running. - + {}'s Quiz record: - + {} has never played Quiz. - + Top {} Quiz records: - + points - + This command is reserved for admins. @@ -1813,7 +1813,7 @@ User "{}" is offline - + \ No newline at end of file diff --git a/conf/i18n/common-ruRU.xml.in b/conf/i18n/common-ruRU.xml.in index cf0c87e32..16996fcd0 100644 --- a/conf/i18n/common-ruRU.xml.in +++ b/conf/i18n/common-ruRU.xml.in @@ -9,103 +9,103 @@ by {} - + for {} - + permanently - + with a reason "{}" - + No such alias. Use // to show the list. - + Alias list: - + you are now tempOP for this channel - + Account name contains some invalid symbol! - + Maximum password length allowed is {} - + Trying to add account "{}" with password "{}" - + Hash is: {} - + Failed to create account! - + Account {} created. - + You must supply a username. - + There's no account with username {}. - + {} is already a Server Admin - + {} has been promoted to a Server Admin - + {} has promoted you to a Server Admin - + {} is not a Server Admin. - + {} has been demoted from a Server Admin - + {} has demoted you from a Server Admin - + Currently logged on Administrators: - + Your game client doesn't support MessageBox. - + \n\n***************************\nBy {} - + Information from {} - + for {} @@ -113,19 +113,19 @@ Announcement from {}: {} - + Could not broadcast message. - + This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. @@ -133,23 +133,23 @@ {} is already a Channel Admin - + {} has been promoted to a Channel Admin - + {} has promoted you to a Channel Admin for channel "{}" - + You are now marked as being away. - + You are no longer marked as away. - + This command can only be used inside a channel. @@ -157,55 +157,55 @@ You have to be at least a Channel Operator to use this command. - + That account doesn't currently exist. - + You cannot ban administrators. - + Audible notification on. - + Channel Arranged Teams is a RESTRICTED Channel! - + Max channel name length exceeded (max {} symbols) - + Command disabled while inside a game. - + Currently accessible channels: - + All current channels: - + Current channels of type {} - + -----------name----------- users ----admin/operator---- - + Only admins may change passwords for other accounts. - + Account does not exist. - + Maximum password length allowed is {} @@ -213,107 +213,107 @@ Trying to change password for account "{}" to "{}" - + Unable to set password. - + Message was sent to all currently available clan members. - + All fellow members of your clan are currently offline. - + Clan channel is opened up! - + Clan channel has already been opened up! - + Clan channel is closed! - + Clan channel has already been closed! - + Clan message of day is updated! - + User {} was invited to your clan! - + You are invited to {} by {}! - + User {} is not online or is already member of clan! - + This is one-way action! If you really want - + to disband your clan, type /clan disband yes - + Your clan was disbanded. - + You have been invited to {} - + You are now a clan member of {} - + Clan {} was be created - + You are no longer ivited to {} - + You are already in clan "{}" - + Clan with your specified &lt;clantag&gt; already exist! - + Please choice another one. - + Clan {} is created! - + Clan {} is pre-created, please invite - + at least {} players to your clan by using - + /clan invite &lt;username&gt; command. - + Invalid user. @@ -325,55 +325,55 @@ {}'s command group(s): {} - + Got bad group: {} - + Groups {} has been added to {} - + Groups {} has been deleted from {} - + Got unknown command: {} - + This command is only enabled for admins. - + Current connections: - + -class -tag -----name------ -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - + Unknown option. - + (none) - + none - + This command can only be used inside a channel. @@ -389,43 +389,43 @@ You must be at least a Channel Admin to demote another Channel Admin - + {} has been demoted from a Channel Admin. - + {} has demoted you from a Channel Admin of channel "{}" - + {} has been demoted from a Channel Operator - + {} has demoted you from a Channel Operator of channel "{}" - + {} has been demoted from a tempOP of this channel - + {} has demoted you from a tmpOP of channel "{}" - + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - + {} has demoted you from a tempOP of channel "{}" - + {} is no tempOP in this channel, so you can't demote him - + This command can only be used inside a channel. @@ -441,43 +441,43 @@ {} has been removed from VOP list. - + {} has removed you from VOP list of channel "{}" - + You must be at least Channel Admin to remove {} from the VOP list - + Voice has been taken from {} in this channel - + {} has taken your Voice in channel "{}" - + {} has no Voice in this channel, so it can't be taken away - + Do Not Disturb mode engaged. - + Not available - + Do Not Disturb mode canceled. - + -- name -- similar to {} - + Invalid user. @@ -485,179 +485,179 @@ Login: {} {} Sex: {} - + Created: {} - + Clan: {} - + Rank: Chieftain - + Rank: Shaman - + Rank: Grunt - + Rank: Peon - + Location: {} Age: {} - + Client: {} Ver: {} Country: {} - + unknown - + Last login {} from - + On since {} from - + Operator: {}, Admin: {}, Locked: {}, Muted: {} - + Yes - + Email: {} - + Last login Owner: {} - + Idle {} - + Flags set to {}. - + That user does not exist. - + Server error. - + You can't add yourself to your friends list. - + You can only have a maximum of {} friends. - + {} is already on your friends list! - + Added {} to your friends list. - + {} added you to his/her friends list. - + All of your friends are offline. - + {} was not found on your friends list. - + Removed {} from your friends list. - + Promoted {} in your friends list. - + Demoted {} in your friends list. - + Your {} - Friends List - + Your {} - Online Friends List - + , offline - + using {} - + , in game "{}" - + , in game AT Preparation - + , in channel "{}", - + , is in AT Preparation - + , is in a game - + , is in a chat channel - + End of Friends List - + You are not in a game. - + That game does not exist. - + Name: {} ID: {} ({}) - + none @@ -669,19 +669,19 @@ Owner: {} - + Address: {} - + Address: {} (trans {}) - + Client: {} (version {}, startver {}) - + Created: {} @@ -689,99 +689,99 @@ Started: {} - + Status: {} - + Type: {} - + Speed: {} - + Difficulty: {} - + Option: {} - + Map: {} - + Map Size: {}x{} - + Map Tileset: {} - + Map Type: {} - + Players: {} current, {} total, {} max - + Description: {} - + Currently accessible games: - + All current games: - + Games in lobby: - + Current games of type {} - + Current games of type {} {} - + ------name------ p -status- --------type--------- count - + ctag - + --------addr-------- - + Warning: That user is not online, using last known address. - + Sorry, no IP address could be retrieved. - + Scanning online users for IP {}... - + There are no online users with that IP address - + This command can only be used inside a channel. @@ -789,47 +789,47 @@ You have to be at least a Channel Operator or tempOP to use this command. - + That user is not logged in. - + That user is not in this channel. - + That connection doesn't exist. - + That user is not logged in? - + An admin has closed your connection and banned your IP address. - + Connection closed by admin. - + Operation successful. - + That is not a valid session. - + That session does not exist. - + Connection closed by admin and banned your IP's. - + Connection closed by admin. @@ -837,7 +837,7 @@ Copied current scores to active scores on all ladders. - + This game does not support win/loss records. @@ -845,11 +845,11 @@ You must supply a rank and a valid program ID. - + Example: /ladderinfo 1 STAR - + Invalid user. @@ -857,11 +857,11 @@ Account {} is now locked - + Your account has just been locked - + This command can only be used inside a channel. @@ -869,11 +869,11 @@ Banned users: - + You are not in a channel. - + This command can only be used inside a channel. @@ -885,23 +885,23 @@ Unable to change channel flags. - + Channel is now unmoderated. - + Channel is now moderated. - + Unable to open motd. - + No motd. - + Invalid user. @@ -909,11 +909,11 @@ Account {} is now muted - + Your account has just been muted - + That user is not logged on. @@ -921,39 +921,39 @@ Address information for other users is only available to admins. - + Server TCP: {} (bind {}) - + Client TCP: {} - + Client UDP: {} - + Client UDP: {} (trans {}) - + Game UDP: {} - + Game UDP: {} (trans {}) - + Game UDP: none - + Audible notification off. - + This command can only be used inside a channel. @@ -961,7 +961,7 @@ You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. @@ -969,31 +969,31 @@ {} is already a Channel Operator - + {} has been promoted to a Channel Operator - + {} has promoted you to a Channel Operator in channel "{}" - + {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to a tempOP - + {} has promoted you to a tempOP in this channel - + You must supply a username. @@ -1005,35 +1005,35 @@ {} is already a Server Operator - + {} has been promoted to a Server Operator - + {} has promoted you to a Server Operator - + {} is no Server Operator, so you can't demote him - + {} has been demoted from a Server Operator - + {} latency: {} - + Your latency {} - + {} latency () - + Invalid user. @@ -1041,35 +1041,35 @@ Connection closed. - + Your quota allows you to write {} line(s) per {} second(s). - + Long lines will be wrapped every {} characters. - + You are not allowed to send lines with more than {} characters. - + You must join a realm first - + Announcement from {}@{}: {} - + Invalid mode. - + Rehash of "{}" is complete! - + You are not in a channel. @@ -1077,11 +1077,11 @@ No one messaged you, use /m instead - + Pending changes has been saved into the database. - + That user is not logged on. @@ -1089,27 +1089,27 @@ Banning {} who is using IP address {} - + User's account is also LOCKED! Only an admin can unlock it! - + /ipban a {} - + You have been banned by Admin: {} - + Your account is also LOCKED! Only an admin can UNLOCK it! - + Access denied due to security reasons. - + Invalid user. @@ -1117,203 +1117,203 @@ Current value of {} is "{}" - + Value currently not set - + Unable to set key for - + Key set successfully for - + Invalid delay. - + You've initialized the shutdown sequence. - + You've canceled the shutdown sequence. - + No such user. - + You can't squelch yourself. - + Could not squelch user. - + {} has been squelched. - + Invalid user. - + Unable to determine client game. - + This game does not support win/loss records. - + You must supply a user name and a valid program ID. - + Example: /stats joe STAR - + {}'s record: - + level: {} - + class: {} - + stats: {} str {} mag {} dex {} vit {} gld - + Diablo kills: {} - + Normal games: {}-{}-{} - + Ladder games: {}-{}-{} (rating {}) - + Ladder games: 0-0-0 - + IronMan games: {}-{}-{} (rating {}) - + IronMan games: 0-0-0 - + {}'s Ladder Record's: - + Users Solo Level: {}, Experience: {} - + SOLO Ladder Record: {}-{}-0 - + SOLO Rank: {} - + Users Team Level: {}, Experience: {} - + TEAM Ladder Record: {}-{}-0 - + TEAM Rank: {} - + Users FFA Level: {}, Experience: {} - + FFA Ladder Record: {}-{}-0 - + FFA Rank: {} - + Users AT Team No. {} - + Users AT TEAM Level: {}, Experience: {} - + AT TEAM Ladder Record: {}-{}-0 - + AT TEAM Rank: {} - + There are currently {} user(s) in {} games of {} - + There are currently {} users online, in {} games, and in {} channels. - + Client tag set to {}. - + Invalid clienttag {} specified - + Server Time: {} - + Your local time: {} - + Invalid duration. - + Your timer has expired. - + Could not set timer. - + Timer set for {} second(s) - + This command can only be used inside a channel. @@ -1321,7 +1321,7 @@ You must be at least a Channel Operator or tmpOP to use this command. - + There's no account with username {}. @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - + {} must be on the same channel to tempOP him @@ -1341,7 +1341,7 @@ {} has been promoted to tmpOP in this channel - + {} has promoted you to a tempOP in this channel @@ -1353,19 +1353,19 @@ Max topic length exceeded (max {} symbols) - + You must be at least a Channel Operator of {} to set the topic - + {} topic: no topic - + Unable to send TOS (Terms of Service). - + This command can only be used inside a channel. @@ -1373,15 +1373,15 @@ You are not a channel operator. - + That user is not banned. - + {} is no longer banned from this channel. - + Invalid user. @@ -1389,11 +1389,11 @@ Your account has just been unlocked by {} - + That user's account is now unlocked. - + Invalid user. @@ -1401,11 +1401,11 @@ Your account has just been unmuted by {} - + That user's account is now unmuted. - + No such user. @@ -1413,11 +1413,11 @@ User was not being ignored. - + No longer ignoring. - + That user does not exist. @@ -1425,11 +1425,11 @@ Removal from watch list failed. - + User {} removed from your watch list. - + Removal from watch list failed. @@ -1437,15 +1437,15 @@ All {} users removed from your watch list. - + All users removed from your watch list. - + Uptime: {} - + This command can only be used inside a channel. @@ -1453,7 +1453,7 @@ You must be at least a Channel Operator to use this command. - + There's no account with username {}. @@ -1461,27 +1461,27 @@ {} is already on VOP list, no need to Voice him - + {} must be on the same channel to voice him - + {} already has Voice in this channel - + {} is already an operator or admin. - + {} has been granted Voice in this channel - + {} has granted you Voice in this channel - + This command can only be used inside a channel. @@ -1497,15 +1497,15 @@ {} is already on VOP list - + {} has been added to the VOP list - + {} has added you to the VOP list of channel "{}" - + That user does not exist. @@ -1513,11 +1513,11 @@ Add to watch list failed. - + User {} added to your watch list. - + Add to watch list failed. @@ -1525,39 +1525,39 @@ All {} users added to your watch list. - + All users added to your watch list. - + That channel does not exist. - + (If you are trying to search for a user, use the /whois command.) - + You are banned from that channel. - + Users in channel {}: - + Unable to obtain your account name. - + (invalid date) - + Reset {}'s {} stats - + Reset {}'s {} stats @@ -1569,39 +1569,39 @@ You cannot kick administrators. - + You cannot kick operators. - + {} has been kicked by {} ({}). - + {} has been kicked by {}. - + You cannot ban operators. - + Unable to ban {}. - + {} has been banned by {} ({}). - + {} has been banned by {}. - + Password for account {} updated. - + Hash is: {} @@ -1609,83 +1609,83 @@ Your account has been muted, you can't whisper to other users. - + That user is not logged on. - + {} is unavailable ({}) - + {} is away ({}) - + Unknown user. - + User was last seen on: {} - + User is offline - + You - + are - + is - + {} {} using {} and {} currently in {} game "{}". - + {} {} using {} and {} currently in channel "{}". - + {} {} using {}. - + {} {} refusing messages ({}) - + {} away ({}) - + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - + This command has been deactivated - + This command is reserved for admins. - + Unknown command. - + This account has been locked - + This account has been locked @@ -1693,7 +1693,7 @@ Oops ! There is a problem with the help file. Please contact the administrator of the server. - + This command can only be used inside a channel. @@ -1701,75 +1701,75 @@ This command can only be used from the game. - + Bad icon. - + {} banned permamently by {}. - + {} banned permamently. - + {} banned for {} by {}. - + {} banned for {}. - + Banning only for: {} minutes. - + This server has NO mail support. - + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - + Successfully deleted messages. - + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - + Succesfully deleted message. - + You have no mail. - + There was an error completing your request. - + Receiver UNKNOWN! - + Receiver has reached his mail quota. Your message will NOT be sent. - + Your mail has been sent successfully. - + There was an error completing your request! - + You must be at least a Channel Operator to use this command. @@ -1781,31 +1781,31 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - + Available Quiz dictionaries: - + Quiz is not running. - + {}'s Quiz record: - + {} has never played Quiz. - + Top {} Quiz records: - + points - + This command is reserved for admins. @@ -1813,7 +1813,7 @@ User "{}" is offline - + \ No newline at end of file diff --git a/conf/i18n/common-zhCN.xml.in b/conf/i18n/common-zhCN.xml.in index 390b31240..5f71bd4da 100644 --- a/conf/i18n/common-zhCN.xml.in +++ b/conf/i18n/common-zhCN.xml.in @@ -9,103 +9,103 @@ by {} - + for {} - + permanently - + with a reason "{}" - + No such alias. Use // to show the list. - + Alias list: - + you are now tempOP for this channel - + Account name contains some invalid symbol! - + Maximum password length allowed is {} - + Trying to add account "{}" with password "{}" - + Hash is: {} - + Failed to create account! - + Account {} created. - + You must supply a username. - + There's no account with username {}. - + {} is already a Server Admin - + {} has been promoted to a Server Admin - + {} has promoted you to a Server Admin - + {} is not a Server Admin. - + {} has been demoted from a Server Admin - + {} has demoted you from a Server Admin - + Currently logged on Administrators: - + Your game client doesn't support MessageBox. - + \n\n***************************\nBy {} - + Information from {} - + for {} @@ -113,19 +113,19 @@ Announcement from {}: {} - + Could not broadcast message. - + This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. @@ -133,23 +133,23 @@ {} is already a Channel Admin - + {} has been promoted to a Channel Admin - + {} has promoted you to a Channel Admin for channel "{}" - + You are now marked as being away. - + You are no longer marked as away. - + This command can only be used inside a channel. @@ -157,55 +157,55 @@ You have to be at least a Channel Operator to use this command. - + That account doesn't currently exist. - + You cannot ban administrators. - + Audible notification on. - + Channel Arranged Teams is a RESTRICTED Channel! - + Max channel name length exceeded (max {} symbols) - + Command disabled while inside a game. - + Currently accessible channels: - + All current channels: - + Current channels of type {} - + -----------name----------- users ----admin/operator---- - + Only admins may change passwords for other accounts. - + Account does not exist. - + Maximum password length allowed is {} @@ -213,107 +213,107 @@ Trying to change password for account "{}" to "{}" - + Unable to set password. - + Message was sent to all currently available clan members. - + All fellow members of your clan are currently offline. - + Clan channel is opened up! - + Clan channel has already been opened up! - + Clan channel is closed! - + Clan channel has already been closed! - + Clan message of day is updated! - + User {} was invited to your clan! - + You are invited to {} by {}! - + User {} is not online or is already member of clan! - + This is one-way action! If you really want - + to disband your clan, type /clan disband yes - + Your clan was disbanded. - + You have been invited to {} - + You are now a clan member of {} - + Clan {} was be created - + You are no longer ivited to {} - + You are already in clan "{}" - + Clan with your specified &lt;clantag&gt; already exist! - + Please choice another one. - + Clan {} is created! - + Clan {} is pre-created, please invite - + at least {} players to your clan by using - + /clan invite &lt;username&gt; command. - + Invalid user. @@ -325,55 +325,55 @@ {}'s command group(s): {} - + Got bad group: {} - + Groups {} has been added to {} - + Groups {} has been deleted from {} - + Got unknown command: {} - + This command is only enabled for admins. - + Current connections: - + -class -tag -----name------ -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - + Unknown option. - + (none) - + none - + This command can only be used inside a channel. @@ -389,43 +389,43 @@ You must be at least a Channel Admin to demote another Channel Admin - + {} has been demoted from a Channel Admin. - + {} has demoted you from a Channel Admin of channel "{}" - + {} has been demoted from a Channel Operator - + {} has demoted you from a Channel Operator of channel "{}" - + {} has been demoted from a tempOP of this channel - + {} has demoted you from a tmpOP of channel "{}" - + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - + {} has demoted you from a tempOP of channel "{}" - + {} is no tempOP in this channel, so you can't demote him - + This command can only be used inside a channel. @@ -441,43 +441,43 @@ {} has been removed from VOP list. - + {} has removed you from VOP list of channel "{}" - + You must be at least Channel Admin to remove {} from the VOP list - + Voice has been taken from {} in this channel - + {} has taken your Voice in channel "{}" - + {} has no Voice in this channel, so it can't be taken away - + Do Not Disturb mode engaged. - + Not available - + Do Not Disturb mode canceled. - + -- name -- similar to {} - + Invalid user. @@ -485,179 +485,179 @@ Login: {} {} Sex: {} - + Created: {} - + Clan: {} - + Rank: Chieftain - + Rank: Shaman - + Rank: Grunt - + Rank: Peon - + Location: {} Age: {} - + Client: {} Ver: {} Country: {} - + unknown - + Last login {} from - + On since {} from - + Operator: {}, Admin: {}, Locked: {}, Muted: {} - + Yes - + Email: {} - + Last login Owner: {} - + Idle {} - + Flags set to {}. - + That user does not exist. - + Server error. - + You can't add yourself to your friends list. - + You can only have a maximum of {} friends. - + {} is already on your friends list! - + Added {} to your friends list. - + {} added you to his/her friends list. - + All of your friends are offline. - + {} was not found on your friends list. - + Removed {} from your friends list. - + Promoted {} in your friends list. - + Demoted {} in your friends list. - + Your {} - Friends List - + Your {} - Online Friends List - + , offline - + using {} - + , in game "{}" - + , in game AT Preparation - + , in channel "{}", - + , is in AT Preparation - + , is in a game - + , is in a chat channel - + End of Friends List - + You are not in a game. - + That game does not exist. - + Name: {} ID: {} ({}) - + none @@ -669,19 +669,19 @@ Owner: {} - + Address: {} - + Address: {} (trans {}) - + Client: {} (version {}, startver {}) - + Created: {} @@ -689,99 +689,99 @@ Started: {} - + Status: {} - + Type: {} - + Speed: {} - + Difficulty: {} - + Option: {} - + Map: {} - + Map Size: {}x{} - + Map Tileset: {} - + Map Type: {} - + Players: {} current, {} total, {} max - + Description: {} - + Currently accessible games: - + All current games: - + Games in lobby: - + Current games of type {} - + Current games of type {} {} - + ------name------ p -status- --------type--------- count - + ctag - + --------addr-------- - + Warning: That user is not online, using last known address. - + Sorry, no IP address could be retrieved. - + Scanning online users for IP {}... - + There are no online users with that IP address - + This command can only be used inside a channel. @@ -789,47 +789,47 @@ You have to be at least a Channel Operator or tempOP to use this command. - + That user is not logged in. - + That user is not in this channel. - + That connection doesn't exist. - + That user is not logged in? - + An admin has closed your connection and banned your IP address. - + Connection closed by admin. - + Operation successful. - + That is not a valid session. - + That session does not exist. - + Connection closed by admin and banned your IP's. - + Connection closed by admin. @@ -837,7 +837,7 @@ Copied current scores to active scores on all ladders. - + This game does not support win/loss records. @@ -845,11 +845,11 @@ You must supply a rank and a valid program ID. - + Example: /ladderinfo 1 STAR - + Invalid user. @@ -857,11 +857,11 @@ Account {} is now locked - + Your account has just been locked - + This command can only be used inside a channel. @@ -869,11 +869,11 @@ Banned users: - + You are not in a channel. - + This command can only be used inside a channel. @@ -885,23 +885,23 @@ Unable to change channel flags. - + Channel is now unmoderated. - + Channel is now moderated. - + Unable to open motd. - + No motd. - + Invalid user. @@ -909,11 +909,11 @@ Account {} is now muted - + Your account has just been muted - + That user is not logged on. @@ -921,39 +921,39 @@ Address information for other users is only available to admins. - + Server TCP: {} (bind {}) - + Client TCP: {} - + Client UDP: {} - + Client UDP: {} (trans {}) - + Game UDP: {} - + Game UDP: {} (trans {}) - + Game UDP: none - + Audible notification off. - + This command can only be used inside a channel. @@ -961,7 +961,7 @@ You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. @@ -969,31 +969,31 @@ {} is already a Channel Operator - + {} has been promoted to a Channel Operator - + {} has promoted you to a Channel Operator in channel "{}" - + {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to a tempOP - + {} has promoted you to a tempOP in this channel - + You must supply a username. @@ -1005,35 +1005,35 @@ {} is already a Server Operator - + {} has been promoted to a Server Operator - + {} has promoted you to a Server Operator - + {} is no Server Operator, so you can't demote him - + {} has been demoted from a Server Operator - + {} latency: {} - + Your latency {} - + {} latency () - + Invalid user. @@ -1041,35 +1041,35 @@ Connection closed. - + Your quota allows you to write {} line(s) per {} second(s). - + Long lines will be wrapped every {} characters. - + You are not allowed to send lines with more than {} characters. - + You must join a realm first - + Announcement from {}@{}: {} - + Invalid mode. - + Rehash of "{}" is complete! - + You are not in a channel. @@ -1077,11 +1077,11 @@ No one messaged you, use /m instead - + Pending changes has been saved into the database. - + That user is not logged on. @@ -1089,27 +1089,27 @@ Banning {} who is using IP address {} - + User's account is also LOCKED! Only an admin can unlock it! - + /ipban a {} - + You have been banned by Admin: {} - + Your account is also LOCKED! Only an admin can UNLOCK it! - + Access denied due to security reasons. - + Invalid user. @@ -1117,203 +1117,203 @@ Current value of {} is "{}" - + Value currently not set - + Unable to set key for - + Key set successfully for - + Invalid delay. - + You've initialized the shutdown sequence. - + You've canceled the shutdown sequence. - + No such user. - + You can't squelch yourself. - + Could not squelch user. - + {} has been squelched. - + Invalid user. - + Unable to determine client game. - + This game does not support win/loss records. - + You must supply a user name and a valid program ID. - + Example: /stats joe STAR - + {}'s record: - + level: {} - + class: {} - + stats: {} str {} mag {} dex {} vit {} gld - + Diablo kills: {} - + Normal games: {}-{}-{} - + Ladder games: {}-{}-{} (rating {}) - + Ladder games: 0-0-0 - + IronMan games: {}-{}-{} (rating {}) - + IronMan games: 0-0-0 - + {}'s Ladder Record's: - + Users Solo Level: {}, Experience: {} - + SOLO Ladder Record: {}-{}-0 - + SOLO Rank: {} - + Users Team Level: {}, Experience: {} - + TEAM Ladder Record: {}-{}-0 - + TEAM Rank: {} - + Users FFA Level: {}, Experience: {} - + FFA Ladder Record: {}-{}-0 - + FFA Rank: {} - + Users AT Team No. {} - + Users AT TEAM Level: {}, Experience: {} - + AT TEAM Ladder Record: {}-{}-0 - + AT TEAM Rank: {} - + There are currently {} user(s) in {} games of {} - + There are currently {} users online, in {} games, and in {} channels. - + Client tag set to {}. - + Invalid clienttag {} specified - + Server Time: {} - + Your local time: {} - + Invalid duration. - + Your timer has expired. - + Could not set timer. - + Timer set for {} second(s) - + This command can only be used inside a channel. @@ -1321,7 +1321,7 @@ You must be at least a Channel Operator or tmpOP to use this command. - + There's no account with username {}. @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - + {} must be on the same channel to tempOP him @@ -1341,7 +1341,7 @@ {} has been promoted to tmpOP in this channel - + {} has promoted you to a tempOP in this channel @@ -1353,19 +1353,19 @@ Max topic length exceeded (max {} symbols) - + You must be at least a Channel Operator of {} to set the topic - + {} topic: no topic - + Unable to send TOS (Terms of Service). - + This command can only be used inside a channel. @@ -1373,15 +1373,15 @@ You are not a channel operator. - + That user is not banned. - + {} is no longer banned from this channel. - + Invalid user. @@ -1389,11 +1389,11 @@ Your account has just been unlocked by {} - + That user's account is now unlocked. - + Invalid user. @@ -1401,11 +1401,11 @@ Your account has just been unmuted by {} - + That user's account is now unmuted. - + No such user. @@ -1413,11 +1413,11 @@ User was not being ignored. - + No longer ignoring. - + That user does not exist. @@ -1425,11 +1425,11 @@ Removal from watch list failed. - + User {} removed from your watch list. - + Removal from watch list failed. @@ -1437,15 +1437,15 @@ All {} users removed from your watch list. - + All users removed from your watch list. - + Uptime: {} - + This command can only be used inside a channel. @@ -1453,7 +1453,7 @@ You must be at least a Channel Operator to use this command. - + There's no account with username {}. @@ -1461,27 +1461,27 @@ {} is already on VOP list, no need to Voice him - + {} must be on the same channel to voice him - + {} already has Voice in this channel - + {} is already an operator or admin. - + {} has been granted Voice in this channel - + {} has granted you Voice in this channel - + This command can only be used inside a channel. @@ -1497,15 +1497,15 @@ {} is already on VOP list - + {} has been added to the VOP list - + {} has added you to the VOP list of channel "{}" - + That user does not exist. @@ -1513,11 +1513,11 @@ Add to watch list failed. - + User {} added to your watch list. - + Add to watch list failed. @@ -1525,39 +1525,39 @@ All {} users added to your watch list. - + All users added to your watch list. - + That channel does not exist. - + (If you are trying to search for a user, use the /whois command.) - + You are banned from that channel. - + Users in channel {}: - + Unable to obtain your account name. - + (invalid date) - + Reset {}'s {} stats - + Reset {}'s {} stats @@ -1569,39 +1569,39 @@ You cannot kick administrators. - + You cannot kick operators. - + {} has been kicked by {} ({}). - + {} has been kicked by {}. - + You cannot ban operators. - + Unable to ban {}. - + {} has been banned by {} ({}). - + {} has been banned by {}. - + Password for account {} updated. - + Hash is: {} @@ -1609,83 +1609,83 @@ Your account has been muted, you can't whisper to other users. - + That user is not logged on. - + {} is unavailable ({}) - + {} is away ({}) - + Unknown user. - + User was last seen on: {} - + User is offline - + You - + are - + is - + {} {} using {} and {} currently in {} game "{}". - + {} {} using {} and {} currently in channel "{}". - + {} {} using {}. - + {} {} refusing messages ({}) - + {} away ({}) - + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - + This command has been deactivated - + This command is reserved for admins. - + Unknown command. - + This account has been locked - + This account has been locked @@ -1693,7 +1693,7 @@ Oops ! There is a problem with the help file. Please contact the administrator of the server. - + This command can only be used inside a channel. @@ -1701,75 +1701,75 @@ This command can only be used from the game. - + Bad icon. - + {} banned permamently by {}. - + {} banned permamently. - + {} banned for {} by {}. - + {} banned for {}. - + Banning only for: {} minutes. - + This server has NO mail support. - + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - + Successfully deleted messages. - + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - + Succesfully deleted message. - + You have no mail. - + There was an error completing your request. - + Receiver UNKNOWN! - + Receiver has reached his mail quota. Your message will NOT be sent. - + Your mail has been sent successfully. - + There was an error completing your request! - + You must be at least a Channel Operator to use this command. @@ -1781,31 +1781,31 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - + Available Quiz dictionaries: - + Quiz is not running. - + {}'s Quiz record: - + {} has never played Quiz. - + Top {} Quiz records: - + points - + This command is reserved for admins. @@ -1813,7 +1813,7 @@ User "{}" is offline - + \ No newline at end of file diff --git a/conf/i18n/common-zhTW.xml.in b/conf/i18n/common-zhTW.xml.in index 427af0d2a..435fa457c 100644 --- a/conf/i18n/common-zhTW.xml.in +++ b/conf/i18n/common-zhTW.xml.in @@ -9,103 +9,103 @@ by {} - + for {} - + permanently - + with a reason "{}" - + No such alias. Use // to show the list. - + Alias list: - + you are now tempOP for this channel - + Account name contains some invalid symbol! - + Maximum password length allowed is {} - + Trying to add account "{}" with password "{}" - + Hash is: {} - + Failed to create account! - + Account {} created. - + You must supply a username. - + There's no account with username {}. - + {} is already a Server Admin - + {} has been promoted to a Server Admin - + {} has promoted you to a Server Admin - + {} is not a Server Admin. - + {} has been demoted from a Server Admin - + {} has demoted you from a Server Admin - + Currently logged on Administrators: - + Your game client doesn't support MessageBox. - + \n\n***************************\nBy {} - + Information from {} - + for {} @@ -113,19 +113,19 @@ Announcement from {}: {} - + Could not broadcast message. - + This command can only be used inside a channel. - + You must be at least a Channel Admin to use this command. - + There's no account with username {}. @@ -133,23 +133,23 @@ {} is already a Channel Admin - + {} has been promoted to a Channel Admin - + {} has promoted you to a Channel Admin for channel "{}" - + You are now marked as being away. - + You are no longer marked as away. - + This command can only be used inside a channel. @@ -157,55 +157,55 @@ You have to be at least a Channel Operator to use this command. - + That account doesn't currently exist. - + You cannot ban administrators. - + Audible notification on. - + Channel Arranged Teams is a RESTRICTED Channel! - + Max channel name length exceeded (max {} symbols) - + Command disabled while inside a game. - + Currently accessible channels: - + All current channels: - + Current channels of type {} - + -----------name----------- users ----admin/operator---- - + Only admins may change passwords for other accounts. - + Account does not exist. - + Maximum password length allowed is {} @@ -213,107 +213,107 @@ Trying to change password for account "{}" to "{}" - + Unable to set password. - + Message was sent to all currently available clan members. - + All fellow members of your clan are currently offline. - + Clan channel is opened up! - + Clan channel has already been opened up! - + Clan channel is closed! - + Clan channel has already been closed! - + Clan message of day is updated! - + User {} was invited to your clan! - + You are invited to {} by {}! - + User {} is not online or is already member of clan! - + This is one-way action! If you really want - + to disband your clan, type /clan disband yes - + Your clan was disbanded. - + You have been invited to {} - + You are now a clan member of {} - + Clan {} was be created - + You are no longer ivited to {} - + You are already in clan "{}" - + Clan with your specified &lt;clantag&gt; already exist! - + Please choice another one. - + Clan {} is created! - + Clan {} is pre-created, please invite - + at least {} players to your clan by using - + /clan invite &lt;username&gt; command. - + Invalid user. @@ -325,55 +325,55 @@ {}'s command group(s): {} - + Got bad group: {} - + Groups {} has been added to {} - + Groups {} has been deleted from {} - + Got unknown command: {} - + This command is only enabled for admins. - + Current connections: - + -class -tag -----name------ -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - + Unknown option. - + (none) - + none - + This command can only be used inside a channel. @@ -389,43 +389,43 @@ You must be at least a Channel Admin to demote another Channel Admin - + {} has been demoted from a Channel Admin. - + {} has demoted you from a Channel Admin of channel "{}" - + {} has been demoted from a Channel Operator - + {} has demoted you from a Channel Operator of channel "{}" - + {} has been demoted from a tempOP of this channel - + {} has demoted you from a tmpOP of channel "{}" - + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - + {} has demoted you from a tempOP of channel "{}" - + {} is no tempOP in this channel, so you can't demote him - + This command can only be used inside a channel. @@ -441,43 +441,43 @@ {} has been removed from VOP list. - + {} has removed you from VOP list of channel "{}" - + You must be at least Channel Admin to remove {} from the VOP list - + Voice has been taken from {} in this channel - + {} has taken your Voice in channel "{}" - + {} has no Voice in this channel, so it can't be taken away - + Do Not Disturb mode engaged. - + Not available - + Do Not Disturb mode canceled. - + -- name -- similar to {} - + Invalid user. @@ -485,179 +485,179 @@ Login: {} {} Sex: {} - + Created: {} - + Clan: {} - + Rank: Chieftain - + Rank: Shaman - + Rank: Grunt - + Rank: Peon - + Location: {} Age: {} - + Client: {} Ver: {} Country: {} - + unknown - + Last login {} from - + On since {} from - + Operator: {}, Admin: {}, Locked: {}, Muted: {} - + Yes - + Email: {} - + Last login Owner: {} - + Idle {} - + Flags set to {}. - + That user does not exist. - + Server error. - + You can't add yourself to your friends list. - + You can only have a maximum of {} friends. - + {} is already on your friends list! - + Added {} to your friends list. - + {} added you to his/her friends list. - + All of your friends are offline. - + {} was not found on your friends list. - + Removed {} from your friends list. - + Promoted {} in your friends list. - + Demoted {} in your friends list. - + Your {} - Friends List - + Your {} - Online Friends List - + , offline - + using {} - + , in game "{}" - + , in game AT Preparation - + , in channel "{}", - + , is in AT Preparation - + , is in a game - + , is in a chat channel - + End of Friends List - + You are not in a game. - + That game does not exist. - + Name: {} ID: {} ({}) - + none @@ -669,19 +669,19 @@ Owner: {} - + Address: {} - + Address: {} (trans {}) - + Client: {} (version {}, startver {}) - + Created: {} @@ -689,99 +689,99 @@ Started: {} - + Status: {} - + Type: {} - + Speed: {} - + Difficulty: {} - + Option: {} - + Map: {} - + Map Size: {}x{} - + Map Tileset: {} - + Map Type: {} - + Players: {} current, {} total, {} max - + Description: {} - + Currently accessible games: - + All current games: - + Games in lobby: - + Current games of type {} - + Current games of type {} {} - + ------name------ p -status- --------type--------- count - + ctag - + --------addr-------- - + Warning: That user is not online, using last known address. - + Sorry, no IP address could be retrieved. - + Scanning online users for IP {}... - + There are no online users with that IP address - + This command can only be used inside a channel. @@ -789,47 +789,47 @@ You have to be at least a Channel Operator or tempOP to use this command. - + That user is not logged in. - + That user is not in this channel. - + That connection doesn't exist. - + That user is not logged in? - + An admin has closed your connection and banned your IP address. - + Connection closed by admin. - + Operation successful. - + That is not a valid session. - + That session does not exist. - + Connection closed by admin and banned your IP's. - + Connection closed by admin. @@ -837,7 +837,7 @@ Copied current scores to active scores on all ladders. - + This game does not support win/loss records. @@ -845,11 +845,11 @@ You must supply a rank and a valid program ID. - + Example: /ladderinfo 1 STAR - + Invalid user. @@ -857,11 +857,11 @@ Account {} is now locked - + Your account has just been locked - + This command can only be used inside a channel. @@ -869,11 +869,11 @@ Banned users: - + You are not in a channel. - + This command can only be used inside a channel. @@ -885,23 +885,23 @@ Unable to change channel flags. - + Channel is now unmoderated. - + Channel is now moderated. - + Unable to open motd. - + No motd. - + Invalid user. @@ -909,11 +909,11 @@ Account {} is now muted - + Your account has just been muted - + That user is not logged on. @@ -921,39 +921,39 @@ Address information for other users is only available to admins. - + Server TCP: {} (bind {}) - + Client TCP: {} - + Client UDP: {} - + Client UDP: {} (trans {}) - + Game UDP: {} - + Game UDP: {} (trans {}) - + Game UDP: none - + Audible notification off. - + This command can only be used inside a channel. @@ -961,7 +961,7 @@ You must be at least a Channel Operator or tempOP to use this command. - + There's no account with username {}. @@ -969,31 +969,31 @@ {} is already a Channel Operator - + {} has been promoted to a Channel Operator - + {} has promoted you to a Channel Operator in channel "{}" - + {} must be on the same channel to tempOP him - + {} already is operator or admin, no need to tempOP him - + {} has been promoted to a tempOP - + {} has promoted you to a tempOP in this channel - + You must supply a username. @@ -1005,35 +1005,35 @@ {} is already a Server Operator - + {} has been promoted to a Server Operator - + {} has promoted you to a Server Operator - + {} is no Server Operator, so you can't demote him - + {} has been demoted from a Server Operator - + {} latency: {} - + Your latency {} - + {} latency () - + Invalid user. @@ -1041,35 +1041,35 @@ Connection closed. - + Your quota allows you to write {} line(s) per {} second(s). - + Long lines will be wrapped every {} characters. - + You are not allowed to send lines with more than {} characters. - + You must join a realm first - + Announcement from {}@{}: {} - + Invalid mode. - + Rehash of "{}" is complete! - + You are not in a channel. @@ -1077,11 +1077,11 @@ No one messaged you, use /m instead - + Pending changes has been saved into the database. - + That user is not logged on. @@ -1089,27 +1089,27 @@ Banning {} who is using IP address {} - + User's account is also LOCKED! Only an admin can unlock it! - + /ipban a {} - + You have been banned by Admin: {} - + Your account is also LOCKED! Only an admin can UNLOCK it! - + Access denied due to security reasons. - + Invalid user. @@ -1117,203 +1117,203 @@ Current value of {} is "{}" - + Value currently not set - + Unable to set key for - + Key set successfully for - + Invalid delay. - + You've initialized the shutdown sequence. - + You've canceled the shutdown sequence. - + No such user. - + You can't squelch yourself. - + Could not squelch user. - + {} has been squelched. - + Invalid user. - + Unable to determine client game. - + This game does not support win/loss records. - + You must supply a user name and a valid program ID. - + Example: /stats joe STAR - + {}'s record: - + level: {} - + class: {} - + stats: {} str {} mag {} dex {} vit {} gld - + Diablo kills: {} - + Normal games: {}-{}-{} - + Ladder games: {}-{}-{} (rating {}) - + Ladder games: 0-0-0 - + IronMan games: {}-{}-{} (rating {}) - + IronMan games: 0-0-0 - + {}'s Ladder Record's: - + Users Solo Level: {}, Experience: {} - + SOLO Ladder Record: {}-{}-0 - + SOLO Rank: {} - + Users Team Level: {}, Experience: {} - + TEAM Ladder Record: {}-{}-0 - + TEAM Rank: {} - + Users FFA Level: {}, Experience: {} - + FFA Ladder Record: {}-{}-0 - + FFA Rank: {} - + Users AT Team No. {} - + Users AT TEAM Level: {}, Experience: {} - + AT TEAM Ladder Record: {}-{}-0 - + AT TEAM Rank: {} - + There are currently {} user(s) in {} games of {} - + There are currently {} users online, in {} games, and in {} channels. - + Client tag set to {}. - + Invalid clienttag {} specified - + Server Time: {} - + Your local time: {} - + Invalid duration. - + Your timer has expired. - + Could not set timer. - + Timer set for {} second(s) - + This command can only be used inside a channel. @@ -1321,7 +1321,7 @@ You must be at least a Channel Operator or tmpOP to use this command. - + There's no account with username {}. @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - + {} must be on the same channel to tempOP him @@ -1341,7 +1341,7 @@ {} has been promoted to tmpOP in this channel - + {} has promoted you to a tempOP in this channel @@ -1353,19 +1353,19 @@ Max topic length exceeded (max {} symbols) - + You must be at least a Channel Operator of {} to set the topic - + {} topic: no topic - + Unable to send TOS (Terms of Service). - + This command can only be used inside a channel. @@ -1373,15 +1373,15 @@ You are not a channel operator. - + That user is not banned. - + {} is no longer banned from this channel. - + Invalid user. @@ -1389,11 +1389,11 @@ Your account has just been unlocked by {} - + That user's account is now unlocked. - + Invalid user. @@ -1401,11 +1401,11 @@ Your account has just been unmuted by {} - + That user's account is now unmuted. - + No such user. @@ -1413,11 +1413,11 @@ User was not being ignored. - + No longer ignoring. - + That user does not exist. @@ -1425,11 +1425,11 @@ Removal from watch list failed. - + User {} removed from your watch list. - + Removal from watch list failed. @@ -1437,15 +1437,15 @@ All {} users removed from your watch list. - + All users removed from your watch list. - + Uptime: {} - + This command can only be used inside a channel. @@ -1453,7 +1453,7 @@ You must be at least a Channel Operator to use this command. - + There's no account with username {}. @@ -1461,27 +1461,27 @@ {} is already on VOP list, no need to Voice him - + {} must be on the same channel to voice him - + {} already has Voice in this channel - + {} is already an operator or admin. - + {} has been granted Voice in this channel - + {} has granted you Voice in this channel - + This command can only be used inside a channel. @@ -1497,15 +1497,15 @@ {} is already on VOP list - + {} has been added to the VOP list - + {} has added you to the VOP list of channel "{}" - + That user does not exist. @@ -1513,11 +1513,11 @@ Add to watch list failed. - + User {} added to your watch list. - + Add to watch list failed. @@ -1525,39 +1525,39 @@ All {} users added to your watch list. - + All users added to your watch list. - + That channel does not exist. - + (If you are trying to search for a user, use the /whois command.) - + You are banned from that channel. - + Users in channel {}: - + Unable to obtain your account name. - + (invalid date) - + Reset {}'s {} stats - + Reset {}'s {} stats @@ -1569,39 +1569,39 @@ You cannot kick administrators. - + You cannot kick operators. - + {} has been kicked by {} ({}). - + {} has been kicked by {}. - + You cannot ban operators. - + Unable to ban {}. - + {} has been banned by {} ({}). - + {} has been banned by {}. - + Password for account {} updated. - + Hash is: {} @@ -1609,83 +1609,83 @@ Your account has been muted, you can't whisper to other users. - + That user is not logged on. - + {} is unavailable ({}) - + {} is away ({}) - + Unknown user. - + User was last seen on: {} - + User is offline - + You - + are - + is - + {} {} using {} and {} currently in {} game "{}". - + {} {} using {} and {} currently in channel "{}". - + {} {} using {}. - + {} {} refusing messages ({}) - + {} away ({}) - + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - + This command has been deactivated - + This command is reserved for admins. - + Unknown command. - + This account has been locked - + This account has been locked @@ -1693,7 +1693,7 @@ Oops ! There is a problem with the help file. Please contact the administrator of the server. - + This command can only be used inside a channel. @@ -1701,75 +1701,75 @@ This command can only be used from the game. - + Bad icon. - + {} banned permamently by {}. - + {} banned permamently. - + {} banned for {} by {}. - + {} banned for {}. - + Banning only for: {} minutes. - + This server has NO mail support. - + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - + Successfully deleted messages. - + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - + Succesfully deleted message. - + You have no mail. - + There was an error completing your request. - + Receiver UNKNOWN! - + Receiver has reached his mail quota. Your message will NOT be sent. - + Your mail has been sent successfully. - + There was an error completing your request! - + You must be at least a Channel Operator to use this command. @@ -1781,31 +1781,31 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - + Available Quiz dictionaries: - + Quiz is not running. - + {}'s Quiz record: - + {} has never played Quiz. - + Top {} Quiz records: - + points - + This command is reserved for admins. @@ -1813,7 +1813,7 @@ User "{}" is offline - + \ No newline at end of file diff --git a/scripts/localize/pvpgn_localize_generator.cs b/scripts/localize/pvpgn_localize_generator.cs index 2af4c3b57..8d5507604 100644 --- a/scripts/localize/pvpgn_localize_generator.cs +++ b/scripts/localize/pvpgn_localize_generator.cs @@ -86,6 +86,11 @@ static void Main(string[] args) xsw.Serialize(fs, _data); } + // replace empty "" strings (for comfort further translation) + var data = File.ReadAllText(outfile); + data = data.Replace("", ""); + File.WriteAllText(outfile, data); + Console.WriteLine("\n{0} items saved in {1}: ", _data.Items.Count, outfile); //Console.WriteLine("\nPress any key to exit..."); //Console.ReadKey(); @@ -361,7 +366,7 @@ public class TranslateItem [XmlAttribute("refid")] public string RefId; [XmlText] - public string InnerText = " "; // default value is " " to save empty values when updating xml file + public string InnerText; // default value is " " to save empty values when updating xml file } } diff --git a/scripts/localize/pvpgn_localize_generator.exe b/scripts/localize/pvpgn_localize_generator.exe index 2f5e5ad4034120721353e440cda67facda1f8233..33107d763d6d897547ad79fbbef326b639856e1c 100644 GIT binary patch delta 2672 zcmZuzYj9h|6+XLH_g?8rR(vH{k|RZuEjyO2M@&uJq&ALSCngHaG>OT?4h3ScVbU7Q zteucVvE_s*%@hafZu%J0&KL?5{lwUNgMX$E0*hdv;e& z$dv2R+3)+#V;^^SuV;p5hQE7|9zQkrofvs??xC&T;XZ(^fX{Y-=k>Wdzh?%(gFLei zAj<1#h7Xb^@;kntloAUVES~lFqoBi!%>V-t0D>HU2JdNVC< zPdhNafCDrN*ts>^f<3Dmh%CXX#n^sEsvjd_8W5wYwD7#I6$6+`i?yP|3`&_str+)7 zEqq?{X+^)3mP&~~;s}rof7;PtWHBX`;U7EdgE@qj?V+g^2&P1`?U`=nDSd}^2`XYH zg)i~D^*Ti@+d}%Zo>delkMuu!f@FEj*qUCh!FZYkrb42QF;ycPz0ih*BLRY%2Jwe?UzaCQna|cwQ2ouV753Wb0MwyN_%3Tybkoymllo*A51^Q%P^ zbV)2H<-%>%<*M%y{Z6-{krT|WG;POxP<4}PGm(V`=Uarx#7YJW-5A>o?wJ{JUgC*Ecvy&K1m()!YlPTRjJnqdvv%3mvToTfWmn2J!nVma z%5IeHGBzgL7~3t|xQk(7ED*QYoeH?wk0mI@J?udxRk4Q^@UkZqSi(*yP|aRaz-Ffv z@UgcQ@U!<72*_z-A2sYlr3Beo1w!nc0%7)<0=3Mc%K;56Wln`6%&S0@`4m{j!V1J# zRDn24NHC-0GPNw;6}#w!7uRk|oIG`X(21||kb9X=TqSe@ZwMoWr_P`geZ0?|YiqzF zQ&l3GZ zS|8l%9CBK4NGd<&N2+e64wJ9)9=1>q1rqPPsm}!`G1Ee!vxr;HkuQleTgq`Lw@(3I- zMb@48W}+C=idhTh^JwokPm=~&p+RC%=RGn+%9tx~3bT%wahfO3V$FO#dD*;+z7pRA54T=^8B|aUJ3fTDQbKh&O9P zXuq!QrxE%M?H;tdwWFwfTRTHVwR!RhX{77u7QWx#qaP&CkT=V}_g`Z+Z5|mK?in4u zYGn5$sN)HnN5)5oZWw{BY{%qC#mAG8oB0nT2Y6ldh4Me5_tOoLPM8D+LokNZ9L07L zMj!zz0KXC|zR1@Fo#_4loUZbZ;u~r8pNg+OaNP&`hR6PTX4fshB0J0H>h_UK^#t{L z@uH)|>osb8F5-)732+*q5pOgaHa)(bzCFvl>d%X0=KEfLcXGNMZ`ez-$4~vDUu*s#8Fc&O delta 2586 zcmZuze{5S<6+ZVqzxV8C$IbI|9Jg^3=NESE#H33bGP1P|$+9(-#=5j>qtTJ9txBPr z)0?iaIf*lhMrpgT^szBTQz_LH7y?b;u#MlONFY!dEex1YH&&SVQ6Va}{xNNTz<2L; z+Ev1q&;7pdo_o$c_uYG+XZOtRdEzJ!dvnJcS>xPuJEG@rBicgvj1iqT=bF99EKvmf z=|Q5D-^@GwQI=tC{v)iMrXh6Ta|eE$Oj=w+^yVre29BTQU&wU%ckwp;50E4APN+b)hd2~$T@+qYzEGOYz8z( ztXAgx8moPg$*EBz&t_%EWup{_7cZ@pz8K|nv>T2m&X6Dwr&v zL2HvLqtSmLox?B3$7ekRnKmgU)rd0pR1phQSvRa6LD?USLF zewlX$gRu2rI@jB7U_PPKWV>y!`qBBE6op*LL~#SW+MT*WL^)c;9{<;&bonLp&B`+~ z8OA=El_#nx{TPa5j+Ia=d&a64FT?AMl@ym%yHZ?L?J9vKfZiaYs!fSis$DHwRNE*z zRNE91>ojo0M>GhFyA&ulMa0LnR3r9i5ET;|tPq$F;y2ZbV;Z>P2@PUmUIR~@(jczN zgmaxZqm_hM(4by?Q-h@Vjs`2mOB$3{i63gzAkJ!#53lhG#J z6<6_yTepwUx&#q&Q|s;9HxHs61V8PskMyzID+eQaHt+}Q1X9l+1=q3-VDiYIFNk8n*1pfvp^sMk?qm0%&K*@&Wc$Fzs%(ngPht8* zl^tb=!48%+RS6^X#T(d{Z(v`!fgMs+>xo8aN;5L;=kV5gvC0x)HFUAcGGN#nSg{5! zZCcsNOl=D*$LXAPgnf_t%+IqB$>O)NjrQ|wGuvYSmM+jX`@8JhG;Vi7zu$H!1)nY! zr?UMs*w5L&VQnfxo5C{AMK;b(Vywhjj5=k<_*V9H#N5hWu#dnl+09UX37@SA_OhJ; z`J>$d`!{^-y|%BSe#u#<9vk8Nk?TBc1AmP#(Q*I3u~s9@ zclqsJX1trX8%wN@pQSh0aXL$vSU1P(k4wyWH}5sl3O54}7@HLC2i{_g!)`Yo;bFep z_$ur{V+qQvaf!=lkFz&fl5gO5`rq>U%_;T+_WR1)-Y(n!Ov3?7A4UJK4M*&|_f8xb z-@Vu0n|h_vyLy3Fa_KvH?H7#lse#i&{U@G1(3(t64ONb|OtFkr7Yngi%1BetB7;R! zsd_scdocFU>ZtxkL1v%yd)sC#GtHyXXyt{rhdKTyP}qBZL~eC#5K7^dwTPp>h_iF| z$l%B=<(apyJd_%kOJ0a4UQPbPs_e?xtmYm3wOjr~{exL-v7yR*_7L;m$eyl5bMKlw N-BWS9uCTc-`+pAF*~|a{ diff --git a/scripts/localize/update.bat b/scripts/localize/update.bat index 22d806b9e..fd2f0f0d2 100644 --- a/scripts/localize/update.bat +++ b/scripts/localize/update.bat @@ -1,15 +1,15 @@ @echo off -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-deDE.xml -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-csCZ.xml -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-esES.xml -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-frFR.xml -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-itIT.xml -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-jaJA.xml -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-koKR.xml -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-plPL.xml -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-ruRU.xml -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-zhCN.xml -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-zhTW.xml +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-deDE.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-csCZ.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-esES.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-frFR.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-itIT.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-jaJA.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-koKR.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-plPL.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-ruRU.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-zhCN.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-zhTW.xml.in pause \ No newline at end of file From b0cc40a0309aa1f14ba055c3481effbc16d403f4 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 29 Jun 2014 16:31:15 +0400 Subject: [PATCH 067/144] utility that validates XML translation files https://github.com/HarpyWar/pvpgn/issues/13 --- scripts/localize/pvpgn_localize_validator.cs | 143 ++++++++++++++++++ scripts/localize/pvpgn_localize_validator.exe | Bin 0 -> 9216 bytes scripts/localize/validate.bat | 15 ++ 3 files changed, 158 insertions(+) create mode 100644 scripts/localize/pvpgn_localize_validator.cs create mode 100644 scripts/localize/pvpgn_localize_validator.exe create mode 100644 scripts/localize/validate.bat diff --git a/scripts/localize/pvpgn_localize_validator.cs b/scripts/localize/pvpgn_localize_validator.cs new file mode 100644 index 000000000..6535eafa3 --- /dev/null +++ b/scripts/localize/pvpgn_localize_validator.cs @@ -0,0 +1,143 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Xml; +using System.Xml.Linq; +using System.Xml.Serialization; + +namespace pvpgn_localize_validator +{ + class Program + { + static void Main(string[] args) + { + if (args.Length == 0) + { + Console.WriteLine("This utility checks XML translation file for missing translations, arguments and illegal characters\n(c) 2014 HarpyWar (harpywar@gmail.com)"); + Console.WriteLine("\nUsage: {0} [filename.xml]\n", AppDomain.CurrentDomain.FriendlyName); + + Environment.Exit(0); + } + + process_file(args[0]); + } + + static void process_file(string filename) + { + try + { + XDocument doc = XDocument.Load(filename, LoadOptions.SetLineInfo); + + // * no author name + var authors = doc.Descendants("author"); + foreach (var author in authors) + { + if (author.Attribute("email").Value == "nomad@example.com") + logerror(author, "Please, remove or update example author."); + } + + var items = doc.Descendants("item"); + XElement original, translate; + XAttribute id; + foreach (var item in items) + { + original = item.Element("original"); + translate = item.Element("translate"); + + // * check missing references + if ((id = translate.Attribute("refid")) != null) + { + if (items.Where(x => x.Attribute("id").Value == id.Value).Count() == 0) + logerror(translate, string.Format("string id=\"{0}\" is not found", id.Value)); + } + else + check_string(original, translate); + } + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } + } + + + static void check_string(XElement original, XElement translate) + { + string a = original.Value; + string b = translate.Value; + + if (a.Trim().Length == 0) + { + logerror(translate, "empty original string"); + return; + } + if (b.Trim().Length == 0) + { + logerror(translate, "empty translation"); + return; + } + + // * illegal characters + if (!validate_symbols(a) || !validate_symbols(b)) + logerror(translate, string.Format("string contains one of invalid characters: {0}", string.Join(", ", invalid_symbols))); + + // * missing arguments + if (a.Count(f => f == '{') != b.Count(f => f == '{') && a.Count(f => f == '}') != b.Count(f => f == '}')) + logerror(translate, "missing argument in translation?"); + + // * reduntant or missing spaces at start + if (get_pos(a, ' ') != get_pos(b, ' ')) + logerror(translate, "spaces count at the beginning of the translation is not equal with original"); + + // * reduntant or missing spaces at the end + if (get_pos(a, ' ', true) != get_pos(b, ' ', true)) + logerror(translate, "spaces count at the end of the translation is not equal with original"); + } + + static int get_pos(string str, char c, bool reverse = false) + { + int pos = 0; + if (!reverse) + for (int i = 0; i < str.Length; i++) + { + if (str[i] == c) + pos++; + else + break; + } + else + for (int i = str.Length-1; i > 0; i--) + { + if (str[i] == c) + pos++; + else + break; + } + return pos; + } + + static string[] invalid_symbols = new string[] + { + ">", + "<" + }; + static bool validate_symbols(string str) + { + foreach(var s in invalid_symbols) + if (str.Contains(s)) + return false; + return true; + } + + static void logerror(XElement el, string text) + { + IXmlLineInfo info = el; + int lineNumber = info.LineNumber; + + Console.WriteLine("[WARNING] line {0}: {1}", lineNumber, text); + } + } + + +} diff --git a/scripts/localize/pvpgn_localize_validator.exe b/scripts/localize/pvpgn_localize_validator.exe new file mode 100644 index 0000000000000000000000000000000000000000..4f1f7a3b3f1d8764676718c56f972c6c0966ec4c GIT binary patch literal 9216 zcmeHMeQX=&d4KMXI#QHGo0KitsXxxN)6$YfQy-0GN3x|zvLjFalx(Z9Jo!kTsH=~6 z^xaXB9N1ORdh3>^NYQNRvSCZQ0ZX=G&9GwWGGxmdV3>z=?SNu`6m5|H(Ew{VG{c4! zE3kOK=RK05KD;_u2Xw$ry61i0=Y784ujgK#dh8ieh$w{j?p>mX(iVwxO!2`>9+0oTGr6qvaOl6HhN}KD>`{2-O>`>R}p=7 zjA%kqD676QS=IIq$x@TlMDzeKkpO$^FiH*Y5MBlv3OTSFHDN!Ow2T*ceiRzIO|)73 zuauQ$Ktd_V6^e(5-e{;G>x-*I&1k=Oh-gPW{-@Qon(2Zvg7%|zJZaxp^wIv*b^!DV zUn_Q_B_56FYTEVO99qJ*AyibnYYYK;DD4`S146cyuHt1`NxXH>5YZ!bO;NqdamB;7 z$<#o9gMmr45=m&|Wo;km`CIw3X4gI!tff?(DC%yLP)nfZKx#C#1)wdp6;N(_J_RGy zj$Lx94egHS756L?x1-@~V}RI1y4`md(3=Q~?Z)pvCEs)Y0ksnBX z2>nsjy;zfiKt-Fv&Q27q(ayej)Y*kcE>0bOedC|Rz$DNqgZNW8&q zt0CE>2V0wOvg7gQ1H+B+aMz}I;dprzkv^5+Lr{I1kN3gRi1@%O znySS{y#=MAuK1SsRcth>cL2T1j1qW`S!ehbU_jDXBVm-l3zGDtdJ7w9KoqSJF-qVo za$s3Nf~~Ehicz;11ag`bcQY&%KB~L5wiHCD;c6v~?(=os?bYs}!rectb|YlenvrQ7 zC5(-?MMGVC+L}5Oa@a}3Nu{?>ZJ&;Y+ozktvIua`_dE9lwf2uSgDz5`Yi7C#aFMpm z57eq$j0^9%aS_z!wwBJVk;dnvvg#a!@B^W?rnj3L+oxL^BcC;UzTe&v4)_$p62&fq zagM4^2Bb~yVu(uN&tT$7N~#-}4%n>_)+uj3@oi6I6Of{6oBI;zzNoglUlQdq4`yxa zz{WOt@)1ewTESdg=u2nPy_w!_vA;Elx%(ar-g}E^1_tCIeD9?1ns&j1DtZHB@(TA~ zn50tW$k==0!uTlqmeGC*lVa~9mXl>-JZMUncFK`P3^)Dc!Ct}^29pSWaJZ;CDX(4iuEc@(>b)Br0by8Bvn%B7o@|0Sph#G;BO1~s({}V@P`7b zGE*LvcgrfB7x1dUED89s{Oj@vy$<75`X~7<&@?LyJCt+43p<2yo|LMn|4_=%8(`m-UH^9o>$z7cv8n12?SV-0V~33^z~s487j&k27y zS{w&1H`7PxAm#QQ&GU*7w~(4Dt$r8(OHcpeU4^D z48Kxosho~=w_w$cWA}v*+AyDE9&Q^P4r1&Ss-&0Jr%U*H?+d(y07}$`IlU45BV{|?p(C_M!2JSt z3wT(-VFAYlJSX7C1k?eKktyoe1zZyFNx)IW`VO6>-vI2R7pX_tOfS=M-U2K_zVRhH>{)F1jZPLT7V=V=RF4gCTA z2R#+~GD*@4p+5A!6#5gSJa_0#ic8-P-2r?j^e)=(hW>@NOFs@x(H@Dl#4C~`D$8$C zj{>_*eMH(<;e97`4w#*45%44GqO@On6f|uAZAr$A=%+OHCrwV%C+U{~o9MTsG_{h9 z`d)$W6tGud9;OciKO!)b0$#?tOVc%)2lS{6_ypaOhv{LgOkKd7fKLkeqJSiEuO{G- zfL8_lG0jV^bW{3_^qlm0`dxYrCuC@u$GHB%X3M*9?U5=u=4#w^(Z3q^s%WmpWw0mm z?j_R+M136ZWkRBa1OAkgFI&b@DlL=>_AC-j-7;?&vkNHly6?DYW6_|qLEe8)A}V@0 z$F9@q`TPiS&yw34RTzwVA{Gx zzN_1wrTYd!KIOVeVe^JUvNi$?k)I!(vM`9V{VX!ytR&0{?7xYve# z*q1FsP?g1)v*0MGY1s3OV%A!kGJVTfA*`ZD4KL@KB_>_pIpWxJW})or_v$W|bbDz% zAI2qL&iU&*Mx4?Tyr18oYs%I0Mp3VKrfTCz+49S7o$*yKD}foeeZzH1lZLxsVn}Jk zDPA-^Gh6TPiL#krZ%-wp>pPBPu-0`})Q*~Z!FD{~%y~3wWXpwuzDiYq!!ThE!_9nUvf>~z|=KpxKtW-iaf)4 zx{j1x7xTCdbKErzJ8vzW=D9d#FPN@li>W@gX!5yz^`YA=1lK!=&5@i80xE|0*~ZVZQ)gLAs=d$k@cK=hn2 z{0b#6$hydEAiSQHPB{z4X__iU=;8GSJ#>GZ`g+bo_s5x~Dc3BDs7x4k z!Jns-PIX$(>n<;JF+*x=4BI!21MoT+x96OI6^+y7VixlV8%1vq_GGas)011LXdVfN zM;evMN6o_P(-PV_^caBGMDH}6q6uJq!d^}`a287DaM02)FwAR+ngbe*iokgIGtpnT zC#OdT(5Hi=01JwcU_&a~!&>qvSuRU10Ar!eb}_wL`-Q9PLMM4`rwuX^DnI znW;+f<&vmrpb0n`_qf0fL23~-){%w;2Q7SL9g5NgNY&A6AdSD*b-)}h}Jv2jrr z!MA`?6EbC=< zvw-KF4=>m@o-f=EA~YxLvJo-%k!{|1)~t*yHSjE?;k9#i?Yv}vdA4tC<1u`-KIg${ zo|?#LgxVk=92_1lX60q2Q5G;52wMo{CE_4}D-;_mSsQW#U#w-}sD??+Lp?7ftr_U$ zr|#DV0Hzg(~WgU%2B)nM87u?ZbGusF$T3+uAovGBfT1R{+tw zi{wxg)X~kbBfvv#EViRJ+>$T@J&DF@$u3ugCYlq=PX~$vn79IGWF-P?AXt$@5`S}O z6hTm8v7NDS1)qQ&6;%QQ6O^c=gu3Un)F>;t7bjG^S%g;W z(fYK2L96iZlxW+%zK^gUvzyc|QKFW0YhQa=(|R)9eMI{u+Gq64^*)q;NbkxX0_e*d znXYW#p-k6Y{&07HcP@YE@JAoQ-Ihe*Zd`5Q4?i$S_*UZw6~Q*zrSS1+A* z>{>E2HSao)d%^~){no;~JAiBM$BT>a^OK{KKk5JL+dE$T_L(mh`!nhbuYZg0riw>q z;3I#lc{7~MSO$`qnKiy<%chk#+_mW1C*q8g{rC)0YD4#odlIEf`7FEf^Y@$;_lSXA zHrKU{ZLI#DveG*{;<#grhWN@AU%-Zu&RaO}@Z5cnv>{RZ`2e!Guh(#R;5P`|htTqB zyMo)gv-iNyZ-8h1H9~+1CgL-wy)Z)zV)%@Lv>ROTroGYXamUBqv6vw&mRs3);e zpTSl=D>m%osPprB=tsB?W5z0TP~spI4>r_VPX&d0EXG~LiRIF9Z26qpjbr2I)PbLU z#9UM8U7uzO0^D>ygGD64CO#qg&?sym$r3afByPc9A5L7XUYeop;H_#N73VbW9UzC3 zl}fS!x)Rcd5+vL3*@A63amJc-101t;sRf_vBGCg+1{=bP?2Dk}6g12syZcHC59OuCjgLU@ZtB i7&urRAvAbq{R|##MEu+Ba^3m%Gm!fKBL0s=;J*OR%Z_gV literal 0 HcmV?d00001 diff --git a/scripts/localize/validate.bat b/scripts/localize/validate.bat new file mode 100644 index 000000000..b2e2cdb65 --- /dev/null +++ b/scripts/localize/validate.bat @@ -0,0 +1,15 @@ +@echo off + +pvpgn_localize_validator.exe ..\..\conf\i18n\common-deDE.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\common-csCZ.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\common-esES.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\common-frFR.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\common-itIT.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\common-jaJA.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\common-koKR.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\common-plPL.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\common-ruRU.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\common-zhCN.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\common-zhTW.xml.in + +pause \ No newline at end of file From f240cb96d61476525e265e2437e48efba5e5970f Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Mon, 30 Jun 2014 09:33:12 +0400 Subject: [PATCH 068/144] reorganize localization file structure --- .../bnmotd.txt.in} | 2 - conf/i18n/bnhelp-deDE.conf.in | 615 ------ conf/i18n/bnhelp-enUS.conf.in | 615 ------ conf/i18n/bnhelp-esES.conf.in | 615 ------ conf/i18n/bnhelp-frFR.conf.in | 615 ------ conf/i18n/bnhelp-itIT.conf.in | 615 ------ conf/i18n/bnhelp-jaJA.conf.in | 615 ------ conf/i18n/bnhelp-koKR.conf.in | 615 ------ conf/i18n/bnhelp-plPL.conf.in | 615 ------ conf/i18n/bnhelp-ruRU.conf.in | 615 ------ conf/i18n/bnhelp-zhCN.conf.in | 615 ------ conf/i18n/bnhelp-zhTW.conf.in | 615 ------ .../{bnhelp-csCZ.conf.in => bnhelp.conf.in} | 0 .../{bnmotd-enUS.txt.in => bnmotd.txt.in} | 2 - conf/i18n/chathelp-war3-deDE.txt.in | 15 - conf/i18n/chathelp-war3-enUS.txt.in | 15 - conf/i18n/chathelp-war3-esES.txt.in | 15 - conf/i18n/chathelp-war3-itIT.txt.in | 15 - conf/i18n/chathelp-war3-jaJA.txt.in | 15 - conf/i18n/chathelp-war3-koKR.txt.in | 15 - conf/i18n/chathelp-war3-plPL.txt.in | 15 - conf/i18n/chathelp-war3-zhTW.txt.in | 15 - ...-war3-csCZ.txt.in => chathelp-war3.txt.in} | 0 conf/i18n/common-deDE.xml.in | 1819 ----------------- conf/i18n/common-esES.xml.in | 1819 ----------------- conf/i18n/common-frFR.xml.in | 1819 ----------------- conf/i18n/common-itIT.xml.in | 1819 ----------------- conf/i18n/common-jaJA.xml.in | 1819 ----------------- conf/i18n/common-koKR.xml.in | 1819 ----------------- conf/i18n/common-plPL.xml.in | 1819 ----------------- conf/i18n/common-ruRU.xml.in | 1819 ----------------- conf/i18n/common-zhCN.xml.in | 1819 ----------------- conf/i18n/common-zhTW.xml.in | 1819 ----------------- .../{common-csCZ.xml.in => common.xml.in} | 2 +- .../bnmotd.txt.in} | 2 - .../bnmotd.txt.in} | 2 - .../bnmotd.txt.in} | 2 - .../bnmotd.txt.in} | 2 - .../chathelp-war3.txt.in} | 4 +- .../bnmotd.txt.in} | 4 +- .../bnmotd.txt.in} | 2 - .../bnmotd.txt.in} | 2 - conf/i18n/newaccount-deDE.txt.in | 21 - conf/i18n/newaccount-enUS.txt.in | 21 - conf/i18n/newaccount-esES.txt.in | 21 - conf/i18n/newaccount-frFR.txt.in | 21 - conf/i18n/newaccount-itIT.txt.in | 21 - conf/i18n/newaccount-jaJA.txt.in | 21 - conf/i18n/newaccount-koKR.txt.in | 21 - conf/i18n/newaccount-plPL.txt.in | 21 - conf/i18n/newaccount-ruRU.txt.in | 21 - conf/i18n/newaccount-zhCN.txt.in | 21 - conf/i18n/newaccount-zhTW.txt.in | 21 - ...waccount-csCZ.txt.in => newaccount.txt.in} | 0 .../bnmotd.txt.in} | 2 - .../bnmotd.txt.in} | 2 - .../bnmotd.txt.in} | 2 - .../bnmotd.txt.in} | 2 - .../chathelp-war3.txt.in} | 0 .../bnmotd.txt.in} | 2 - conf/i18n/termsofservice-csCZ.txt.in | 21 - conf/i18n/termsofservice-deDE.txt.in | 21 - conf/i18n/termsofservice-enUS.txt.in | 21 - conf/i18n/termsofservice-esES.txt.in | 21 - conf/i18n/termsofservice-frFR.txt.in | 21 - conf/i18n/termsofservice-itIT.txt.in | 21 - conf/i18n/termsofservice-jaJA.txt.in | 21 - conf/i18n/termsofservice-koKR.txt.in | 21 - conf/i18n/termsofservice-plPL.txt.in | 21 - conf/i18n/termsofservice-ruRU.txt.in | 21 - conf/i18n/termsofservice-zhCN.txt.in | 21 - conf/i18n/termsofservice-zhTW.txt.in | 21 - .../bnmotd.txt.in} | 2 - .../chathelp-war3.txt.in} | 0 .../bnmotd.txt.in} | 2 - 75 files changed, 4 insertions(+), 25594 deletions(-) rename conf/i18n/{bnmotd-bgBG.txt.in => bgBG/bnmotd.txt.in} (92%) delete mode 100644 conf/i18n/bnhelp-deDE.conf.in delete mode 100644 conf/i18n/bnhelp-enUS.conf.in delete mode 100644 conf/i18n/bnhelp-esES.conf.in delete mode 100644 conf/i18n/bnhelp-frFR.conf.in delete mode 100644 conf/i18n/bnhelp-itIT.conf.in delete mode 100644 conf/i18n/bnhelp-jaJA.conf.in delete mode 100644 conf/i18n/bnhelp-koKR.conf.in delete mode 100644 conf/i18n/bnhelp-plPL.conf.in delete mode 100644 conf/i18n/bnhelp-ruRU.conf.in delete mode 100644 conf/i18n/bnhelp-zhCN.conf.in delete mode 100644 conf/i18n/bnhelp-zhTW.conf.in rename conf/i18n/{bnhelp-csCZ.conf.in => bnhelp.conf.in} (100%) rename conf/i18n/{bnmotd-enUS.txt.in => bnmotd.txt.in} (87%) delete mode 100644 conf/i18n/chathelp-war3-deDE.txt.in delete mode 100644 conf/i18n/chathelp-war3-enUS.txt.in delete mode 100644 conf/i18n/chathelp-war3-esES.txt.in delete mode 100644 conf/i18n/chathelp-war3-itIT.txt.in delete mode 100644 conf/i18n/chathelp-war3-jaJA.txt.in delete mode 100644 conf/i18n/chathelp-war3-koKR.txt.in delete mode 100644 conf/i18n/chathelp-war3-plPL.txt.in delete mode 100644 conf/i18n/chathelp-war3-zhTW.txt.in rename conf/i18n/{chathelp-war3-csCZ.txt.in => chathelp-war3.txt.in} (100%) delete mode 100644 conf/i18n/common-deDE.xml.in delete mode 100644 conf/i18n/common-esES.xml.in delete mode 100644 conf/i18n/common-frFR.xml.in delete mode 100644 conf/i18n/common-itIT.xml.in delete mode 100644 conf/i18n/common-jaJA.xml.in delete mode 100644 conf/i18n/common-koKR.xml.in delete mode 100644 conf/i18n/common-plPL.xml.in delete mode 100644 conf/i18n/common-ruRU.xml.in delete mode 100644 conf/i18n/common-zhCN.xml.in delete mode 100644 conf/i18n/common-zhTW.xml.in rename conf/i18n/{common-csCZ.xml.in => common.xml.in} (99%) rename conf/i18n/{bnmotd-csCZ.txt.in => csCZ/bnmotd.txt.in} (88%) rename conf/i18n/{bnmotd-deDE.txt.in => deDE/bnmotd.txt.in} (88%) rename conf/i18n/{bnmotd-esES.txt.in => esES/bnmotd.txt.in} (88%) rename conf/i18n/{bnmotd-frFR.txt.in => frFR/bnmotd.txt.in} (89%) rename conf/i18n/{chathelp-war3-frFR.txt.in => frFR/chathelp-war3.txt.in} (86%) rename conf/i18n/{bnmotd-jaJA.txt.in => itIT/bnmotd.txt.in} (75%) rename conf/i18n/{bnmotd-jpJA.txt.in => jpJA/bnmotd.txt.in} (91%) rename conf/i18n/{bnmotd-koKR.txt.in => koKR/bnmotd.txt.in} (92%) delete mode 100644 conf/i18n/newaccount-deDE.txt.in delete mode 100644 conf/i18n/newaccount-enUS.txt.in delete mode 100644 conf/i18n/newaccount-esES.txt.in delete mode 100644 conf/i18n/newaccount-frFR.txt.in delete mode 100644 conf/i18n/newaccount-itIT.txt.in delete mode 100644 conf/i18n/newaccount-jaJA.txt.in delete mode 100644 conf/i18n/newaccount-koKR.txt.in delete mode 100644 conf/i18n/newaccount-plPL.txt.in delete mode 100644 conf/i18n/newaccount-ruRU.txt.in delete mode 100644 conf/i18n/newaccount-zhCN.txt.in delete mode 100644 conf/i18n/newaccount-zhTW.txt.in rename conf/i18n/{newaccount-csCZ.txt.in => newaccount.txt.in} (100%) rename conf/i18n/{bnmotd-nlNL.txt.in => nlNL/bnmotd.txt.in} (88%) rename conf/i18n/{bnmotd-plPL.txt.in => plPL/bnmotd.txt.in} (89%) rename conf/i18n/{bnmotd-ptBR.txt.in => ptBR/bnmotd.txt.in} (87%) rename conf/i18n/{bnmotd-ruRU.txt.in => ruRU/bnmotd.txt.in} (85%) rename conf/i18n/{chathelp-war3-ruRU.txt.in => ruRU/chathelp-war3.txt.in} (100%) rename conf/i18n/{bnmotd-svSE.txt.in => svSE/bnmotd.txt.in} (88%) delete mode 100644 conf/i18n/termsofservice-csCZ.txt.in delete mode 100644 conf/i18n/termsofservice-deDE.txt.in delete mode 100644 conf/i18n/termsofservice-enUS.txt.in delete mode 100644 conf/i18n/termsofservice-esES.txt.in delete mode 100644 conf/i18n/termsofservice-frFR.txt.in delete mode 100644 conf/i18n/termsofservice-itIT.txt.in delete mode 100644 conf/i18n/termsofservice-jaJA.txt.in delete mode 100644 conf/i18n/termsofservice-koKR.txt.in delete mode 100644 conf/i18n/termsofservice-plPL.txt.in delete mode 100644 conf/i18n/termsofservice-ruRU.txt.in delete mode 100644 conf/i18n/termsofservice-zhCN.txt.in delete mode 100644 conf/i18n/termsofservice-zhTW.txt.in rename conf/i18n/{bnmotd-zhCN.txt.in => zhCN/bnmotd.txt.in} (88%) rename conf/i18n/{chathelp-war3-zhCN.txt.in => zhCN/chathelp-war3.txt.in} (100%) rename conf/i18n/{bnmotd-zhTW.txt.in => zhTW/bnmotd.txt.in} (88%) diff --git a/conf/i18n/bnmotd-bgBG.txt.in b/conf/i18n/bgBG/bnmotd.txt.in similarity index 92% rename from conf/i18n/bnmotd-bgBG.txt.in rename to conf/i18n/bgBG/bnmotd.txt.in index c21507fb0..722508d6d 100644 --- a/conf/i18n/bnmotd-bgBG.txt.in +++ b/conf/i18n/bgBG/bnmotd.txt.in @@ -8,6 +8,4 @@ %IИмате проблем с команда? Въведете /help за да %Iнаучите повече за нея. %I -%I(edit this text in conf/bnmotd-bgBG.txt) -%I %I%m \ No newline at end of file diff --git a/conf/i18n/bnhelp-deDE.conf.in b/conf/i18n/bnhelp-deDE.conf.in deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/bnhelp-deDE.conf.in +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/bnhelp-enUS.conf.in b/conf/i18n/bnhelp-enUS.conf.in deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/bnhelp-enUS.conf.in +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/bnhelp-esES.conf.in b/conf/i18n/bnhelp-esES.conf.in deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/bnhelp-esES.conf.in +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/bnhelp-frFR.conf.in b/conf/i18n/bnhelp-frFR.conf.in deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/bnhelp-frFR.conf.in +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/bnhelp-itIT.conf.in b/conf/i18n/bnhelp-itIT.conf.in deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/bnhelp-itIT.conf.in +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/bnhelp-jaJA.conf.in b/conf/i18n/bnhelp-jaJA.conf.in deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/bnhelp-jaJA.conf.in +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/bnhelp-koKR.conf.in b/conf/i18n/bnhelp-koKR.conf.in deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/bnhelp-koKR.conf.in +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/bnhelp-plPL.conf.in b/conf/i18n/bnhelp-plPL.conf.in deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/bnhelp-plPL.conf.in +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/bnhelp-ruRU.conf.in b/conf/i18n/bnhelp-ruRU.conf.in deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/bnhelp-ruRU.conf.in +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/bnhelp-zhCN.conf.in b/conf/i18n/bnhelp-zhCN.conf.in deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/bnhelp-zhCN.conf.in +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/bnhelp-zhTW.conf.in b/conf/i18n/bnhelp-zhTW.conf.in deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/bnhelp-zhTW.conf.in +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/bnhelp-csCZ.conf.in b/conf/i18n/bnhelp.conf.in similarity index 100% rename from conf/i18n/bnhelp-csCZ.conf.in rename to conf/i18n/bnhelp.conf.in diff --git a/conf/i18n/bnmotd-enUS.txt.in b/conf/i18n/bnmotd.txt.in similarity index 87% rename from conf/i18n/bnmotd-enUS.txt.in rename to conf/i18n/bnmotd.txt.in index 43d8600f4..b02f52fe0 100644 --- a/conf/i18n/bnmotd-enUS.txt.in +++ b/conf/i18n/bnmotd.txt.in @@ -8,6 +8,4 @@ %IHaving trouble with a command? Type /help to %Ilearn more about it. %I -%I(edit this text in conf/bnmotd-enUS.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-deDE.txt.in b/conf/i18n/chathelp-war3-deDE.txt.in deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/chathelp-war3-deDE.txt.in +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-enUS.txt.in b/conf/i18n/chathelp-war3-enUS.txt.in deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/chathelp-war3-enUS.txt.in +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-esES.txt.in b/conf/i18n/chathelp-war3-esES.txt.in deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/chathelp-war3-esES.txt.in +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-itIT.txt.in b/conf/i18n/chathelp-war3-itIT.txt.in deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/chathelp-war3-itIT.txt.in +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-jaJA.txt.in b/conf/i18n/chathelp-war3-jaJA.txt.in deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/chathelp-war3-jaJA.txt.in +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-koKR.txt.in b/conf/i18n/chathelp-war3-koKR.txt.in deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/chathelp-war3-koKR.txt.in +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-plPL.txt.in b/conf/i18n/chathelp-war3-plPL.txt.in deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/chathelp-war3-plPL.txt.in +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-zhTW.txt.in b/conf/i18n/chathelp-war3-zhTW.txt.in deleted file mode 100644 index 197ddc02f..000000000 --- a/conf/i18n/chathelp-war3-zhTW.txt.in +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN模拟战网聊天命令帮助 - -新命令: - -使用 /f help 显示朋友命令帮助 -使用 /users 显示在线玩家数 -使用 /w 或者 /msg <玩家名称> 发送消息给玩家 -使用 /join <频道> 加入指定的频道 - -频道管理员: - -使用 /ban <玩家名称> 把玩家从该频道中踢出,并禁止玩家再次进入此频道 -使用 /kick <玩家名称> 把玩家从该频道中踢出 - -更多的帮助:输入/help diff --git a/conf/i18n/chathelp-war3-csCZ.txt.in b/conf/i18n/chathelp-war3.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-csCZ.txt.in rename to conf/i18n/chathelp-war3.txt.in diff --git a/conf/i18n/common-deDE.xml.in b/conf/i18n/common-deDE.xml.in deleted file mode 100644 index 22cba0d73..000000000 --- a/conf/i18n/common-deDE.xml.in +++ /dev/null @@ -1,1819 +0,0 @@ - - - - German - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/common-esES.xml.in b/conf/i18n/common-esES.xml.in deleted file mode 100644 index 8b7e41540..000000000 --- a/conf/i18n/common-esES.xml.in +++ /dev/null @@ -1,1819 +0,0 @@ - - - - Spanish - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/common-frFR.xml.in b/conf/i18n/common-frFR.xml.in deleted file mode 100644 index 9d4ffa6e0..000000000 --- a/conf/i18n/common-frFR.xml.in +++ /dev/null @@ -1,1819 +0,0 @@ - - - - French - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/common-itIT.xml.in b/conf/i18n/common-itIT.xml.in deleted file mode 100644 index b2843e0f2..000000000 --- a/conf/i18n/common-itIT.xml.in +++ /dev/null @@ -1,1819 +0,0 @@ - - - - Italy - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/common-jaJA.xml.in b/conf/i18n/common-jaJA.xml.in deleted file mode 100644 index e18275b73..000000000 --- a/conf/i18n/common-jaJA.xml.in +++ /dev/null @@ -1,1819 +0,0 @@ - - - - Japanese - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/common-koKR.xml.in b/conf/i18n/common-koKR.xml.in deleted file mode 100644 index 5d4ce7110..000000000 --- a/conf/i18n/common-koKR.xml.in +++ /dev/null @@ -1,1819 +0,0 @@ - - - - Korean - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/common-plPL.xml.in b/conf/i18n/common-plPL.xml.in deleted file mode 100644 index a356ad1b1..000000000 --- a/conf/i18n/common-plPL.xml.in +++ /dev/null @@ -1,1819 +0,0 @@ - - - - Polish - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/common-ruRU.xml.in b/conf/i18n/common-ruRU.xml.in deleted file mode 100644 index 16996fcd0..000000000 --- a/conf/i18n/common-ruRU.xml.in +++ /dev/null @@ -1,1819 +0,0 @@ - - - - Russian - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/common-zhCN.xml.in b/conf/i18n/common-zhCN.xml.in deleted file mode 100644 index 5f71bd4da..000000000 --- a/conf/i18n/common-zhCN.xml.in +++ /dev/null @@ -1,1819 +0,0 @@ - - - - Chinese Simple - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/common-zhTW.xml.in b/conf/i18n/common-zhTW.xml.in deleted file mode 100644 index 435fa457c..000000000 --- a/conf/i18n/common-zhTW.xml.in +++ /dev/null @@ -1,1819 +0,0 @@ - - - - Chinese Traditional - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/common-csCZ.xml.in b/conf/i18n/common.xml.in similarity index 99% rename from conf/i18n/common-csCZ.xml.in rename to conf/i18n/common.xml.in index cbb517f26..19d5716c7 100644 --- a/conf/i18n/common-csCZ.xml.in +++ b/conf/i18n/common.xml.in @@ -1,7 +1,7 @@ - Czech + English diff --git a/conf/i18n/bnmotd-csCZ.txt.in b/conf/i18n/csCZ/bnmotd.txt.in similarity index 88% rename from conf/i18n/bnmotd-csCZ.txt.in rename to conf/i18n/csCZ/bnmotd.txt.in index 879d6f964..c34858db7 100644 --- a/conf/i18n/bnmotd-csCZ.txt.in +++ b/conf/i18n/csCZ/bnmotd.txt.in @@ -9,6 +9,4 @@ %I %ITvoje IP adresa: %r, tvoje ID %i a tvuj klient %t. %I -%I(edit this text in conf/bnmotd-csCZ.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-deDE.txt.in b/conf/i18n/deDE/bnmotd.txt.in similarity index 88% rename from conf/i18n/bnmotd-deDE.txt.in rename to conf/i18n/deDE/bnmotd.txt.in index b28467b15..b67a60a47 100644 --- a/conf/i18n/bnmotd-deDE.txt.in +++ b/conf/i18n/deDE/bnmotd.txt.in @@ -8,6 +8,4 @@ %IEin Problem mit den Kommandos? Schreibe /help und %Ilerne mehr über die Kommandos. %I -%I(edit this text in conf/bnmotd-deDE.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-esES.txt.in b/conf/i18n/esES/bnmotd.txt.in similarity index 88% rename from conf/i18n/bnmotd-esES.txt.in rename to conf/i18n/esES/bnmotd.txt.in index de6fe58e7..b06212111 100644 --- a/conf/i18n/bnmotd-esES.txt.in +++ b/conf/i18n/esES/bnmotd.txt.in @@ -8,6 +8,4 @@ %ITiene problemas con algun comando? Teclee "/help" para %Iaprender más sobre los comandos. %I -%I(edit this text in conf/bnmotd-ptBR.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-frFR.txt.in b/conf/i18n/frFR/bnmotd.txt.in similarity index 89% rename from conf/i18n/bnmotd-frFR.txt.in rename to conf/i18n/frFR/bnmotd.txt.in index 974fa78b9..6b0e540b4 100644 --- a/conf/i18n/bnmotd-frFR.txt.in +++ b/conf/i18n/frFR/bnmotd.txt.in @@ -8,6 +8,4 @@ %IUn problème avec une commande ? Tappez /help pour %Ien savoir plus. %I -%I(edit this text in conf/bnmotd-ptBR.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-frFR.txt.in b/conf/i18n/frFR/chathelp-war3.txt.in similarity index 86% rename from conf/i18n/chathelp-war3-frFR.txt.in rename to conf/i18n/frFR/chathelp-war3.txt.in index 07fde45bd..05988aa7c 100644 --- a/conf/i18n/chathelp-war3-frFR.txt.in +++ b/conf/i18n/frFR/chathelp-war3.txt.in @@ -7,9 +7,9 @@ utiliser /users pour voir les utilisateur en ligne utiliser /w ou /msg pour chuchoter a une personne utiliser /join pour joindre un canal de discussions -Pour les oprateurs du canal: +Pour les opйrateurs du canal: utiliser /ban banni l'utilisateur du canal de discussions utiliser /kick pour sortir un utilisateur du canal de discussions -pour une aide plus dtaill taper: /help \ No newline at end of file +pour une aide plus dйtaillй taper: /help \ No newline at end of file diff --git a/conf/i18n/bnmotd-jaJA.txt.in b/conf/i18n/itIT/bnmotd.txt.in similarity index 75% rename from conf/i18n/bnmotd-jaJA.txt.in rename to conf/i18n/itIT/bnmotd.txt.in index a9ad2b36a..b02f52fe0 100644 --- a/conf/i18n/bnmotd-jaJA.txt.in +++ b/conf/i18n/itIT/bnmotd.txt.in @@ -1,4 +1,4 @@ -%Eпривет %l, welcome to %s! +%EHello %l, welcome to %s! %IRunning version %v on %h. %IThis server is hosted by %H %I @@ -8,6 +8,4 @@ %IHaving trouble with a command? Type /help to %Ilearn more about it. %I -%I(edit this text in conf/bnmotd-enUS.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-jpJA.txt.in b/conf/i18n/jpJA/bnmotd.txt.in similarity index 91% rename from conf/i18n/bnmotd-jpJA.txt.in rename to conf/i18n/jpJA/bnmotd.txt.in index d9db62914..8947f2496 100644 --- a/conf/i18n/bnmotd-jpJA.txt.in +++ b/conf/i18n/jpJA/bnmotd.txt.in @@ -8,6 +8,4 @@ %I%c 個のチャンネが生成しました。 %Iコマンド・リストは「/help」をタイプして下さい。 %I -%I(edit this text in conf/bnmotd-ptBR.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-koKR.txt.in b/conf/i18n/koKR/bnmotd.txt.in similarity index 92% rename from conf/i18n/bnmotd-koKR.txt.in rename to conf/i18n/koKR/bnmotd.txt.in index 902c6a35d..5a1f0b6a7 100644 --- a/conf/i18n/bnmotd-koKR.txt.in +++ b/conf/i18n/koKR/bnmotd.txt.in @@ -8,6 +8,4 @@ %I명령어의 대해 궁금한 사항이 있으시다구요? %I/help 명령어를 이용해 보세요. %I -%I(edit this text in conf/bnmotd-ptBR.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/newaccount-deDE.txt.in b/conf/i18n/newaccount-deDE.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/newaccount-deDE.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-enUS.txt.in b/conf/i18n/newaccount-enUS.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/newaccount-enUS.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-esES.txt.in b/conf/i18n/newaccount-esES.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/newaccount-esES.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-frFR.txt.in b/conf/i18n/newaccount-frFR.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/newaccount-frFR.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-itIT.txt.in b/conf/i18n/newaccount-itIT.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/newaccount-itIT.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-jaJA.txt.in b/conf/i18n/newaccount-jaJA.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/newaccount-jaJA.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-koKR.txt.in b/conf/i18n/newaccount-koKR.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/newaccount-koKR.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-plPL.txt.in b/conf/i18n/newaccount-plPL.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/newaccount-plPL.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-ruRU.txt.in b/conf/i18n/newaccount-ruRU.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/newaccount-ruRU.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-zhCN.txt.in b/conf/i18n/newaccount-zhCN.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/newaccount-zhCN.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-zhTW.txt.in b/conf/i18n/newaccount-zhTW.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/newaccount-zhTW.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/newaccount-csCZ.txt.in b/conf/i18n/newaccount.txt.in similarity index 100% rename from conf/i18n/newaccount-csCZ.txt.in rename to conf/i18n/newaccount.txt.in diff --git a/conf/i18n/bnmotd-nlNL.txt.in b/conf/i18n/nlNL/bnmotd.txt.in similarity index 88% rename from conf/i18n/bnmotd-nlNL.txt.in rename to conf/i18n/nlNL/bnmotd.txt.in index cbf3f506e..a3d8b6548 100644 --- a/conf/i18n/bnmotd-nlNL.txt.in +++ b/conf/i18n/nlNL/bnmotd.txt.in @@ -8,6 +8,4 @@ %IProblemen met een commando? Type /help om %Ier meer te weten over te komen. %I -%I(edit this text in conf/bnmotd-nlNL.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-plPL.txt.in b/conf/i18n/plPL/bnmotd.txt.in similarity index 89% rename from conf/i18n/bnmotd-plPL.txt.in rename to conf/i18n/plPL/bnmotd.txt.in index 818bc5383..77486af33 100644 --- a/conf/i18n/bnmotd-plPL.txt.in +++ b/conf/i18n/plPL/bnmotd.txt.in @@ -8,6 +8,4 @@ %IJeśli masz jakieś problemy z poleceniami, to napiszsz /help aby %Idowiedzieć się wiecej. %I -%I(edit this text in conf/bnmotd-plPL.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-ptBR.txt.in b/conf/i18n/ptBR/bnmotd.txt.in similarity index 87% rename from conf/i18n/bnmotd-ptBR.txt.in rename to conf/i18n/ptBR/bnmotd.txt.in index 527def542..75a70bd74 100644 --- a/conf/i18n/bnmotd-ptBR.txt.in +++ b/conf/i18n/ptBR/bnmotd.txt.in @@ -8,6 +8,4 @@ %ITendo algum problema com comando? Digite /help ra %Aprender mais sobre. %I -%I(edit this text in conf/bnmotd-ptBR.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/bnmotd-ruRU.txt.in b/conf/i18n/ruRU/bnmotd.txt.in similarity index 85% rename from conf/i18n/bnmotd-ruRU.txt.in rename to conf/i18n/ruRU/bnmotd.txt.in index 65344ea07..813faef18 100644 --- a/conf/i18n/bnmotd-ruRU.txt.in +++ b/conf/i18n/ruRU/bnmotd.txt.in @@ -8,6 +8,4 @@ %I %IВведите /help для получения помощи по командам чата %I -%I(измените этот текст в файле conf/bnmotd-ruRU.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-ruRU.txt.in b/conf/i18n/ruRU/chathelp-war3.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-ruRU.txt.in rename to conf/i18n/ruRU/chathelp-war3.txt.in diff --git a/conf/i18n/bnmotd-svSE.txt.in b/conf/i18n/svSE/bnmotd.txt.in similarity index 88% rename from conf/i18n/bnmotd-svSE.txt.in rename to conf/i18n/svSE/bnmotd.txt.in index 29ded5911..75c03e3d4 100644 --- a/conf/i18n/bnmotd-svSE.txt.in +++ b/conf/i18n/svSE/bnmotd.txt.in @@ -8,6 +8,4 @@ %IHar du problem med ett kommando? Skriv /help för %Iatt lära dig mer om det. %I -%I(edit this text in conf/bnmotd-svSE.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/termsofservice-csCZ.txt.in b/conf/i18n/termsofservice-csCZ.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/termsofservice-csCZ.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-deDE.txt.in b/conf/i18n/termsofservice-deDE.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/termsofservice-deDE.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-enUS.txt.in b/conf/i18n/termsofservice-enUS.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/termsofservice-enUS.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-esES.txt.in b/conf/i18n/termsofservice-esES.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/termsofservice-esES.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-frFR.txt.in b/conf/i18n/termsofservice-frFR.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/termsofservice-frFR.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-itIT.txt.in b/conf/i18n/termsofservice-itIT.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/termsofservice-itIT.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-jaJA.txt.in b/conf/i18n/termsofservice-jaJA.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/termsofservice-jaJA.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-koKR.txt.in b/conf/i18n/termsofservice-koKR.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/termsofservice-koKR.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-plPL.txt.in b/conf/i18n/termsofservice-plPL.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/termsofservice-plPL.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-ruRU.txt.in b/conf/i18n/termsofservice-ruRU.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/termsofservice-ruRU.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-zhCN.txt.in b/conf/i18n/termsofservice-zhCN.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/termsofservice-zhCN.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice-zhTW.txt.in b/conf/i18n/termsofservice-zhTW.txt.in deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/termsofservice-zhTW.txt.in +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/bnmotd-zhCN.txt.in b/conf/i18n/zhCN/bnmotd.txt.in similarity index 88% rename from conf/i18n/bnmotd-zhCN.txt.in rename to conf/i18n/zhCN/bnmotd.txt.in index 716cccbc2..5cca60656 100644 --- a/conf/i18n/bnmotd-zhCN.txt.in +++ b/conf/i18n/zhCN/bnmotd.txt.in @@ -8,6 +8,4 @@ %I还不了解可以使用哪些命令? %I输入 /help 就可以学习了 %I -%I(edit this text in conf/bnmotd-zhCB.txt) -%I %M%m \ No newline at end of file diff --git a/conf/i18n/chathelp-war3-zhCN.txt.in b/conf/i18n/zhCN/chathelp-war3.txt.in similarity index 100% rename from conf/i18n/chathelp-war3-zhCN.txt.in rename to conf/i18n/zhCN/chathelp-war3.txt.in diff --git a/conf/i18n/bnmotd-zhTW.txt.in b/conf/i18n/zhTW/bnmotd.txt.in similarity index 88% rename from conf/i18n/bnmotd-zhTW.txt.in rename to conf/i18n/zhTW/bnmotd.txt.in index 54c5a5f9e..f4f4dcf7a 100644 --- a/conf/i18n/bnmotd-zhTW.txt.in +++ b/conf/i18n/zhTW/bnmotd.txt.in @@ -7,6 +7,4 @@ %I其中有 %u 個玩家一邊在玩 %g 個遊戲一邊在 %c 個聊天頻道. %I不懂使用指令? 請輸入 /help 來了解更多... %I -%I(edit this text in conf/bnmotd-zhTW.txt) -%I %M%m \ No newline at end of file From 7a5b98802f2266a71cf46f35ddd48d64af1bd7c8 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Mon, 30 Jun 2014 10:26:57 +0400 Subject: [PATCH 069/144] duplication of files to be translated soon https://github.com/HarpyWar/pvpgn/issues/13 --- conf/i18n/csCZ/bnhelp.conf.in | 615 +++++++++ conf/i18n/csCZ/chathelp-war3.txt.in | 15 + conf/i18n/csCZ/common.xml.in | 1819 +++++++++++++++++++++++++++ conf/i18n/csCZ/newaccount.txt.in | 21 + conf/i18n/deDE/bnhelp.conf.in | 615 +++++++++ conf/i18n/deDE/chathelp-war3.txt.in | 15 + conf/i18n/deDE/common.xml.in | 1819 +++++++++++++++++++++++++++ conf/i18n/deDE/newaccount.txt.in | 21 + conf/i18n/esES/bnhelp.conf.in | 615 +++++++++ conf/i18n/esES/chathelp-war3.txt.in | 15 + conf/i18n/esES/common.xml.in | 1819 +++++++++++++++++++++++++++ conf/i18n/esES/newaccount.txt.in | 21 + conf/i18n/frFR/bnhelp.conf.in | 615 +++++++++ conf/i18n/frFR/common.xml.in | 1819 +++++++++++++++++++++++++++ conf/i18n/frFR/newaccount.txt.in | 21 + conf/i18n/itIT/bnhelp.conf.in | 615 +++++++++ conf/i18n/itIT/chathelp-war3.txt.in | 15 + conf/i18n/itIT/common.xml.in | 1819 +++++++++++++++++++++++++++ conf/i18n/itIT/newaccount.txt.in | 21 + conf/i18n/jpJA/bnhelp.conf.in | 615 +++++++++ conf/i18n/jpJA/chathelp-war3.txt.in | 15 + conf/i18n/jpJA/common.xml.in | 1819 +++++++++++++++++++++++++++ conf/i18n/jpJA/newaccount.txt.in | 21 + conf/i18n/plPL/bnhelp.conf.in | 615 +++++++++ conf/i18n/plPL/chathelp-war3.txt.in | 15 + conf/i18n/plPL/common.xml.in | 1819 +++++++++++++++++++++++++++ conf/i18n/plPL/newaccount.txt.in | 21 + conf/i18n/ruRU/bnhelp.conf.in | 615 +++++++++ conf/i18n/ruRU/common.xml.in | 1819 +++++++++++++++++++++++++++ conf/i18n/ruRU/newaccount.txt.in | 21 + 30 files changed, 19730 insertions(+) create mode 100644 conf/i18n/csCZ/bnhelp.conf.in create mode 100644 conf/i18n/csCZ/chathelp-war3.txt.in create mode 100644 conf/i18n/csCZ/common.xml.in create mode 100644 conf/i18n/csCZ/newaccount.txt.in create mode 100644 conf/i18n/deDE/bnhelp.conf.in create mode 100644 conf/i18n/deDE/chathelp-war3.txt.in create mode 100644 conf/i18n/deDE/common.xml.in create mode 100644 conf/i18n/deDE/newaccount.txt.in create mode 100644 conf/i18n/esES/bnhelp.conf.in create mode 100644 conf/i18n/esES/chathelp-war3.txt.in create mode 100644 conf/i18n/esES/common.xml.in create mode 100644 conf/i18n/esES/newaccount.txt.in create mode 100644 conf/i18n/frFR/bnhelp.conf.in create mode 100644 conf/i18n/frFR/common.xml.in create mode 100644 conf/i18n/frFR/newaccount.txt.in create mode 100644 conf/i18n/itIT/bnhelp.conf.in create mode 100644 conf/i18n/itIT/chathelp-war3.txt.in create mode 100644 conf/i18n/itIT/common.xml.in create mode 100644 conf/i18n/itIT/newaccount.txt.in create mode 100644 conf/i18n/jpJA/bnhelp.conf.in create mode 100644 conf/i18n/jpJA/chathelp-war3.txt.in create mode 100644 conf/i18n/jpJA/common.xml.in create mode 100644 conf/i18n/jpJA/newaccount.txt.in create mode 100644 conf/i18n/plPL/bnhelp.conf.in create mode 100644 conf/i18n/plPL/chathelp-war3.txt.in create mode 100644 conf/i18n/plPL/common.xml.in create mode 100644 conf/i18n/plPL/newaccount.txt.in create mode 100644 conf/i18n/ruRU/bnhelp.conf.in create mode 100644 conf/i18n/ruRU/common.xml.in create mode 100644 conf/i18n/ruRU/newaccount.txt.in diff --git a/conf/i18n/csCZ/bnhelp.conf.in b/conf/i18n/csCZ/bnhelp.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/csCZ/bnhelp.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/csCZ/chathelp-war3.txt.in b/conf/i18n/csCZ/chathelp-war3.txt.in new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/csCZ/chathelp-war3.txt.in @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/csCZ/common.xml.in b/conf/i18n/csCZ/common.xml.in new file mode 100644 index 000000000..19d5716c7 --- /dev/null +++ b/conf/i18n/csCZ/common.xml.in @@ -0,0 +1,1819 @@ + + + + English + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + This account has been locked + + + + This account has been locked + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/csCZ/newaccount.txt.in b/conf/i18n/csCZ/newaccount.txt.in new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/csCZ/newaccount.txt.in @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/deDE/bnhelp.conf.in b/conf/i18n/deDE/bnhelp.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/deDE/bnhelp.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/deDE/chathelp-war3.txt.in b/conf/i18n/deDE/chathelp-war3.txt.in new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/deDE/chathelp-war3.txt.in @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/deDE/common.xml.in b/conf/i18n/deDE/common.xml.in new file mode 100644 index 000000000..19d5716c7 --- /dev/null +++ b/conf/i18n/deDE/common.xml.in @@ -0,0 +1,1819 @@ + + + + English + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + This account has been locked + + + + This account has been locked + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/deDE/newaccount.txt.in b/conf/i18n/deDE/newaccount.txt.in new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/deDE/newaccount.txt.in @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/esES/bnhelp.conf.in b/conf/i18n/esES/bnhelp.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/esES/bnhelp.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/esES/chathelp-war3.txt.in b/conf/i18n/esES/chathelp-war3.txt.in new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/esES/chathelp-war3.txt.in @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/esES/common.xml.in b/conf/i18n/esES/common.xml.in new file mode 100644 index 000000000..19d5716c7 --- /dev/null +++ b/conf/i18n/esES/common.xml.in @@ -0,0 +1,1819 @@ + + + + English + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + This account has been locked + + + + This account has been locked + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/esES/newaccount.txt.in b/conf/i18n/esES/newaccount.txt.in new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/esES/newaccount.txt.in @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/frFR/bnhelp.conf.in b/conf/i18n/frFR/bnhelp.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/frFR/bnhelp.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/frFR/common.xml.in b/conf/i18n/frFR/common.xml.in new file mode 100644 index 000000000..19d5716c7 --- /dev/null +++ b/conf/i18n/frFR/common.xml.in @@ -0,0 +1,1819 @@ + + + + English + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + This account has been locked + + + + This account has been locked + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/frFR/newaccount.txt.in b/conf/i18n/frFR/newaccount.txt.in new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/frFR/newaccount.txt.in @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/itIT/bnhelp.conf.in b/conf/i18n/itIT/bnhelp.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/itIT/bnhelp.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/itIT/chathelp-war3.txt.in b/conf/i18n/itIT/chathelp-war3.txt.in new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/itIT/chathelp-war3.txt.in @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/itIT/common.xml.in b/conf/i18n/itIT/common.xml.in new file mode 100644 index 000000000..19d5716c7 --- /dev/null +++ b/conf/i18n/itIT/common.xml.in @@ -0,0 +1,1819 @@ + + + + English + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + This account has been locked + + + + This account has been locked + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/itIT/newaccount.txt.in b/conf/i18n/itIT/newaccount.txt.in new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/itIT/newaccount.txt.in @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/jpJA/bnhelp.conf.in b/conf/i18n/jpJA/bnhelp.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/jpJA/bnhelp.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/jpJA/chathelp-war3.txt.in b/conf/i18n/jpJA/chathelp-war3.txt.in new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/jpJA/chathelp-war3.txt.in @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/jpJA/common.xml.in b/conf/i18n/jpJA/common.xml.in new file mode 100644 index 000000000..19d5716c7 --- /dev/null +++ b/conf/i18n/jpJA/common.xml.in @@ -0,0 +1,1819 @@ + + + + English + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + This account has been locked + + + + This account has been locked + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/jpJA/newaccount.txt.in b/conf/i18n/jpJA/newaccount.txt.in new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/jpJA/newaccount.txt.in @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/plPL/bnhelp.conf.in b/conf/i18n/plPL/bnhelp.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/plPL/bnhelp.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/plPL/chathelp-war3.txt.in b/conf/i18n/plPL/chathelp-war3.txt.in new file mode 100644 index 000000000..65f5dce3c --- /dev/null +++ b/conf/i18n/plPL/chathelp-war3.txt.in @@ -0,0 +1,15 @@ +PvPGN Bnet Emulation Chat Help Commands + +New Commands: + +use /f help for a friend lists help +use /users to view users online +use /w or /msg to whisper people +use /join to join a channel + +For Chan Ops: + +use /ban bans a user from channel +use /kick kicks a user from channel + +For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/plPL/common.xml.in b/conf/i18n/plPL/common.xml.in new file mode 100644 index 000000000..19d5716c7 --- /dev/null +++ b/conf/i18n/plPL/common.xml.in @@ -0,0 +1,1819 @@ + + + + English + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + This account has been locked + + + + This account has been locked + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/plPL/newaccount.txt.in b/conf/i18n/plPL/newaccount.txt.in new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/plPL/newaccount.txt.in @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/ruRU/bnhelp.conf.in b/conf/i18n/ruRU/bnhelp.conf.in new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/ruRU/bnhelp.conf.in @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records diff --git a/conf/i18n/ruRU/common.xml.in b/conf/i18n/ruRU/common.xml.in new file mode 100644 index 000000000..19d5716c7 --- /dev/null +++ b/conf/i18n/ruRU/common.xml.in @@ -0,0 +1,1819 @@ + + + + English + + + + + + + by {} + + + + for {} + + + + permanently + + + + with a reason "{}" + + + + No such alias. Use // to show the list. + + + + Alias list: + + + + you are now tempOP for this channel + + + + Account name contains some invalid symbol! + + + + Maximum password length allowed is {} + + + + Trying to add account "{}" with password "{}" + + + + Hash is: {} + + + + Failed to create account! + + + + Account {} created. + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Admin + + + + {} has been promoted to a Server Admin + + + + {} has promoted you to a Server Admin + + + + {} is not a Server Admin. + + + + {} has been demoted from a Server Admin + + + + {} has demoted you from a Server Admin + + + + Currently logged on Administrators: + + + + Your game client doesn't support MessageBox. + + + + \n\n***************************\nBy {} + + + + Information from {} + + + + for {} + + + + Announcement from {}: {} + + + + Could not broadcast message. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Admin + + + + {} has been promoted to a Channel Admin + + + + {} has promoted you to a Channel Admin for channel "{}" + + + + You are now marked as being away. + + + + You are no longer marked as away. + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + + + + That account doesn't currently exist. + + + + You cannot ban administrators. + + + + Audible notification on. + + + + Channel Arranged Teams is a RESTRICTED Channel! + + + + Max channel name length exceeded (max {} symbols) + + + + Command disabled while inside a game. + + + + Currently accessible channels: + + + + All current channels: + + + + Current channels of type {} + + + + -----------name----------- users ----admin/operator---- + + + + Only admins may change passwords for other accounts. + + + + Account does not exist. + + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + + + + Unable to set password. + + + + Message was sent to all currently available clan members. + + + + All fellow members of your clan are currently offline. + + + + Clan channel is opened up! + + + + Clan channel has already been opened up! + + + + Clan channel is closed! + + + + Clan channel has already been closed! + + + + Clan message of day is updated! + + + + User {} was invited to your clan! + + + + You are invited to {} by {}! + + + + User {} is not online or is already member of clan! + + + + This is one-way action! If you really want + + + + to disband your clan, type /clan disband yes + + + + Your clan was disbanded. + + + + You have been invited to {} + + + + You are now a clan member of {} + + + + Clan {} was be created + + + + You are no longer ivited to {} + + + + You are already in clan "{}" + + + + Clan with your specified &lt;clantag&gt; already exist! + + + + Please choice another one. + + + + Clan {} is created! + + + + Clan {} is pre-created, please invite + + + + at least {} players to your clan by using + + + + /clan invite &lt;username&gt; command. + + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + + + + Got bad group: {} + + + + Groups {} has been added to {} + + + + Groups {} has been deleted from {} + + + + Got unknown command: {} + + + + This command is only enabled for admins. + + + + Current connections: + + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + + + + Unknown option. + + + + (none) + + + + none + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + + + + {} has been demoted from a Channel Admin. + + + + {} has demoted you from a Channel Admin of channel "{}" + + + + {} has been demoted from a Channel Operator + + + + {} has demoted you from a Channel Operator of channel "{}" + + + + {} has been demoted from a tempOP of this channel + + + + {} has demoted you from a tmpOP of channel "{}" + + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + + + + {} has removed you from VOP list of channel "{}" + + + + You must be at least Channel Admin to remove {} from the VOP list + + + + Voice has been taken from {} in this channel + + + + {} has taken your Voice in channel "{}" + + + + {} has no Voice in this channel, so it can't be taken away + + + + Do Not Disturb mode engaged. + + + + Not available + + + + Do Not Disturb mode canceled. + + + + -- name -- similar to {} + + + + Invalid user. + + + + Login: {} {} Sex: {} + + + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Location: {} Age: {} + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Yes + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + + + Flags set to {}. + + + + That user does not exist. + + + + Server error. + + + + You can't add yourself to your friends list. + + + + You can only have a maximum of {} friends. + + + + {} is already on your friends list! + + + + Added {} to your friends list. + + + + {} added you to his/her friends list. + + + + All of your friends are offline. + + + + {} was not found on your friends list. + + + + Removed {} from your friends list. + + + + Promoted {} in your friends list. + + + + Demoted {} in your friends list. + + + + Your {} - Friends List + + + + Your {} - Online Friends List + + + + , offline + + + + using {} + + + + , in game "{}" + + + + , in game AT Preparation + + + + , in channel "{}", + + + + , is in AT Preparation + + + + , is in a game + + + + , is in a chat channel + + + + End of Friends List + + + + You are not in a game. + + + + That game does not exist. + + + + Name: {} ID: {} ({}) + + + + none + + + + unknown + + + + Owner: {} + + + + Address: {} + + + + Address: {} (trans {}) + + + + Client: {} (version {}, startver {}) + + + + Created: {} + + + + Started: {} + + + + Status: {} + + + + Type: {} + + + + Speed: {} + + + + Difficulty: {} + + + + Option: {} + + + + Map: {} + + + + Map Size: {}x{} + + + + Map Tileset: {} + + + + Map Type: {} + + + + Players: {} current, {} total, {} max + + + + Description: {} + + + + Currently accessible games: + + + + All current games: + + + + Games in lobby: + + + + Current games of type {} + + + + Current games of type {} {} + + + + ------name------ p -status- --------type--------- count + + + + ctag + + + + --------addr-------- + + + + Warning: That user is not online, using last known address. + + + + Sorry, no IP address could be retrieved. + + + + Scanning online users for IP {}... + + + + There are no online users with that IP address + + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + + + + That user is not logged in. + + + + That user is not in this channel. + + + + That connection doesn't exist. + + + + That user is not logged in? + + + + An admin has closed your connection and banned your IP address. + + + + Connection closed by admin. + + + + Operation successful. + + + + That is not a valid session. + + + + That session does not exist. + + + + Connection closed by admin and banned your IP's. + + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + + + + Example: /ladderinfo 1 STAR + + + + Invalid user. + + + + Account {} is now locked + + + + Your account has just been locked + + + + This command can only be used inside a channel. + + + + Banned users: + + + + You are not in a channel. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + + + + Channel is now unmoderated. + + + + Channel is now moderated. + + + + Unable to open motd. + + + + No motd. + + + + Invalid user. + + + + Account {} is now muted + + + + Your account has just been muted + + + + That user is not logged on. + + + + Address information for other users is only available to admins. + + + + Server TCP: {} (bind {}) + + + + Client TCP: {} + + + + Client UDP: {} + + + + Client UDP: {} (trans {}) + + + + Game UDP: {} + + + + Game UDP: {} (trans {}) + + + + Game UDP: none + + + + Audible notification off. + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + {} is already a Channel Operator + + + + {} has been promoted to a Channel Operator + + + + {} has promoted you to a Channel Operator in channel "{}" + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to a tempOP + + + + {} has promoted you to a tempOP in this channel + + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + + + + {} has been promoted to a Server Operator + + + + {} has promoted you to a Server Operator + + + + {} is no Server Operator, so you can't demote him + + + + {} has been demoted from a Server Operator + + + + {} latency: {} + + + + Your latency {} + + + + {} latency () + + + + Invalid user. + + + + Connection closed. + + + + Your quota allows you to write {} line(s) per {} second(s). + + + + Long lines will be wrapped every {} characters. + + + + You are not allowed to send lines with more than {} characters. + + + + You must join a realm first + + + + Announcement from {}@{}: {} + + + + Invalid mode. + + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + + + + Pending changes has been saved into the database. + + + + That user is not logged on. + + + + Banning {} who is using IP address {} + + + + User's account is also LOCKED! Only an admin can unlock it! + + + + /ipban a {} + + + + You have been banned by Admin: {} + + + + Your account is also LOCKED! Only an admin can UNLOCK it! + + + + Access denied due to security reasons. + + + + Invalid user. + + + + Current value of {} is "{}" + + + + Value currently not set + + + + Unable to set key for + + + + Key set successfully for + + + + Invalid delay. + + + + You've initialized the shutdown sequence. + + + + You've canceled the shutdown sequence. + + + + No such user. + + + + You can't squelch yourself. + + + + Could not squelch user. + + + + {} has been squelched. + + + + Invalid user. + + + + Unable to determine client game. + + + + This game does not support win/loss records. + + + + You must supply a user name and a valid program ID. + + + + Example: /stats joe STAR + + + + {}'s record: + + + + level: {} + + + + class: {} + + + + stats: {} str {} mag {} dex {} vit {} gld + + + + Diablo kills: {} + + + + Normal games: {}-{}-{} + + + + Ladder games: {}-{}-{} (rating {}) + + + + Ladder games: 0-0-0 + + + + IronMan games: {}-{}-{} (rating {}) + + + + IronMan games: 0-0-0 + + + + {}'s Ladder Record's: + + + + Users Solo Level: {}, Experience: {} + + + + SOLO Ladder Record: {}-{}-0 + + + + SOLO Rank: {} + + + + Users Team Level: {}, Experience: {} + + + + TEAM Ladder Record: {}-{}-0 + + + + TEAM Rank: {} + + + + Users FFA Level: {}, Experience: {} + + + + FFA Ladder Record: {}-{}-0 + + + + FFA Rank: {} + + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + + + + There are currently {} users online, in {} games, and in {} channels. + + + + Client tag set to {}. + + + + Invalid clienttag {} specified + + + + Server Time: {} + + + + Your local time: {} + + + + Invalid duration. + + + + Your timer has expired. + + + + Could not set timer. + + + + Timer set for {} second(s) + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + + + + You must be at least a Channel Operator of {} to set the topic + + + + {} topic: no topic + + + + Unable to send TOS (Terms of Service). + + + + This command can only be used inside a channel. + + + + You are not a channel operator. + + + + That user is not banned. + + + + {} is no longer banned from this channel. + + + + Invalid user. + + + + Your account has just been unlocked by {} + + + + That user's account is now unlocked. + + + + Invalid user. + + + + Your account has just been unmuted by {} + + + + That user's account is now unmuted. + + + + No such user. + + + + User was not being ignored. + + + + No longer ignoring. + + + + That user does not exist. + + + + Removal from watch list failed. + + + + User {} removed from your watch list. + + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + + + + All users removed from your watch list. + + + + Uptime: {} + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + + + + {} must be on the same channel to voice him + + + + {} already has Voice in this channel + + + + {} is already an operator or admin. + + + + {} has been granted Voice in this channel + + + + {} has granted you Voice in this channel + + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + + + + {} has been added to the VOP list + + + + {} has added you to the VOP list of channel "{}" + + + + That user does not exist. + + + + Add to watch list failed. + + + + User {} added to your watch list. + + + + Add to watch list failed. + + + + All {} users added to your watch list. + + + + All users added to your watch list. + + + + That channel does not exist. + + + + (If you are trying to search for a user, use the /whois command.) + + + + You are banned from that channel. + + + + Users in channel {}: + + + + Unable to obtain your account name. + + + + (invalid date) + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + + + + You cannot kick operators. + + + + {} has been kicked by {} ({}). + + + + {} has been kicked by {}. + + + + You cannot ban operators. + + + + Unable to ban {}. + + + + {} has been banned by {} ({}). + + + + {} has been banned by {}. + + + + Password for account {} updated. + + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + + + + That user is not logged on. + + + + {} is unavailable ({}) + + + + {} is away ({}) + + + + Unknown user. + + + + User was last seen on: {} + + + + User is offline + + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + + + + {} {} using {} and {} currently in channel "{}". + + + + {} {} using {}. + + + + {} {} refusing messages ({}) + + + + {} away ({}) + + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + + + + This command has been deactivated + + + + This command is reserved for admins. + + + + Unknown command. + + + + This account has been locked + + + + This account has been locked + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + + + + Bad icon. + + + + {} banned permamently by {}. + + + + {} banned permamently. + + + + {} banned for {} by {}. + + + + {} banned for {}. + + + + Banning only for: {} minutes. + + + + This server has NO mail support. + + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + + + + Successfully deleted messages. + + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + + + + Succesfully deleted message. + + + + You have no mail. + + + + There was an error completing your request. + + + + Receiver UNKNOWN! + + + + Receiver has reached his mail quota. Your message will NOT be sent. + + + + Your mail has been sent successfully. + + + + There was an error completing your request! + + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + + + + Quiz is not running. + + + + {}'s Quiz record: + + + + {} has never played Quiz. + + + + Top {} Quiz records: + + + + points + + + + This command is reserved for admins. + + + + User "{}" is offline + + + + \ No newline at end of file diff --git a/conf/i18n/ruRU/newaccount.txt.in b/conf/i18n/ruRU/newaccount.txt.in new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/ruRU/newaccount.txt.in @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ From 9fa8161126857f4aeb0edaf4868f325a11f1832e Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Mon, 30 Jun 2014 14:27:03 +0400 Subject: [PATCH 070/144] update localization scripts according to a new directory structure --- scripts/localize/pvpgn_localize_validator.cs | 2 +- scripts/localize/pvpgn_localize_validator.exe | Bin 9216 -> 9216 bytes scripts/localize/update.bat | 23 +++++++++--------- scripts/localize/validate.bat | 23 +++++++++--------- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/scripts/localize/pvpgn_localize_validator.cs b/scripts/localize/pvpgn_localize_validator.cs index 6535eafa3..123db3e12 100644 --- a/scripts/localize/pvpgn_localize_validator.cs +++ b/scripts/localize/pvpgn_localize_validator.cs @@ -57,7 +57,7 @@ static void process_file(string filename) } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine("[ERROR] " + e.Message); } } diff --git a/scripts/localize/pvpgn_localize_validator.exe b/scripts/localize/pvpgn_localize_validator.exe index 4f1f7a3b3f1d8764676718c56f972c6c0966ec4c..be6e52aac69964af667e9d45b2c0c3a949d9fc94 100644 GIT binary patch delta 1332 zcmY+EZERCj7{~w5y}hTe6uRz>Zr$3oj_#%1tBhqTn;TG!y19xQ0hGEeW4Nr%?L;PK z9g-LZ3sR59s4;A4V)g|?YGPdCLXrh3c2EIl|#xgn#g~l3{j2GYu67eNPFz5dcYCc zVZg)q8I6Ffvg{$BOj_Eq4Qz9$DWh?U6#E>hCPvhy>N7k)A~<-X^+Ct`|2srPV}G;F zYPQi@RbOYHUacZM&&#qznmJbFAp=GrF|V*O>M8w4*jQ$wkRB~aQQ4t|nWI`=SCq#t za8S#gOy-TbKBKks4{2Z;C4W8e1-l3VmJX zMfanB@^eG;z&I~$n)ee*%<5A!lNsZ~Y&wDKhW|hUZ*K$mkI=pY`v z`4seq3+huuV8h9xx`rt1_{LOkRBoUXPRtggIJ7o$;#5&3S-J3fQGLK_3l@v&2Ucz@ zI|@N7$HjYc%Kn1a&wD34K>4HnPId#Tb{9c19_PUg^;v9St1wt92H09F;uL1}H9U0F zGQyUy$S`AKo*HP7$E=`TJx>a6Y!_mvLcJ2h8N9=E;xfhHg^l|m)81sV!?g6ES&3!Q zZ<-P&58+83`VvksGdROMg(amA{j{5sCdW*kHo0OFWOxH6drclSc@HymlFrau^dU)n zgf$G3Wx>34#>+1jx$b;A+{I@C{E-yw!!7LRdIZOf8wxz~RBHU?>50c6pYc`Z_quLb zM1N{#EIFI6_l!~gY{_9|o97VrV3>b{T#q1-|E2UfJ|+m1{Ow)56M16slk!*pcqRC) zj91(h8WgwNo!?#ALfdNzzW!8tPM?}QHXHbAH4sng>A8`lF0%FyS1*#`f>h3|e^TPyqPIOT&rE0ru2vyCzBiqQ|`g5}C`cP>~eU#yyz z?&=f%UcQ?5%guh^x57qEQ?Fd9zC_Ei&mW@K U!>YZtko~T8=RI}5Q?Awe9}l6b#Ihg=kO^14R^kk|OPc2=>9g6$C%dOje;0^n!;=vg2xTa|8km^$d9 zyue(O%QT)W@DjV_xGT``T{~ce0bmtHFxcW%i}v6X#ZDfIU5p;TT0W|vWC-4{OMlXF>3@eXH1>D9b!Y5(S}osZ zU)igoRN+uuMq2*uN>I0qYi-Q!T03)6Ym0XC8C72Es@O18Af554<$(N9YoYyemHANK z)7m>TJW=f*5RpS(J#xsWD^7S@eoeP-yhRTC(;>xO%*akLK)v!s(G@m%jjufKLP@{O zX_IR7$@fLfbBirEMWlRNekHQcJ#qo53UHJonB+85`LpGdr>AD^PrK#=R&4*lJW2t8 zAEfpi9NooZmBlT&RUe{0>x@p+uwA>WgfJvbAuui%+*_NXnn^*-IQ-1v1I?7{?$pA? zHhcRT-bE8s+)Hh!>qziD4)8tNzRzL6jZ<~Ch8}qErK8@Cu44c`OxJf&wKVxqtg9oe z{5V%v*H|^+d|iFdsu9<`8=FRt2`T41FNHU8?t~{OfAc(CXeIlgAnvLMunxDd*&w#D zH7a&eJF9OHr2DRYY)Ob2W`~%kPRj9|C2Ua_N#T?RkwFYeC4;x{4%3GZD1$H*eor~} zw8MVKGK9@+AF(a3a!J_BCa{h98m5`Em}9CVG@)3brUOdg zljn6U)PH36ooxKCWNvYtxOC)GOEtW(2Sy}IqFPRlc~m{Q2ftFbrb z{pMlW7(bUVxmf;dKa2ps+jU=Wrd*1DL|5dFM2b$yR}%lIIfUd?OV(Ox*{8~33V66U Q?B7c@YX#f>pqi=w3kFNt*8l(j diff --git a/scripts/localize/update.bat b/scripts/localize/update.bat index fd2f0f0d2..552db1388 100644 --- a/scripts/localize/update.bat +++ b/scripts/localize/update.bat @@ -1,15 +1,16 @@ @echo off -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-deDE.xml.in -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-csCZ.xml.in -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-esES.xml.in -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-frFR.xml.in -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-itIT.xml.in -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-jaJA.xml.in -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-koKR.xml.in -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-plPL.xml.in -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-ruRU.xml.in -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-zhCN.xml.in -pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common-zhTW.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\common.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\deDE\common.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\csCZ\common.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\esES\common.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\frFR\common.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\itIT\common.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\jaJA\common.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\koKR\common.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\plPL\common.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\ruRU\common.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\zhCN\common.xml.in +pvpgn_localize_generator.exe ..\..\ ..\..\conf\i18n\zhTW\common.xml.in pause \ No newline at end of file diff --git a/scripts/localize/validate.bat b/scripts/localize/validate.bat index b2e2cdb65..52a25e008 100644 --- a/scripts/localize/validate.bat +++ b/scripts/localize/validate.bat @@ -1,15 +1,16 @@ @echo off -pvpgn_localize_validator.exe ..\..\conf\i18n\common-deDE.xml.in -pvpgn_localize_validator.exe ..\..\conf\i18n\common-csCZ.xml.in -pvpgn_localize_validator.exe ..\..\conf\i18n\common-esES.xml.in -pvpgn_localize_validator.exe ..\..\conf\i18n\common-frFR.xml.in -pvpgn_localize_validator.exe ..\..\conf\i18n\common-itIT.xml.in -pvpgn_localize_validator.exe ..\..\conf\i18n\common-jaJA.xml.in -pvpgn_localize_validator.exe ..\..\conf\i18n\common-koKR.xml.in -pvpgn_localize_validator.exe ..\..\conf\i18n\common-plPL.xml.in -pvpgn_localize_validator.exe ..\..\conf\i18n\common-ruRU.xml.in -pvpgn_localize_validator.exe ..\..\conf\i18n\common-zhCN.xml.in -pvpgn_localize_validator.exe ..\..\conf\i18n\common-zhTW.xml.in + +pvpgn_localize_validator.exe ..\..\conf\i18n\deDE\common.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\csCZ\common.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\esES\common.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\frFR\common.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\itIT\common.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\jaJA\common.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\koKR\common.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\plPL\common.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\ruRU\common.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\zhCN\common.xml.in +pvpgn_localize_validator.exe ..\..\conf\i18n\zhTW\common.xml.in pause \ No newline at end of file From f6096d834c237dac65b306c0d22e2840844a68e3 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Mon, 30 Jun 2014 22:45:16 +0400 Subject: [PATCH 071/144] remove reduntant *.in extension, add news.txt --- conf/i18n/bgBG/{bnmotd.txt.in => bnmotd.txt} | 0 conf/i18n/{bnhelp.conf.in => bnhelp.conf} | 0 conf/i18n/{bnmotd.txt.in => bnmotd.txt} | 0 ...chathelp-war3.txt.in => chathelp-war3.txt} | 0 conf/i18n/{common.xml.in => common.xml} | 0 .../i18n/csCZ/{bnhelp.conf.in => bnhelp.conf} | 0 conf/i18n/csCZ/{bnmotd.txt.in => bnmotd.txt} | 0 ...chathelp-war3.txt.in => chathelp-war3.txt} | 0 conf/i18n/csCZ/{common.xml.in => common.xml} | 0 .../{newaccount.txt.in => newaccount.txt} | 0 .../i18n/deDE/{bnhelp.conf.in => bnhelp.conf} | 0 conf/i18n/deDE/{bnmotd.txt.in => bnmotd.txt} | 0 ...chathelp-war3.txt.in => chathelp-war3.txt} | 0 conf/i18n/deDE/{common.xml.in => common.xml} | 0 .../{newaccount.txt.in => newaccount.txt} | 0 .../i18n/esES/{bnhelp.conf.in => bnhelp.conf} | 0 conf/i18n/esES/{bnmotd.txt.in => bnmotd.txt} | 0 ...chathelp-war3.txt.in => chathelp-war3.txt} | 0 conf/i18n/esES/{common.xml.in => common.xml} | 0 .../{newaccount.txt.in => newaccount.txt} | 0 .../i18n/frFR/{bnhelp.conf.in => bnhelp.conf} | 0 conf/i18n/frFR/{bnmotd.txt.in => bnmotd.txt} | 0 ...chathelp-war3.txt.in => chathelp-war3.txt} | 0 conf/i18n/frFR/{common.xml.in => common.xml} | 0 .../{newaccount.txt.in => newaccount.txt} | 0 .../i18n/itIT/{bnhelp.conf.in => bnhelp.conf} | 0 conf/i18n/itIT/{bnmotd.txt.in => bnmotd.txt} | 0 ...chathelp-war3.txt.in => chathelp-war3.txt} | 0 conf/i18n/itIT/{common.xml.in => common.xml} | 0 .../{newaccount.txt.in => newaccount.txt} | 0 .../i18n/jpJA/{bnhelp.conf.in => bnhelp.conf} | 0 conf/i18n/jpJA/{bnmotd.txt.in => bnmotd.txt} | 0 ...chathelp-war3.txt.in => chathelp-war3.txt} | 0 conf/i18n/jpJA/{common.xml.in => common.xml} | 0 .../{newaccount.txt.in => newaccount.txt} | 0 conf/i18n/koKR/{bnmotd.txt.in => bnmotd.txt} | 0 .../{newaccount.txt.in => newaccount.txt} | 0 conf/i18n/news.txt | 32 +++++++++++++++++++ conf/i18n/nlNL/{bnmotd.txt.in => bnmotd.txt} | 0 .../i18n/plPL/{bnhelp.conf.in => bnhelp.conf} | 0 conf/i18n/plPL/{bnmotd.txt.in => bnmotd.txt} | 0 ...chathelp-war3.txt.in => chathelp-war3.txt} | 0 conf/i18n/plPL/{common.xml.in => common.xml} | 0 .../{newaccount.txt.in => newaccount.txt} | 0 conf/i18n/ptBR/{bnmotd.txt.in => bnmotd.txt} | 0 .../i18n/ruRU/{bnhelp.conf.in => bnhelp.conf} | 0 conf/i18n/ruRU/{bnmotd.txt.in => bnmotd.txt} | 0 ...chathelp-war3.txt.in => chathelp-war3.txt} | 0 conf/i18n/ruRU/{common.xml.in => common.xml} | 0 .../{newaccount.txt.in => newaccount.txt} | 0 conf/i18n/svSE/{bnmotd.txt.in => bnmotd.txt} | 0 conf/i18n/zhCN/{bnmotd.txt.in => bnmotd.txt} | 0 ...chathelp-war3.txt.in => chathelp-war3.txt} | 0 conf/i18n/zhTW/{bnmotd.txt.in => bnmotd.txt} | 0 54 files changed, 32 insertions(+) rename conf/i18n/bgBG/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/{bnhelp.conf.in => bnhelp.conf} (100%) rename conf/i18n/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/{chathelp-war3.txt.in => chathelp-war3.txt} (100%) rename conf/i18n/{common.xml.in => common.xml} (100%) rename conf/i18n/csCZ/{bnhelp.conf.in => bnhelp.conf} (100%) rename conf/i18n/csCZ/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/csCZ/{chathelp-war3.txt.in => chathelp-war3.txt} (100%) rename conf/i18n/csCZ/{common.xml.in => common.xml} (100%) rename conf/i18n/csCZ/{newaccount.txt.in => newaccount.txt} (100%) rename conf/i18n/deDE/{bnhelp.conf.in => bnhelp.conf} (100%) rename conf/i18n/deDE/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/deDE/{chathelp-war3.txt.in => chathelp-war3.txt} (100%) rename conf/i18n/deDE/{common.xml.in => common.xml} (100%) rename conf/i18n/deDE/{newaccount.txt.in => newaccount.txt} (100%) rename conf/i18n/esES/{bnhelp.conf.in => bnhelp.conf} (100%) rename conf/i18n/esES/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/esES/{chathelp-war3.txt.in => chathelp-war3.txt} (100%) rename conf/i18n/esES/{common.xml.in => common.xml} (100%) rename conf/i18n/esES/{newaccount.txt.in => newaccount.txt} (100%) rename conf/i18n/frFR/{bnhelp.conf.in => bnhelp.conf} (100%) rename conf/i18n/frFR/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/frFR/{chathelp-war3.txt.in => chathelp-war3.txt} (100%) rename conf/i18n/frFR/{common.xml.in => common.xml} (100%) rename conf/i18n/frFR/{newaccount.txt.in => newaccount.txt} (100%) rename conf/i18n/itIT/{bnhelp.conf.in => bnhelp.conf} (100%) rename conf/i18n/itIT/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/itIT/{chathelp-war3.txt.in => chathelp-war3.txt} (100%) rename conf/i18n/itIT/{common.xml.in => common.xml} (100%) rename conf/i18n/itIT/{newaccount.txt.in => newaccount.txt} (100%) rename conf/i18n/jpJA/{bnhelp.conf.in => bnhelp.conf} (100%) rename conf/i18n/jpJA/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/jpJA/{chathelp-war3.txt.in => chathelp-war3.txt} (100%) rename conf/i18n/jpJA/{common.xml.in => common.xml} (100%) rename conf/i18n/jpJA/{newaccount.txt.in => newaccount.txt} (100%) rename conf/i18n/koKR/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/{newaccount.txt.in => newaccount.txt} (100%) create mode 100644 conf/i18n/news.txt rename conf/i18n/nlNL/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/plPL/{bnhelp.conf.in => bnhelp.conf} (100%) rename conf/i18n/plPL/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/plPL/{chathelp-war3.txt.in => chathelp-war3.txt} (100%) rename conf/i18n/plPL/{common.xml.in => common.xml} (100%) rename conf/i18n/plPL/{newaccount.txt.in => newaccount.txt} (100%) rename conf/i18n/ptBR/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/ruRU/{bnhelp.conf.in => bnhelp.conf} (100%) rename conf/i18n/ruRU/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/ruRU/{chathelp-war3.txt.in => chathelp-war3.txt} (100%) rename conf/i18n/ruRU/{common.xml.in => common.xml} (100%) rename conf/i18n/ruRU/{newaccount.txt.in => newaccount.txt} (100%) rename conf/i18n/svSE/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/zhCN/{bnmotd.txt.in => bnmotd.txt} (100%) rename conf/i18n/zhCN/{chathelp-war3.txt.in => chathelp-war3.txt} (100%) rename conf/i18n/zhTW/{bnmotd.txt.in => bnmotd.txt} (100%) diff --git a/conf/i18n/bgBG/bnmotd.txt.in b/conf/i18n/bgBG/bnmotd.txt similarity index 100% rename from conf/i18n/bgBG/bnmotd.txt.in rename to conf/i18n/bgBG/bnmotd.txt diff --git a/conf/i18n/bnhelp.conf.in b/conf/i18n/bnhelp.conf similarity index 100% rename from conf/i18n/bnhelp.conf.in rename to conf/i18n/bnhelp.conf diff --git a/conf/i18n/bnmotd.txt.in b/conf/i18n/bnmotd.txt similarity index 100% rename from conf/i18n/bnmotd.txt.in rename to conf/i18n/bnmotd.txt diff --git a/conf/i18n/chathelp-war3.txt.in b/conf/i18n/chathelp-war3.txt similarity index 100% rename from conf/i18n/chathelp-war3.txt.in rename to conf/i18n/chathelp-war3.txt diff --git a/conf/i18n/common.xml.in b/conf/i18n/common.xml similarity index 100% rename from conf/i18n/common.xml.in rename to conf/i18n/common.xml diff --git a/conf/i18n/csCZ/bnhelp.conf.in b/conf/i18n/csCZ/bnhelp.conf similarity index 100% rename from conf/i18n/csCZ/bnhelp.conf.in rename to conf/i18n/csCZ/bnhelp.conf diff --git a/conf/i18n/csCZ/bnmotd.txt.in b/conf/i18n/csCZ/bnmotd.txt similarity index 100% rename from conf/i18n/csCZ/bnmotd.txt.in rename to conf/i18n/csCZ/bnmotd.txt diff --git a/conf/i18n/csCZ/chathelp-war3.txt.in b/conf/i18n/csCZ/chathelp-war3.txt similarity index 100% rename from conf/i18n/csCZ/chathelp-war3.txt.in rename to conf/i18n/csCZ/chathelp-war3.txt diff --git a/conf/i18n/csCZ/common.xml.in b/conf/i18n/csCZ/common.xml similarity index 100% rename from conf/i18n/csCZ/common.xml.in rename to conf/i18n/csCZ/common.xml diff --git a/conf/i18n/csCZ/newaccount.txt.in b/conf/i18n/csCZ/newaccount.txt similarity index 100% rename from conf/i18n/csCZ/newaccount.txt.in rename to conf/i18n/csCZ/newaccount.txt diff --git a/conf/i18n/deDE/bnhelp.conf.in b/conf/i18n/deDE/bnhelp.conf similarity index 100% rename from conf/i18n/deDE/bnhelp.conf.in rename to conf/i18n/deDE/bnhelp.conf diff --git a/conf/i18n/deDE/bnmotd.txt.in b/conf/i18n/deDE/bnmotd.txt similarity index 100% rename from conf/i18n/deDE/bnmotd.txt.in rename to conf/i18n/deDE/bnmotd.txt diff --git a/conf/i18n/deDE/chathelp-war3.txt.in b/conf/i18n/deDE/chathelp-war3.txt similarity index 100% rename from conf/i18n/deDE/chathelp-war3.txt.in rename to conf/i18n/deDE/chathelp-war3.txt diff --git a/conf/i18n/deDE/common.xml.in b/conf/i18n/deDE/common.xml similarity index 100% rename from conf/i18n/deDE/common.xml.in rename to conf/i18n/deDE/common.xml diff --git a/conf/i18n/deDE/newaccount.txt.in b/conf/i18n/deDE/newaccount.txt similarity index 100% rename from conf/i18n/deDE/newaccount.txt.in rename to conf/i18n/deDE/newaccount.txt diff --git a/conf/i18n/esES/bnhelp.conf.in b/conf/i18n/esES/bnhelp.conf similarity index 100% rename from conf/i18n/esES/bnhelp.conf.in rename to conf/i18n/esES/bnhelp.conf diff --git a/conf/i18n/esES/bnmotd.txt.in b/conf/i18n/esES/bnmotd.txt similarity index 100% rename from conf/i18n/esES/bnmotd.txt.in rename to conf/i18n/esES/bnmotd.txt diff --git a/conf/i18n/esES/chathelp-war3.txt.in b/conf/i18n/esES/chathelp-war3.txt similarity index 100% rename from conf/i18n/esES/chathelp-war3.txt.in rename to conf/i18n/esES/chathelp-war3.txt diff --git a/conf/i18n/esES/common.xml.in b/conf/i18n/esES/common.xml similarity index 100% rename from conf/i18n/esES/common.xml.in rename to conf/i18n/esES/common.xml diff --git a/conf/i18n/esES/newaccount.txt.in b/conf/i18n/esES/newaccount.txt similarity index 100% rename from conf/i18n/esES/newaccount.txt.in rename to conf/i18n/esES/newaccount.txt diff --git a/conf/i18n/frFR/bnhelp.conf.in b/conf/i18n/frFR/bnhelp.conf similarity index 100% rename from conf/i18n/frFR/bnhelp.conf.in rename to conf/i18n/frFR/bnhelp.conf diff --git a/conf/i18n/frFR/bnmotd.txt.in b/conf/i18n/frFR/bnmotd.txt similarity index 100% rename from conf/i18n/frFR/bnmotd.txt.in rename to conf/i18n/frFR/bnmotd.txt diff --git a/conf/i18n/frFR/chathelp-war3.txt.in b/conf/i18n/frFR/chathelp-war3.txt similarity index 100% rename from conf/i18n/frFR/chathelp-war3.txt.in rename to conf/i18n/frFR/chathelp-war3.txt diff --git a/conf/i18n/frFR/common.xml.in b/conf/i18n/frFR/common.xml similarity index 100% rename from conf/i18n/frFR/common.xml.in rename to conf/i18n/frFR/common.xml diff --git a/conf/i18n/frFR/newaccount.txt.in b/conf/i18n/frFR/newaccount.txt similarity index 100% rename from conf/i18n/frFR/newaccount.txt.in rename to conf/i18n/frFR/newaccount.txt diff --git a/conf/i18n/itIT/bnhelp.conf.in b/conf/i18n/itIT/bnhelp.conf similarity index 100% rename from conf/i18n/itIT/bnhelp.conf.in rename to conf/i18n/itIT/bnhelp.conf diff --git a/conf/i18n/itIT/bnmotd.txt.in b/conf/i18n/itIT/bnmotd.txt similarity index 100% rename from conf/i18n/itIT/bnmotd.txt.in rename to conf/i18n/itIT/bnmotd.txt diff --git a/conf/i18n/itIT/chathelp-war3.txt.in b/conf/i18n/itIT/chathelp-war3.txt similarity index 100% rename from conf/i18n/itIT/chathelp-war3.txt.in rename to conf/i18n/itIT/chathelp-war3.txt diff --git a/conf/i18n/itIT/common.xml.in b/conf/i18n/itIT/common.xml similarity index 100% rename from conf/i18n/itIT/common.xml.in rename to conf/i18n/itIT/common.xml diff --git a/conf/i18n/itIT/newaccount.txt.in b/conf/i18n/itIT/newaccount.txt similarity index 100% rename from conf/i18n/itIT/newaccount.txt.in rename to conf/i18n/itIT/newaccount.txt diff --git a/conf/i18n/jpJA/bnhelp.conf.in b/conf/i18n/jpJA/bnhelp.conf similarity index 100% rename from conf/i18n/jpJA/bnhelp.conf.in rename to conf/i18n/jpJA/bnhelp.conf diff --git a/conf/i18n/jpJA/bnmotd.txt.in b/conf/i18n/jpJA/bnmotd.txt similarity index 100% rename from conf/i18n/jpJA/bnmotd.txt.in rename to conf/i18n/jpJA/bnmotd.txt diff --git a/conf/i18n/jpJA/chathelp-war3.txt.in b/conf/i18n/jpJA/chathelp-war3.txt similarity index 100% rename from conf/i18n/jpJA/chathelp-war3.txt.in rename to conf/i18n/jpJA/chathelp-war3.txt diff --git a/conf/i18n/jpJA/common.xml.in b/conf/i18n/jpJA/common.xml similarity index 100% rename from conf/i18n/jpJA/common.xml.in rename to conf/i18n/jpJA/common.xml diff --git a/conf/i18n/jpJA/newaccount.txt.in b/conf/i18n/jpJA/newaccount.txt similarity index 100% rename from conf/i18n/jpJA/newaccount.txt.in rename to conf/i18n/jpJA/newaccount.txt diff --git a/conf/i18n/koKR/bnmotd.txt.in b/conf/i18n/koKR/bnmotd.txt similarity index 100% rename from conf/i18n/koKR/bnmotd.txt.in rename to conf/i18n/koKR/bnmotd.txt diff --git a/conf/i18n/newaccount.txt.in b/conf/i18n/newaccount.txt similarity index 100% rename from conf/i18n/newaccount.txt.in rename to conf/i18n/newaccount.txt diff --git a/conf/i18n/news.txt b/conf/i18n/news.txt new file mode 100644 index 000000000..1d1310ead --- /dev/null +++ b/conf/i18n/news.txt @@ -0,0 +1,32 @@ +{03/28/2014} +(edit this text in conf/news.txt) + + +Note that Warcraft 3 client caches news in bncache.dat +(remove the file on the client side before login to see the changes immediately) + + +New support channel at: +http://pvpgn.pro + + +{10/01/2004} +Welcome To The Player-vs-Player Gaming Network! +Bringing Emulation To New Levels! + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-= + +** IF YOU EXPERIENCE PROBLEMS USING THIS SERVER PLEASE REPORT IT TO THE ** +********* ADMINISTRATOR OF THE SERVER NOT TO THE PVPGN TEAM ************ + +Project development homepage: http://pvpgn.berlios.de + +Support channels (ONLY for the admins): +======================================== + +1. Forums: http://forums.pvpgn.org + +2. IRC live support: #pvpgn on irc.pvpgn.org + +Enjoy! +The PvPGN Team diff --git a/conf/i18n/nlNL/bnmotd.txt.in b/conf/i18n/nlNL/bnmotd.txt similarity index 100% rename from conf/i18n/nlNL/bnmotd.txt.in rename to conf/i18n/nlNL/bnmotd.txt diff --git a/conf/i18n/plPL/bnhelp.conf.in b/conf/i18n/plPL/bnhelp.conf similarity index 100% rename from conf/i18n/plPL/bnhelp.conf.in rename to conf/i18n/plPL/bnhelp.conf diff --git a/conf/i18n/plPL/bnmotd.txt.in b/conf/i18n/plPL/bnmotd.txt similarity index 100% rename from conf/i18n/plPL/bnmotd.txt.in rename to conf/i18n/plPL/bnmotd.txt diff --git a/conf/i18n/plPL/chathelp-war3.txt.in b/conf/i18n/plPL/chathelp-war3.txt similarity index 100% rename from conf/i18n/plPL/chathelp-war3.txt.in rename to conf/i18n/plPL/chathelp-war3.txt diff --git a/conf/i18n/plPL/common.xml.in b/conf/i18n/plPL/common.xml similarity index 100% rename from conf/i18n/plPL/common.xml.in rename to conf/i18n/plPL/common.xml diff --git a/conf/i18n/plPL/newaccount.txt.in b/conf/i18n/plPL/newaccount.txt similarity index 100% rename from conf/i18n/plPL/newaccount.txt.in rename to conf/i18n/plPL/newaccount.txt diff --git a/conf/i18n/ptBR/bnmotd.txt.in b/conf/i18n/ptBR/bnmotd.txt similarity index 100% rename from conf/i18n/ptBR/bnmotd.txt.in rename to conf/i18n/ptBR/bnmotd.txt diff --git a/conf/i18n/ruRU/bnhelp.conf.in b/conf/i18n/ruRU/bnhelp.conf similarity index 100% rename from conf/i18n/ruRU/bnhelp.conf.in rename to conf/i18n/ruRU/bnhelp.conf diff --git a/conf/i18n/ruRU/bnmotd.txt.in b/conf/i18n/ruRU/bnmotd.txt similarity index 100% rename from conf/i18n/ruRU/bnmotd.txt.in rename to conf/i18n/ruRU/bnmotd.txt diff --git a/conf/i18n/ruRU/chathelp-war3.txt.in b/conf/i18n/ruRU/chathelp-war3.txt similarity index 100% rename from conf/i18n/ruRU/chathelp-war3.txt.in rename to conf/i18n/ruRU/chathelp-war3.txt diff --git a/conf/i18n/ruRU/common.xml.in b/conf/i18n/ruRU/common.xml similarity index 100% rename from conf/i18n/ruRU/common.xml.in rename to conf/i18n/ruRU/common.xml diff --git a/conf/i18n/ruRU/newaccount.txt.in b/conf/i18n/ruRU/newaccount.txt similarity index 100% rename from conf/i18n/ruRU/newaccount.txt.in rename to conf/i18n/ruRU/newaccount.txt diff --git a/conf/i18n/svSE/bnmotd.txt.in b/conf/i18n/svSE/bnmotd.txt similarity index 100% rename from conf/i18n/svSE/bnmotd.txt.in rename to conf/i18n/svSE/bnmotd.txt diff --git a/conf/i18n/zhCN/bnmotd.txt.in b/conf/i18n/zhCN/bnmotd.txt similarity index 100% rename from conf/i18n/zhCN/bnmotd.txt.in rename to conf/i18n/zhCN/bnmotd.txt diff --git a/conf/i18n/zhCN/chathelp-war3.txt.in b/conf/i18n/zhCN/chathelp-war3.txt similarity index 100% rename from conf/i18n/zhCN/chathelp-war3.txt.in rename to conf/i18n/zhCN/chathelp-war3.txt diff --git a/conf/i18n/zhTW/bnmotd.txt.in b/conf/i18n/zhTW/bnmotd.txt similarity index 100% rename from conf/i18n/zhTW/bnmotd.txt.in rename to conf/i18n/zhTW/bnmotd.txt From 89ba17b420512ddc611d88995f536ff041acd49e Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Mon, 30 Jun 2014 22:55:44 +0400 Subject: [PATCH 072/144] update make files, remove files (that are localized now) from old location --- conf/CMakeLists.txt | 15 +- conf/Makefile.am | 16 +- conf/bnhelp.conf.in | 615 ------------------------------- conf/bnmotd-bgBG.txt.in | 13 - conf/bnmotd-csCZ.txt.in | 14 - conf/bnmotd-deDE.txt.in | 13 - conf/bnmotd-enUS.txt.in | 13 - conf/bnmotd-esES.txt.in | 13 - conf/bnmotd-frFR.txt.in | 13 - conf/bnmotd-jpJA.txt.in | 13 - conf/bnmotd-koKR.txt.in | 13 - conf/bnmotd-nlNL.txt.in | 13 - conf/bnmotd-plPL.txt.in | 13 - conf/bnmotd-ptBR.txt.in | 13 - conf/bnmotd-ruRU.txt.in | 13 - conf/bnmotd-svSE.txt.in | 13 - conf/bnmotd-zhCN.txt.in | 13 - conf/bnmotd-zhTW.txt.in | 12 - conf/bnmotd_w3.txt.in | 12 - conf/d2server.ini | 108 ------ conf/i18n/CMakeLists.txt | 17 + conf/news.txt.in | 32 -- files/Makefile.am | 7 +- files/chathelp-war3-default.txt | 15 - files/chathelp-war3-enUS.txt | 15 - files/chathelp-war3-frFR.txt | 15 - files/chathelp-war3-ruRU.txt | 15 - files/chathelp-war3-zhCN.txt | 15 - files/newaccount-default.txt | 23 -- files/newaccount-enUS.txt | 23 -- files/termsofservice-default.txt | 23 -- files/termsofservice-enUS.txt | 23 -- files/tos-unicode_default.txt | 23 -- files/tos.txt | 23 -- files/tos_default.txt | 23 -- src/bnetd/Makefile.am | 6 +- src/common/Makefile.am | 6 +- 37 files changed, 41 insertions(+), 1224 deletions(-) delete mode 100644 conf/bnhelp.conf.in delete mode 100644 conf/bnmotd-bgBG.txt.in delete mode 100644 conf/bnmotd-csCZ.txt.in delete mode 100644 conf/bnmotd-deDE.txt.in delete mode 100644 conf/bnmotd-enUS.txt.in delete mode 100644 conf/bnmotd-esES.txt.in delete mode 100644 conf/bnmotd-frFR.txt.in delete mode 100644 conf/bnmotd-jpJA.txt.in delete mode 100644 conf/bnmotd-koKR.txt.in delete mode 100644 conf/bnmotd-nlNL.txt.in delete mode 100644 conf/bnmotd-plPL.txt.in delete mode 100644 conf/bnmotd-ptBR.txt.in delete mode 100644 conf/bnmotd-ruRU.txt.in delete mode 100644 conf/bnmotd-svSE.txt.in delete mode 100644 conf/bnmotd-zhCN.txt.in delete mode 100644 conf/bnmotd-zhTW.txt.in delete mode 100644 conf/bnmotd_w3.txt.in delete mode 100644 conf/d2server.ini create mode 100644 conf/i18n/CMakeLists.txt delete mode 100644 conf/news.txt.in delete mode 100644 files/chathelp-war3-default.txt delete mode 100644 files/chathelp-war3-enUS.txt delete mode 100644 files/chathelp-war3-frFR.txt delete mode 100644 files/chathelp-war3-ruRU.txt delete mode 100644 files/chathelp-war3-zhCN.txt delete mode 100644 files/newaccount-default.txt delete mode 100644 files/newaccount-enUS.txt delete mode 100644 files/termsofservice-default.txt delete mode 100644 files/termsofservice-enUS.txt delete mode 100644 files/tos-unicode_default.txt delete mode 100644 files/tos.txt delete mode 100644 files/tos_default.txt diff --git a/conf/CMakeLists.txt b/conf/CMakeLists.txt index 811af65cf..c0cb941e2 100644 --- a/conf/CMakeLists.txt +++ b/conf/CMakeLists.txt @@ -1,11 +1,8 @@ # generate the configs with proper line endings set(OUTPUT_CONFS ad.conf anongame_infos.conf address_translation.conf autoupdate.conf bnalias.conf bnban.conf bnetd_default_user.plain - bnhelp.conf bnissue.txt bnmaps.conf bnxpcalc.conf bnmotd-enUS.txt - bnmotd-csCZ.txt bnmotd-deDE.txt bnmotd-esES.txt bnmotd-frFR.txt - bnmotd-nlNL.txt bnmotd-plPL.txt bnmotd-ruRU.txt bnmotd-zhCN.txt - bnmotd-zhTW.txt bnmotd-ptBR.txt bnmotd_w3.txt - bnxplevel.conf channel.conf command_groups.conf news.txt realm.conf + bnissue.txt bnmaps.conf bnxpcalc.conf + bnxplevel.conf channel.conf command_groups.conf realm.conf sql_DB_layout2.conf sql_DB_layout.conf supportfile.conf topics.conf tournament.conf versioncheck.conf icons.conf) foreach(CONF ${OUTPUT_CONFS}) @@ -20,10 +17,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/d2dbs.conf.in ${CMAKE_CURRENT_BINARY_ if(WITH_BNETD) set(BNETD_CONFS bnetd.conf ad.conf anongame_infos.conf address_translation.conf autoupdate.conf bnalias.conf bnban.conf - bnetd_default_user.plain bnhelp.conf bnissue.txt bnmaps.conf bnmotd-enUS.txt - bnmotd-csCZ.txt bnmotd-deDE.txt bnmotd-esES.txt bnmotd-frFR.txt bnmotd-nlNL.txt - bnmotd-plPL.txt bnmotd-ruRU.txt bnmotd-zhCN.txt bnmotd-zhTW.txt bnmotd-ptBR.txt - bnxpcalc.conf bnxplevel.conf channel.conf command_groups.conf news.txt bnmotd_w3.txt + bnetd_default_user.plain bnissue.txt bnmaps.conf + bnxpcalc.conf bnxplevel.conf channel.conf command_groups.conf realm.conf sql_DB_layout.conf sql_DB_layout2.conf supportfile.conf topics.conf tournament.conf versioncheck.conf icons.conf) @@ -45,3 +40,5 @@ endif(WITH_D2DBS) foreach(CONF_FILE ${BNETD_CONFS} ${D2CS_CONFS} ${D2DBS_CONFS}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CONF_FILE} DESTINATION ${SYSCONFDIR}) endforeach(CONF_FILE) + +add_subdirectory(i18n) \ No newline at end of file diff --git a/conf/Makefile.am b/conf/Makefile.am index 7f2c8d007..75b3c9ffd 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -1,16 +1,16 @@ if COND_BNETD bnetd_confs = bnetd.conf ad.conf anongame_infos.conf address_translation.conf \ autoupdate.conf bnalias.conf bnban.conf bnetd_default_user.cdb \ - bnetd_default_user.plain bnhelp.conf bnissue.txt bnmaps.conf \ + bnetd_default_user.plain bnissue.txt bnmaps.conf \ bnmotd.txt bnxpcalc.conf bnxplevel.conf channel.conf \ - command_groups.conf news.txt realm.conf sql_DB_layout.conf \ + command_groups.conf realm.conf sql_DB_layout.conf \ supportfile.conf topics.conf tournament.conf versioncheck.conf \ sql_DB_layout2.conf bnetd_extras = bnetd.conf.in bnetd.conf.win32 ad.conf.in anongame_infos.conf.in \ address_translation.conf.in autoupdate.conf.in bnalias.conf.in \ - bnban.conf.in bnetd_default_user.plain.in bnhelp.conf.in bnissue.txt.in \ - bnmaps.conf.in bnmotd.txt.in bnxpcalc.conf.in bnxplevel.conf.in \ - channel.conf.in command_groups.conf.in news.txt.in realm.conf.in \ + bnban.conf.in bnetd_default_user.plain.in bnissue.txt.in \ + bnmaps.conf.in bnxpcalc.conf.in bnxplevel.conf.in \ + channel.conf.in command_groups.conf.in realm.conf.in \ sql_DB_layout.conf.in supportfile.conf.in topics.conf.in \ tournament.conf.in versioncheck.conf.in sql_DB_layout2.conf.in else @@ -58,8 +58,8 @@ d2dbs.conf:d2dbs.conf.in $(top_builddir)/config.status CONFIG_CLEAN_FILES = bnetd.conf d2cs.conf d2dbs.conf ad.conf \ anongame_infos.conf address_translation.conf autoupdate.conf \ - bnalias.conf bnban.conf bnetd_default_user.plain bnhelp.conf \ - bnissue.txt bnmaps.conf bnmotd.txt bnxpcalc.conf bnxplevel.conf \ - channel.conf command_groups.conf news.txt realm.conf \ + bnalias.conf bnban.conf bnetd_default_user.plain \ + bnissue.txt bnmaps.conf bnxpcalc.conf bnxplevel.conf \ + channel.conf command_groups.conf realm.conf \ sql_DB_layout.conf supportfile.conf topics.conf tournament.conf \ versioncheck.conf sql_DB_layout2.conf diff --git a/conf/bnhelp.conf.in b/conf/bnhelp.conf.in deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/bnhelp.conf.in +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/bnmotd-bgBG.txt.in b/conf/bnmotd-bgBG.txt.in deleted file mode 100644 index c21507fb0..000000000 --- a/conf/bnmotd-bgBG.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%EЗдравей %l, добре дошъл в %s! -%IВерсията на сървъра е %v на %h. -%IТози сървър се хоства от %H -%I -%IИма %a потребителски акаунти на този сървър. -%IВ момента има %U потребители в %G игри на %N -%Iи общо %u потребители играещи общо %g игри и разговарящи в общо %c канала. -%IИмате проблем с команда? Въведете /help за да -%Iнаучите повече за нея. -%I -%I(edit this text in conf/bnmotd-bgBG.txt) -%I -%I%m \ No newline at end of file diff --git a/conf/bnmotd-csCZ.txt.in b/conf/bnmotd-csCZ.txt.in deleted file mode 100644 index 879d6f964..000000000 --- a/conf/bnmotd-csCZ.txt.in +++ /dev/null @@ -1,14 +0,0 @@ -%EAhoj %l, -%IVitej na serveru %s, verze %v. -%I -%IMomentalne je zde registrovanych %a uzivatelu, z toho je %u online, hrajicich %g hry. -%I -%I%N si muzes zahrat s %U hraci, v %G prave probihajicich hrach nebo si muzes pokecat v %c chatech. -%I -%INevis si rady ? Napis /help pro napovedu. -%I -%ITvoje IP adresa: %r, tvoje ID %i a tvuj klient %t. -%I -%I(edit this text in conf/bnmotd-csCZ.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-deDE.txt.in b/conf/bnmotd-deDE.txt.in deleted file mode 100644 index b28467b15..000000000 --- a/conf/bnmotd-deDE.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%EHallo %l, willkommen zu %s! -%ILaufende Version %v auf %h. -%IDer Server ist von %H gehostet -%I -%IEs sind %a Benutzerprofile auf dem server. -%IAktuell sind %U Spieler in %G Spielen von %N, -%Iund %u Spieler spielen %g Spiele und chatten in %c Channels. -%IEin Problem mit den Kommandos? Schreibe /help und -%Ilerne mehr über die Kommandos. -%I -%I(edit this text in conf/bnmotd-deDE.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-enUS.txt.in b/conf/bnmotd-enUS.txt.in deleted file mode 100644 index 43d8600f4..000000000 --- a/conf/bnmotd-enUS.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%EHello %l, welcome to %s! -%IRunning version %v on %h. -%IThis server is hosted by %H -%I -%IThere are %a user accounts on this server. -%IThere are currently %U users in %G games of %N, -%Iand %u users playing %g games and chatting in %c channels. -%IHaving trouble with a command? Type /help to -%Ilearn more about it. -%I -%I(edit this text in conf/bnmotd-enUS.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-esES.txt.in b/conf/bnmotd-esES.txt.in deleted file mode 100644 index de6fe58e7..000000000 --- a/conf/bnmotd-esES.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%EHola %l, bienvenido a %s! -%IEn %h se usa la versión %v -%IEste servidor es alojado por %H -%I -%IEn este servidor hay %a cuentas registradas. -%IActualmente hay %U usuarios en %G partidas de %N, -%Iy %u usuarios jugando %g partidas y conversando en %c salas. -%ITiene problemas con algun comando? Teclee "/help" para -%Iaprender más sobre los comandos. -%I -%I(edit this text in conf/bnmotd-ptBR.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-frFR.txt.in b/conf/bnmotd-frFR.txt.in deleted file mode 100644 index 974fa78b9..000000000 --- a/conf/bnmotd-frFR.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%EBonjour %l, bienvenue sur %s! -%IUtilisant la version %v sur %h. -%ICe serveur est hébergé par %H -%I -%IIl y à %a comptes utilisateur sur ce serveur. -%IIl y à en ce moment %U ultilisateurs dans %G parties de %N, -%Iainsi que %u utilisateurs jouant dans %g parties et discutant dans %c canaux. -%IUn problème avec une commande ? Tappez /help pour -%Ien savoir plus. -%I -%I(edit this text in conf/bnmotd-ptBR.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-jpJA.txt.in b/conf/bnmotd-jpJA.txt.in deleted file mode 100644 index d9db62914..000000000 --- a/conf/bnmotd-jpJA.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%E%l さん, PvPGN サーバへようこそ! -%I%h さんが %v を運用します。 -%Iこのサーバは今 %H さんがホスティング中です。 -%I -%I登録ユーザの数は %a 名です。 -%I今 %U 名のユーザさんが %N に %G 個のゲームをプレー中です。 -%Iすべては %u 名のユーザさんが %g 個のゲームをプレーします。 -%I%c 個のチャンネが生成しました。 -%Iコマンド・リストは「/help」をタイプして下さい。 -%I -%I(edit this text in conf/bnmotd-ptBR.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-koKR.txt.in b/conf/bnmotd-koKR.txt.in deleted file mode 100644 index 902c6a35d..000000000 --- a/conf/bnmotd-koKR.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%E안녕하세요 %l 님, PvPGN 서버에 오신것을 환영합니다! -%I%h 님이 %v 를 구동하고 계십니다. -%I본 서버는 %H 님이 호스팅하고 계십니다. -%I -%I현재 %a 개의 계정이 저장되어 있습니다. -%I현재 %U 명의 유저들이 %N 에서 %G 개의 게임을 즐기시고 계십니다. -%I모두 %u 명의 유저가 %g 개의 게임을 즐기고 있으며 %c 개의 채널이 있습니다. -%I명령어의 대해 궁금한 사항이 있으시다구요? -%I/help 명령어를 이용해 보세요. -%I -%I(edit this text in conf/bnmotd-ptBR.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-nlNL.txt.in b/conf/bnmotd-nlNL.txt.in deleted file mode 100644 index cbf3f506e..000000000 --- a/conf/bnmotd-nlNL.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%IHallo %l, welom bij %s! -%EWe draaien versie %v op %h. -%IDeze server wordt gehost bij %H -%I -%IEr zijn %a gebruikers accounts op deze server. -%IEr zijn momenteel %U gebruikers in %G games van %N, -%Ien %u gebruikers spelen %g spellen en chatten in %c channels. -%IProblemen met een commando? Type /help om -%Ier meer te weten over te komen. -%I -%I(edit this text in conf/bnmotd-nlNL.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-plPL.txt.in b/conf/bnmotd-plPL.txt.in deleted file mode 100644 index 818bc5383..000000000 --- a/conf/bnmotd-plPL.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%ECześć %l, witaj w %s! -%IWersja serwera %v uruchomiona na %h. -%ISerwer obsługuje %H -%I -%IDo tej pory zarejestrowaliśmy %a kont. -%IAktualnie jest %U użytkowników zalogowanych, w %G grach, z pośród %N, -%I%u użytkowników gra w %g gier, i rozmawia na %c kanałach. -%IJeśli masz jakieś problemy z poleceniami, to napiszsz /help aby -%Idowiedzieć się wiecej. -%I -%I(edit this text in conf/bnmotd-plPL.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-ptBR.txt.in b/conf/bnmotd-ptBR.txt.in deleted file mode 100644 index 527def542..000000000 --- a/conf/bnmotd-ptBR.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%EOlá %l, Bem vindo a %s! -%IRodando a versão %v em %h. -%IEste servidor é hosteado por %H -%I -%IExistem %a contas criadas nesse servidor. -%IAtuamente existe %U usuarios %G jogos de %N, -%IE %u usuários jogando %g jogos e conversando em %c canais. -%ITendo algum problema com comando? Digite /help ra -%Aprender mais sobre. -%I -%I(edit this text in conf/bnmotd-ptBR.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-ruRU.txt.in b/conf/bnmotd-ruRU.txt.in deleted file mode 100644 index 65344ea07..000000000 --- a/conf/bnmotd-ruRU.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%EПривет %l, добро пожаловать на %s! -%IВерсия сервера %v. -%IСервер расположен у %H (%h) -%I -%IНа сервере зарегистрировано %a аккаунтов. -%IСейчас %G игр и %U игроков в %N -%Iиз них %u находятся в %g играх и общаются на %c каналах. -%I -%IВведите /help для получения помощи по командам чата -%I -%I(измените этот текст в файле conf/bnmotd-ruRU.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-svSE.txt.in b/conf/bnmotd-svSE.txt.in deleted file mode 100644 index 29ded5911..000000000 --- a/conf/bnmotd-svSE.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%EHej %l, välkommen till %s! -%IKör version %v på %h. -%IVärden för den här servern är %H -%I -%IDet finns %a användarkonton på denna server. -%IDet finns förnärvarande %U användare i %G spel av %N, -%Ioch %u användare som spelar %g spel och chattar i %c kanaler. -%IHar du problem med ett kommando? Skriv /help för -%Iatt lära dig mer om det. -%I -%I(edit this text in conf/bnmotd-svSE.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-zhCN.txt.in b/conf/bnmotd-zhCN.txt.in deleted file mode 100644 index 716cccbc2..000000000 --- a/conf/bnmotd-zhCN.txt.in +++ /dev/null @@ -1,13 +0,0 @@ -%E%l,你好。欢迎来到 %s! -%I现在 %h 正在运行的版本为 %v -%I本服务器由 %H 管理维护 -%I -%I本服务器现在有 %a 个用户账号 -%I当前有 %U 人登陆到 %G 个 %N 游戏中 -%I有 %u 人在玩 %g 个游戏,以及在 %c 个频道中聊天 -%I还不了解可以使用哪些命令? -%I输入 /help 就可以学习了 -%I -%I(edit this text in conf/bnmotd-zhCB.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd-zhTW.txt.in b/conf/bnmotd-zhTW.txt.in deleted file mode 100644 index 54c5a5f9e..000000000 --- a/conf/bnmotd-zhTW.txt.in +++ /dev/null @@ -1,12 +0,0 @@ -%E哈囉! %l, 歡迎蒞臨 %s! -%I本伺服器由 %H 架設於 %h. -%I現行的伺服器版本是 %v. -%I -%I本伺服器已有 %a 個使用者帳號. -%I共有 %U 個玩家在玩 %N 的 %G 個遊戲, -%I其中有 %u 個玩家一邊在玩 %g 個遊戲一邊在 %c 個聊天頻道. -%I不懂使用指令? 請輸入 /help 來了解更多... -%I -%I(edit this text in conf/bnmotd-zhTW.txt) -%I -%M%m \ No newline at end of file diff --git a/conf/bnmotd_w3.txt.in b/conf/bnmotd_w3.txt.in deleted file mode 100644 index ba7710d61..000000000 --- a/conf/bnmotd_w3.txt.in +++ /dev/null @@ -1,12 +0,0 @@ -Welcome to the greatest PvPGN server! - -|c00FF0000Here |c00FF9933you |c0000CCFFcan |c00A8A8A8 use |c0000CC00coloured |c00FFFF00text |c009999FFas |c00FF66FFfollow|c00FFFFFF: -"|00HEXCOLOR your text here" - - - - - -(edit this text in conf/bnmotd_w3.txt) - -This text will not displayed, because there is limitation of 11 lines \ No newline at end of file diff --git a/conf/d2server.ini b/conf/d2server.ini deleted file mode 100644 index 76b3f2e4f..000000000 --- a/conf/d2server.ini +++ /dev/null @@ -1,108 +0,0 @@ -;Standard windows INI file format - -[D2GE] -DebugDumpThread=1 - -[World Event] -Enable=1 - -;update interval in seconds -UpdateInterval=30 - -;Notes: even if DC spawns in non-hell difficulty, it can only drop USC in hell difficulty -;e.g: Difficulty=normal,nightmare,hell means spawn DC in any difficulty -Difficulty=hell - -;you will be happy when SpawnMinions set to non zero... -SpawnMinions=0 - -ItemDataFile=ItemConfig.dat - -;World event trigger item config -Item=The Stone of Jordan - -;Total items needed to trigger DC is: -;[ItemRangeMin, ItemRangeMax] + (ItemNormalGameFactor * NormalGames)/100 -;+ (ItemNormalPlayerFactor * NormalPlayers)/100 + ... -;NormalGame, NormalPlayers ... all are current dyanmic count on this server -ItemRangeMin=10 -ItemRangeMax=20 - -ItemNormalGameFactor=0 -ItemNightmareGameFactor=0 -ItemHellGameFactor=100 -ItemNormalPlayerFactor=0 -ItemNightmarePlayerFactor=0 -ItemHellPlayerFactor=100 - -[Key] -Mods = code=key - -[The Stone of Jordan] -Mods = code=rin & quality=unique & prefix=122 - -[7% mf sc] -Mods = code=cm1 & quality=magical & mf=7 - -[UM Rune] -Mods = code=r22 - -[Unique or Set ring] -Mods = code=rin & quality=unique, quality=set - -[UnID unique ring or unID set amulet] -Mods = code=rin & quality=unique | code=amu & quality=set - -;Item Format: -;Logical operators: -;'|' ';' high priority OR -;'&' normal priority AND -;',' low priority OR -;e.g: -;mod1 | mod2, mod3 & mod4 = mod1 ; mod2, mod3 & mod4 = mod1 || ((mod2 || mod3) && mod4) (unsupported c like expression) -;all spaces are ignored -;any character after '/' will be treated as comment and ignored - -;Mod format: -;[mod] [<|=|>|<=|>=] [value] -;Currently supported mod list: -;Type -> item base type id -;can be found from weapons.txt armor.txt misc.txt -;notes: the ID start from 0 instead of 1 - -;code -> item code -;can be found from weapons.txt armor.txt misc.txt - -;quality -> tempered, craft,unique,set,rare,magical,superior,normal,inferior - -;prefix -> item prefix id -;actually, for unique/set/runeword items, it is the name index. -;can be found from UniqueItems.txt, SetItems.txt, Runes.txt -;notes: the ID start from 0 instead of 1 - -;ilvl -> item ilvl - -;stat[n] -> stats value -;see ItemStatCost.txt ID column - -;flag[n] -> item flag value -;see alias for common used flags - -;MPQVersion -> item version -;ItemClassic for classic item, ItemExpansion for expansion item, ItemExpansion110 for items after 1.10 - -;Common used alias -;socket = number of socket -;ethereal = [1|0] -;ear = [1|0] -;runeword = [1|0] -;broken = [1|0] -;identified = [1/0] -;personalized = [1/0] -;gems = number of gems socketed - -;unsupported now -;gem[n] = mod of certain gem -;suffix = item suffix id -;and item magical prefix/suffix, use Stat[n] to check them now -;e.g: mf=7 & code=cm1 or stat80=7 & code=cm1 means 7% mf sc diff --git a/conf/i18n/CMakeLists.txt b/conf/i18n/CMakeLists.txt new file mode 100644 index 000000000..54072366c --- /dev/null +++ b/conf/i18n/CMakeLists.txt @@ -0,0 +1,17 @@ +# copy all files from directory + +file(GLOB DEPLOY_FILES_AND_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/*") + +foreach(ITEM ${DEPLOY_FILES_AND_DIRS}) + IF( IS_DIRECTORY "${ITEM}" ) + LIST( APPEND DIRS_TO_DEPLOY "${ITEM}" ) + ELSE() + IF(NOT ${ITEM} MATCHES "CMakeLists.txt") + LIST( APPEND FILES_TO_DEPLOY "${ITEM}" ) + ENDIF(NOT ${ITEM} MATCHES "CMakeLists.txt") + ENDIF() +endforeach() + +INSTALL( FILES ${FILES_TO_DEPLOY} DESTINATION ${SYSCONFDIR}/i18n ) +INSTALL( DIRECTORY ${DIRS_TO_DEPLOY} DESTINATION ${SYSCONFDIR}/i18n ) + diff --git a/conf/news.txt.in b/conf/news.txt.in deleted file mode 100644 index 1d1310ead..000000000 --- a/conf/news.txt.in +++ /dev/null @@ -1,32 +0,0 @@ -{03/28/2014} -(edit this text in conf/news.txt) - - -Note that Warcraft 3 client caches news in bncache.dat -(remove the file on the client side before login to see the changes immediately) - - -New support channel at: -http://pvpgn.pro - - -{10/01/2004} -Welcome To The Player-vs-Player Gaming Network! -Bringing Emulation To New Levels! - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-= - -** IF YOU EXPERIENCE PROBLEMS USING THIS SERVER PLEASE REPORT IT TO THE ** -********* ADMINISTRATOR OF THE SERVER NOT TO THE PVPGN TEAM ************ - -Project development homepage: http://pvpgn.berlios.de - -Support channels (ONLY for the admins): -======================================== - -1. Forums: http://forums.pvpgn.org - -2. IRC live support: #pvpgn on irc.pvpgn.org - -Enjoy! -The PvPGN Team diff --git a/files/Makefile.am b/files/Makefile.am index 7c9183d38..177753a15 100644 --- a/files/Makefile.am +++ b/files/Makefile.am @@ -1,10 +1,7 @@ filesdir = $(localstatedir)/files dist_files_DATA = ad000001.mng ad000001.smk ad000002.mng ad000003.mng \ - ad000004.mng ad000075.mng chathelp-war3-default.txt \ - chathelp-war3-enUS.txt chathelp-war3-frFR.txt chathelp-war3-ruRU.txt \ - chathelp-war3-zhCN.txt newaccount-default.txt newaccount-enUS.txt \ - newbie.save termsofservice-default.txt termsofservice-enUS.txt \ - tos_default.txt tos-unicode_default.txt + ad000004.mng ad000075.mng \ + newbie.save usersdir = $(localstatedir)/users users_DATA = diff --git a/files/chathelp-war3-default.txt b/files/chathelp-war3-default.txt deleted file mode 100644 index 65f5dce3c..000000000 --- a/files/chathelp-war3-default.txt +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/files/chathelp-war3-enUS.txt b/files/chathelp-war3-enUS.txt deleted file mode 100644 index 65f5dce3c..000000000 --- a/files/chathelp-war3-enUS.txt +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/files/chathelp-war3-frFR.txt b/files/chathelp-war3-frFR.txt deleted file mode 100644 index 07fde45bd..000000000 --- a/files/chathelp-war3-frFR.txt +++ /dev/null @@ -1,15 +0,0 @@ -Commandes d'aides du salon de discussions de PvPGN(serveur Emulateur Bnet) - -Nouvelles commandes: - -utiliser /f pour afficher la liste d'amis -utiliser /users pour voir les utilisateur en ligne -utiliser /w ou /msg pour chuchoter a une personne -utiliser /join pour joindre un canal de discussions - -Pour les oprateurs du canal: - -utiliser /ban banni l'utilisateur du canal de discussions -utiliser /kick pour sortir un utilisateur du canal de discussions - -pour une aide plus dtaill taper: /help \ No newline at end of file diff --git a/files/chathelp-war3-ruRU.txt b/files/chathelp-war3-ruRU.txt deleted file mode 100644 index 53dff7bae..000000000 --- a/files/chathelp-war3-ruRU.txt +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -Новые команды: - -наберите /f help для вызова справки списке друзей -наберите /users для просмотра пользоватей в онлайне -наберите /w или /msg <имяпользователя> для личного сообщения -наберите /join <канал> для присоединения к каналу - -Для операторов каналов: - -наберите /ban <имяпользователя> чтобы забанить игрока на данном канале -наберите /kick <имяпользователя> чтобы выкинуть пользователя с этого канала - -Для дальнейшей помощи наберите: /help diff --git a/files/chathelp-war3-zhCN.txt b/files/chathelp-war3-zhCN.txt deleted file mode 100644 index 197ddc02f..000000000 --- a/files/chathelp-war3-zhCN.txt +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN模拟战网聊天命令帮助 - -新命令: - -使用 /f help 显示朋友命令帮助 -使用 /users 显示在线玩家数 -使用 /w 或者 /msg <玩家名称> 发送消息给玩家 -使用 /join <频道> 加入指定的频道 - -频道管理员: - -使用 /ban <玩家名称> 把玩家从该频道中踢出,并禁止玩家再次进入此频道 -使用 /kick <玩家名称> 把玩家从该频道中踢出 - -更多的帮助:输入/help diff --git a/files/newaccount-default.txt b/files/newaccount-default.txt deleted file mode 100644 index 6b53ef9b7..000000000 --- a/files/newaccount-default.txt +++ /dev/null @@ -1,23 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ - -(edit this text in var/files/newaccount-default.txt) \ No newline at end of file diff --git a/files/newaccount-enUS.txt b/files/newaccount-enUS.txt deleted file mode 100644 index d97e62951..000000000 --- a/files/newaccount-enUS.txt +++ /dev/null @@ -1,23 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ - -(edit this text in var/files/newaccount-enUS.txt) \ No newline at end of file diff --git a/files/termsofservice-default.txt b/files/termsofservice-default.txt deleted file mode 100644 index 7e8591f64..000000000 --- a/files/termsofservice-default.txt +++ /dev/null @@ -1,23 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ - -(edit this text in var/files/termsofservice-default.txt) \ No newline at end of file diff --git a/files/termsofservice-enUS.txt b/files/termsofservice-enUS.txt deleted file mode 100644 index 40dfcfc30..000000000 --- a/files/termsofservice-enUS.txt +++ /dev/null @@ -1,23 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ - -(edit this text in var/files/termsofservice-enUS.txt) \ No newline at end of file diff --git a/files/tos-unicode_default.txt b/files/tos-unicode_default.txt deleted file mode 100644 index 519ddba85..000000000 --- a/files/tos-unicode_default.txt +++ /dev/null @@ -1,23 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ - -(edit this text in var/files/tos-unicode_default.txt) \ No newline at end of file diff --git a/files/tos.txt b/files/tos.txt deleted file mode 100644 index 5fe368b03..000000000 --- a/files/tos.txt +++ /dev/null @@ -1,23 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ - -(edit this text in var/files/tos.txt) \ No newline at end of file diff --git a/files/tos_default.txt b/files/tos_default.txt deleted file mode 100644 index 452a180b9..000000000 --- a/files/tos_default.txt +++ /dev/null @@ -1,23 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ - -(edit this text in var/files/tos-defaut.txt) \ No newline at end of file diff --git a/src/bnetd/Makefile.am b/src/bnetd/Makefile.am index 299d53ebd..b7c06aca9 100644 --- a/src/bnetd/Makefile.am +++ b/src/bnetd/Makefile.am @@ -15,7 +15,8 @@ bnetd_SOURCES = account.cpp account_wrap.cpp adbanner.cpp alias_command.cpp anon storage_file.cpp storage_sql.cpp support.cpp team.cpp tick.cpp timer.cpp topic.cpp \ tournament.cpp tracker.cpp udptest_send.cpp versioncheck.cpp watch.cpp \ storage_sql2.cpp sql_common.cpp handle_wol.cpp handle_irc_common.cpp handle_apireg.cpp \ - handle_wserv.cpp luafunctions.cpp luainterface.cpp luaobjects.cpp luawrapper.cpp + handle_wserv.cpp luafunctions.cpp luainterface.cpp luaobjects.cpp luawrapper.cpp \ + i18n.cpp icons.cpp bnetd_LDADD = $(top_builddir)/src/common/libcommon.a \ $(top_builddir)/src/compat/libcompat.a \ @@ -35,4 +36,5 @@ noinst_HEADERS = account.h account_wrap.h adbanner.h alias_command.h \ storage_file.h storage.h storage_sql.h support.h team.h tick.h \ timer.h topic.h tournament.h udptest_send.h versioncheck.h watch.h \ tracker.h storage_sql2.h sql_common.h handle_wol.h handle_irc_common.h handle_apireg.h \ - handle_wserv.h luafunctions.h luainterface.h luaobjects.h luawrapper.h + handle_wserv.h luafunctions.h luainterface.h luaobjects.h luawrapper.h \ + i18n.h icons.h diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 52cce8e43..dac98eec6 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -8,7 +8,8 @@ libcommon_a_SOURCES = conf.cpp list.cpp eventlog.cpp hexdump.cpp bn_type.cpp uti fdwatch.cpp fdwatch_epoll.cpp fdwatch_kqueue.cpp fdwatch_poll.cpp \ fdwatch_select.cpp give_up_root_privileges.cpp hashtable.cpp \ proginfo.cpp queue.cpp rcm.cpp rlimit.cpp tag.cpp token.cpp trans.cpp \ - fdwbackend.cpp xstr.cpp systemerror.cpp wolhash.cpp + fdwbackend.cpp xstr.cpp systemerror.cpp wolhash.cpp \ + format.cpp pugixml.cpp noinst_HEADERS = addr.h anongame_protocol.h asnprintf.h bnethashconv.h \ bnethash.h bnet_protocol.h bnettime.h bn_type.h bot_protocol.h \ @@ -21,4 +22,5 @@ noinst_HEADERS = addr.h anongame_protocol.h asnprintf.h bnethashconv.h \ trans.h udp_protocol.h util.h version.h xalloc.h xstring.h \ d2cs_bnetd_protocol.h d2cs_d2dbs_ladder.h d2cs_d2gs_character.h \ d2cs_d2gs_protocol.h d2cs_protocol.h scoped_array.h scoped_ptr.h \ - fdwbackend.h xstr.h systemerror.h wolhash.h + fdwbackend.h xstr.h systemerror.h wolhash.h \ + format.h pugiconfig.h pugixml.h From 8dc23c0f0be29a033e4a235643d8d769fbd63cbc Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 1 Jul 2014 00:12:34 +0400 Subject: [PATCH 073/144] add localizefile option in config --- conf/bnetd.conf.in | 26 +++++++++++++++++++------- conf/bnetd.conf.win32 | 26 +++++++++++++++++++------- src/bnetd/luainterface.cpp | 1 + src/bnetd/prefs.cpp | 29 ++++++++++++++++++++++++++++- src/bnetd/prefs.h | 1 + src/common/setup_before.h | 15 +++++++++------ 6 files changed, 77 insertions(+), 21 deletions(-) diff --git a/conf/bnetd.conf.in b/conf/bnetd.conf.in index 7b12b1b26..52250d999 100644 --- a/conf/bnetd.conf.in +++ b/conf/bnetd.conf.in @@ -79,19 +79,15 @@ storage_path = "file:mode=plain;dir=${LOCALSTATEDIR}/users;clan=${LOCALSTATEDIR} #----------------------------------------------------------------------------# filedir = "${LOCALSTATEDIR}/files" -i18ndir = "${SYSCONFDIR}/i18n" scriptdir = "${LOCALSTATEDIR}/lua" reportdir = "${LOCALSTATEDIR}/reports" chanlogdir = "${LOCALSTATEDIR}/chanlogs" -motdfile = "${SYSCONFDIR}/bnmotd.txt" -motdw3file = "${SYSCONFDIR}/bnmotd_w3.txt" +i18ndir = "${SYSCONFDIR}/i18n" issuefile = "${SYSCONFDIR}/bnissue.txt" channelfile = "${SYSCONFDIR}/channel.conf" -newsfile = "${SYSCONFDIR}/news.txt" adfile = "${SYSCONFDIR}/ad.conf" topicfile = "${SYSCONFDIR}/topics.conf" ipbanfile = "${SYSCONFDIR}/bnban.conf" -helpfile = "${SYSCONFDIR}/bnhelp.conf" mpqfile = "${SYSCONFDIR}/autoupdate.conf" logfile = "${LOCALSTATEDIR}/bnetd.log" realmfile = "${SYSCONFDIR}/realm.conf" @@ -118,6 +114,24 @@ fortunecmd = /usr/games/fortune ############################################################################## +############################################################################## +# Localized files realm server settings # +#----------------------------------------------------------------------------# + +# These filenames can have translated versions in +# the "i18ndir" directory specified above. +# (there are also two downloadable files: chathelp-war3.txt, newaccount.txt) +localizefile = common.xml +motdfile = bnmotd.txt +motdw3file = w3motd.txt +newsfile = news.txt +helpfile = bnhelp.conf +tosfile = termsofservice.txt + +# # +############################################################################## + + ############################################################################## # Message logs # #----------------------------------------------------------------------------# @@ -162,8 +176,6 @@ iconfile = "icons.bni" war3_iconfile = "icons-WAR3.bni" star_iconfile = "icons_STAR.bni" -tosfile = "tos.txt" - # # ############################################################################## diff --git a/conf/bnetd.conf.win32 b/conf/bnetd.conf.win32 index 7041a639a..5f7dcd777 100644 --- a/conf/bnetd.conf.win32 +++ b/conf/bnetd.conf.win32 @@ -59,19 +59,15 @@ storage_path = file:mode=plain;dir=var\users;clan=var\clans;team=var\teams;defau #----------------------------------------------------------------------------# filedir = files -i18ndir = conf\i18n scriptdir = lua reportdir = var\reports chanlogdir = var\chanlogs -motdfile = conf\bnmotd.txt -motdw3file = conf\bnmotd_w3.txt +i18ndir = conf\i18n issuefile = conf\bnissue.txt channelfile = conf\channel.conf -newsfile = conf\news.txt adfile = conf\ad.conf topicfile = conf\topics.conf ipbanfile = conf\bnban.conf -helpfile = conf\bnhelp.conf transfile = conf\address_translation.conf mpqfile = conf\autoupdate.conf logfile = var\bnetd.log @@ -96,6 +92,24 @@ fortunecmd = bin\fortune.exe ############################################################################## +############################################################################## +# Localized files realm server settings # +#----------------------------------------------------------------------------# + +# These filenames can have translated versions in +# the "i18ndir" directory specified above. +# (there are also two downloadable files: chathelp-war3.txt, newaccount.txt) +localizefile = common.xml +motdfile = bnmotd.txt +motdw3file = w3motd.txt +newsfile = news.txt +helpfile = bnhelp.conf +tosfile = termsofservice.txt + +# # +############################################################################## + + ############################################################################## # Message logs # #----------------------------------------------------------------------------# @@ -140,8 +154,6 @@ iconfile = "icons.bni" war3_iconfile = "icons-WAR3.bni" star_iconfile = "icons_STAR.bni" -tosfile = "tos.txt" - # # ############################################################################## diff --git a/src/bnetd/luainterface.cpp b/src/bnetd/luainterface.cpp index 96e24a61f..2d16b2eca 100644 --- a/src/bnetd/luainterface.cpp +++ b/src/bnetd/luainterface.cpp @@ -173,6 +173,7 @@ namespace pvpgn config.update("scriptdir", prefs_get_scriptdir()); config.update("reportdir", prefs_get_reportdir()); config.update("chanlogdir", prefs_get_chanlogdir()); + config.update("localizefile", prefs_get_localizefile()); config.update("motdfile", prefs_get_motdfile()); config.update("motdw3file", prefs_get_motdw3file()); config.update("issuefile", prefs_get_issuefile()); diff --git a/src/bnetd/prefs.cpp b/src/bnetd/prefs.cpp index ce3ec754b..f4e72e704 100644 --- a/src/bnetd/prefs.cpp +++ b/src/bnetd/prefs.cpp @@ -43,6 +43,7 @@ namespace pvpgn char const * storage_path; char const * logfile; char const * loglevels; + char const * localizefile; char const * motdfile; char const * motdw3file; char const * newsfile; @@ -196,6 +197,10 @@ namespace pvpgn static const char *conf_get_loglevels(void); static int conf_setdef_loglevels(void); + static int conf_set_localizefile(const char *valstr); + static const char *conf_get_localizefile(void); + static int conf_setdef_localizefile(void); + static int conf_set_motdfile(const char *valstr); static const char *conf_get_motdfile(void); static int conf_setdef_motdfile(void); @@ -712,6 +717,7 @@ namespace pvpgn { "storage_path", conf_set_storage_path, conf_get_storage_path, conf_setdef_storage_path }, { "logfile", conf_set_logfile, conf_get_logfile, conf_setdef_logfile }, { "loglevels", conf_set_loglevels, conf_get_loglevels, conf_setdef_loglevels }, + { "localizefile", conf_set_localizefile, conf_get_localizefile, conf_setdef_localizefile }, { "motdfile", conf_set_motdfile, conf_get_motdfile, conf_setdef_motdfile }, { "motdw3file", conf_set_motdw3file, conf_get_motdw3file, conf_setdef_motdw3file }, { "newsfile", conf_set_newsfile, conf_get_newsfile, conf_setdef_newsfile }, @@ -981,6 +987,27 @@ namespace pvpgn } + extern char const * prefs_get_localizefile(void) + { + return prefs_runtime_config.localizefile; + } + + static int conf_set_localizefile(const char *valstr) + { + return conf_set_str(&prefs_runtime_config.localizefile, valstr, NULL); + } + + static int conf_setdef_localizefile(void) + { + return conf_set_str(&prefs_runtime_config.localizefile, NULL, BNETD_LOCALIZE_FILE); + } + + static const char* conf_get_localizefile(void) + { + return prefs_runtime_config.localizefile; + } + + extern char const * prefs_get_motdfile(void) { return prefs_runtime_config.motdfile; @@ -1035,7 +1062,7 @@ namespace pvpgn static int conf_setdef_newsfile(void) { - return conf_set_str(&prefs_runtime_config.newsfile, NULL, BNETD_NEWS_DIR); + return conf_set_str(&prefs_runtime_config.newsfile, NULL, BNETD_NEWS_FILE); } static const char* conf_get_newsfile(void) diff --git a/src/bnetd/prefs.h b/src/bnetd/prefs.h index 76556774a..9779de0d1 100644 --- a/src/bnetd/prefs.h +++ b/src/bnetd/prefs.h @@ -40,6 +40,7 @@ namespace pvpgn extern char const * prefs_get_i18ndir(void); extern char const * prefs_get_logfile(void); extern char const * prefs_get_loglevels(void); + extern char const * prefs_get_localizefile(void); extern char const * prefs_get_motdfile(void); extern char const * prefs_get_motdw3file(void); extern char const * prefs_get_newsfile(void); diff --git a/src/common/setup_before.h b/src/common/setup_before.h index 73daa666e..7fae41ec3 100644 --- a/src/common/setup_before.h +++ b/src/common/setup_before.h @@ -126,20 +126,24 @@ const bool BNETD_CHANLOG = false; # define BNETD_DEFAULT_CONF_FILE "conf/bnetd.conf" #endif const char * const BNETD_FILE_DIR = "files"; -const char * const BNETD_I18N_DIR = "conf/i18n"; const char * const BNETD_SCRIPT_DIR = "lua"; const char * const BNETD_STORAGE_PATH = ""; const char * const BNETD_REPORT_DIR = "reports"; +const char * const BNETD_I18N_DIR = "conf/i18n"; +// ------ i18n files -------- +const char * const BNETD_LOCALIZE_FILE = "common.xml"; +const char * const BNETD_MOTD_FILE = "bnmotd.txt"; +const char * const BNETD_MOTDW3_FILE = "w3motd.txt"; +const char * const BNETD_NEWS_FILE = "news.txt"; +const char * const BNETD_HELP_FILE = "bnhelp.conf"; +const char * const BNETD_TOS_FILE = "newaccount.txt"; +// -------------------------- const char * const BNETD_LOG_FILE = "logs/bnetd.log"; -const char * const BNETD_MOTD_FILE = "conf/bnmotd.txt"; -const char * const BNETD_MOTDW3_FILE = "conf/bnmotd_w3.txt"; -const char * const BNETD_NEWS_DIR = "news"; const char * const BNETD_AD_FILE = "conf/ad.conf"; const char * const BNETD_CHANNEL_FILE = "conf/channel.conf"; const char * const BNETD_PID_FILE = ""; /* this means "none" */ const char * const BNETD_ACCOUNT_TMP = ".bnetd_acct_temp"; const char * const BNETD_IPBAN_FILE = "conf/bnban.conf"; -const char * const BNETD_HELP_FILE = "conf/bnhelp.conf"; const char * const BNETD_FORTUNECMD = "/usr/games/fortune"; const char * const BNETD_TRANS_FILE = "conf/address_translation.conf"; const char * const BNETD_CHANLOG_DIR = "chanlogs"; @@ -171,7 +175,6 @@ const unsigned MAX_FRIENDS = 20; const unsigned BNETD_MAX_OUTBURST = 16384; /* default files relative to FILE_DIR */ -const char * const BNETD_TOS_FILE = "tos.txt"; const char * const BNETD_ICON_FILE = "icons.bni"; const char * const BNETD_WAR3_ICON_FILE = "icons-WAR3.bni"; const char * const BNETD_STAR_ICON_FILE = "icons_STAR.bni"; From 272b83a8e2248d2da09851faae7306d0a562641c Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 1 Jul 2014 23:37:10 +0400 Subject: [PATCH 074/144] Add termsofservice.txt. Content is the same as newaccount.txt that shows in Warcraft 3 after displaying TOS, but TOS used in all games. --- conf/i18n/csCZ/termsofservice.txt | 21 +++++++++++++++++++++ conf/i18n/deDE/termsofservice.txt | 21 +++++++++++++++++++++ conf/i18n/esES/termsofservice.txt | 21 +++++++++++++++++++++ conf/i18n/frFR/termsofservice.txt | 21 +++++++++++++++++++++ conf/i18n/itIT/termsofservice.txt | 21 +++++++++++++++++++++ conf/i18n/jpJA/termsofservice.txt | 21 +++++++++++++++++++++ conf/i18n/plPL/termsofservice.txt | 21 +++++++++++++++++++++ conf/i18n/ruRU/termsofservice.txt | 21 +++++++++++++++++++++ conf/i18n/termsofservice.txt | 21 +++++++++++++++++++++ 9 files changed, 189 insertions(+) create mode 100644 conf/i18n/csCZ/termsofservice.txt create mode 100644 conf/i18n/deDE/termsofservice.txt create mode 100644 conf/i18n/esES/termsofservice.txt create mode 100644 conf/i18n/frFR/termsofservice.txt create mode 100644 conf/i18n/itIT/termsofservice.txt create mode 100644 conf/i18n/jpJA/termsofservice.txt create mode 100644 conf/i18n/plPL/termsofservice.txt create mode 100644 conf/i18n/ruRU/termsofservice.txt create mode 100644 conf/i18n/termsofservice.txt diff --git a/conf/i18n/csCZ/termsofservice.txt b/conf/i18n/csCZ/termsofservice.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/csCZ/termsofservice.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/deDE/termsofservice.txt b/conf/i18n/deDE/termsofservice.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/deDE/termsofservice.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/esES/termsofservice.txt b/conf/i18n/esES/termsofservice.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/esES/termsofservice.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/frFR/termsofservice.txt b/conf/i18n/frFR/termsofservice.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/frFR/termsofservice.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/itIT/termsofservice.txt b/conf/i18n/itIT/termsofservice.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/itIT/termsofservice.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/jpJA/termsofservice.txt b/conf/i18n/jpJA/termsofservice.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/jpJA/termsofservice.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/plPL/termsofservice.txt b/conf/i18n/plPL/termsofservice.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/plPL/termsofservice.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/ruRU/termsofservice.txt b/conf/i18n/ruRU/termsofservice.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/ruRU/termsofservice.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/termsofservice.txt b/conf/i18n/termsofservice.txt new file mode 100644 index 000000000..d457818ca --- /dev/null +++ b/conf/i18n/termsofservice.txt @@ -0,0 +1,21 @@ +You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) + +PvPGN TERMS OF USE: + +PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). +PvPGN is provided "as is" without warrenties of any kind. +We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. + +1. Information found on PvPGN. +PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. + +2. Disclaimer of Warrenty. +PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. + +3. Limitations of Liability +PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. + +Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. + +Besides all this... Happy gaming.. +PvPGN Project Page: http://pvpgn.berlios.de/ From 79d6ccc33190399ea4fe69c5baa75d61a4721d3a Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 1 Jul 2014 23:54:27 +0400 Subject: [PATCH 075/144] switch to return localized files for user: bnhelp.conf, motdw3.txt, termsofservice.txt, newaccount.txt, chathelp-war3.txt --- src/bnetd/command.cpp | 35 +++++++--------- src/bnetd/file.cpp | 85 ++++++++++++++++++++++----------------- src/bnetd/handle_bnet.cpp | 6 ++- src/bnetd/helpfile.cpp | 50 +++++++++++++++++++---- src/bnetd/i18n.cpp | 42 ++++++++----------- src/bnetd/i18n.h | 7 +--- 6 files changed, 128 insertions(+), 97 deletions(-) diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 7427cb332..2ab8ae778 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -4618,34 +4618,30 @@ namespace pvpgn char const * filename; std::FILE * fp; - if ((filename = prefs_get_motdfile())) { - if ((fp = std::fopen(filename, "r"))) - { - message_send_file(c, fp); - if (std::fclose(fp) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not close motd file \"%s\" after reading (std::fopen: %s)", filename, std::strerror(errno)); - } - else - { - eventlog(eventlog_level_error, __FUNCTION__, "could not open motd file \"%s\" for reading (std::fopen: %s)", filename, std::strerror(errno)); - message_send_text(c, message_type_error, c, localize(c, "Unable to open motd.")); - } - return 0; + filename = i18n_filename(prefs_get_motdfile(), conn_get_gamelang(c)); + + if (fp = std::fopen(filename, "r")) + { + message_send_file(c, fp); + if (std::fclose(fp) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not close motd file \"%s\" after reading (std::fopen: %s)", filename, std::strerror(errno)); } - else { - message_send_text(c, message_type_error, c, localize(c, "No motd.")); - return 0; + else + { + eventlog(eventlog_level_error, __FUNCTION__, "could not open motd file \"%s\" for reading (std::fopen: %s)", filename, std::strerror(errno)); + message_send_text(c, message_type_error, c, localize(c, "Unable to open motd.")); } + return 0; } static int _handle_tos_command(t_connection * c, char const * text) { /* handle /tos - shows terms of service by user request -raistlinthewiz */ - char * filename = NULL; + const char * filename = NULL; std::FILE * fp; - filename = buildpath(prefs_get_filedir(), prefs_get_tosfile()); + filename = i18n_filename(prefs_get_tosfile(), conn_get_gamelang(c)); /* FIXME: if user enters relative path to tos file in config, above routine will fail */ @@ -4669,7 +4665,7 @@ namespace pvpgn while (len > MAX_MESSAGE_LEN - 1) { std::strncpy(msgtemp0, buff, MAX_MESSAGE_LEN - 1); - msgtemp0[MAX_MESSAGE_LEN] = '\0'; + msgtemp0[MAX_MESSAGE_LEN-1] = '\0'; buff += MAX_MESSAGE_LEN - 1; len -= MAX_MESSAGE_LEN - 1; message_send_text(c, message_type_info, c, msgtemp0); @@ -4690,7 +4686,6 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "could not open tos file \"%s\" for reading (std::fopen: %s)", filename, std::strerror(errno)); message_send_text(c, message_type_error, c, localize(c, "Unable to send TOS (Terms of Service).")); } - xfree((void *)filename); return 0; } diff --git a/src/bnetd/file.cpp b/src/bnetd/file.cpp index 162e37255..1124a6804 100644 --- a/src/bnetd/file.cpp +++ b/src/bnetd/file.cpp @@ -38,9 +38,11 @@ #include "common/packet.h" #include "common/util.h" #include "common/bn_type.h" +#include "common/tag.h" #include "prefs.h" #include "connection.h" +#include "i18n.h" #include "common/setup_after.h" namespace pvpgn @@ -51,38 +53,49 @@ namespace pvpgn static char const * file_get_info(char const * rawname, unsigned int * len, bn_long * modtime); - static char * file_find_default(const char *rawname) + /* Requested files aliases */ + const char * requestfiles[] = { + "termsofservice-", "termsofservice.txt", + "newaccount-", "newaccount.txt", // used in warcraft 3 after agree with TOS + "chathelp-war3-", "chathelp-war3.txt", + "matchmaking-war3-", "matchmaking-war3.dat", // FIXME: (HarpyWar) this file should be in files, not in i18n + "tos_", "termsofservice.txt", + "tos-unicode_", "termsofservice.txt", + NULL, NULL }; + + + static const char * file_find_localized(const char *rawname) { - /* Add new default files here */ - const char * defaultfiles[] = { "termsofservice-", ".txt", - "newaccount-", ".txt", - "chathelp-war3-", ".txt", - "matchmaking-war3-", ".dat", - "tos_", ".txt", - "tos-unicode_", ".txt", - NULL, NULL }; - const char ** pattern, **extension; - char *filename = NULL; - - for (pattern = defaultfiles, extension = defaultfiles + 1; *pattern; pattern += 2, extension += 2) - if (!std::strncmp(rawname, *pattern, std::strlen(*pattern))) { /* Check if there is a default file available for this kind of file */ - filename = (char*)xmalloc(std::strlen(prefs_get_filedir()) + 1 + std::strlen(*pattern) + 7 + std::strlen(*extension) + 1); - - std::strcpy(filename, prefs_get_filedir()); - std::strcat(filename, "/"); - std::strcat(filename, *pattern); - std::strcat(filename, "default"); - std::strcat(filename, *extension); - - break; - } + const char ** pattern, **alias; - return filename; + for (pattern = requestfiles, alias = requestfiles + 1; *pattern; pattern += 2, alias += 2) + { + // Check if there is an alias file available for this kind of file + if (!std::strncmp(rawname, *pattern, std::strlen(*pattern))) + { + t_gamelang lang; + // when file transferring by bnftp protofol client doesn't provide a language + + // if there is no country tag in the file (just in case) + if ((strlen(*pattern) + 4) > strlen(rawname)) + return NULL; + + // get language tag from the file name + char langstr[5]; + strncpy(langstr, rawname + std::strlen(*pattern), 4); + langstr[4] = 0; + lang = tag_str_to_uint(langstr); + + return i18n_filename(*alias, lang); + } + } + // if not found return source file + return NULL; } static char const * file_get_info(char const * rawname, unsigned int * len, bn_long * modtime) { - char *filename; + const char *filename; t_bnettime bt; struct stat sfile; @@ -106,16 +119,15 @@ namespace pvpgn return NULL; } - filename = buildpath(prefs_get_filedir(), rawname); - - if (stat(filename, &sfile) < 0) { /* if it doesn't exist, try to replace with default file */ - xfree((void*)filename); - filename = file_find_default(rawname); - if (!filename) return NULL; /* no default version */ + filename = file_find_localized(rawname); + // if localized file not found in "i18n" + if (!filename || stat(filename, &sfile) < 0) + { + // try find it in "files" + filename = buildpath(prefs_get_filedir(), rawname); if (stat(filename, &sfile) < 0) { /* try again */ /* FIXME: check for lower-case version of filename */ - xfree(filename); return NULL; } } @@ -192,7 +204,6 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "stat() succeeded yet could not open file \"%s\" for reading (std::fopen: %s)", filename, std::strerror(errno)); filelen = 0; } - xfree((void *)filename); /* avoid warning */ } else { @@ -231,18 +242,18 @@ namespace pvpgn */ if (!fp) { - eventlog(eventlog_level_warn, __FUNCTION__, "[%d] sending no data for file \"%s\"", conn_get_socket(c), rawname); + eventlog(eventlog_level_warn, __FUNCTION__, "[%d] sending no data for file \"%s\" (\"%s\")", conn_get_socket(c), rawname, filename); return -1; } - eventlog(eventlog_level_info, __FUNCTION__, "[%d] sending file \"%s\" of length %d", conn_get_socket(c), rawname, filelen); + eventlog(eventlog_level_info, __FUNCTION__, "[%d] sending file \"%s\" (\"%s\") of length %d", conn_get_socket(c), rawname, filename, filelen); for (;;) { if (!(rpacket = packet_create(packet_class_raw))) { eventlog(eventlog_level_error, __FUNCTION__, "could not create raw packet"); if (std::fclose(fp) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not close file \"%s\" after reading (std::fclose: %s)", rawname, std::strerror(errno)); + eventlog(eventlog_level_error, __FUNCTION__, "could not close file \"%s\" after reading (std::fclose: %s)", filename, std::strerror(errno)); return -1; } if ((nbytes = std::fread(packet_get_raw_data_build(rpacket, 0), 1, MAX_PACKET_SIZE, fp))<(int)MAX_PACKET_SIZE) diff --git a/src/bnetd/handle_bnet.cpp b/src/bnetd/handle_bnet.cpp index bbfb955ef..29a5625ed 100644 --- a/src/bnetd/handle_bnet.cpp +++ b/src/bnetd/handle_bnet.cpp @@ -2770,12 +2770,14 @@ namespace pvpgn char * buff; std::FILE * fp; - std::ifstream in(filename = prefs_get_motdw3file()); + filename = i18n_filename(prefs_get_motdw3file(), conn_get_gamelang(c)); + + std::ifstream in(filename); if (in) { std::string contents((std::istreambuf_iterator(in)), std::istreambuf_iterator()); strcpy(serverinfo, contents.substr(0,511).c_str()); } else - eventlog(eventlog_level_error, __FUNCTION__, "Could not open file motdw3 \"%s\" (std::fopen: %s)", filename, std::strerror(errno)); + eventlog(eventlog_level_error, __FUNCTION__, "Could not open file w3motd \"%s\" (std::fopen: %s)", filename, std::strerror(errno)); packet_append_string(rpacket, serverinfo); diff --git a/src/bnetd/helpfile.cpp b/src/bnetd/helpfile.cpp index 98b03d041..64c6154a3 100644 --- a/src/bnetd/helpfile.cpp +++ b/src/bnetd/helpfile.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include "compat/strcasecmp.h" #include "common/eventlog.h" @@ -40,11 +41,25 @@ namespace pvpgn namespace bnetd { - + static std::map hfd_list; static std::FILE* hfd = NULL; /* helpfile descriptor */ static int list_commands(t_connection *); + static std::FILE* get_hfd(t_connection * c); + static std::FILE* get_hfd(t_connection * c) + { + if (t_gamelang lang = conn_get_gamelang(c)) + { + std::map::iterator it = hfd_list.find(lang); + if (it != hfd_list.end()) + { + return it->second; + } + // return enUS if language is not specified in language list + return hfd_list[languages[0]]; + } + } extern int helpfile_init(char const *filename) { @@ -53,10 +68,18 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "got NULL filename"); return -1; } - if (!(hfd = std::fopen(filename, "r"))) + const char * _filename; + + // iterate language list + for (int i = 0; i < (sizeof(languages) / sizeof(*languages)); i++) { - eventlog(eventlog_level_error, __FUNCTION__, "could not open help file \"%s\" for reading (std::fopen: %s)", filename, std::strerror(errno)); - return -1; + // get hfd of all localized help files + _filename = i18n_filename(filename, languages[i]); + if (!(hfd_list[languages[i]] = std::fopen(_filename, "r"))) + { + eventlog(eventlog_level_error, __FUNCTION__, "could not open help file \"%s\" for reading (std::fopen: %s)", _filename, std::strerror(errno)); + return -1; + } } return 0; } @@ -64,18 +87,26 @@ namespace pvpgn extern int helpfile_unload(void) { - if (hfd != NULL) + // destroy file handles + for (std::map::iterator it = hfd_list.begin(); it != hfd_list.end(); ++it) { - if (std::fclose(hfd) < 0) - eventlog(eventlog_level_error, __FUNCTION__, "could not close help file after reading (std::fclose: %s)", std::strerror(errno)); - hfd = NULL; + if (it->second != NULL) + { + if (std::fclose(it->second) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not close help file after reading (std::fclose: %s)", std::strerror(errno)); + it->second = NULL; + } } + // clear list + hfd_list.clear(); + return 0; } extern int handle_help_command(t_connection * c, char const * text) { + std::FILE* hfd = get_hfd(c); unsigned int i, j; char cmd[MAX_COMMAND_LEN]; @@ -108,6 +139,7 @@ namespace pvpgn static int list_commands(t_connection * c) { + std::FILE* hfd = get_hfd(c); char * line; int i; @@ -164,9 +196,11 @@ namespace pvpgn extern int describe_command(t_connection * c, char const * cmd) { + std::FILE* hfd = get_hfd(c); char * line; int i; + /* ok. the client requested help for a specific command */ std::rewind(hfd); while ((line = file_get_line(hfd)) != NULL) diff --git a/src/bnetd/i18n.cpp b/src/bnetd/i18n.cpp index d961ad9b6..e3dc58cbd 100644 --- a/src/bnetd/i18n.cpp +++ b/src/bnetd/i18n.cpp @@ -32,6 +32,10 @@ #include #include +#ifdef HAVE_SYS_STAT_H +# include +#endif + #include "compat/strcasecmp.h" #include "compat/snprintf.h" @@ -75,7 +79,7 @@ namespace pvpgn const char * _find_string(char const * text, t_gamelang gamelang); - const t_gamelang languages[12] = { + extern const t_gamelang languages[12] = { GAMELANG_ENGLISH_UINT, /* enUS */ GAMELANG_GERMAN_UINT, /* deDE */ GAMELANG_CZECH_UINT, /* csCZ */ @@ -101,8 +105,6 @@ namespace pvpgn extern int i18n_load(void) { - const char * filename = buildpath(prefs_get_i18ndir(), commonfile); - std::string lang_filename; pugi::xml_document doc; std::string original, translate; @@ -110,7 +112,7 @@ namespace pvpgn // iterate language list for (int i = 0; i < (sizeof(languages) / sizeof(*languages)); i++) { - lang_filename = i18n_filename(filename, languages[i]); + lang_filename = i18n_filename(prefs_get_localizefile(), languages[i]); if (FILE *f = fopen(lang_filename.c_str(), "r")) { fclose(f); @@ -149,7 +151,7 @@ namespace pvpgn else { translate = original; - WARN2("could not find translate reference refid=\"%s\", use original string (%s)", attr.value(), lang_filename.c_str()); + //WARN2("could not find translate reference refid=\"%s\", use original string (%s)", attr.value(), lang_filename.c_str()); } } else @@ -209,35 +211,25 @@ namespace pvpgn /* Add a locale tag into filename example: motd.txt -> motd-ruRU.txt */ - extern std::string i18n_filename(const char * filename, t_tag gamelang) + extern const char * i18n_filename(const char * filename, t_tag gamelang) { // get language string char lang_str[sizeof(t_tag)+1]; std::memset(lang_str, 0, sizeof(lang_str)); tag_uint_to_str(lang_str, gamelang); - if (!tag_check_gamelang(gamelang)) - { - ERROR1("got unknown language tag \"%s\"", lang_str); - return filename; - } - - std::string _filename(filename); - - // get extension - std::string::size_type idx(_filename.rfind('.')); - if (idx == std::string::npos || idx + 4 != _filename.size()) + struct stat sfile; + const char * _filename; + + _filename = buildpath(buildpath(prefs_get_i18ndir(), lang_str), filename); + // if localized file not found + if (stat(_filename, &sfile) < 0) { - ERROR1("Invalid extension for '%s'", _filename.c_str()); - return filename; + // use default file + _filename = buildpath(prefs_get_i18ndir(), filename); } - std::string ext(_filename.substr(idx + 1)); - - // get filename without extension - std::string fname(_filename.substr(0, idx)); - std::string lang_filename(fname + "-" + lang_str + "." + ext); - return lang_filename; + return _filename; } diff --git a/src/bnetd/i18n.h b/src/bnetd/i18n.h index 5dfc9cc5e..68dd0ceb9 100644 --- a/src/bnetd/i18n.h +++ b/src/bnetd/i18n.h @@ -22,7 +22,7 @@ namespace pvpgn { namespace bnetd { - + extern const t_gamelang languages[12]; } } @@ -44,16 +44,13 @@ namespace pvpgn { extern int i18n_load(void); extern int i18n_reload(void); - //extern const char * localize(t_connection * c, char const * text); - - extern std::string i18n_filename(const char * filename, t_tag gamelang); + extern const char * i18n_filename(const char * filename, t_tag gamelang); #define _VARIADIC_MAX 10 extern std::string _localize(t_connection * c, const char * func, const char *fmt, const fmt::ArgList &args); FMT_VARIADIC(std::string, _localize, t_connection *, const char *, const char *) #define localize(c, fmt, ...) _localize(c, __FUNCTION__, fmt, __VA_ARGS__) - //#define localize(c, fmt) _localize(c, __FUNCTION__, fmt) } From 0d738e5dae5fafe64462bb308e5c940df9da4815 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Wed, 2 Jul 2014 22:39:42 +0400 Subject: [PATCH 076/144] remove unused code --- src/bnetd/prefs.cpp | 27 --------------------------- src/bnetd/prefs.h | 4 ---- 2 files changed, 31 deletions(-) diff --git a/src/bnetd/prefs.cpp b/src/bnetd/prefs.cpp index f4e72e704..3d0731c9a 100644 --- a/src/bnetd/prefs.cpp +++ b/src/bnetd/prefs.cpp @@ -129,7 +129,6 @@ namespace pvpgn char const * version_exeinfo_match; unsigned int version_exeinfo_maxdiff; unsigned int max_concurrent_logins; - char const * server_info; char const * mapsfile; char const * xplevelfile; char const * xpcalcfile; @@ -533,10 +532,6 @@ namespace pvpgn static const char *conf_get_max_concurrent_logins(void); static int conf_setdef_max_concurrent_logins(void); - static int conf_set_server_info(const char *valstr); - static const char *conf_get_server_info(void); - static int conf_setdef_server_info(void); - static int conf_set_mapsfile(const char *valstr); static const char *conf_get_mapsfile(void); static int conf_setdef_mapsfile(void); @@ -801,7 +796,6 @@ namespace pvpgn { "version_exeinfo_match", conf_set_version_exeinfo_match, conf_get_version_exeinfo_match, conf_setdef_version_exeinfo_match }, { "version_exeinfo_maxdiff", conf_set_version_exeinfo_maxdiff, conf_get_version_exeinfo_maxdiff, conf_setdef_version_exeinfo_maxdiff }, { "max_concurrent_logins", conf_set_max_concurrent_logins, conf_get_max_concurrent_logins, conf_setdef_max_concurrent_logins }, - { "server_info", conf_set_server_info, conf_get_server_info, conf_setdef_server_info }, { "mapsfile", conf_set_mapsfile, conf_get_mapsfile, conf_setdef_mapsfile }, { "xplevelfile", conf_set_xplevelfile, conf_get_xplevelfile, conf_setdef_xplevelfile }, { "xpcalcfile", conf_set_xpcalcfile, conf_get_xpcalcfile, conf_setdef_xpcalcfile }, @@ -2764,27 +2758,6 @@ namespace pvpgn } - extern char const * prefs_get_server_info(void) - { - return prefs_runtime_config.server_info; - } - - static int conf_set_server_info(const char *valstr) - { - return conf_set_str(&prefs_runtime_config.server_info, valstr, NULL); - } - - static int conf_setdef_server_info(void) - { - return conf_set_str(&prefs_runtime_config.server_info, NULL, ""); - } - - static const char* conf_get_server_info(void) - { - return prefs_runtime_config.server_info; - } - - extern char const * prefs_get_mapsfile(void) { return prefs_runtime_config.mapsfile; diff --git a/src/bnetd/prefs.h b/src/bnetd/prefs.h index 9779de0d1..b5855d020 100644 --- a/src/bnetd/prefs.h +++ b/src/bnetd/prefs.h @@ -126,10 +126,6 @@ namespace pvpgn extern unsigned int prefs_get_max_concurrent_logins(void); - /* ADDED BY UNDYING SOULZZ 4/9/02 */ - extern unsigned int prefs_get_identify_timeout_secs(void); - extern char const * prefs_get_server_info(void); - /* [zap-zero] 20020616 */ extern char const * prefs_get_mysql_host(void); extern char const * prefs_get_mysql_account(void); From 1e0b253d68786be5fbfe97a49dbd253c70a811ec Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Wed, 2 Jul 2014 22:41:01 +0400 Subject: [PATCH 077/144] add format feature with variables into w3motd file (like in bnmotd) --- src/bnetd/handle_bnet.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/bnetd/handle_bnet.cpp b/src/bnetd/handle_bnet.cpp index 29a5625ed..6456edc75 100644 --- a/src/bnetd/handle_bnet.cpp +++ b/src/bnetd/handle_bnet.cpp @@ -2767,19 +2767,23 @@ namespace pvpgn // read text from bnmotd_w3.txt char const * filename; - char * buff; + char * buff, *line; std::FILE * fp; filename = i18n_filename(prefs_get_motdw3file(), conn_get_gamelang(c)); - std::ifstream in(filename); - if (in) { - std::string contents((std::istreambuf_iterator(in)), std::istreambuf_iterator()); - strcpy(serverinfo, contents.substr(0,511).c_str()); - } else - eventlog(eventlog_level_error, __FUNCTION__, "Could not open file w3motd \"%s\" (std::fopen: %s)", filename, std::strerror(errno)); - - + if (fp = std::fopen(filename, "r")) + { + strcpy(serverinfo, ""); // init + while ((buff = file_get_line(fp))) + { + line = message_format_line(c, buff); + strcat(serverinfo, &line[1]); + strcat(serverinfo, "\n"); + } + if (std::fclose(fp) < 0) + eventlog(eventlog_level_error, __FUNCTION__, "could not close motdw3 file \"%s\" after reading (std::fopen: %s)", filename, std::strerror(errno)); + } packet_append_string(rpacket, serverinfo); conn_push_outqueue(c, rpacket); From 5812041299f57da133639e56fd2c82ac266d219f Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Wed, 2 Jul 2014 22:42:54 +0400 Subject: [PATCH 078/144] add updated w3motd.txt to localized files https://github.com/HarpyWar/pvpgn/issues/13 --- conf/i18n/csCZ/w3motd.txt | 11 +++++++++++ conf/i18n/deDE/w3motd.txt | 11 +++++++++++ conf/i18n/esES/w3motd.txt | 11 +++++++++++ conf/i18n/frFR/w3motd.txt | 11 +++++++++++ conf/i18n/itIT/w3motd.txt | 11 +++++++++++ conf/i18n/jpJA/w3motd.txt | 11 +++++++++++ conf/i18n/plPL/w3motd.txt | 11 +++++++++++ conf/i18n/ruRU/w3motd.txt | 11 +++++++++++ conf/i18n/w3motd.txt | 11 +++++++++++ 9 files changed, 99 insertions(+) create mode 100644 conf/i18n/csCZ/w3motd.txt create mode 100644 conf/i18n/deDE/w3motd.txt create mode 100644 conf/i18n/esES/w3motd.txt create mode 100644 conf/i18n/frFR/w3motd.txt create mode 100644 conf/i18n/itIT/w3motd.txt create mode 100644 conf/i18n/jpJA/w3motd.txt create mode 100644 conf/i18n/plPL/w3motd.txt create mode 100644 conf/i18n/ruRU/w3motd.txt create mode 100644 conf/i18n/w3motd.txt diff --git a/conf/i18n/csCZ/w3motd.txt b/conf/i18n/csCZ/w3motd.txt new file mode 100644 index 000000000..8bc4a5911 --- /dev/null +++ b/conf/i18n/csCZ/w3motd.txt @@ -0,0 +1,11 @@ +|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF + +There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. + + + + + + + +This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/deDE/w3motd.txt b/conf/i18n/deDE/w3motd.txt new file mode 100644 index 000000000..8bc4a5911 --- /dev/null +++ b/conf/i18n/deDE/w3motd.txt @@ -0,0 +1,11 @@ +|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF + +There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. + + + + + + + +This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/esES/w3motd.txt b/conf/i18n/esES/w3motd.txt new file mode 100644 index 000000000..8bc4a5911 --- /dev/null +++ b/conf/i18n/esES/w3motd.txt @@ -0,0 +1,11 @@ +|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF + +There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. + + + + + + + +This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/frFR/w3motd.txt b/conf/i18n/frFR/w3motd.txt new file mode 100644 index 000000000..8bc4a5911 --- /dev/null +++ b/conf/i18n/frFR/w3motd.txt @@ -0,0 +1,11 @@ +|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF + +There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. + + + + + + + +This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/itIT/w3motd.txt b/conf/i18n/itIT/w3motd.txt new file mode 100644 index 000000000..8bc4a5911 --- /dev/null +++ b/conf/i18n/itIT/w3motd.txt @@ -0,0 +1,11 @@ +|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF + +There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. + + + + + + + +This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/jpJA/w3motd.txt b/conf/i18n/jpJA/w3motd.txt new file mode 100644 index 000000000..8bc4a5911 --- /dev/null +++ b/conf/i18n/jpJA/w3motd.txt @@ -0,0 +1,11 @@ +|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF + +There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. + + + + + + + +This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/plPL/w3motd.txt b/conf/i18n/plPL/w3motd.txt new file mode 100644 index 000000000..8bc4a5911 --- /dev/null +++ b/conf/i18n/plPL/w3motd.txt @@ -0,0 +1,11 @@ +|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF + +There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. + + + + + + + +This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/ruRU/w3motd.txt b/conf/i18n/ruRU/w3motd.txt new file mode 100644 index 000000000..8bc4a5911 --- /dev/null +++ b/conf/i18n/ruRU/w3motd.txt @@ -0,0 +1,11 @@ +|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF + +There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. + + + + + + + +This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/w3motd.txt b/conf/i18n/w3motd.txt new file mode 100644 index 000000000..8bc4a5911 --- /dev/null +++ b/conf/i18n/w3motd.txt @@ -0,0 +1,11 @@ +|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF + +There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. + + + + + + + +This text invisible, because of limitation of 11 lines \ No newline at end of file From 6d39b26a31bab33fd157977d9ca5a838f0e2e0ed Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Wed, 2 Jul 2014 23:47:46 +0400 Subject: [PATCH 079/144] Add .travis.yml --- .travis.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..7ab0cd8b4 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: cpp + +os: + - linux + +before_install: + - sudo apt-get install build-essential zlib1g-dev libmysqlclient-dev liblua5.1-0-dev + - mkdir build + - cd build + +script: + - cmake -D CMAKE_INSTALL_PREFIX=/usr/local/pvpgn -D WITH_MYSQL=true -D WITH_LUA=true ../ + - make + - make install From 96bbf4d0e9b5983dae5f97db27ee05f185f4ae00 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Thu, 3 Jul 2014 00:33:14 +0400 Subject: [PATCH 080/144] fix compile errors on Linux --- src/bnetd/account_wrap.cpp | 2 +- src/bnetd/channel.cpp | 6 +++--- src/bnetd/command.cpp | 19 +++++++++++-------- src/bnetd/connection.cpp | 4 ++-- src/bnetd/i18n.cpp | 2 +- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/bnetd/account_wrap.cpp b/src/bnetd/account_wrap.cpp index 2a1073587..27470f601 100644 --- a/src/bnetd/account_wrap.cpp +++ b/src/bnetd/account_wrap.cpp @@ -474,7 +474,7 @@ namespace pvpgn if (unsigned int locktime = account_get_auth_locktime(account)) msgtemp += localize(c, " for {}", seconds_to_timestr(locktime - now)); else - msgtemp += localize(c, " permanently"); + msgtemp += localize(c, " permanently", /**/); // append reason char const * reason = account_get_auth_lockreason(account); diff --git a/src/bnetd/channel.cpp b/src/bnetd/channel.cpp index 273ae836c..57d8792c7 100644 --- a/src/bnetd/channel.cpp +++ b/src/bnetd/channel.cpp @@ -685,9 +685,9 @@ namespace pvpgn // if user is muted if (account_get_auth_mute(acc) == 1) { - char msgtemp[MAX_MESSAGE_LEN], msgtemp2[MAX_MESSAGE_LEN]; - - snprintf(msgtemp, sizeof(msgtemp), "You can't talk on the channel. Your account has been muted%s", account_get_locktext(acc, true)); + std::string msgtemp; + msgtemp = localize(me, "You can't talk on the channel. Your account has been muted"); + msgtemp += account_get_locktext(acc, false); message_send_text(me, message_type_error, me, msgtemp); return; } diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 2ab8ae778..418d75912 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -1767,8 +1767,8 @@ namespace pvpgn } frienduid = account_get_name(friend_acc); - if (!software.empty()) snprintf(msgtemp0, sizeof(msgtemp0), "%d: %s%.16s%.128s, %.64s", i + 1, friend_get_mutual(fr) ? "*" : " ", frienduid, status, software); - else snprintf(msgtemp0, sizeof(msgtemp0), "%d: %.16s%.128s", i + 1, frienduid, status); + if (!software.empty()) snprintf(msgtemp0, sizeof(msgtemp0), "%d: %s%.16s%.128s, %.64s", i + 1, friend_get_mutual(fr) ? "*" : " ", frienduid, status.c_str(), software.c_str()); + else snprintf(msgtemp0, sizeof(msgtemp0), "%d: %.16s%.128s", i + 1, frienduid, status.c_str()); message_send_text(c, message_type_info, c, msgtemp0); } } @@ -3416,14 +3416,16 @@ namespace pvpgn /* check /admin-addr for admin privileges */ if ((account_get_command_groups(conn_get_account(c)) & command_get_group("/admin-addr"))) { + const char * yes = localize(c, "Yes").c_str(); + const char * no = localize(c, "No").c_str(); /* the player who requested /finger has admin privileges give him more info about the one he queries; is_admin, is_operator, is_locked, email */ msgtemp = localize(c, "Operator: {}, Admin: {}, Locked: {}, Muted: {}", - account_get_auth_operator(account, NULL) == 1 ? localize(c, "Yes") : localize(c, "No"), - account_get_auth_admin(account, NULL) == 1 ? localize(c, "Yes") : localize(c, "No"), - account_get_auth_lock(account) == 1 ? localize(c, "Yes") : localize(c, "No"), - account_get_auth_mute(account) == 1 ? localize(c, "Yes") : localize(c, "No")); + account_get_auth_operator(account, NULL) == 1 ? yes : no, + account_get_auth_admin(account, NULL) == 1 ? yes : no, + account_get_auth_lock(account) == 1 ? yes : no, + account_get_auth_mute(account) == 1 ? yes : no); message_send_text(c, message_type_info, c, msgtemp); msgtemp = localize(c, "Email: {}", account_get_email(account)); @@ -3602,8 +3604,9 @@ namespace pvpgn message_send_text(c, message_type_error, c, localize(c, "That game does not exist.")); return 0; } - - msgtemp = localize(c, "Name: {} ID: {} ({})", game_get_name(game), game_get_id(game), game_get_flag(game) != game_flag_private ? localize(c, "public") : localize(c, "private")); + const char * pub = localize(c, "public").c_str(); + const char * prv = localize(c, "private").c_str(); + msgtemp = localize(c, "Name: {} ID: {} ({})", game_get_name(game), game_get_id(game), game_get_flag(game) != game_flag_private ? pub : prv); message_send_text(c, message_type_info, c, msgtemp); { diff --git a/src/bnetd/connection.cpp b/src/bnetd/connection.cpp index 72845fe4b..0ffd93006 100644 --- a/src/bnetd/connection.cpp +++ b/src/bnetd/connection.cpp @@ -134,11 +134,11 @@ namespace pvpgn if (fp = std::fopen(lang_filename.c_str(), "r")) { message_send_file(c, fp); if (std::fclose(fp) < 0) { - eventlog(eventlog_level_error, __FUNCTION__, "could not close MOTD file \"%s\" after reading (std::fopen: %s)", lang_filename, std::strerror(errno)); + eventlog(eventlog_level_error, __FUNCTION__, "could not close MOTD file \"%s\" after reading (std::fopen: %s)", lang_filename.c_str(), std::strerror(errno)); } } else { - INFO1("motd file %s not found, sending default motd file", lang_filename); + INFO1("motd file %s not found, sending default motd file", lang_filename.c_str()); if (fp = std::fopen(filename, "r")) { message_send_file(c, fp); if (std::fclose(fp) < 0) { diff --git a/src/bnetd/i18n.cpp b/src/bnetd/i18n.cpp index e3dc58cbd..f7bbade58 100644 --- a/src/bnetd/i18n.cpp +++ b/src/bnetd/i18n.cpp @@ -190,7 +190,7 @@ namespace pvpgn } catch (const std::exception& e) { - ERROR1("Can't format translation string \"%s\" (%s)", fmt, e.what()); + ERROR2("Can't format translation string \"%s\" (%s)", fmt, e.what()); } return output; } From c54e1c15cd81240d8ba2070761d139625ccef3c5 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Thu, 3 Jul 2014 00:35:42 +0400 Subject: [PATCH 081/144] fix compile errors on Linux --- src/bnetd/i18n.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bnetd/i18n.h b/src/bnetd/i18n.h index 68dd0ceb9..d81f6c359 100644 --- a/src/bnetd/i18n.h +++ b/src/bnetd/i18n.h @@ -50,7 +50,7 @@ namespace pvpgn #define _VARIADIC_MAX 10 extern std::string _localize(t_connection * c, const char * func, const char *fmt, const fmt::ArgList &args); FMT_VARIADIC(std::string, _localize, t_connection *, const char *, const char *) - #define localize(c, fmt, ...) _localize(c, __FUNCTION__, fmt, __VA_ARGS__) + #define localize(c, fmt, ...) _localize(c, __FUNCTION__, fmt, ##__VA_ARGS__) } From 3074a6a992832dac35bcf5cd9b89d7064e02bc97 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Thu, 3 Jul 2014 02:08:28 +0400 Subject: [PATCH 082/144] fix Linux compile errors --- src/bnetd/command.cpp | 8 ++++---- src/bnetd/i18n.h | 12 ++++++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 418d75912..9d7ba95f1 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -3416,8 +3416,8 @@ namespace pvpgn /* check /admin-addr for admin privileges */ if ((account_get_command_groups(conn_get_account(c)) & command_get_group("/admin-addr"))) { - const char * yes = localize(c, "Yes").c_str(); - const char * no = localize(c, "No").c_str(); + std::string yes = localize(c, "Yes"); + std::string no = localize(c, "No"); /* the player who requested /finger has admin privileges give him more info about the one he queries; is_admin, is_operator, is_locked, email */ @@ -3604,8 +3604,8 @@ namespace pvpgn message_send_text(c, message_type_error, c, localize(c, "That game does not exist.")); return 0; } - const char * pub = localize(c, "public").c_str(); - const char * prv = localize(c, "private").c_str(); + std::string pub = localize(c, "public"); + std::string prv = localize(c, "private"); msgtemp = localize(c, "Name: {} ID: {} ({})", game_get_name(game), game_get_id(game), game_get_flag(game) != game_flag_private ? pub : prv); message_send_text(c, message_type_info, c, msgtemp); diff --git a/src/bnetd/i18n.h b/src/bnetd/i18n.h index d81f6c359..049eab53c 100644 --- a/src/bnetd/i18n.h +++ b/src/bnetd/i18n.h @@ -47,10 +47,18 @@ namespace pvpgn extern const char * i18n_filename(const char * filename, t_tag gamelang); -#define _VARIADIC_MAX 10 extern std::string _localize(t_connection * c, const char * func, const char *fmt, const fmt::ArgList &args); FMT_VARIADIC(std::string, _localize, t_connection *, const char *, const char *) - #define localize(c, fmt, ...) _localize(c, __FUNCTION__, fmt, ##__VA_ARGS__) + +#if defined (_SOLARIS) +#define localize(c, fmt, ...) _localize(c, __FUNCTION__, fmt, # __VA_ARGS__) + /* optional: disables "warning: argument mismatch" */ + #pragma error_messages (off, E_ARGUEMENT_MISMATCH) +#elif defined (__GNUC__) + #define localize(c, fmt, s...) _localize(c, __FUNCTION__, fmt, ## s) +#else + #define localize(c, fmt, ...) _localize(c, __FUNCTION__, fmt, __VA_ARGS__) +#endif } From db8b9b1aa0db72bf53d285c214aa354dab58d839 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 00:58:20 +0400 Subject: [PATCH 083/144] * set different "conf" path for Windows and Linux * allow all clients by default in Windows config, and more detailed loglevel --- ConfigureChecks.cmake | 12 +++++++++--- conf/bnetd.conf.win32 | 6 +++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 8777b4bdb..3c2571fcb 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -24,9 +24,15 @@ set(LOCALSTATEDIR ${LOCALSTATE_INSTALL_DIR}) set(MANDIR ${MAN_INSTALL_DIR}) # set default hardcoded config paths -set(BNETD_DEFAULT_CONF_FILE "${SYSCONFDIR}/bnetd.conf") -set(D2CS_DEFAULT_CONF_FILE "${SYSCONFDIR}/d2cs.conf") -set(D2DBS_DEFAULT_CONF_FILE "${SYSCONFDIR}/d2dbs.conf") +if(WIN32) + set(BNETD_DEFAULT_CONF_FILE "conf/bnetd.conf") + set(D2CS_DEFAULT_CONF_FILE "conf/d2cs.conf") + set(D2DBS_DEFAULT_CONF_FILE "conf/d2dbs.conf") +else(WIN32) + set(BNETD_DEFAULT_CONF_FILE "${SYSCONFDIR}/bnetd.conf") + set(D2CS_DEFAULT_CONF_FILE "${SYSCONFDIR}/d2cs.conf") + set(D2DBS_DEFAULT_CONF_FILE "${SYSCONFDIR}/d2dbs.conf") +endif(WIN32) # library checks find_package(ZLIB REQUIRED) diff --git a/conf/bnetd.conf.win32 b/conf/bnetd.conf.win32 index 5f7dcd777..c65a56b56 100644 --- a/conf/bnetd.conf.win32 +++ b/conf/bnetd.conf.win32 @@ -124,7 +124,7 @@ tosfile = termsofservice.txt # error # fatal #loglevels = fatal,error,warn,info,debug,trace -loglevels = fatal,error +loglevels = fatal,error,warn,info # # ############################################################################## @@ -202,11 +202,11 @@ allowed_clients = all # than 109. Starting with version 109 the clients will always do version # checking since they do not function properly if the server does not # request it. -skip_versioncheck = false +skip_versioncheck = true # If you enable the version checks but want to allow clients that don't pass # the checksum test then enable this. -allow_bad_version = false +allow_bad_version = true # If you enable the version checks but want to allow clients that aren't # listed in the versioncheck configuration file then enable this. Unless From 29d405fad116a10475ce360c1ecdfcdb9ff4b07b Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 01:08:39 +0400 Subject: [PATCH 084/144] Travis and AppVeyor badges --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 60d7764ce..b4af478fd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Build Status](https://travis-ci.org/HarpyWar/pvpgn.svg?branch=test)](https://travis-ci.org/HarpyWar/pvpgn) [![Build status](https://ci.appveyor.com/api/projects/status/dqoj9lkvhfwthmn6)](https://ci.appveyor.com/project/HarpyWar/pvpgn) Player versus Player Gaming Network ===== ![](http://harpywar.com/images/items/pvpgn.gif) From 82e769ff4925d272041ffbbff4fcb02ed46a2808 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 03:17:00 +0400 Subject: [PATCH 085/144] Add appveyor.yml --- appveyor.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..dc37f8745 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,26 @@ +branches: + only: + - master + +os: Windows Server 2012 + +clone_folder: c:\pvpgn + +install: + - cmd: cd c:\ + - cmd: appveyor DownloadFile https://github.com/HarpyWar/pvpgn-magic-builder/archive/master.zip + - cmd: 7z.exe x master.zip >nul + - cmd: ren pvpgn-magic-builder-master builder + - cmd: mkdir c:\builder\source\ + - cmd: xcopy /E /R /K /Y /Q "c:\pvpgn" "c:\builder\source\" + +before_build: +- cmd: cd c:\builder\ +- cmd: build_pvpgn.bat cmake_only 6 2 1 y +- cmd: "%VS120COMNTOOLS%vsvars32.bat" +- cmd: set INCLUDE=c:\builder\module\include\vsexpress_include\;%INCLUDE% +- cmd: "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount + +test: + assemblies: + - C:\builder\build\src\bnetd\Release\bnetd.exe From a2849dbef895bb2430560c146642daca7d2b842e Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 03:35:58 +0400 Subject: [PATCH 086/144] Update appveyor.yml --- appveyor.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index dc37f8745..429d5b77b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,11 +15,11 @@ install: - cmd: xcopy /E /R /K /Y /Q "c:\pvpgn" "c:\builder\source\" before_build: -- cmd: cd c:\builder\ -- cmd: build_pvpgn.bat cmake_only 6 2 1 y -- cmd: "%VS120COMNTOOLS%vsvars32.bat" -- cmd: set INCLUDE=c:\builder\module\include\vsexpress_include\;%INCLUDE% -- cmd: "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount + - cmd: cd c:\builder\ + - cmd: build_pvpgn.bat cmake_only 6 2 1 y + - cmd: "%VS120COMNTOOLS%vsvars32.bat" + - cmd: set INCLUDE=c:\builder\module\include\vsexpress_include\;%INCLUDE% + - cmd: \"%FrameworkDir%%FrameworkVersion%\\MSBuild.exe" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount test: assemblies: From a08aeaeb8c026eb0fbe2b8d6a8001b96276c1b83 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 03:44:55 +0400 Subject: [PATCH 087/144] Update appveyor.yml --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 429d5b77b..001bb2631 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,9 +17,9 @@ install: before_build: - cmd: cd c:\builder\ - cmd: build_pvpgn.bat cmake_only 6 2 1 y - - cmd: "%VS120COMNTOOLS%vsvars32.bat" + - cmd: \"%VS120COMNTOOLS%vsvars32.bat\" - cmd: set INCLUDE=c:\builder\module\include\vsexpress_include\;%INCLUDE% - - cmd: \"%FrameworkDir%%FrameworkVersion%\\MSBuild.exe" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount + - cmd: \"%FrameworkDir%%FrameworkVersion%\\MSBuild.exe\" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount test: assemblies: From f429d6dd189ed8a9f3d5dbcfc033a8b9d553ada3 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 03:55:03 +0400 Subject: [PATCH 088/144] Update appveyor.yml --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 001bb2631..9890a838b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,9 +17,9 @@ install: before_build: - cmd: cd c:\builder\ - cmd: build_pvpgn.bat cmake_only 6 2 1 y - - cmd: \"%VS120COMNTOOLS%vsvars32.bat\" + - cmd: start "%VS120COMNTOOLS%vsvars32.bat" - cmd: set INCLUDE=c:\builder\module\include\vsexpress_include\;%INCLUDE% - - cmd: \"%FrameworkDir%%FrameworkVersion%\\MSBuild.exe\" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount + - cmd: start "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount test: assemblies: From bdbd032c8529b293aac9354a3092fab63e70647c Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 04:05:46 +0400 Subject: [PATCH 089/144] Update appveyor.yml --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9890a838b..d0c1ff0c6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,9 +17,9 @@ install: before_build: - cmd: cd c:\builder\ - cmd: build_pvpgn.bat cmake_only 6 2 1 y - - cmd: start "%VS120COMNTOOLS%vsvars32.bat" + - cmd: call "%VS120COMNTOOLS%vsvars32.bat" - cmd: set INCLUDE=c:\builder\module\include\vsexpress_include\;%INCLUDE% - - cmd: start "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount + - cmd: call "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount test: assemblies: From 80484825926b3529f85bf4bc532579e89e4e309b Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 04:47:03 +0400 Subject: [PATCH 090/144] Update appveyor.yml --- appveyor.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d0c1ff0c6..8248d6e84 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,8 +19,5 @@ before_build: - cmd: build_pvpgn.bat cmake_only 6 2 1 y - cmd: call "%VS120COMNTOOLS%vsvars32.bat" - cmd: set INCLUDE=c:\builder\module\include\vsexpress_include\;%INCLUDE% - - cmd: call "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount - -test: - assemblies: - - C:\builder\build\src\bnetd\Release\bnetd.exe + - cmd: cd c:\build\ + - cmd: call "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount From f26d23b991b60086f12f7719d74f740028a36648 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 04:47:29 +0400 Subject: [PATCH 091/144] Update appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 8248d6e84..fbd73c6ba 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,5 +19,5 @@ before_build: - cmd: build_pvpgn.bat cmake_only 6 2 1 y - cmd: call "%VS120COMNTOOLS%vsvars32.bat" - cmd: set INCLUDE=c:\builder\module\include\vsexpress_include\;%INCLUDE% - - cmd: cd c:\build\ + - cmd: cd c:\builder\build\ - cmd: call "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount From ee3967385d419b2aab8f235eb49f9fdac97af721 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 05:22:35 +0400 Subject: [PATCH 092/144] Update appveyor.yml --- appveyor.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index fbd73c6ba..cfddd9661 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,10 +14,13 @@ install: - cmd: mkdir c:\builder\source\ - cmd: xcopy /E /R /K /Y /Q "c:\pvpgn" "c:\builder\source\" -before_build: +build_script: - cmd: cd c:\builder\ - cmd: build_pvpgn.bat cmake_only 6 2 1 y - cmd: call "%VS120COMNTOOLS%vsvars32.bat" - cmd: set INCLUDE=c:\builder\module\include\vsexpress_include\;%INCLUDE% - - cmd: cd c:\builder\build\ - - cmd: call "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount + - cmd: call "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount + +test: + assemblies: + - C:\builder\build\src\bnetd\Release\bnetd.exe From 6a65e2012a172b1bb11ecb3df504aece9918ef54 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 05:37:59 +0400 Subject: [PATCH 093/144] Update appveyor.yml --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index cfddd9661..b02c83ce2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,6 +14,8 @@ install: - cmd: mkdir c:\builder\source\ - cmd: xcopy /E /R /K /Y /Q "c:\pvpgn" "c:\builder\source\" +build: + project: MyTestAzureCS.sln build_script: - cmd: cd c:\builder\ - cmd: build_pvpgn.bat cmake_only 6 2 1 y From cfc69231788ea331b6668b6337850634bde8ac53 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 05:39:05 +0400 Subject: [PATCH 094/144] Update appveyor.yml --- appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b02c83ce2..ad22887a6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,7 +15,8 @@ install: - cmd: xcopy /E /R /K /Y /Q "c:\pvpgn" "c:\builder\source\" build: - project: MyTestAzureCS.sln + project: c:\builder\build\pvpgn.sln + build_script: - cmd: cd c:\builder\ - cmd: build_pvpgn.bat cmake_only 6 2 1 y @@ -25,4 +26,4 @@ build_script: test: assemblies: - - C:\builder\build\src\bnetd\Release\bnetd.exe + - *\src\bnetd\Release\bnetd.exe From b325926cfc7640764d7b2143b231a9a3bc2332ce Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 05:44:00 +0400 Subject: [PATCH 095/144] Update appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index ad22887a6..e1c6e390f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,4 +26,4 @@ build_script: test: assemblies: - - *\src\bnetd\Release\bnetd.exe + - '**\src\bnetd\Release\bnetd.exe' From a393e038293fe6d3558d04732d690d5aee7e0d96 Mon Sep 17 00:00:00 2001 From: xboi209 Date: Thu, 3 Jul 2014 21:23:39 -0700 Subject: [PATCH 096/144] Update TODO Removed Gamespy protocol support, updated roadmap for PvPGN 2.0-PRO --- TODO | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/TODO b/TODO index 52fe7e77c..e8edb775c 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,7 @@ PvPGN TODO LIST AND WHATS BEING WORKED ON: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -Release v1.7 ROADMAP: +Release v2.0-PRO ROADMAP: 1. DOCUMENTATION (client and server documentation; a FAQ, HOWTO and a file describing all configuration options) 2. i18n or some sort to support different language messages to users @@ -32,10 +32,6 @@ a client lib) * design a plugins support and move in time all the code in plugins (except the core code of course) -* add gamespy protocol support (gamespy master server does what we do in bnetd -keeping user accounts, records, stats, channels, publishing games to requestors) -very nice ideea from Mivabe - * add some way to be able to read/write specific "runtime changable" bnetd.conf entries (like while server is online doing /config "allow_unknown_version" "false") From 6550ecc78ba009e99ef4d5d7262bab3e1f238e15 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 14:51:47 +0400 Subject: [PATCH 097/144] Update appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index e1c6e390f..8ac565ece 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,7 +21,7 @@ build_script: - cmd: cd c:\builder\ - cmd: build_pvpgn.bat cmake_only 6 2 1 y - cmd: call "%VS120COMNTOOLS%vsvars32.bat" - - cmd: set INCLUDE=c:\builder\module\include\vsexpress_include\;%INCLUDE% + - cmd: set INCLUDE=c:\builder\module\include\atlmfc\;%INCLUDE% - cmd: call "%FrameworkDir%%FrameworkVersion%\MSBuild.exe" c:\builder\build\pvpgn.sln /t:Rebuild /p:Configuration=Release;UseEnv=true /consoleloggerparameters:Summary;PerformanceSummary;Verbosity=minimal /maxcpucount test: From 6ec07558b74ce1f676fd402f008eefa5abbf6eeb Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 16:27:11 +0400 Subject: [PATCH 098/144] remove ZLIB_WINAPI macro https://github.com/HarpyWar/pvpgn/issues/24 --- src/bnetd/anongame_infos.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/bnetd/anongame_infos.cpp b/src/bnetd/anongame_infos.cpp index cefd90d98..8c920b519 100644 --- a/src/bnetd/anongame_infos.cpp +++ b/src/bnetd/anongame_infos.cpp @@ -28,9 +28,6 @@ #include "common/tag.h" #include "common/bn_type.h" #include "common/xalloc.h" -#ifdef WIN32 -# define ZLIB_WINAPI -#endif #include "zlib.h" #include "tournament.h" #include "anongame_maplists.h" From eff351d652125e80045d883c6b7ab506a8048427 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 4 Jul 2014 17:53:08 +0400 Subject: [PATCH 099/144] Update TODO https://github.com/HarpyWar/pvpgn/pull/41 --- TODO | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index e8edb775c..565591b52 100644 --- a/TODO +++ b/TODO @@ -3,8 +3,10 @@ PvPGN TODO LIST AND WHATS BEING WORKED ON: Release v2.0-PRO ROADMAP: 1. DOCUMENTATION (client and server documentation; a FAQ, HOWTO and a file -describing all configuration options) +describing all configuration options). Site http://pvpgn.pro 2. i18n or some sort to support different language messages to users +3. Connectivity with Ghost++ to support DotA + Stuff not programmed for any specific version release: From 937ac6723befc11a9289790b3c01c14c24b92679 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 6 Jul 2014 16:44:58 +0400 Subject: [PATCH 100/144] * move /killsession and /addacct into commented section for debug https://github.com/HarpyWar/pvpgn/issues/42 * remove unknown command /bitsinfo --- conf/command_groups.conf.in | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/conf/command_groups.conf.in b/conf/command_groups.conf.in index 711a36a43..dd44cdc52 100644 --- a/conf/command_groups.conf.in +++ b/conf/command_groups.conf.in @@ -69,7 +69,6 @@ 1 /mail 1 /motd 1 /tos -1 /bitsinfo 1 /latency /ping /p 1 /topic 1 /icon @@ -155,8 +154,7 @@ 3 /serverban /ipban 3 /ipscan -4 /kill /killsession -4 /addacct +4 /kill 4 /lock /lockacct /unlock /unlockacct 4 /mute /muteacct /unmute /unmuteacct @@ -173,6 +171,14 @@ 8 /shutdown /rehash /find /save + +# ////////////////////////////////////// +# ///// Commands for Debugging ///// +# ////////////////////////////////////// +#8 /killsession +#8 /addacct + + # ////////////////////////////////////// # ///// End of Command Groups File ///// # ////////////////////////////////////// From d74da670c14cfd522ff41e0e00afabb63f2c7c37 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 6 Jul 2014 20:02:22 +0400 Subject: [PATCH 101/144] the latest cppformat library version 0.10.0 --- src/common/format.cpp | 138 +++-- src/common/format.h | 1144 ++++++++++++++++++++++------------------- 2 files changed, 702 insertions(+), 580 deletions(-) diff --git a/src/common/format.cpp b/src/common/format.cpp index 3f5d8080b..566a0104a 100644 --- a/src/common/format.cpp +++ b/src/common/format.cpp @@ -116,10 +116,37 @@ void ReportError(FormatFunc func, std::fputc('\n', stderr); } catch (...) {} } + +const fmt::internal::ArgInfo DUMMY_ARG = {fmt::internal::ArgInfo::INT, 0}; + +fmt::ULongLong GetIntValue(const fmt::internal::ArgInfo &arg) { + typedef fmt::internal::ArgInfo Arg; + switch (arg.type) { + case Arg::INT: + return arg.int_value; + case Arg::UINT: + return arg.uint_value; + case Arg::LONG_LONG: + return arg.long_long_value; + case Arg::ULONG_LONG: + return arg.ulong_long_value; + default: + return -1; + } +} } // namespace int fmt::internal::SignBitNoInline(double value) { return SignBit(value); } +void fmt::SystemError::init( + int error_code, StringRef format_str, const ArgList &args) { + error_code_ = error_code; + Writer w; + internal::FormatSystemErrorMessage(w, error_code, format(format_str, args)); + std::runtime_error &base = *this; + base = std::runtime_error(w.str()); +} + template int fmt::internal::CharTraits::FormatFloat( char *buffer, std::size_t size, const char *format, @@ -178,12 +205,12 @@ const uint64_t fmt::internal::POWERS_OF_10_64[] = { void fmt::internal::ReportUnknownType(char code, const char *type) { if (std::isprint(static_cast(code))) { - throw fmt::FormatError(fmt::str( - fmt::Format("unknown format code '{}' for {}") << code << type)); + throw fmt::FormatError( + fmt::format("unknown format code '{}' for {}", code, type)); } throw fmt::FormatError( - fmt::str(fmt::Format("unknown format code '\\x{:02x}' for {}") - << static_cast(code) << type)); + fmt::format("unknown format code '\\x{:02x}' for {}", + static_cast(code), type)); } #ifdef _WIN32 @@ -193,17 +220,17 @@ fmt::internal::UTF8ToUTF16::UTF8ToUTF16(fmt::StringRef s) { CP_UTF8, MB_ERR_INVALID_CHARS, s.c_str(), -1, 0, 0); static const char ERROR[] = "cannot convert string from UTF-8 to UTF-16"; if (length == 0) - ThrowWinError(GetLastError(), ERROR); + throw WindowsError(GetLastError(), ERROR); buffer_.resize(length); length = MultiByteToWideChar( CP_UTF8, MB_ERR_INVALID_CHARS, s.c_str(), -1, &buffer_[0], length); if (length == 0) - ThrowWinError(GetLastError(), ERROR); + throw WindowsError(GetLastError(), ERROR); } fmt::internal::UTF16ToUTF8::UTF16ToUTF8(fmt::WStringRef s) { if (int error_code = Convert(s)) { - ThrowWinError(GetLastError(), + throw WindowsError(GetLastError(), "cannot convert string from UTF-16 to UTF-8"); } } @@ -220,6 +247,15 @@ int fmt::internal::UTF16ToUTF8::Convert(fmt::WStringRef s) { return 0; } +void fmt::WindowsError::init( + int error_code, StringRef format_str, const ArgList &args) { + error_code_ = error_code; + Writer w; + internal::FormatWinErrorMessage(w, error_code, format(format_str, args)); + std::runtime_error &base = *this; + base = std::runtime_error(w.str()); +} + #endif int fmt::internal::StrError( @@ -289,7 +325,7 @@ void fmt::internal::FormatWinErrorMessage( reinterpret_cast(system_message.ptr()), 0, 0)) { UTF16ToUTF8 utf8_message; if (!utf8_message.Convert(system_message.c_str())) { - out << message << ": " << c_str(utf8_message); + out << message << ": " << utf8_message; return; } } @@ -332,10 +368,6 @@ int fmt::internal::ParseNonnegativeInt( return value; } -template -const typename fmt::internal::ArgInfo - fmt::BasicWriter::DUMMY_ARG = {fmt::internal::ArgInfo::INT, 0}; - // Fills the padding around the content and returns the pointer to the // content area. template @@ -397,7 +429,7 @@ void fmt::BasicWriter::FormatDouble(T value, const FormatSpec &spec) { --size; ++nan; } - CharPtr out = FormatString(nan, size, spec); + CharPtr out = write_str(nan, size, spec); if (sign) *out = sign; return; @@ -412,7 +444,7 @@ void fmt::BasicWriter::FormatDouble(T value, const FormatSpec &spec) { --size; ++inf; } - CharPtr out = FormatString(inf, size, spec); + CharPtr out = write_str(inf, size, spec); if (sign) *out = sign; return; @@ -502,26 +534,10 @@ void fmt::BasicWriter::FormatDouble(T value, const FormatSpec &spec) { } } -template -fmt::ULongLong fmt::BasicWriter::GetIntValue(const Arg &arg) { - switch (arg.type) { - case Arg::INT: - return arg.int_value; - case Arg::UINT: - return arg.uint_value; - case Arg::LONG_LONG: - return arg.long_long_value; - case Arg::ULONG_LONG: - return arg.ulong_long_value; - default: - return -1; - } -} - template template -void fmt::BasicWriter::FormatString( - const Arg::StringValue &str, const FormatSpec &spec) { +void fmt::BasicWriter::write_str( + const internal::StringValue &str, const FormatSpec &spec) { if (spec.type_ && spec.type_ != 's') internal::ReportUnknownType(spec.type_, "string"); const StringChar *s = str.value; @@ -532,7 +548,7 @@ void fmt::BasicWriter::FormatString( if (*s) size = std::char_traits::length(s); } - FormatString(s, size, spec); + write_str(s, size, spec); } template @@ -569,17 +585,17 @@ void fmt::BasicWriter::FormatParser::CheckSign( char sign = static_cast(*s); if (arg.type > Arg::LAST_NUMERIC_TYPE) { report_error_(s, - fmt::Format("format specifier '{}' requires numeric argument") << sign); + fmt::format("format specifier '{}' requires numeric argument", sign).c_str()); } if (arg.type == Arg::UINT || arg.type == Arg::ULONG_LONG) { report_error_(s, - fmt::Format("format specifier '{}' requires signed argument") << sign); + fmt::format("format specifier '{}' requires signed argument", sign).c_str()); } ++s; } template -void fmt::BasicWriter::PrintfParser::ParseFlags( +void fmt::internal::PrintfParser::ParseFlags( FormatSpec &spec, const Char *&s) { for (;;) { switch (*s++) { @@ -606,7 +622,7 @@ void fmt::BasicWriter::PrintfParser::ParseFlags( } template -unsigned fmt::BasicWriter::PrintfParser::ParseHeader( +unsigned fmt::internal::PrintfParser::ParseHeader( const Char *&s, FormatSpec &spec, const char *&error) { unsigned arg_index = UINT_MAX; Char c = *s; @@ -672,8 +688,8 @@ unsigned fmt::BasicWriter::PrintfParser::ParseHeader( // TODO: move to a base class that doesn't depend on template argument template -const typename fmt::BasicWriter::Arg - &fmt::BasicWriter::PrintfParser::HandleArgIndex( +const fmt::internal::ArgInfo + &fmt::internal::PrintfParser::HandleArgIndex( unsigned arg_index, const char *&error) { if (arg_index != UINT_MAX) { if (next_arg_index_ <= 0) { @@ -695,7 +711,7 @@ const typename fmt::BasicWriter::Arg } template -void fmt::BasicWriter::PrintfParser::Format( +void fmt::internal::PrintfParser::Format( BasicWriter &writer, BasicStringRef format, const ArgList &args) { const Char *start = format.c_str(); @@ -739,7 +755,7 @@ void fmt::BasicWriter::PrintfParser::Format( ++s; const Arg &arg = HandleArgIndex(UINT_MAX, error); if (arg.type <= Arg::LAST_INTEGER_TYPE) - spec.precision_ = GetIntValue(arg); + spec.precision_ = static_cast(GetIntValue(arg)); // TODO: check for overflow else if (!error) error = "precision is not integer"; } @@ -821,10 +837,10 @@ void fmt::BasicWriter::PrintfParser::Format( break; } case Arg::STRING: - writer.FormatString(arg.string, spec); + writer.write_str(arg.string, spec); break; case Arg::WSTRING: - writer.FormatString(arg.wstring, spec); + writer.write_str(internal::CharTraits::convert(arg.wstring), spec); break; case Arg::POINTER: if (spec.type_ && spec.type_ != 'p') @@ -1045,10 +1061,10 @@ void fmt::BasicWriter::FormatParser::Format( break; } case Arg::STRING: - writer.FormatString(arg.string, spec); + writer.write_str(arg.string, spec); break; case Arg::WSTRING: - writer.FormatString(arg.wstring, spec); + writer.write_str(internal::CharTraits::convert(arg.wstring), spec); break; case Arg::POINTER: if (spec.type_ && spec.type_ != 'p') @@ -1070,12 +1086,6 @@ void fmt::BasicWriter::FormatParser::Format( writer.buffer_.append(start, s); } -void fmt::SystemErrorSink::operator()(const fmt::Writer &w) const { - Writer message; - internal::FormatSystemErrorMessage(message, error_code_, w.c_str()); - throw SystemError(message.c_str(), error_code_); -} - void fmt::ReportSystemError( int error_code, fmt::StringRef message) FMT_NOEXCEPT(true) { // FIXME: FormatSystemErrorMessage may throw @@ -1084,9 +1094,7 @@ void fmt::ReportSystemError( #ifdef _WIN32 void fmt::WinErrorSink::operator()(const Writer &w) const { - Writer message; - internal::FormatWinErrorMessage(message, error_code_, w.c_str()); - throw SystemError(message.c_str(), error_code_); + throw WindowsError(error_code_, w.c_str()); } void fmt::ReportWinError( @@ -1105,6 +1113,24 @@ void fmt::ANSITerminalSink::operator()( std::fputs(RESET_COLOR, file_); } +void fmt::print(StringRef format, const ArgList &args) { + Writer w; + w.write(format, args); + std::fwrite(w.data(), 1, w.size(), stdout); +} + +void fmt::print(std::FILE *f, StringRef format, const ArgList &args) { + Writer w; + w.write(format, args); + std::fwrite(w.data(), 1, w.size(), f); +} + +void fmt::printf(StringRef format, const ArgList &args) { + Writer w; + printf(w, format, args); + std::fwrite(w.data(), 1, w.size(), stdout); +} + // Explicit instantiations for char. template fmt::BasicWriter::CharPtr @@ -1114,7 +1140,7 @@ template fmt::BasicWriter::CharPtr template void fmt::BasicWriter::FormatParser::Format( BasicWriter &writer, BasicStringRef format, const ArgList &args); -template void fmt::BasicWriter::PrintfParser::Format( +template void fmt::internal::PrintfParser::Format( BasicWriter &writer, BasicStringRef format, const ArgList &args); // Explicit instantiations for wchar_t. @@ -1127,7 +1153,7 @@ template void fmt::BasicWriter::FormatParser::Format( BasicWriter &writer, BasicStringRef format, const ArgList &args); -template void fmt::BasicWriter::PrintfParser::Format( +template void fmt::internal::PrintfParser::Format( BasicWriter &writer, BasicStringRef format, const ArgList &args); diff --git a/src/common/format.h b/src/common/format.h index 9e6eae899..c4182588b 100644 --- a/src/common/format.h +++ b/src/common/format.h @@ -119,6 +119,16 @@ TypeName(const TypeName&); \ void operator=(const TypeName&) +#ifdef FMT_DEPRECATED +// Do nothing. +#elif defined(__GNUC__) +# define FMT_DEPRECATED(func) func __attribute__((deprecated)) +#elif defined(_MSC_VER) +# define FMT_DEPRECATED(func) __declspec(deprecated) func +#else +# define FMT_DEPRECATED(func) func +#endif + #if FMT_MSC_VER # pragma warning(push) # pragma warning(disable: 4521) // 'class' : multiple copy constructors specified @@ -131,6 +141,10 @@ namespace fmt { FMT_GCC_EXTENSION typedef long long LongLong; FMT_GCC_EXTENSION typedef unsigned long long ULongLong; +#if FMT_USE_RVALUE_REFERENCES +using std::move; +#endif + template class BasicWriter; @@ -144,15 +158,27 @@ struct FormatSpec; /** \rst - A string reference. It can be constructed from a C string, ``std::string`` - or as a result of a formatting operation. It is most useful as a parameter - type to allow passing different types of strings in a function, for example:: + A string reference. It can be constructed from a C string or + ``std::string``. + + You can use one of the following typedefs for common character types: + + +------------+-------------------------+ + | Type | Definition | + +============+=========================+ + | StringRef | BasicStringRef | + +------------+-------------------------+ + | WStringRef | BasicStringRef | + +------------+-------------------------+ - Formatter<> Format(StringRef format); + This class is most useful as a parameter type to allow passing + different types of strings to a function, for example:: - Format("{}") << 42; - Format(std::string("{}")) << 42; - Format(Format("{{}}")) << 42; + template + Writer format(StringRef format, const Args & ... args); + + format("{}", 42); + format(std::string("{}"), 42); \endrst */ template @@ -242,8 +268,14 @@ class Array { if (ptr_ != data_) delete [] ptr_; } + FMT_DISALLOW_COPY_AND_ASSIGN(Array); + + public: + Array() : size_(0), capacity_(SIZE), ptr_(data_) {} + ~Array() { Free(); } + // Move data from other to this array. - void Move(Array &other) { + void move(Array &other) { size_ = other.size_; capacity_ = other.capacity_; if (other.ptr_ == other.data_) { @@ -257,21 +289,15 @@ class Array { } } - FMT_DISALLOW_COPY_AND_ASSIGN(Array); - - public: - Array() : size_(0), capacity_(SIZE), ptr_(data_) {} - ~Array() { Free(); } - #if FMT_USE_RVALUE_REFERENCES Array(Array &&other) { - Move(other); + move(other); } Array& operator=(Array &&other) { assert(this != &other); Free(); - Move(other); + move(other); return *this; } #endif @@ -329,6 +355,12 @@ void Array::append(const T *begin, const T *end) { size_ += num_elements; } +template +struct StringValue { + const Char *value; + std::size_t size; +}; + template class CharTraits; @@ -353,6 +385,11 @@ class CharTraits : public BasicCharTraits { static char ConvertChar(char value) { return value; } + static StringValue convert(StringValue) { + StringValue s = {"", 0}; + return s; + } + template static int FormatFloat(char *buffer, std::size_t size, const char *format, unsigned width, int precision, T value); @@ -366,6 +403,8 @@ class CharTraits : public BasicCharTraits { static wchar_t ConvertChar(char value) { return value; } static wchar_t ConvertChar(wchar_t value) { return value; } + static StringValue convert(StringValue s) { return s; } + template static int FormatFloat(wchar_t *buffer, std::size_t size, const wchar_t *format, unsigned width, int precision, T value); @@ -492,6 +531,7 @@ class UTF8ToUTF16 { explicit UTF8ToUTF16(StringRef s); operator WStringRef() const { return WStringRef(&buffer_[0], size()); } size_t size() const { return buffer_.size() - 1; } + std::wstring str() const { return std::wstring(&buffer_[0], size()); } }; // A converter from UTF-16 to UTF-8. @@ -505,6 +545,7 @@ class UTF16ToUTF8 { explicit UTF16ToUTF8(WStringRef s); operator StringRef() const { return StringRef(&buffer_[0], size()); } size_t size() const { return buffer_.size() - 1; } + std::string str() const { return std::string(&buffer_[0], size()); } // Performs conversion returning a system error code instead of // throwing exception on error. @@ -577,12 +618,6 @@ struct ArgInfo { }; Type type; - template - struct StringValue { - const Char *value; - std::size_t size; - }; - typedef void (*FormatFunc)( void *writer, const void *arg, const FormatSpec &spec); @@ -604,22 +639,171 @@ struct ArgInfo { CustomValue custom; }; }; + +// An argument action that does nothing. +struct NullArgAction { + void operator()() const {} +}; + +// A wrapper around a format argument. +template +class BasicArg : public Action, public internal::ArgInfo { + private: + // This method is private to disallow formatting of arbitrary pointers. + // If you want to output a pointer cast it to const void*. Do not implement! + template + BasicArg(const T *value); + + // This method is private to disallow formatting of arbitrary pointers. + // If you want to output a pointer cast it to void*. Do not implement! + template + BasicArg(T *value); + + public: + using internal::ArgInfo::type; + + BasicArg() {} + // TODO: unsigned char & signed char + BasicArg(short value) { type = INT; int_value = value; } + BasicArg(unsigned short value) { type = UINT; uint_value = value; } + BasicArg(int value) { type = INT; int_value = value; } + BasicArg(unsigned value) { type = UINT; uint_value = value; } + BasicArg(long value) { + if (sizeof(long) == sizeof(int)) { + type = INT; + int_value = static_cast(value); + } else { + type = LONG_LONG; + long_long_value = value; + } + } + BasicArg(unsigned long value) { + if (sizeof(unsigned long) == sizeof(unsigned)) { + type = UINT; + uint_value = static_cast(value); + } else { + type = ULONG_LONG; + ulong_long_value = value; + } + } + BasicArg(LongLong value) { type = LONG_LONG; long_long_value = value; } + BasicArg(ULongLong value) { type = ULONG_LONG; ulong_long_value = value; } + BasicArg(float value) { type = DOUBLE; double_value = value; } + BasicArg(double value) { type = DOUBLE; double_value = value; } + BasicArg(long double value) { type = LONG_DOUBLE; long_double_value = value; } + BasicArg(char value) { type = CHAR; int_value = value; } + BasicArg(wchar_t value) { + type = CHAR; + int_value = internal::CharTraits::ConvertChar(value); + } + + BasicArg(const char *value) { + type = STRING; + string.value = value; + string.size = 0; + } + + BasicArg(const wchar_t *value) { + type = WSTRING; + wstring.value = value; + wstring.size = 0; + } + + BasicArg(Char *value) { + type = STRING; + string.value = value; + string.size = 0; + } + + BasicArg(const void *value) { type = POINTER; pointer_value = value; + } + BasicArg(void *value) { type = POINTER; pointer_value = value; } + + BasicArg(const std::basic_string &value) { + type = STRING; + string.value = value.c_str(); + string.size = value.size(); + } + + BasicArg(BasicStringRef value) { + type = STRING; + string.value = value.c_str(); + string.size = value.size(); + } + + template + BasicArg(const T &value) { + type = CUSTOM; + custom.value = &value; + custom.format = &internal::FormatCustomArg; + } + + // The destructor is declared noexcept(false) because the action may throw + // an exception. + ~BasicArg() FMT_NOEXCEPT(false) { + // Invoke the action. + (*this)(); + } +}; + +template +inline ArgInfo make_arg(const T &arg) { return BasicArg(arg); } + +class SystemErrorBase : public std::runtime_error { +public: + SystemErrorBase() : std::runtime_error("") {} +}; } // namespace internal /** - An error returned by an operating system or a language runtime, - for example a file opening error. + An argument list. */ -class SystemError : public std::runtime_error { +class ArgList { private: - int error_code_; + const internal::ArgInfo *args_; + std::size_t size_; - public: - SystemError(StringRef message, int error_code) - : std::runtime_error(message), error_code_(error_code) {} +public: + ArgList() : size_(0) {} + ArgList(const internal::ArgInfo *args, std::size_t size) + : args_(args), size_(size) {} - int error_code() const { return error_code_; } + /** + Returns the list size (the number of arguments). + */ + std::size_t size() const { return size_; } + + /** + Returns the argument at specified index. + */ + const internal::ArgInfo &operator[](std::size_t index) const { + return args_[index]; + } +}; + +namespace internal { +// Printf format string parser. +template +class PrintfParser { + private: + ArgList args_; + int next_arg_index_; + + typedef ArgInfo Arg; + + void ParseFlags(FormatSpec &spec, const Char *&s); + + // Parses argument index, flags and width and returns the parsed + // argument index. + unsigned ParseHeader(const Char *&s, FormatSpec &spec, const char *&error); + + const ArgInfo &HandleArgIndex(unsigned arg_index, const char *&error); + + public: + void Format(BasicWriter &writer, + BasicStringRef format, const ArgList &args); }; +} // namespace internal enum Alignment { ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, ALIGN_NUMERIC @@ -847,51 +1031,140 @@ inline StrFormatSpec pad( return StrFormatSpec(str, width, fill); } -class ArgList { - private: - const internal::ArgInfo *args_; - std::size_t size_; +// Generates a comma-separated list with results of applying f to numbers 0..n-1. +# define FMT_GEN(n, f) FMT_GEN##n(f) +# define FMT_GEN1(f) f(0) +# define FMT_GEN2(f) FMT_GEN1(f), f(1) +# define FMT_GEN3(f) FMT_GEN2(f), f(2) +# define FMT_GEN4(f) FMT_GEN3(f), f(3) +# define FMT_GEN5(f) FMT_GEN4(f), f(4) +# define FMT_GEN6(f) FMT_GEN5(f), f(5) +# define FMT_GEN7(f) FMT_GEN6(f), f(6) +# define FMT_GEN8(f) FMT_GEN7(f), f(7) +# define FMT_GEN9(f) FMT_GEN8(f), f(8) +# define FMT_GEN10(f) FMT_GEN9(f), f(9) + +# define FMT_MAKE_TEMPLATE_ARG(n) typename T##n +# define FMT_MAKE_ARG(n) const T##n &v##n +# define FMT_MAKE_REF_char(n) fmt::internal::make_arg(v##n) +# define FMT_MAKE_REF_wchar_t(n) fmt::internal::make_arg(v##n) -public: - ArgList() : size_(0) {} - ArgList(const internal::ArgInfo *args, std::size_t size) - : args_(args), size_(size) {} +#if FMT_USE_VARIADIC_TEMPLATES +// Defines a variadic function returning void. +# define FMT_VARIADIC_VOID(func, arg_type) \ + template \ + void func(arg_type arg1, const Args & ... args) { \ + const internal::ArgInfo arg_array[fmt::internal::NonZero::VALUE] = { \ + fmt::internal::make_arg(args)... \ + }; \ + func(arg1, ArgList(arg_array, sizeof...(Args))); \ + } - std::size_t size() const { return size_; } +// Defines a variadic constructor. +# define FMT_VARIADIC_CTOR(ctor, func, arg0_type, arg1_type) \ + template \ + ctor(arg0_type arg0, arg1_type arg1, const Args & ... args) { \ + const internal::ArgInfo arg_array[fmt::internal::NonZero::VALUE] = { \ + fmt::internal::make_arg(args)... \ + }; \ + func(arg0, arg1, ArgList(arg_array, sizeof...(Args))); \ + } - const internal::ArgInfo &operator[](std::size_t index) const { - return args_[index]; +#else + +# define FMT_MAKE_REF(n) fmt::internal::make_arg(v##n) +// Defines a wrapper for a function taking one argument of type arg_type +// and n additional arguments of arbitrary types. +# define FMT_WRAP1(func, arg_type, n) \ + template \ + inline void func(arg_type arg1, FMT_GEN(n, FMT_MAKE_ARG)) { \ + const fmt::internal::ArgInfo args[] = {FMT_GEN(n, FMT_MAKE_REF)}; \ + func(arg1, fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ } -}; -// Generates a comma-separated list by applying f to numbers 1..n. -#define FMT_GEN(n, f) FMT_GEN##n(f) -#define FMT_GEN1(f) f(1) -#define FMT_GEN2(f) FMT_GEN1(f), f(2) -#define FMT_GEN3(f) FMT_GEN2(f), f(3) -#define FMT_GEN4(f) FMT_GEN3(f), f(4) -#define FMT_GEN5(f) FMT_GEN4(f), f(5) -#define FMT_GEN6(f) FMT_GEN5(f), f(6) -#define FMT_GEN7(f) FMT_GEN6(f), f(7) -#define FMT_GEN8(f) FMT_GEN7(f), f(8) -#define FMT_GEN9(f) FMT_GEN8(f), f(9) - -#define FMT_MAKE_TEMPLATE_ARG(n) typename T##n -#define FMT_MAKE_ARG(n) const T##n &v##n -#define FMT_MAKE_REF(n) MakeArg(v##n) - -#define FMT_TEMPLATE(func_name, n) \ +// Emulates a variadic function returning void on a pre-C++11 compiler. +# define FMT_VARIADIC_VOID(func, arg_type) \ + FMT_WRAP1(func, arg_type, 1) FMT_WRAP1(func, arg_type, 2) \ + FMT_WRAP1(func, arg_type, 3) FMT_WRAP1(func, arg_type, 4) \ + FMT_WRAP1(func, arg_type, 5) FMT_WRAP1(func, arg_type, 6) \ + FMT_WRAP1(func, arg_type, 7) FMT_WRAP1(func, arg_type, 8) \ + FMT_WRAP1(func, arg_type, 9) FMT_WRAP1(func, arg_type, 10) + +# define FMT_CTOR(ctor, func, arg0_type, arg1_type, n) \ template \ - inline void func_name(BasicStringRef format, FMT_GEN(n, FMT_MAKE_ARG)) { \ + ctor(arg0_type arg0, arg1_type arg1, FMT_GEN(n, FMT_MAKE_ARG)) { \ const fmt::internal::ArgInfo args[] = {FMT_GEN(n, FMT_MAKE_REF)}; \ - func_name(format, fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ + func(arg0, arg1, fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ + } + +// Emulates a variadic function returning void on a pre-C++11 compiler. +# define FMT_VARIADIC_CTOR(ctor, func, arg0_type, arg1_type) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 1) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 2) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 3) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 4) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 5) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 6) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 7) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 8) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 9) \ + FMT_CTOR(ctor, func, arg0_type, arg1_type, 10) +#endif + +// Generates a comma-separated list with results of applying f to pairs +// (argument, index). +#define FMT_FOR_EACH1(f, x0) f(x0, 0) +#define FMT_FOR_EACH2(f, x0, x1) \ + FMT_FOR_EACH1(f, x0), f(x1, 1) +#define FMT_FOR_EACH3(f, x0, x1, x2) \ + FMT_FOR_EACH2(f, x0 ,x1), f(x2, 2) +#define FMT_FOR_EACH4(f, x0, x1, x2, x3) \ + FMT_FOR_EACH3(f, x0, x1, x2), f(x3, 3) +#define FMT_FOR_EACH5(f, x0, x1, x2, x3, x4) \ + FMT_FOR_EACH4(f, x0, x1, x2, x3), f(x4, 4) +#define FMT_FOR_EACH6(f, x0, x1, x2, x3, x4, x5) \ + FMT_FOR_EACH5(f, x0, x1, x2, x3, x4), f(x5, 5) +#define FMT_FOR_EACH7(f, x0, x1, x2, x3, x4, x5, x6) \ + FMT_FOR_EACH6(f, x0, x1, x2, x3, x4, x5), f(x6, 6) +#define FMT_FOR_EACH8(f, x0, x1, x2, x3, x4, x5, x6, x7) \ + FMT_FOR_EACH7(f, x0, x1, x2, x3, x4, x5, x6), f(x7, 7) +#define FMT_FOR_EACH9(f, x0, x1, x2, x3, x4, x5, x6, x7, x8) \ + FMT_FOR_EACH8(f, x0, x1, x2, x3, x4, x5, x6, x7), f(x8, 8) +#define FMT_FOR_EACH10(f, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) \ + FMT_FOR_EACH9(f, x0, x1, x2, x3, x4, x5, x6, x7, x8), f(x9, 9) + +/** +An error returned by an operating system or a language runtime, +for example a file opening error. +*/ +class SystemError : public internal::SystemErrorBase { + private: + void init(int error_code, StringRef format_str, const ArgList &args); + + protected: + int error_code_; + + typedef char Char; // For FMT_VARIADIC_CTOR. + + SystemError() {} + + public: + /** + \rst + Constructs a :cpp:class:`fmt::SystemError` object with the description + of the form "**: **", where ** is the + formatted message and ** is the system message corresponding + to the error code. + *error_code* is a system error code as given by ``errno``. + \endrst + */ + SystemError(int error_code, StringRef message) { + init(error_code, message, ArgList()); } + FMT_VARIADIC_CTOR(SystemError, init, int, StringRef) -// Defines a variadic function returning void. -#define FMT_VARIADIC_VOID(func_name) \ - FMT_TEMPLATE(format, 1) FMT_TEMPLATE(format, 2) FMT_TEMPLATE(format, 3) \ - FMT_TEMPLATE(format, 4) FMT_TEMPLATE(format, 5) FMT_TEMPLATE(format, 6) \ - FMT_TEMPLATE(format, 7) FMT_TEMPLATE(format, 8) FMT_TEMPLATE(format, 9) + int error_code() const { return error_code_; } +}; /** \rst @@ -913,7 +1186,7 @@ class ArgList { Writer out; out << "The answer is " << 42 << "\n"; - out.Format("({:+f}, {:+f})") << -3.14 << 3.14; + out.write("({:+f}, {:+f})", -3.14, 3.14); This will write the following output to the ``out`` object: @@ -930,7 +1203,8 @@ template class BasicWriter { private: // Output buffer. - mutable internal::Array buffer_; + typedef internal::Array Buffer; + mutable Buffer buffer_; // Make BasicFormatter a friend so that it can access ArgInfo and Arg. friend class BasicFormatter; @@ -939,8 +1213,6 @@ class BasicWriter { typedef internal::ArgInfo Arg; - static const Arg DUMMY_ARG; - #if _SECURE_SCL static Char *GetBase(CharPtr p) { return p.base(); } #else @@ -979,14 +1251,14 @@ class BasicWriter { template void FormatDouble(T value, const FormatSpec &spec); - // Formats a string. + // Writes a formatted string. template - CharPtr FormatString( + CharPtr write_str( const StringChar *s, std::size_t size, const AlignSpec &spec); template - void FormatString( - const Arg::StringValue &str, const FormatSpec &spec); + void write_str( + const internal::StringValue &str, const FormatSpec &spec); // This method is private to disallow writing a wide string to a // char stream and vice versa. If you want to print a wide string @@ -994,128 +1266,6 @@ class BasicWriter { // Do not implement! void operator<<(typename internal::CharTraits::UnsupportedStrType); - static ULongLong GetIntValue(const Arg &arg); - - // An argument action that does nothing. - struct NullArgAction { - void operator()() const {} - }; - - // A wrapper around a format argument. - template - class BasicArg : public Action, public Arg { - private: - // This method is private to disallow formatting of arbitrary pointers. - // If you want to output a pointer cast it to const void*. Do not implement! - template - BasicArg(const T *value); - - // This method is private to disallow formatting of arbitrary pointers. - // If you want to output a pointer cast it to void*. Do not implement! - template - BasicArg(T *value); - - public: - using Arg::type; - - BasicArg() {} - // TODO: unsigned char & signed char - BasicArg(short value) { type = Arg::INT; Arg::int_value = value; } - BasicArg(unsigned short value) { - type = Arg::UINT; - Arg::uint_value = value; - } - BasicArg(int value) { type = Arg::INT; Arg::int_value = value; } - BasicArg(unsigned value) { type = Arg::UINT; Arg::uint_value = value; } - BasicArg(long value) { - if (sizeof(long) == sizeof(int)) { - type = Arg::INT; - Arg::int_value = static_cast(value); - } else { - type = Arg::LONG_LONG; - Arg::long_long_value = value; - } - } - BasicArg(unsigned long value) { - if (sizeof(unsigned long) == sizeof(unsigned)) { - type = Arg::UINT; - Arg::uint_value = static_cast(value); - } else { - type = Arg::ULONG_LONG; - Arg::ulong_long_value = value; - } - } - BasicArg(LongLong value) { - type = Arg::LONG_LONG; - Arg::long_long_value = value; - } - BasicArg(ULongLong value) { - type = Arg::ULONG_LONG; - Arg::ulong_long_value = value; - } - BasicArg(float value) { type = Arg::DOUBLE; Arg::double_value = value; } - BasicArg(double value) { type = Arg::DOUBLE; Arg::double_value = value; } - BasicArg(long double value) { - type = Arg::LONG_DOUBLE; - Arg::long_double_value = value; - } - BasicArg(char value) { type = Arg::CHAR; Arg::int_value = value; } - BasicArg(wchar_t value) { - type = Arg::CHAR; - Arg::int_value = internal::CharTraits::ConvertChar(value); - } - - BasicArg(const char *value) { - type = Arg::STRING; - Arg::string.value = value; - Arg::string.size = 0; - } - - BasicArg(const wchar_t *value) { - type = Arg::WSTRING; - Arg::wstring.value = value; - Arg::wstring.size = 0; - } - - BasicArg(Char *value) { - type = Arg::STRING; - Arg::string.value = value; - Arg::string.size = 0; - } - - BasicArg(const void *value) { - type = Arg::POINTER; - Arg::pointer_value = value; - } - BasicArg(void *value) { type = Arg::POINTER; Arg::pointer_value = value; } - - BasicArg(const std::basic_string &value) { - type = Arg::STRING; - Arg::string.value = value.c_str(); - Arg::string.size = value.size(); - } - - BasicArg(BasicStringRef value) { - type = Arg::STRING; - Arg::string.value = value.c_str(); - Arg::string.size = value.size(); - } - - template - BasicArg(const T &value) { - type = Arg::CUSTOM; - Arg::custom.value = &value; - Arg::custom.format = &internal::FormatCustomArg; - } - - // The destructor is declared noexcept(false) because the action may throw - // an exception. - ~BasicArg() FMT_NOEXCEPT(false) { - // Invoke the action. - (*this)(); - } - }; - // Format string parser. class FormatParser { private: @@ -1133,24 +1283,7 @@ class BasicWriter { BasicStringRef format, const ArgList &args); }; - // Printf format string parser. - class PrintfParser { - private: - ArgList args_; - int next_arg_index_; - - void ParseFlags(FormatSpec &spec, const Char *&s); - - // Parses argument index, flags and width and returns the parsed - // argument index. - unsigned ParseHeader(const Char *&s, FormatSpec &spec, const char *&error); - - const Arg &HandleArgIndex(unsigned arg_index, const char *&error); - - public: - void Format(BasicWriter &writer, - BasicStringRef format, const ArgList &args); - }; + friend class internal::PrintfParser; public: /** @@ -1204,25 +1337,17 @@ class BasicWriter { return std::basic_string(&buffer_[0], buffer_.size()); } - inline void format(BasicStringRef format, const ArgList &args) { - FormatParser().Format(*this, format, args); - } - - inline void printf(BasicStringRef format, const ArgList &args) { - PrintfParser().Format(*this, format, args); - } - /** \rst - Formats a string sending the output to the writer. Arguments are - accepted through the returned :cpp:class:`fmt::BasicFormatter` object - using operator ``<<``. + Writes formatted data. + + *args* is an argument list representing arbitrary arguments. **Example**:: Writer out; - out.Format("Current point:\n"); - out.Format("({:+f}, {:+f})") << -3.14 << 3.14; + out.write("Current point:\n"); + out.write("({:+f}, {:+f})", -3.14, 3.14); This will write the following output to the ``out`` object: @@ -1237,54 +1362,15 @@ class BasicWriter { See also `Format String Syntax`_. \endrst */ - BasicFormatter Format(StringRef format); - -#if FMT_USE_VARIADIC_TEMPLATES - /** - \rst - Formats a string sending the output to the writer. - - This version of the Format method uses C++11 features such as - variadic templates and rvalue references. For C++98 version, see - the overload taking a single ``StringRef`` argument above. - - **Example**:: - - Writer out; - out.Format("Current point:\n"); - out.Format("({:+f}, {:+f})", -3.14, 3.14); - - This will write the following output to the ``out`` object: - - .. code-block:: none - - Current point: - (-3.140000, +3.140000) - - The output can be accessed using :meth:`data`, :meth:`c_str` or :meth:`str` - methods. - - See also `Format String Syntax`_. - \endrst - */ - template - void Format(BasicStringRef format, const Args & ... args) { - BasicArg<> arg_array[] = {args...}; - this->format(format, ArgList(arg_array, sizeof...(Args))); + inline void write(BasicStringRef format, const ArgList &args) { + FormatParser().Format(*this, format, args); } + FMT_VARIADIC_VOID(write, fmt::BasicStringRef) - template - void printf(BasicStringRef format, const Args & ... args) { - BasicArg<> arg_array[internal::NonZero::VALUE] = {args...}; - this->printf(format, ArgList(arg_array, sizeof...(Args))); + friend void printf(BasicWriter &w, + BasicStringRef format, const ArgList &args) { + internal::PrintfParser().Format(w, format, args); } - -#else - FMT_VARIADIC_VOID(format) -#endif - - template - static Arg MakeArg(const T &arg) { return BasicArg<>(arg); } BasicWriter &operator<<(int value) { return *this << IntFormatSpec(value); @@ -1356,22 +1442,44 @@ class BasicWriter { template BasicWriter &operator<<(const StrFormatSpec &spec) { const StringChar *s = spec.str(); - FormatString(s, std::char_traits::length(s), spec); + write_str(s, std::char_traits::length(s), spec); return *this; } - void Write(const std::basic_string &s, const FormatSpec &spec) { - FormatString(s.data(), s.size(), spec); + void write_str(const std::basic_string &s, const FormatSpec &spec) { + write_str(s.data(), s.size(), spec); } - void Clear() { - buffer_.clear(); - } + void clear() { buffer_.clear(); } + +#if !defined(FMT_NO_DEPRECATED) + FMT_DEPRECATED(BasicFormatter Format(StringRef format)); + +#if FMT_USE_VARIADIC_TEMPLATES + // This function is deprecated. Use Writer::write instead. + template + FMT_DEPRECATED(void Format(BasicStringRef format, const Args & ... args)); +#endif + + // This function is deprecated. Use Writer::write instead. + FMT_DEPRECATED(void Write(const std::basic_string &s, const FormatSpec &spec)); + + // This function is deprecated. Use Writer::clear instead. + FMT_DEPRECATED(void Clear()); +#endif }; +template +inline void BasicWriter::Write(const std::basic_string &s, const FormatSpec &spec) { + write(s, spec); +} + +template +inline void BasicWriter::Clear() { clear(); } + template template -typename BasicWriter::CharPtr BasicWriter::FormatString( +typename BasicWriter::CharPtr BasicWriter::write_str( const StringChar *s, std::size_t size, const AlignSpec &spec) { CharPtr out = CharPtr(); if (spec.width() > size) { @@ -1400,6 +1508,7 @@ typename fmt::BasicWriter::CharPtr const char *prefix, unsigned prefix_size) { unsigned width = spec.width(); Alignment align = spec.align(); + Char fill = static_cast(spec.fill()); if (spec.precision() > static_cast(num_digits)) { // Octal prefix '0' is counted as a digit, so ignore it if precision // is specified. @@ -1413,12 +1522,12 @@ typename fmt::BasicWriter::CharPtr unsigned fill_size = width - number_size; if (align != ALIGN_LEFT) { CharPtr p = GrowBuffer(fill_size); - std::fill(p, p + fill_size, spec.fill()); + std::fill(p, p + fill_size, fill); } CharPtr result = PrepareBufferForInt(num_digits, subspec, prefix, prefix_size); if (align == ALIGN_LEFT) { CharPtr p = GrowBuffer(fill_size); - std::fill(p, p + fill_size, spec.fill()); + std::fill(p, p + fill_size, fill); } return result; } @@ -1431,7 +1540,6 @@ typename fmt::BasicWriter::CharPtr CharPtr p = GrowBuffer(width); CharPtr end = p + width; // TODO: error if fill is not convertible to Char - Char fill = static_cast(spec.fill()); if (align == ALIGN_LEFT) { std::copy(prefix, prefix + prefix_size, p); p += size; @@ -1545,17 +1653,17 @@ BasicFormatter BasicWriter::Format(StringRef format) { // The default formatting function. template -void Format(BasicWriter &w, const FormatSpec &spec, const T &value) { +void format(BasicWriter &w, const FormatSpec &spec, const T &value) { std::basic_ostringstream os; os << value; - w.Write(os.str(), spec); + w.write_str(os.str(), spec); } namespace internal { // Formats an argument of a custom type, such as a user-defined class. template void FormatCustomArg(void *writer, const void *arg, const FormatSpec &spec) { - Format(*static_cast*>(writer), + format(*static_cast*>(writer), spec, *static_cast(arg)); } } @@ -1596,7 +1704,7 @@ class BasicFormatter { }; typedef typename internal::ArgInfo ArgInfo; - typedef typename BasicWriter::template BasicArg Arg; + typedef internal::BasicArg Arg; enum { NUM_INLINE_ARGS = 10 }; internal::Array args_; // Format arguments. @@ -1622,7 +1730,7 @@ class BasicFormatter { if (!format_) return; const Char *format = format_; format_ = 0; - writer_->format(format, ArgList(&args_[0], args_.size())); + writer_->write(format, ArgList(&args_[0], args_.size())); } public: @@ -1654,70 +1762,64 @@ class BasicFormatter { } }; +template +FMT_DEPRECATED(std::basic_string str(const BasicWriter &f)); + +// This function is deprecated. Use BasicWriter::str() instead. template inline std::basic_string str(const BasicWriter &f) { return f.str(); } +template +FMT_DEPRECATED(const Char *c_str(const BasicWriter &f)); + +// This function is deprecated. Use BasicWriter::c_str() instead. template inline const Char *c_str(const BasicWriter &f) { return f.c_str(); } +FMT_DEPRECATED(std::string str(StringRef s)); + /** Converts a string reference to `std::string`. */ +// This function is deprecated. Use StringRef::c_str() instead. inline std::string str(StringRef s) { return std::string(s.c_str(), s.size()); } +FMT_DEPRECATED(const char *c_str(StringRef s)); + /** Returns the pointer to a C string. */ +// This function is deprecated. Use StringRef::c_str() instead. inline const char *c_str(StringRef s) { return s.c_str(); } +FMT_DEPRECATED(std::wstring str(WStringRef s)); + +// This function is deprecated. Use WStringRef::c_str() instead. inline std::wstring str(WStringRef s) { return std::wstring(s.c_str(), s.size()); } +FMT_DEPRECATED(const wchar_t *c_str(WStringRef s)); + +// This function is deprecated. Use WStringRef::c_str() instead. inline const wchar_t *c_str(WStringRef s) { return s.c_str(); } -/** - A sink that discards all output written to it. - */ +// This class is deprecated. Use variadic functions instead of sinks. class NullSink { public: - /** Discards the output. */ template void operator()(const BasicWriter &) const {} }; -/** - \rst - A formatter that sends output to a sink. Objects of this class normally - exist only as temporaries returned by one of the formatting functions. - You can use this class to create your own functions similar to - :cpp:func:`fmt::Format()`. - - **Example**:: - - struct ErrorSink { - void operator()(const fmt::Writer &w) const { - fmt::Print("Error: {}\n") << w.str(); - } - }; - - // Formats an error message and prints it to stdout. - fmt::Formatter ReportError(const char *format) { - fmt::Formatter f(format); - return f; - } - - ReportError("File not found: {}") << path; - \endrst - */ +// This class is deprecated. Use variadic functions instead. template class Formatter : private Sink, public BasicFormatter { private: @@ -1727,47 +1829,17 @@ class Formatter : private Sink, public BasicFormatter { FMT_DISALLOW_COPY_AND_ASSIGN(Formatter); public: - /** - \rst - Constructs a formatter with a format string and a sink. - The sink should be an unary function object that takes a const - reference to :cpp:class:`fmt::BasicWriter`, representing the - formatting output, as an argument. See :cpp:class:`fmt::NullSink` - and :cpp:class:`fmt::FileSink` for examples of sink classes. - \endrst - */ explicit Formatter(BasicStringRef format, Sink s = Sink()) : Sink(s), BasicFormatter(writer_, format.c_str()), inactive_(false) { } - /** - \rst - A "move" constructor. Constructs a formatter transferring the format - string from other to this object. This constructor is used to return - a formatter object from a formatting function since the copy constructor - taking a const reference is disabled to prevent misuse of the API. - It is not implemented as a move constructor for compatibility with - pre-C++11 compilers, but should be treated as such. - - **Example**:: - - fmt::Formatter<> Format(fmt::StringRef format) { - fmt::Formatter<> f(format); - return f; - } - \endrst - */ Formatter(Formatter &other) : Sink(other), BasicFormatter(writer_, other.TakeFormatString()), inactive_(false) { other.inactive_ = true; } - /** - Performs the formatting, sends the output to the sink and destroys - the object. - */ ~Formatter() FMT_NOEXCEPT(false) { if (!inactive_) { this->CompleteFormatting(); @@ -1776,41 +1848,22 @@ class Formatter : private Sink, public BasicFormatter { } }; -/** - \rst - Formats a string similarly to Python's `str.format - `__ function. - Returns a temporary :cpp:class:`fmt::Formatter` object that accepts arguments - via operator ``<<``. - - *format* is a format string that contains literal text and replacement - fields surrounded by braces ``{}``. The formatter object replaces the - fields with formatted arguments and stores the output in a memory buffer. - The content of the buffer can be converted to ``std::string`` with - :cpp:func:`fmt::str()` or accessed as a C string with - :cpp:func:`fmt::c_str()`. - - **Example**:: - - std::string message = str(Format("The answer is {}") << 42); - - See also `Format String Syntax`_. - \endrst - */ +#if !defined(FMT_NO_DEPRECATED) +// This function is deprecated. Use fmt::format instead. +FMT_DEPRECATED(Formatter<> Format(StringRef format)); inline Formatter<> Format(StringRef format) { Formatter<> f(format); return f; } +// This function is deprecated. Use fmt::format instead. +Formatter FMT_DEPRECATED(Format(WStringRef format)); inline Formatter Format(WStringRef format) { Formatter f(format); return f; } -/** - A sink that gets the error message corresponding to a system error code - as given by errno and throws SystemError. - */ +// This class is deprecated. Use variadic functions instead of sinks. class SystemErrorSink { private: int error_code_; @@ -1818,18 +1871,16 @@ class SystemErrorSink { public: explicit SystemErrorSink(int error_code) : error_code_(error_code) {} - void operator()(const Writer &w) const; + void operator()(const Writer &w) const { + throw SystemError(error_code_, "{}", w.c_str()); + } }; +#endif -/** - \rst - Formats a message and throws :cpp:class:`fmt::SystemError` with - the description of the form "**: **", - where ** is the formatted message and ** - is the system message corresponding to the error code. - *error_code* is a system error code as given by ``errno``. - \endrst - */ +FMT_DEPRECATED(Formatter ThrowSystemError( + int error_code, StringRef format)); + +// This function is deprecated. Use fmt::SystemError instead. inline Formatter ThrowSystemError( int error_code, StringRef format) { Formatter f(format, SystemErrorSink(error_code)); @@ -1842,10 +1893,7 @@ void ReportSystemError(int error_code, StringRef message) FMT_NOEXCEPT(true); #ifdef _WIN32 -/** - A sink that gets the error message corresponding to a Windows error code - as given by GetLastError and throws SystemError. - */ +// This class is deprecated. Use variadic functions instead of sinks. class WinErrorSink { private: int error_code_; @@ -1857,16 +1905,31 @@ class WinErrorSink { }; /** - \rst - Formats a message and throws :cpp:class:`fmt::SystemError` with - the description of the form "**: **", - where ** is the formatted message and ** - is the system message corresponding to the error code. - *error_code* is a Windows error code as given by ``GetLastError``. + A Windows error. +*/ +class WindowsError : public SystemError { + private: + void init(int error_code, StringRef format_str, const ArgList &args); - This function is only available on Windows. - \endrst - */ + public: + /** + \rst + Constructs a :cpp:class:`fmt::WindowsError` object with the description + of the form "**: **", where ** is the + formatted message and ** is the system message corresponding + to the error code. + *error_code* is a Windows error code as given by ``GetLastError``. + \endrst + */ + WindowsError(int error_code, StringRef message) { + init(error_code, message, ArgList()); + } + FMT_VARIADIC_CTOR(WindowsError, init, int, StringRef) +}; + +FMT_DEPRECATED(Formatter ThrowWinError(int error_code, StringRef format)); + +// This function is deprecated. Use WindowsError instead. inline Formatter ThrowWinError(int error_code, StringRef format) { Formatter f(format, WinErrorSink(error_code)); return f; @@ -1878,7 +1941,7 @@ void ReportWinError(int error_code, StringRef message) FMT_NOEXCEPT(true); #endif -/** A sink that writes output to a file. */ +// This class is deprecated. Use variadic functions instead of sinks. class FileSink { private: std::FILE *file_; @@ -1886,36 +1949,17 @@ class FileSink { public: explicit FileSink(std::FILE *f) : file_(f) {} - /** Writes the output to a file. */ void operator()(const BasicWriter &w) const { if (std::fwrite(w.data(), w.size(), 1, file_) == 0) - ThrowSystemError(errno, "cannot write to file"); + throw SystemError(errno, "cannot write to file"); } }; -/** - \rst - Formats a string and writes the result to ``stdout``. - - **Example**:: - - Print("Elapsed time: {0:.2f} seconds") << 1.23; - \endrst - */ inline Formatter Print(StringRef format) { Formatter f(format, FileSink(stdout)); return f; } -/** - \rst - Formats a string and writes the result to a file. - - **Example**:: - - Print(stderr, "Don't {}!") << "panic"; - \endrst - */ inline Formatter Print(std::FILE *file, StringRef format) { Formatter f(format, FileSink(file)); return f; @@ -1923,10 +1967,7 @@ inline Formatter Print(std::FILE *file, StringRef format) { enum Color { BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE }; -/** - A sink that writes output to a terminal using ANSI escape sequences - to specify color. - */ +// This class is deprecated. Use variadic functions instead of sinks. class ANSITerminalSink { private: std::FILE *file_; @@ -1935,10 +1976,6 @@ class ANSITerminalSink { public: ANSITerminalSink(std::FILE *f, Color c) : file_(f), color_(c) {} - /** - Writes the output to a terminal using ANSI escape sequences to - specify color. - */ void operator()(const BasicWriter &w) const; }; @@ -1953,32 +1990,80 @@ inline Formatter PrintColored(Color c, StringRef format) { return f; } -#if FMT_USE_VARIADIC_TEMPLATES && FMT_USE_RVALUE_REFERENCES - /** \rst Formats a string similarly to Python's `str.format `__ function - and returns an :cpp:class:`fmt::BasicWriter` object containing the output. - - This version of the Format function uses C++11 features such as - variadic templates and rvalue references. For C++98 version, see - the :cpp:func:`fmt::Format()` overload above. + and returns the result as a string. - *format* is a format string that contains literal text and replacement - fields surrounded by braces ``{}``. The formatter object replaces the - fields with formatted arguments and stores the output in a memory buffer. - The content of the buffer can be converted to ``std::string`` with - :cpp:func:`fmt::str()` or accessed as a C string with - :cpp:func:`fmt::c_str()`. + *format_str* is a format string that contains literal text and replacement + fields surrounded by braces ``{}``. The fields are replaced with formatted + arguments in the resulting string. + + *args* is an argument list representing arbitrary arguments. **Example**:: - std::string message = str(Format("The answer is {}", 42)); + std::string message = format("The answer is {}", 42); See also `Format String Syntax`_. \endrst +*/ +inline std::string format(StringRef format_str, const ArgList &args) { + Writer w; + w.write(format_str, args); + return w.str(); +} + +inline std::wstring format(WStringRef format, const ArgList &args) { + WWriter w; + w.write(format, args); + return w.str(); +} + +/** + \rst + Prints formatted data to ``stdout``. + + **Example**:: + + print("Elapsed time: {0:.2f} seconds", 1.23); + \endrst + */ +void print(StringRef format, const ArgList &args); + +/** + \rst + Prints formatted data to a file. + + **Example**:: + + print(stderr, "Don't {}!", "panic"); + \endrst */ +void print(std::FILE *f, StringRef format, const ArgList &args); + +inline std::string sprintf(StringRef format, const ArgList &args) { + Writer w; + printf(w, format, args); + return w.str(); +} + +void printf(StringRef format, const ArgList &args); + +#if !defined(FMT_NO_DEPRECATED) && FMT_USE_VARIADIC_TEMPLATES && FMT_USE_RVALUE_REFERENCES + +template +template +void BasicWriter::Format( + BasicStringRef format, const Args & ... args) { + this->format(format, args...); +} + +// This function is deprecated. Use fmt::format instead. +template +FMT_DEPRECATED(Writer Format(StringRef format, const Args & ... args)); + template inline Writer Format(StringRef format, const Args & ... args) { Writer w; @@ -1986,6 +2071,10 @@ inline Writer Format(StringRef format, const Args & ... args) { return std::move(w); } +// This function is deprecated. Use fmt::format instead. +template +FMT_DEPRECATED(WWriter Format(WStringRef format, const Args & ... args)); + template inline WWriter Format(WStringRef format, const Args & ... args) { WWriter w; @@ -1993,13 +2082,21 @@ inline WWriter Format(WStringRef format, const Args & ... args) { return std::move(w); } +// This function is deprecated. Use fmt::print instead. +template +FMT_DEPRECATED(void Print(StringRef format, const Args & ... args)); + template void Print(StringRef format, const Args & ... args) { Writer w; - w.Format(format, args...); + w.write(format, args...); std::fwrite(w.data(), 1, w.size(), stdout); } +// This function is deprecated. Use fmt::print instead. +template +FMT_DEPRECATED(void Print(std::FILE *f, StringRef format, const Args & ... args)); + template void Print(std::FILE *f, StringRef format, const Args & ... args) { Writer w; @@ -2007,20 +2104,6 @@ void Print(std::FILE *f, StringRef format, const Args & ... args) { std::fwrite(w.data(), 1, w.size(), f); } -template -inline Writer sprintf(StringRef format, const Args & ... args) { - Writer w; - w.printf(format, args...); - return std::move(w); -} - -template -void printf(StringRef format, const Args & ... args) { - Writer w; - w.printf(format, args...); - std::fwrite(w.data(), 1, w.size(), stdout); -} - #endif // FMT_USE_VARIADIC_TEMPLATES && FMT_USE_RVALUE_REFERENCES /** @@ -2129,91 +2212,104 @@ inline void FormatDec(char *&buffer, T value) { #if FMT_GCC_VERSION // Use the system_header pragma to suppress warnings about variadic macros // because suppressing -Wvariadic-macros with the diagnostic pragma doesn't work. +// It is used at the end because we want to suppress as little warnings as +// possible. # pragma GCC system_header #endif -#define FMT_CONCATENATE(arg1, arg2) FMT_CONCATENATE1(arg1, arg2) -#define FMT_CONCATENATE1(arg1, arg2) FMT_CONCATENATE2(arg1, arg2) -#define FMT_CONCATENATE2(arg1, arg2) arg1##arg2 - +// This is used to work around VC++ bugs in handling variadic macros. #define FMT_EXPAND(args) args -#define FMT_FOR_EACH_1(func, x, ...) func(x, 1) -#define FMT_FOR_EACH_2(func, x, ...) \ - func(x, 2), FMT_EXPAND(FMT_FOR_EACH_1(func, __VA_ARGS__)) -#define FMT_FOR_EACH_3(func, x, ...) \ - func(x, 3), FMT_EXPAND(FMT_FOR_EACH_2(func, __VA_ARGS__)) -#define FMT_FOR_EACH_4(func, x, ...) \ - func(x, 4), FMT_EXPAND(FMT_FOR_EACH_3(func, __VA_ARGS__)) -#define FMT_FOR_EACH_5(func, x, ...) \ - func(x, 5), FMT_EXPAND(FMT_FOR_EACH_4(func, __VA_ARGS__)) -#define FMT_FOR_EACH_6(func, x, ...) \ - func(x, 6), FMT_EXPAND(FMT_FOR_EACH_5(func, __VA_ARGS__)) -#define FMT_FOR_EACH_7(func, x, ...) \ - func(x, 7), FMT_EXPAND(FMT_FOR_EACH_6(func, __VA_ARGS__)) -#define FMT_FOR_EACH_8(func, x, ...) \ - func(x, 8), FMT_EXPAND(FMT_FOR_EACH_7(func, __VA_ARGS__)) - -#define FMT_FOR_EACH_NARG(...) FMT_FOR_EACH_NARG_(__VA_ARGS__, FMT_FOR_EACH_RSEQ_N()) -#define FMT_FOR_EACH_NARG_(...) FMT_EXPAND(FMT_FOR_EACH_ARG_N(__VA_ARGS__)) -#define FMT_FOR_EACH_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, N, ...) N -#define FMT_FOR_EACH_RSEQ_N() 8, 7, 6, 5, 4, 3, 2, 1, 0 - -#define FMT_FOR_EACH_(N, func, ...) \ - FMT_CONCATENATE(FMT_FOR_EACH_, N)(func, __VA_ARGS__) -#define FMT_FOR_EACH(func, ...) \ - FMT_EXPAND(FMT_FOR_EACH_(FMT_FOR_EACH_NARG(__VA_ARGS__), func, __VA_ARGS__)) + +// Returns the number of arguments. +// Based on https://groups.google.com/forum/#!topic/comp.std.c/d-6Mj5Lko_s. +#define FMT_NARG(...) FMT_NARG_(__VA_ARGS__, FMT_RSEQ_N()) +#define FMT_NARG_(...) FMT_EXPAND(FMT_ARG_N(__VA_ARGS__)) +#define FMT_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N +#define FMT_RSEQ_N() 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 + +#define FMT_CONCAT(a, b) a##b +#define FMT_FOR_EACH_(N, f, ...) \ + FMT_EXPAND(FMT_CONCAT(FMT_FOR_EACH, N)(f, __VA_ARGS__)) +#define FMT_FOR_EACH(f, ...) \ + FMT_EXPAND(FMT_FOR_EACH_(FMT_NARG(__VA_ARGS__), f, __VA_ARGS__)) #define FMT_ADD_ARG_NAME(type, index) type arg##index #define FMT_GET_ARG_NAME(type, index) arg##index -#define FMT_MAKE_ARG(arg, index) fmt::Writer::MakeArg(arg) -#define FMT_VARIADIC(return_type, func_name, ...) \ - inline return_type func_name(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__)) { \ - return func_name(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ - fmt::ArgList()); \ - } \ - template \ - inline return_type func_name(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ - const T1 &v1) { \ - const fmt::internal::ArgInfo args[] = {FMT_FOR_EACH(FMT_MAKE_ARG, v1)}; \ - return func_name(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ - fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ - } \ - template \ - inline return_type func_name(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ - const T1 &v1, const T2 &v2) { \ - const fmt::internal::ArgInfo args[] = {FMT_FOR_EACH(FMT_MAKE_ARG, v1, v2)}; \ - return func_name(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ - fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ - } \ - template \ - inline return_type func_name(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ - const T1 &v1, const T2 &v2, const T3 &v3) { \ - const fmt::internal::ArgInfo args[] = { \ - FMT_FOR_EACH(FMT_MAKE_ARG, v1, v2, v3) \ - }; \ - return func_name(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ - fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ - } \ - template \ - inline return_type func_name(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ - const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4) { \ - const fmt::internal::ArgInfo args[] = { \ - FMT_FOR_EACH(FMT_MAKE_ARG, v1, v2, v3, v4) \ - }; \ - return func_name(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ - fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ - } \ - template \ - inline return_type func_name(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ - const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5) { \ - const fmt::internal::ArgInfo args[] = { \ - FMT_FOR_EACH(FMT_MAKE_ARG, v1, v2, v3, v4, v5) \ +#if FMT_USE_VARIADIC_TEMPLATES + +# define FMT_VARIADIC_(Char, ReturnType, func, ...) \ + template \ + ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ + const Args & ... args) { \ + enum {N = fmt::internal::NonZero::VALUE}; \ + const fmt::internal::ArgInfo array[N] = { \ + fmt::internal::make_arg(args)... \ }; \ - return func_name(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ + return func(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ + fmt::ArgList(array, sizeof...(Args))); \ + } + +#else + +// Defines a wrapper for a function taking __VA_ARGS__ arguments +// and n additional arguments of arbitrary types. +# define FMT_WRAP(Char, ReturnType, func, n, ...) \ + template \ + inline ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ + FMT_GEN(n, FMT_MAKE_ARG)) { \ + const fmt::internal::ArgInfo args[] = {FMT_GEN(n, FMT_MAKE_REF_##Char)}; \ + return func(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ fmt::ArgList(args, sizeof(args) / sizeof(*args))); \ } +# define FMT_VARIADIC_(Char, ReturnType, func, ...) \ + inline ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__)) { \ + return func(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), fmt::ArgList()); \ + } \ + FMT_WRAP(Char, ReturnType, func, 1, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, 2, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, 3, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, 4, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, 5, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, 6, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, 7, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, 8, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, 9, __VA_ARGS__) \ + FMT_WRAP(Char, ReturnType, func, 10, __VA_ARGS__) + +#endif // FMT_USE_VARIADIC_TEMPLATES + +/** + \rst + Defines a variadic function with the specified return type, function name + and argument types passed as variable arguments to this macro. + + **Example**:: + + void print_error(const char *file, int line, const char *format, + const fmt::ArgList &args) { + fmt::print("{}: {}: ", file, line); + fmt::print(format, args); + } + FMT_VARIADIC(void, print_error, const char *, int, const char *) + \endrst + */ +#define FMT_VARIADIC(ReturnType, func, ...) \ + FMT_VARIADIC_(char, ReturnType, func, __VA_ARGS__) + +#define FMT_VARIADIC_W(ReturnType, func, ...) \ + FMT_VARIADIC_(wchar_t, ReturnType, func, __VA_ARGS__) + +namespace fmt { +FMT_VARIADIC(std::string, format, StringRef) +FMT_VARIADIC_W(std::wstring, format, WStringRef) +FMT_VARIADIC(void, print, StringRef) +FMT_VARIADIC(void, print, std::FILE *, StringRef) +FMT_VARIADIC(std::string, sprintf, StringRef) +FMT_VARIADIC(void, printf, StringRef) +} + // Restore warnings. #if FMT_GCC_VERSION >= 406 # pragma GCC diagnostic pop From d38498a3a067d9c2c00449a8532812f169a4a8a9 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 6 Jul 2014 20:03:05 +0400 Subject: [PATCH 102/144] fix compile errors on Linux https://github.com/cppformat/cppformat/issues/49 --- src/bnetd/account_wrap.cpp | 2 +- src/bnetd/i18n.cpp | 6 +++--- src/bnetd/i18n.h | 10 +--------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/bnetd/account_wrap.cpp b/src/bnetd/account_wrap.cpp index 27470f601..2a1073587 100644 --- a/src/bnetd/account_wrap.cpp +++ b/src/bnetd/account_wrap.cpp @@ -474,7 +474,7 @@ namespace pvpgn if (unsigned int locktime = account_get_auth_locktime(account)) msgtemp += localize(c, " for {}", seconds_to_timestr(locktime - now)); else - msgtemp += localize(c, " permanently", /**/); + msgtemp += localize(c, " permanently"); // append reason char const * reason = account_get_auth_lockreason(account); diff --git a/src/bnetd/i18n.cpp b/src/bnetd/i18n.cpp index f7bbade58..b48968596 100644 --- a/src/bnetd/i18n.cpp +++ b/src/bnetd/i18n.cpp @@ -184,9 +184,9 @@ namespace pvpgn if (!(format = _find_string(fmt, lang))) format = fmt; - fmt::Writer w; - w.format(format, args); - output = w.str(); + fmt::Writer out; + out.write(format, args); + output = out.str(); } catch (const std::exception& e) { diff --git a/src/bnetd/i18n.h b/src/bnetd/i18n.h index 049eab53c..6e74d2651 100644 --- a/src/bnetd/i18n.h +++ b/src/bnetd/i18n.h @@ -50,15 +50,7 @@ namespace pvpgn extern std::string _localize(t_connection * c, const char * func, const char *fmt, const fmt::ArgList &args); FMT_VARIADIC(std::string, _localize, t_connection *, const char *, const char *) -#if defined (_SOLARIS) -#define localize(c, fmt, ...) _localize(c, __FUNCTION__, fmt, # __VA_ARGS__) - /* optional: disables "warning: argument mismatch" */ - #pragma error_messages (off, E_ARGUEMENT_MISMATCH) -#elif defined (__GNUC__) - #define localize(c, fmt, s...) _localize(c, __FUNCTION__, fmt, ## s) -#else - #define localize(c, fmt, ...) _localize(c, __FUNCTION__, fmt, __VA_ARGS__) -#endif + #define localize(c, ...) _localize(c, __FUNCTION__, __VA_ARGS__) } From 522a75e559f5f73978060bc88d5a466f50528eff Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 6 Jul 2014 20:05:48 +0400 Subject: [PATCH 103/144] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7ab0cd8b4..8e0ee8a18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ before_install: script: - cmake -D CMAKE_INSTALL_PREFIX=/usr/local/pvpgn -D WITH_MYSQL=true -D WITH_LUA=true ../ - make - - make install + - sudo make install From 596b50e7ceffc7c17de97965a2f1d417ea7f14aa Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 6 Jul 2014 20:11:24 +0400 Subject: [PATCH 104/144] remove d2server.ini definition (it must be supplied with d2gs) --- conf/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/conf/CMakeLists.txt b/conf/CMakeLists.txt index c0cb941e2..1bf3c6ee8 100644 --- a/conf/CMakeLists.txt +++ b/conf/CMakeLists.txt @@ -28,9 +28,6 @@ endif(WITH_BNETD) if(WITH_D2CS) set(D2CS_CONFS d2cs.conf anongame_infos.conf) - - # special treatment for non .in files - install(FILES d2server.ini DESTINATION ${SYSCONFDIR}) endif(WITH_D2CS) if(WITH_D2DBS) From 50b7df5b241a3f62a2dcdcfa6ab9bf36c15fe2fe Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 6 Jul 2014 20:37:11 +0400 Subject: [PATCH 105/144] * supress gcc variadic warnings * shorthand of format usage https://github.com/cppformat/cppformat/issues/49#issuecomment-48116104 --- CMakeLists.txt | 26 ++++++++++++++++++++++++++ files/CMakeLists.txt | 6 +----- src/bnetd/i18n.cpp | 4 +--- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ed0a3732a..ae27ad403 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,32 @@ option(WITH_PGSQL "include PostgreSQL user accounts support" OFF) option(WITH_ODBC "include ODBC user accounts support" OFF) include(ConfigureChecks.cmake) + +if (CMAKE_COMPILER_IS_GNUCXX) + # Determine GCC version. + message("Determining GCC version.") + EXEC_PROGRAM(${CMAKE_CXX_COMPILER} + ARGS --version + OUTPUT_VARIABLE _GCC_VERSION) + STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]) .*" "\\1\\2\\3" + _GCC_VERSION ${_GCC_VERSION}) + message(" GCC version is ${_GCC_VERSION}") + + # Add -Wno-longlong if the GCC version is < 4.0.0. Add -pedantic flag + # but disable warnings for variadic macros with GCC >= 4.0.0. Earlier + # versions warn because of anonymous variadic macros in pedantic mode + # but do not have a flag to disable these warnings. + if (400 GREATER _GCC_VERSION) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-long") + else (400 GREATER _GCC_VERSION) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-variadic-macros") + endif (400 GREATER _GCC_VERSION) + + # Pass CXX flags to flags. + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSEQAN_CXX_FLAGS_=\"${CMAKE_CXX_FLAGS}\"") +endif (CMAKE_COMPILER_IS_GNUCXX) + + subdirs(src conf man files) if(WITH_LUA) add_subdirectory(lua) diff --git a/files/CMakeLists.txt b/files/CMakeLists.txt index e95d55a01..e38e96eb1 100644 --- a/files/CMakeLists.txt +++ b/files/CMakeLists.txt @@ -17,11 +17,7 @@ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/var/status") install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/var/ DESTINATION ${LOCALSTATEDIR}) install(FILES ad000001.mng ad000001.smk ad000002.mng ad000003.mng - ad000004.mng ad000075.mng chathelp-war3-default.txt - chathelp-war3-enUS.txt chathelp-war3-frFR.txt chathelp-war3-ruRU.txt - chathelp-war3-zhCN.txt newaccount-default.txt newaccount-enUS.txt - newbie.save termsofservice-default.txt termsofservice-enUS.txt - tos_default.txt tos-unicode_default.txt + ad000004.mng ad000075.mng newbie.save bnserver.ini bnserver-D2DV.ini bnserver-D2XP.ini bnserver-WAR3.ini ver-ix86-1.mpq IX86ver1.mpq PMACver1.mpq XMACver1.mpq icons.bni icons_STAR.bni icons-WAR3.bni diff --git a/src/bnetd/i18n.cpp b/src/bnetd/i18n.cpp index b48968596..a80f064b7 100644 --- a/src/bnetd/i18n.cpp +++ b/src/bnetd/i18n.cpp @@ -184,9 +184,7 @@ namespace pvpgn if (!(format = _find_string(fmt, lang))) format = fmt; - fmt::Writer out; - out.write(format, args); - output = out.str(); + output = fmt::format(format, args); } catch (const std::exception& e) { From 3129bdfd0e6a0e79a7d2800f65088f9e454aaab7 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sun, 6 Jul 2014 20:46:31 +0400 Subject: [PATCH 106/144] Update Travis CI badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b4af478fd..cbc4ffc2b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/HarpyWar/pvpgn.svg?branch=test)](https://travis-ci.org/HarpyWar/pvpgn) [![Build status](https://ci.appveyor.com/api/projects/status/dqoj9lkvhfwthmn6)](https://ci.appveyor.com/project/HarpyWar/pvpgn) +[![Build Status](https://travis-ci.org/HarpyWar/pvpgn.svg?branch=master)](https://travis-ci.org/HarpyWar/pvpgn) [![Build status](https://ci.appveyor.com/api/projects/status/dqoj9lkvhfwthmn6)](https://ci.appveyor.com/project/HarpyWar/pvpgn) Player versus Player Gaming Network ===== ![](http://harpywar.com/images/items/pvpgn.gif) From 79f85553123b7a89511c4cc06ca3eb8dbf293833 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Mon, 7 Jul 2014 21:34:08 +0400 Subject: [PATCH 107/144] Display Sex and Age in /finger only if they are not empty, and "unknown" location if it is empty display https://github.com/HarpyWar/pvpgn/issues/44 --- src/bnetd/command.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 9d7ba95f1..3e1aeec9f 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -3336,7 +3336,13 @@ namespace pvpgn then = account_get_ll_ctime(account); tmthen = std::localtime(&then); /* FIXME: determine user's timezone */ - msgtemp = localize(c, "Login: {} {} Sex: {}", + // do not display sex if empty + std::string pattern = "Login: {} {} Sex: {}"; + pattern = (account_get_sex(account) && strcmp(account_get_sex(account), "") == -1) + ? pattern + : pattern.substr(0, pattern.find("Sex: ", 0)); + + msgtemp = localize(c, pattern.c_str(), account_get_name(account), account_get_uid(account), account_get_sex(account)); @@ -3378,8 +3384,14 @@ namespace pvpgn } } - msgtemp = localize(c, "Location: {} Age: {}", - account_get_loc(account), + // do not display age if empty + pattern = "Location: {} Age: {}"; + pattern = (account_get_age(account) && strcmp(account_get_age(account), "") == -1) + ? pattern + : pattern.substr(0, pattern.find("Age: ", 0)); + const char * loc = account_get_loc(account); + msgtemp = localize(c, pattern.c_str(), + (loc && strcmp(loc, "") == -1) ? loc : "unknown", account_get_age(account)); message_send_text(c, message_type_info, c, msgtemp); From 5d7049ca183bc71f400151ef726e73b992de6062 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 8 Jul 2014 11:15:46 +0400 Subject: [PATCH 108/144] fix crash when send "/con anytext" https://github.com/HarpyWar/pvpgn/issues/13#issuecomment-48153581 --- src/bnetd/command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 3e1aeec9f..6be2cf53f 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -3237,7 +3237,7 @@ namespace pvpgn message_send_text(c, message_type_info, c, msgtemp); } else - if (std::strcmp(&text[i], "all") == 0) /* print extended info */ + if (std::strcmp(text, "all") == 0) /* print extended info */ { if (prefs_get_hide_addr() && !(account_get_command_groups(conn_get_account(c)) & command_get_group("/admin-addr"))) msgtemp = localize(c, " -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game--"); From 039ad8adf32819d600a3246dfc801450589e2ae6 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Tue, 8 Jul 2014 23:00:29 +0400 Subject: [PATCH 109/144] fix news loading --- conf/i18n/news.txt | 11 +++++------ src/bnetd/i18n.h | 1 + src/bnetd/news.cpp | 6 +++++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/conf/i18n/news.txt b/conf/i18n/news.txt index 1d1310ead..e9fd72ec2 100644 --- a/conf/i18n/news.txt +++ b/conf/i18n/news.txt @@ -1,9 +1,8 @@ -{03/28/2014} -(edit this text in conf/news.txt) - - -Note that Warcraft 3 client caches news in bncache.dat -(remove the file on the client side before login to see the changes immediately) +{03/29/2014} + +Note that text of news is cached in Warcraft 3 client. Be careful when deleting existing news - + it remain on a client side until bncache.dat won't be removed or outdated! +A file news.txt is loaded once when the server starts. Use command "/rehash news" to reload the file. New support channel at: diff --git a/src/bnetd/i18n.h b/src/bnetd/i18n.h index 6e74d2651..f9f7a7e2f 100644 --- a/src/bnetd/i18n.h +++ b/src/bnetd/i18n.h @@ -34,6 +34,7 @@ namespace pvpgn #define JUST_NEED_TYPES # include +# include "connection.h" # include "common/format.h" #undef JUST_NEED_TYPES diff --git a/src/bnetd/news.cpp b/src/bnetd/news.cpp index 050bae144..93d84e8b1 100644 --- a/src/bnetd/news.cpp +++ b/src/bnetd/news.cpp @@ -27,6 +27,9 @@ #include "common/eventlog.h" #include "common/xalloc.h" +#include "common/tag.h" +#include "i18n.h" + #include "common/setup_after.h" namespace pvpgn @@ -142,7 +145,8 @@ namespace pvpgn return -1; } - if ((fp = std::fopen(filename, "rt")) == NULL) { + // FIXME: (HarpyWar) change news loading when user log on to send a localized version + if ((fp = std::fopen(i18n_filename(filename, GAMELANG_ENGLISH_UINT), "rt")) == NULL) { eventlog(eventlog_level_warn, __FUNCTION__, "can't open news file"); _news_insert_default(); return 0; From c4dd101c4e005081eea449d4d74c7e53e3f8cf48 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Thu, 10 Jul 2014 01:27:00 +0400 Subject: [PATCH 110/144] get language by country for TOS file --- src/bnetd/file.cpp | 10 ++++- src/bnetd/i18n.cpp | 103 ++++++++++++++++++++++++++++++++++++++++++++- src/bnetd/i18n.h | 1 + 3 files changed, 112 insertions(+), 2 deletions(-) diff --git a/src/bnetd/file.cpp b/src/bnetd/file.cpp index 1124a6804..1094c11d4 100644 --- a/src/bnetd/file.cpp +++ b/src/bnetd/file.cpp @@ -75,8 +75,9 @@ namespace pvpgn { t_gamelang lang; // when file transferring by bnftp protofol client doesn't provide a language + // but we can extract it from the filename - // if there is no country tag in the file (just in case) + // if there is no country tag in the file (just in case to prevent crash from invalid filename) if ((strlen(*pattern) + 4) > strlen(rawname)) return NULL; @@ -86,6 +87,13 @@ namespace pvpgn langstr[4] = 0; lang = tag_str_to_uint(langstr); + // if language is invalid then try find it by code + if (!tag_check_gamelang(lang)) + { + strncpy(langstr, rawname + std::strlen(*pattern), 3); + langstr[3] = 0; + lang = lang_find_by_country(langstr); + } return i18n_filename(*alias, lang); } } diff --git a/src/bnetd/i18n.cpp b/src/bnetd/i18n.cpp index a80f064b7..86797566a 100644 --- a/src/bnetd/i18n.cpp +++ b/src/bnetd/i18n.cpp @@ -95,6 +95,95 @@ namespace pvpgn }; + // http://msdn.microsoft.com/en-us/goglobal/bb896001.aspx + extern const char * countries[][2] = + { + /* English (uses if other not found) */ + { "USA", "enUS" }, + + /* Polish */ + { "POL", "plPL" }, + + /* Korean */ + { "KOR", "koKR" }, + + /* French */ + { "FRA", "frFR" }, + + /* Bulgarian */ + { "BGR", "bgBG" }, + + /* Italian */ + { "ITA", "itIT" }, + + /* Japanese */ + { "JPN", "jpJA" }, + + /* Czech */ + { "CZE", "csCZ" }, + + /* Dutch */ + { "NLD", "nlNL" }, + + /* Portuguese */ + { "BRA", "ptBR" }, + { "PRT", "ptBR" }, + + /* Swedish */ + { "SWE", "svSE" }, + { "FIN", "svSE" }, + + /* German */ + { "DEU", "deDE" }, + { "AUT", "deDE" }, + { "LIE", "deDE" }, + { "LUX", "deDE" }, + + /* German */ + { "DEU", "deDE" }, + { "AUT", "deDE" }, + { "LIE", "deDE" }, + { "LUX", "deDE" }, + + /* Russian */ + { "RUS", "ruRU" }, + { "UZB", "ruRU" }, + { "TTT", "ruRU" }, + { "UKR", "ruRU" }, + { "AZE", "ruRU" }, + { "ARM", "ruRU" }, + + /* Chinese */ + { "CHN", "chCN" }, + { "SGP", "chCN" }, + { "HKG", "chTW" }, + { "MCO", "chTW" }, + { "TWN", "chTW" }, + + /* Spanish */ + { "ESP", "esES" }, + { "ARG", "esES" }, + { "BOL", "esES" }, + { "CHL", "esES" }, + { "COL", "esES" }, + { "CRI", "esES" }, + { "DOM", "esES" }, + { "ECU", "esES" }, + { "SLV", "esES" }, + { "GTM", "esES" }, + { "HND", "esES" }, + { "MEX", "esES" }, + { "NIC", "esES" }, + { "PAN", "esES" }, + { "PRY", "esES" }, + { "PER", "esES" }, + { "PRI", "esES" }, + { "URY", "esES" }, + { "VEN", "esES" }, + }; + + + extern int i18n_reload(void) { translations.clear(); @@ -206,7 +295,6 @@ namespace pvpgn return NULL; } - /* Add a locale tag into filename example: motd.txt -> motd-ruRU.txt */ extern const char * i18n_filename(const char * filename, t_tag gamelang) @@ -230,6 +318,19 @@ namespace pvpgn return _filename; } + /* Return language tag by code */ + extern t_gamelang lang_find_by_country(const char * code) + { + if (!code || code[0] == '\0') + return tag_str_to_uint(countries[0][0]); + + for (int i = 0; i < (sizeof(countries) / sizeof(*countries)); i++) + if (strcasecmp(code, countries[i][0]) == 0) + return tag_str_to_uint(countries[i][0]); + + return tag_str_to_uint(countries[0][0]); // default + } + } } diff --git a/src/bnetd/i18n.h b/src/bnetd/i18n.h index f9f7a7e2f..a2f2f9b9d 100644 --- a/src/bnetd/i18n.h +++ b/src/bnetd/i18n.h @@ -47,6 +47,7 @@ namespace pvpgn extern int i18n_reload(void); extern const char * i18n_filename(const char * filename, t_tag gamelang); + extern t_gamelang lang_find_by_country(const char * code); extern std::string _localize(t_connection * c, const char * func, const char *fmt, const fmt::ArgList &args); FMT_VARIADIC(std::string, _localize, t_connection *, const char *, const char *) From a207ab790a12c224179fb35ede290cf89e7f67fc Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Thu, 10 Jul 2014 02:16:22 +0400 Subject: [PATCH 111/144] get user language by a country (instead of a game language) if new config option "localize_by_country" is enabled https://github.com/HarpyWar/pvpgn/issues/13 --- conf/bnetd.conf.in | 3 +++ conf/bnetd.conf.win32 | 3 +++ src/bnetd/channel.cpp | 2 +- src/bnetd/command.cpp | 4 ++-- src/bnetd/connection.cpp | 3 +-- src/bnetd/file.cpp | 27 ++++++++++++++++----------- src/bnetd/file.h | 2 +- src/bnetd/handle_bnet.cpp | 12 ++++++------ src/bnetd/helpfile.cpp | 15 +++++++-------- src/bnetd/i18n.cpp | 16 +++++++++++++--- src/bnetd/i18n.h | 1 + src/bnetd/prefs.cpp | 29 +++++++++++++++++++++++++++++ src/bnetd/prefs.h | 1 + 13 files changed, 84 insertions(+), 34 deletions(-) diff --git a/conf/bnetd.conf.in b/conf/bnetd.conf.in index 52250d999..e8f187207 100644 --- a/conf/bnetd.conf.in +++ b/conf/bnetd.conf.in @@ -128,6 +128,9 @@ newsfile = news.txt helpfile = bnhelp.conf tosfile = termsofservice.txt +# Do localization by a game language or by user country? +localize_by_country = true + # # ############################################################################## diff --git a/conf/bnetd.conf.win32 b/conf/bnetd.conf.win32 index c65a56b56..b6bce9ee3 100644 --- a/conf/bnetd.conf.win32 +++ b/conf/bnetd.conf.win32 @@ -106,6 +106,9 @@ newsfile = news.txt helpfile = bnhelp.conf tosfile = termsofservice.txt +# Do localization by a game language or by user country? +localize_by_country = true + # # ############################################################################## diff --git a/src/bnetd/channel.cpp b/src/bnetd/channel.cpp index 57d8792c7..d8caa4722 100644 --- a/src/bnetd/channel.cpp +++ b/src/bnetd/channel.cpp @@ -762,7 +762,7 @@ namespace pvpgn if ((conn_get_wol(me) == 0)) { if (!heard && (type == message_type_talk || type == message_type_emote)) - message_send_text(me, message_type_info, me, "No one hears you."); + message_send_text(me, message_type_info, me, localize(c, "No one hears you.")); } #ifdef WITH_LUA diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 6be2cf53f..e68a1b1d7 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -4633,7 +4633,7 @@ namespace pvpgn char const * filename; std::FILE * fp; - filename = i18n_filename(prefs_get_motdfile(), conn_get_gamelang(c)); + filename = i18n_filename(prefs_get_motdfile(), conn_get_gamelang_localized(c)); if (fp = std::fopen(filename, "r")) { @@ -4656,7 +4656,7 @@ namespace pvpgn const char * filename = NULL; std::FILE * fp; - filename = i18n_filename(prefs_get_tosfile(), conn_get_gamelang(c)); + filename = i18n_filename(prefs_get_tosfile(), conn_get_gamelang_localized(c)); /* FIXME: if user enters relative path to tos file in config, above routine will fail */ diff --git a/src/bnetd/connection.cpp b/src/bnetd/connection.cpp index 0ffd93006..65cdca13a 100644 --- a/src/bnetd/connection.cpp +++ b/src/bnetd/connection.cpp @@ -128,8 +128,7 @@ namespace pvpgn return; } if (filename = prefs_get_motdfile()) { - t_tag gamelang = conn_get_gamelang(c); - std::string lang_filename = i18n_filename(filename, gamelang); + std::string lang_filename = i18n_filename(filename, conn_get_gamelang_localized(c)); if (fp = std::fopen(lang_filename.c_str(), "r")) { message_send_file(c, fp); diff --git a/src/bnetd/file.cpp b/src/bnetd/file.cpp index 1094c11d4..0c02197b9 100644 --- a/src/bnetd/file.cpp +++ b/src/bnetd/file.cpp @@ -51,7 +51,7 @@ namespace pvpgn namespace bnetd { - static char const * file_get_info(char const * rawname, unsigned int * len, bn_long * modtime); + static char const * file_get_info(t_connection * c, char const * rawname, unsigned int * len, bn_long * modtime); /* Requested files aliases */ const char * requestfiles[] = { @@ -64,7 +64,7 @@ namespace pvpgn NULL, NULL }; - static const char * file_find_localized(const char *rawname) + static const char * file_find_localized(t_connection * c, const char *rawname) { const char ** pattern, **alias; @@ -74,20 +74,25 @@ namespace pvpgn if (!std::strncmp(rawname, *pattern, std::strlen(*pattern))) { t_gamelang lang; - // when file transferring by bnftp protofol client doesn't provide a language - // but we can extract it from the filename + if (lang = conn_get_gamelang_localized(c)) + return i18n_filename(*alias, lang); + + // FIXME: when file is transferring by bnftp protofol client doesn't provide a language + // but we can extract it from the filename, so do it in next code // if there is no country tag in the file (just in case to prevent crash from invalid filename) if ((strlen(*pattern) + 4) > strlen(rawname)) return NULL; - // get language tag from the file name + // get language tag from the file name (like "termsofservice-ruRU.txt") + // (it used in War3) char langstr[5]; strncpy(langstr, rawname + std::strlen(*pattern), 4); langstr[4] = 0; lang = tag_str_to_uint(langstr); - // if language is invalid then try find it by code + // if language is invalid then try find it by country (like "tos_USA.txt") + // (it used in D1, SC, War2) if (!tag_check_gamelang(lang)) { strncpy(langstr, rawname + std::strlen(*pattern), 3); @@ -101,7 +106,7 @@ namespace pvpgn return NULL; } - static char const * file_get_info(char const * rawname, unsigned int * len, bn_long * modtime) + static char const * file_get_info(t_connection * c, char const * rawname, unsigned int * len, bn_long * modtime) { const char *filename; t_bnettime bt; @@ -128,7 +133,7 @@ namespace pvpgn } - filename = file_find_localized(rawname); + filename = file_find_localized(c, rawname); // if localized file not found in "i18n" if (!filename || stat(filename, &sfile) < 0) { @@ -148,7 +153,7 @@ namespace pvpgn } - extern int file_to_mod_time(char const * rawname, bn_long * modtime) + extern int file_to_mod_time(t_connection * c, char const * rawname, bn_long * modtime) { char const * filename; unsigned int len; @@ -164,7 +169,7 @@ namespace pvpgn return -1; } - if (!(filename = file_get_info(rawname, &len, modtime))) + if (!(filename = file_get_info(c, rawname, &len, modtime))) return -1; xfree((void *)filename); /* avoid warning */ @@ -204,7 +209,7 @@ namespace pvpgn packet_set_size(rpacket, sizeof(t_server_file_reply)); packet_set_type(rpacket, SERVER_FILE_REPLY); - if ((filename = file_get_info(rawname, &filelen, &rpacket->u.server_file_reply.timestamp))) + if ((filename = file_get_info(c, rawname, &filelen, &rpacket->u.server_file_reply.timestamp))) { if (!(fp = std::fopen(filename, "rb"))) { diff --git a/src/bnetd/file.h b/src/bnetd/file.h index f87801301..23f13c3dc 100644 --- a/src/bnetd/file.h +++ b/src/bnetd/file.h @@ -33,7 +33,7 @@ namespace pvpgn namespace bnetd { - extern int file_to_mod_time(char const * rawname, bn_long * modtime); + extern int file_to_mod_time(t_connection * c, char const * rawname, bn_long * modtime); extern int file_send(t_connection * c, char const * rawname, unsigned int adid, unsigned int etag, unsigned int startoffset, int need_header); } diff --git a/src/bnetd/handle_bnet.cpp b/src/bnetd/handle_bnet.cpp index 6456edc75..a0a0015d8 100644 --- a/src/bnetd/handle_bnet.cpp +++ b/src/bnetd/handle_bnet.cpp @@ -582,7 +582,7 @@ namespace pvpgn bn_int_set(&rpacket->u.server_authreq_109.sessionkey, conn_get_sessionkey(c)); bn_int_set(&rpacket->u.server_authreq_109.sessionnum, conn_get_sessionnum(c)); - file_to_mod_time(versioncheck_get_mpqfile(vc), &rpacket->u.server_authreq_109.timestamp); + file_to_mod_time(c, versioncheck_get_mpqfile(vc), &rpacket->u.server_authreq_109.timestamp); packet_append_string(rpacket, versioncheck_get_mpqfile(vc)); packet_append_string(rpacket, versioncheck_get_eqn(vc)); eventlog(eventlog_level_debug, __FUNCTION__, "[%d] selected \"%s\" \"%s\"", conn_get_socket(c), versioncheck_get_mpqfile(vc), versioncheck_get_eqn(vc)); @@ -649,7 +649,7 @@ namespace pvpgn if ((rpacket = packet_create(packet_class_bnet))) { packet_set_size(rpacket, sizeof(t_server_authreq1)); packet_set_type(rpacket, SERVER_AUTHREQ1); - file_to_mod_time(versioncheck_get_mpqfile(vc), &rpacket->u.server_authreq1.timestamp); + file_to_mod_time(c, versioncheck_get_mpqfile(vc), &rpacket->u.server_authreq1.timestamp); packet_append_string(rpacket, versioncheck_get_mpqfile(vc)); packet_append_string(rpacket, versioncheck_get_eqn(vc)); eventlog(eventlog_level_debug, __FUNCTION__, "[%d] selected \"%s\" \"%s\"", conn_get_socket(c), versioncheck_get_mpqfile(vc), versioncheck_get_eqn(vc)); @@ -1219,7 +1219,7 @@ namespace pvpgn if ((rpacket = packet_create(packet_class_bnet))) { packet_set_size(rpacket, sizeof(t_server_iconreply)); packet_set_type(rpacket, SERVER_ICONREPLY); - file_to_mod_time(prefs_get_iconfile(), &rpacket->u.server_iconreply.timestamp); + file_to_mod_time(c, prefs_get_iconfile(), &rpacket->u.server_iconreply.timestamp); /* battle.net sends different file on iconreq for WAR3 and W3XP [Omega] */ if ((conn_get_clienttag(c) == CLIENTTAG_WARCRAFT3_UINT) || (conn_get_clienttag(c) == CLIENTTAG_WAR3XP_UINT)) @@ -1397,7 +1397,7 @@ namespace pvpgn * timestamp doesn't work correctly and starcraft * needs name in client locale or displays hostname */ - file_to_mod_time(tosfile, &rpacket->u.server_fileinforeply.timestamp); + file_to_mod_time(c, tosfile, &rpacket->u.server_fileinforeply.timestamp); packet_append_string(rpacket, tosfile); conn_push_outqueue(c, rpacket); packet_del_ref(rpacket); @@ -2770,7 +2770,7 @@ namespace pvpgn char * buff, *line; std::FILE * fp; - filename = i18n_filename(prefs_get_motdw3file(), conn_get_gamelang(c)); + filename = i18n_filename(prefs_get_motdw3file(), conn_get_gamelang_localized(c)); if (fp = std::fopen(filename, "r")) { @@ -3211,7 +3211,7 @@ namespace pvpgn packet_set_type(rpacket, SERVER_ADREPLY); bn_int_set(&rpacket->u.server_adreply.adid, ad->getId()); bn_int_set(&rpacket->u.server_adreply.extensiontag, ad->getExtensionTag()); - file_to_mod_time(ad->getFilename(), &rpacket->u.server_adreply.timestamp); + file_to_mod_time(c, ad->getFilename(), &rpacket->u.server_adreply.timestamp); packet_append_string(rpacket, ad->getFilename()); packet_append_string(rpacket, ad->getLink()); conn_push_outqueue(c, rpacket); diff --git a/src/bnetd/helpfile.cpp b/src/bnetd/helpfile.cpp index 64c6154a3..14a36afd1 100644 --- a/src/bnetd/helpfile.cpp +++ b/src/bnetd/helpfile.cpp @@ -49,16 +49,15 @@ namespace pvpgn static std::FILE* get_hfd(t_connection * c) { - if (t_gamelang lang = conn_get_gamelang(c)) + t_gamelang lang = conn_get_gamelang_localized(c); + + std::map::iterator it = hfd_list.find(lang); + if (it != hfd_list.end()) { - std::map::iterator it = hfd_list.find(lang); - if (it != hfd_list.end()) - { - return it->second; - } - // return enUS if language is not specified in language list - return hfd_list[languages[0]]; + return it->second; } + // return enUS if language is not specified in language list + return hfd_list[languages[0]]; } extern int helpfile_init(char const *filename) diff --git a/src/bnetd/i18n.cpp b/src/bnetd/i18n.cpp index 86797566a..e50fc3b51 100644 --- a/src/bnetd/i18n.cpp +++ b/src/bnetd/i18n.cpp @@ -269,7 +269,7 @@ namespace pvpgn { format = fmt; - if (t_gamelang lang = conn_get_gamelang(c)) + if (t_gamelang lang = conn_get_gamelang_localized(c)) if (!(format = _find_string(fmt, lang))) format = fmt; @@ -326,11 +326,21 @@ namespace pvpgn for (int i = 0; i < (sizeof(countries) / sizeof(*countries)); i++) if (strcasecmp(code, countries[i][0]) == 0) - return tag_str_to_uint(countries[i][0]); + return tag_str_to_uint(countries[i][1]); - return tag_str_to_uint(countries[0][0]); // default + return tag_str_to_uint(countries[0][1]); // default } + extern t_gamelang conn_get_gamelang_localized(t_connection * c) + { + t_gamelang lang = conn_get_gamelang(c); + + if (prefs_get_localize_by_country()) + if (const char * country = conn_get_country(c)) + lang = lang_find_by_country(country); + + return lang; + } } } diff --git a/src/bnetd/i18n.h b/src/bnetd/i18n.h index a2f2f9b9d..5047bf6de 100644 --- a/src/bnetd/i18n.h +++ b/src/bnetd/i18n.h @@ -48,6 +48,7 @@ namespace pvpgn extern const char * i18n_filename(const char * filename, t_tag gamelang); extern t_gamelang lang_find_by_country(const char * code); + extern t_gamelang conn_get_gamelang_localized(t_connection * c); extern std::string _localize(t_connection * c, const char * func, const char *fmt, const fmt::ArgList &args); FMT_VARIADIC(std::string, _localize, t_connection *, const char *, const char *) diff --git a/src/bnetd/prefs.cpp b/src/bnetd/prefs.cpp index 3d0731c9a..8f3202bd9 100644 --- a/src/bnetd/prefs.cpp +++ b/src/bnetd/prefs.cpp @@ -163,6 +163,7 @@ namespace pvpgn unsigned int max_connections; unsigned int sync_on_logoff; char const * irc_network_name; + unsigned int localize_by_country; char const * apiregaddrs; char const * wolv1addrs; @@ -664,6 +665,11 @@ namespace pvpgn static int conf_set_irc_network_name(const char *valstr); static const char *conf_get_irc_network_name(void); + static int conf_set_localize_by_country(const char *valstr); + static const char *conf_get_localize_by_country(void); + static int conf_setdef_localize_by_country(void); + + static int conf_setdef_apireg_addrs(void); static int conf_set_apireg_addrs(const char *valstr); static const char *conf_get_apireg_addrs(void); @@ -829,6 +835,7 @@ namespace pvpgn { "sync_on_logoff", conf_set_sync_on_logoff, conf_get_sync_on_logoff, conf_setdef_sync_on_logoff }, { "ladder_prefix", conf_set_ladder_prefix, conf_get_ladder_prefix, conf_setdef_ladder_prefix }, { "irc_network_name", conf_set_irc_network_name, conf_get_irc_network_name, conf_setdef_irc_network_name }, + { "localize_by_country", conf_set_localize_by_country, conf_get_localize_by_country, conf_setdef_localize_by_country }, { "apiregaddrs", conf_set_apireg_addrs, conf_get_apireg_addrs, conf_setdef_apireg_addrs }, { "wgameresaddrs", conf_set_wgameres_addrs, conf_get_wgameres_addrs, conf_setdef_wgameres_addrs }, @@ -3478,6 +3485,28 @@ namespace pvpgn return prefs_runtime_config.irc_network_name; } + + extern unsigned int prefs_get_localize_by_country(void) + { + return prefs_runtime_config.localize_by_country; + } + + static int conf_set_localize_by_country(const char *valstr) + { + return conf_set_bool(&prefs_runtime_config.localize_by_country, valstr, 0); + } + + static int conf_setdef_localize_by_country(void) + { + return conf_set_bool(&prefs_runtime_config.localize_by_country, NULL, 0); + } + + static const char* conf_get_localize_by_country(void) + { + return conf_get_bool(prefs_runtime_config.localize_by_country); + } + + /** * Westwood Online Extensions */ diff --git a/src/bnetd/prefs.h b/src/bnetd/prefs.h index b5855d020..f9dfbdc75 100644 --- a/src/bnetd/prefs.h +++ b/src/bnetd/prefs.h @@ -179,6 +179,7 @@ namespace pvpgn extern unsigned int prefs_get_max_connections(void); extern unsigned int prefs_get_sync_on_logoff(void); extern char const * prefs_get_irc_network_name(void); + extern unsigned int prefs_get_localize_by_country(void); /** * Westwood Online Extensions From 7737a6014733e1f1dc8bf49b36aa29db1664ae04 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 11 Jul 2014 00:48:49 +0400 Subject: [PATCH 112/144] user can select different language using command /language [code] to display different translation https://github.com/HarpyWar/pvpgn/issues/13 --- conf/command_groups.conf.in | 1 + conf/i18n/bnhelp.conf | 5 ++++ lua/extend/account_wrap.lua | 7 +++++ src/bnetd/account_wrap.cpp | 21 ++++++++++++-- src/bnetd/account_wrap.h | 3 ++ src/bnetd/command.cpp | 2 ++ src/bnetd/i18n.cpp | 57 +++++++++++++++++++++++++++++++++++++ src/bnetd/i18n.h | 4 ++- 8 files changed, 97 insertions(+), 3 deletions(-) diff --git a/conf/command_groups.conf.in b/conf/command_groups.conf.in index dd44cdc52..6309d0882 100644 --- a/conf/command_groups.conf.in +++ b/conf/command_groups.conf.in @@ -72,6 +72,7 @@ 1 /latency /ping /p 1 /topic 1 /icon +1 /language /lang # ///////////////////////////// # ///// Operator commands ///// diff --git a/conf/i18n/bnhelp.conf b/conf/i18n/bnhelp.conf index c8e119ad9..1e018eaa8 100644 --- a/conf/i18n/bnhelp.conf +++ b/conf/i18n/bnhelp.conf @@ -600,6 +600,11 @@ Syntax for operator/admin: /icon l[ist] Display availaible icons in server stash that can be assigned to users +%language /lang +-------------------------------------------------------- +/lang [code] + Set your language to get another translation: + %quiz -------------------------------------------------------- /quiz [option] diff --git a/lua/extend/account_wrap.lua b/lua/extend/account_wrap.lua index de1ce248f..8ae5dd478 100644 --- a/lua/extend/account_wrap.lua +++ b/lua/extend/account_wrap.lua @@ -202,6 +202,13 @@ function account_set_acct_salt(username, value) return api.account_set_attr(username, "BNET\\acct\\salt", attr_type_raw, value) end +function account_get_userlang(username) + return api.account_get_attr(username, "BNET\\acct\\userlang", attr_type_str) +end +function account_set_userlang(username, value) + return api.account_set_attr(username, "BNET\\acct\\userlang", attr_type_str, value) +end + -- -- Profile -- diff --git a/src/bnetd/account_wrap.cpp b/src/bnetd/account_wrap.cpp index 2a1073587..cdabecfe4 100644 --- a/src/bnetd/account_wrap.cpp +++ b/src/bnetd/account_wrap.cpp @@ -2609,7 +2609,6 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "Unable to set account flag to TRUE"); return NULL; } - return account_get_strattr(account, "BNET\\acct\\email"); } @@ -2620,10 +2619,28 @@ namespace pvpgn eventlog(eventlog_level_error, __FUNCTION__, "Unable to set account flag to TRUE"); return -1; } - return account_set_strattr(account, "BNET\\acct\\email", email); } + extern int account_set_userlang(t_account * account, const char * lang) + { + if (lang) + return account_set_strattr(account, "BNET\\acct\\userlang", lang); + else + return account_set_strattr(account, "BNET\\acct\\userlang", "NULL"); + } + + extern char const * account_get_userlang(t_account * account) + { + char const * retval; + retval = account_get_strattr(account, "BNET\\acct\\userlang"); + + if ((retval) && ((std::strcmp(retval, "NULL") != 0))) + return retval; + else + return NULL; + } + /** * Westwood Online Extensions */ diff --git a/src/bnetd/account_wrap.h b/src/bnetd/account_wrap.h index d71cf8bf1..3a9310c13 100644 --- a/src/bnetd/account_wrap.h +++ b/src/bnetd/account_wrap.h @@ -249,6 +249,9 @@ namespace pvpgn extern int account_set_email(t_account * account, char const * email); extern char const * account_get_email(t_account * account); + extern int account_set_userlang(t_account * account, const char * lang); + extern char const * account_get_userlang(t_account * account); + /* Westwood Online Extensions */ extern char const * account_get_wol_apgar(t_account * account); extern int account_set_wol_apgar(t_account * account, char const * apgar); diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index e68a1b1d7..12f15d750 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -538,6 +538,8 @@ namespace pvpgn { "/clearstats", _handle_clearstats_command }, { "/icon", handle_icon_command }, { "/alert", _handle_alert_command }, + { "/language", handle_language_command }, + { "/lang", handle_language_command }, { NULL, NULL } diff --git a/src/bnetd/i18n.cpp b/src/bnetd/i18n.cpp index e50fc3b51..4df7981ec 100644 --- a/src/bnetd/i18n.cpp +++ b/src/bnetd/i18n.cpp @@ -56,6 +56,8 @@ #include "helpfile.h" #include "channel.h" #include "prefs.h" +#include "account_wrap.h" +#include "command.h" #include "i18n.h" #include "common/setup_after.h" @@ -335,12 +337,67 @@ namespace pvpgn { t_gamelang lang = conn_get_gamelang(c); + // force localize by user country if (prefs_get_localize_by_country()) if (const char * country = conn_get_country(c)) lang = lang_find_by_country(country); + // if user set own language + if (t_account * a = conn_get_account(c)) + if (const char * l = account_get_userlang(a)) + lang = tag_str_to_uint(l); + return lang; } + + /* Set custom user language (command) */ + extern int handle_language_command(t_connection * c, char const *text) + { + + // split command args + std::vector args = split_command(text, 3); + if (args[1].empty()) + { + // display command help + describe_command(c, args[0].c_str()); + + + std::string out = " "; + char lang_str[5]; + // display available language list + for (int i = 0; i < (sizeof(languages) / sizeof(*languages)); i++) + { + tag_uint_to_str(lang_str, languages[i]); + + // select with brackets current user language + if (languages[i] == conn_get_gamelang_localized(c)) + out += "[" + std::string(lang_str) + "]"; + else + out += lang_str; + if (i < (sizeof(languages) / sizeof(*languages)) - 1) + out += ", "; + } + message_send_text(c, message_type_info, c, out.c_str()); + + return -1; + } + + const char * userlang = args[1].c_str(); + + // validate given language + if (!tag_check_gamelang(tag_str_to_uint(userlang))) + { + message_send_text(c, message_type_error, c, localize(c, "Bad language code.")); + return -1; + } + + if (t_account * account = conn_get_account(c)) + { + account_set_userlang(account, userlang); + message_send_text(c, message_type_error, c, localize(c, "Set your language to {}", userlang)); + } + return 0; + } } } diff --git a/src/bnetd/i18n.h b/src/bnetd/i18n.h index 5047bf6de..4e8162c1e 100644 --- a/src/bnetd/i18n.h +++ b/src/bnetd/i18n.h @@ -23,6 +23,7 @@ namespace pvpgn namespace bnetd { extern const t_gamelang languages[12]; + } } @@ -50,11 +51,12 @@ namespace pvpgn extern t_gamelang lang_find_by_country(const char * code); extern t_gamelang conn_get_gamelang_localized(t_connection * c); + extern int handle_language_command(t_connection * c, char const *text); + extern std::string _localize(t_connection * c, const char * func, const char *fmt, const fmt::ArgList &args); FMT_VARIADIC(std::string, _localize, t_connection *, const char *, const char *) #define localize(c, ...) _localize(c, __FUNCTION__, __VA_ARGS__) - } } From 43f971ddf58aa4eb18176f241efbc11c92ea1b40 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 11 Jul 2014 00:53:16 +0400 Subject: [PATCH 113/144] * remove files that are not translated yet https://github.com/HarpyWar/pvpgn/issues/13 * remove duplicate German country definition https://github.com/HarpyWar/pvpgn/commit/c4dd101c4e005081eea449d4d74c7e53e3f8cf48#commitcomment-6954490 --- conf/i18n/csCZ/bnhelp.conf | 615 ---------- conf/i18n/csCZ/chathelp-war3.txt | 15 - conf/i18n/csCZ/common.xml | 1819 ----------------------------- conf/i18n/csCZ/newaccount.txt | 21 - conf/i18n/csCZ/termsofservice.txt | 21 - conf/i18n/csCZ/w3motd.txt | 11 - conf/i18n/deDE/bnhelp.conf | 615 ---------- conf/i18n/deDE/chathelp-war3.txt | 15 - conf/i18n/deDE/common.xml | 1819 ----------------------------- conf/i18n/deDE/newaccount.txt | 21 - conf/i18n/deDE/termsofservice.txt | 21 - conf/i18n/deDE/w3motd.txt | 11 - conf/i18n/esES/bnhelp.conf | 615 ---------- conf/i18n/esES/chathelp-war3.txt | 15 - conf/i18n/esES/common.xml | 1819 ----------------------------- conf/i18n/esES/newaccount.txt | 21 - conf/i18n/esES/termsofservice.txt | 21 - conf/i18n/esES/w3motd.txt | 11 - conf/i18n/frFR/bnhelp.conf | 615 ---------- conf/i18n/frFR/common.xml | 1819 ----------------------------- conf/i18n/frFR/newaccount.txt | 21 - conf/i18n/frFR/termsofservice.txt | 21 - conf/i18n/frFR/w3motd.txt | 11 - conf/i18n/itIT/bnhelp.conf | 615 ---------- conf/i18n/itIT/chathelp-war3.txt | 15 - conf/i18n/itIT/common.xml | 1819 ----------------------------- conf/i18n/itIT/newaccount.txt | 21 - conf/i18n/itIT/termsofservice.txt | 21 - conf/i18n/itIT/w3motd.txt | 11 - conf/i18n/jpJA/bnhelp.conf | 615 ---------- conf/i18n/jpJA/chathelp-war3.txt | 15 - conf/i18n/jpJA/common.xml | 1819 ----------------------------- conf/i18n/jpJA/newaccount.txt | 21 - conf/i18n/jpJA/termsofservice.txt | 21 - conf/i18n/jpJA/w3motd.txt | 11 - conf/i18n/plPL/bnhelp.conf | 615 ---------- conf/i18n/plPL/chathelp-war3.txt | 15 - conf/i18n/plPL/common.xml | 1819 ----------------------------- conf/i18n/plPL/newaccount.txt | 21 - conf/i18n/plPL/termsofservice.txt | 21 - conf/i18n/plPL/w3motd.txt | 11 - conf/i18n/ruRU/bnhelp.conf | 615 ---------- conf/i18n/ruRU/common.xml | 1819 ----------------------------- conf/i18n/ruRU/newaccount.txt | 21 - conf/i18n/ruRU/termsofservice.txt | 21 - conf/i18n/ruRU/w3motd.txt | 11 - src/bnetd/i18n.cpp | 6 - 47 files changed, 19992 deletions(-) delete mode 100644 conf/i18n/csCZ/bnhelp.conf delete mode 100644 conf/i18n/csCZ/chathelp-war3.txt delete mode 100644 conf/i18n/csCZ/common.xml delete mode 100644 conf/i18n/csCZ/newaccount.txt delete mode 100644 conf/i18n/csCZ/termsofservice.txt delete mode 100644 conf/i18n/csCZ/w3motd.txt delete mode 100644 conf/i18n/deDE/bnhelp.conf delete mode 100644 conf/i18n/deDE/chathelp-war3.txt delete mode 100644 conf/i18n/deDE/common.xml delete mode 100644 conf/i18n/deDE/newaccount.txt delete mode 100644 conf/i18n/deDE/termsofservice.txt delete mode 100644 conf/i18n/deDE/w3motd.txt delete mode 100644 conf/i18n/esES/bnhelp.conf delete mode 100644 conf/i18n/esES/chathelp-war3.txt delete mode 100644 conf/i18n/esES/common.xml delete mode 100644 conf/i18n/esES/newaccount.txt delete mode 100644 conf/i18n/esES/termsofservice.txt delete mode 100644 conf/i18n/esES/w3motd.txt delete mode 100644 conf/i18n/frFR/bnhelp.conf delete mode 100644 conf/i18n/frFR/common.xml delete mode 100644 conf/i18n/frFR/newaccount.txt delete mode 100644 conf/i18n/frFR/termsofservice.txt delete mode 100644 conf/i18n/frFR/w3motd.txt delete mode 100644 conf/i18n/itIT/bnhelp.conf delete mode 100644 conf/i18n/itIT/chathelp-war3.txt delete mode 100644 conf/i18n/itIT/common.xml delete mode 100644 conf/i18n/itIT/newaccount.txt delete mode 100644 conf/i18n/itIT/termsofservice.txt delete mode 100644 conf/i18n/itIT/w3motd.txt delete mode 100644 conf/i18n/jpJA/bnhelp.conf delete mode 100644 conf/i18n/jpJA/chathelp-war3.txt delete mode 100644 conf/i18n/jpJA/common.xml delete mode 100644 conf/i18n/jpJA/newaccount.txt delete mode 100644 conf/i18n/jpJA/termsofservice.txt delete mode 100644 conf/i18n/jpJA/w3motd.txt delete mode 100644 conf/i18n/plPL/bnhelp.conf delete mode 100644 conf/i18n/plPL/chathelp-war3.txt delete mode 100644 conf/i18n/plPL/common.xml delete mode 100644 conf/i18n/plPL/newaccount.txt delete mode 100644 conf/i18n/plPL/termsofservice.txt delete mode 100644 conf/i18n/plPL/w3motd.txt delete mode 100644 conf/i18n/ruRU/bnhelp.conf delete mode 100644 conf/i18n/ruRU/common.xml delete mode 100644 conf/i18n/ruRU/newaccount.txt delete mode 100644 conf/i18n/ruRU/termsofservice.txt delete mode 100644 conf/i18n/ruRU/w3motd.txt diff --git a/conf/i18n/csCZ/bnhelp.conf b/conf/i18n/csCZ/bnhelp.conf deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/csCZ/bnhelp.conf +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/csCZ/chathelp-war3.txt b/conf/i18n/csCZ/chathelp-war3.txt deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/csCZ/chathelp-war3.txt +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/csCZ/common.xml b/conf/i18n/csCZ/common.xml deleted file mode 100644 index 19d5716c7..000000000 --- a/conf/i18n/csCZ/common.xml +++ /dev/null @@ -1,1819 +0,0 @@ - - - - English - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/csCZ/newaccount.txt b/conf/i18n/csCZ/newaccount.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/csCZ/newaccount.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/csCZ/termsofservice.txt b/conf/i18n/csCZ/termsofservice.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/csCZ/termsofservice.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/csCZ/w3motd.txt b/conf/i18n/csCZ/w3motd.txt deleted file mode 100644 index 8bc4a5911..000000000 --- a/conf/i18n/csCZ/w3motd.txt +++ /dev/null @@ -1,11 +0,0 @@ -|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF - -There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. - - - - - - - -This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/deDE/bnhelp.conf b/conf/i18n/deDE/bnhelp.conf deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/deDE/bnhelp.conf +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/deDE/chathelp-war3.txt b/conf/i18n/deDE/chathelp-war3.txt deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/deDE/chathelp-war3.txt +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/deDE/common.xml b/conf/i18n/deDE/common.xml deleted file mode 100644 index 19d5716c7..000000000 --- a/conf/i18n/deDE/common.xml +++ /dev/null @@ -1,1819 +0,0 @@ - - - - English - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/deDE/newaccount.txt b/conf/i18n/deDE/newaccount.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/deDE/newaccount.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/deDE/termsofservice.txt b/conf/i18n/deDE/termsofservice.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/deDE/termsofservice.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/deDE/w3motd.txt b/conf/i18n/deDE/w3motd.txt deleted file mode 100644 index 8bc4a5911..000000000 --- a/conf/i18n/deDE/w3motd.txt +++ /dev/null @@ -1,11 +0,0 @@ -|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF - -There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. - - - - - - - -This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/esES/bnhelp.conf b/conf/i18n/esES/bnhelp.conf deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/esES/bnhelp.conf +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/esES/chathelp-war3.txt b/conf/i18n/esES/chathelp-war3.txt deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/esES/chathelp-war3.txt +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/esES/common.xml b/conf/i18n/esES/common.xml deleted file mode 100644 index 19d5716c7..000000000 --- a/conf/i18n/esES/common.xml +++ /dev/null @@ -1,1819 +0,0 @@ - - - - English - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/esES/newaccount.txt b/conf/i18n/esES/newaccount.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/esES/newaccount.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/esES/termsofservice.txt b/conf/i18n/esES/termsofservice.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/esES/termsofservice.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/esES/w3motd.txt b/conf/i18n/esES/w3motd.txt deleted file mode 100644 index 8bc4a5911..000000000 --- a/conf/i18n/esES/w3motd.txt +++ /dev/null @@ -1,11 +0,0 @@ -|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF - -There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. - - - - - - - -This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/frFR/bnhelp.conf b/conf/i18n/frFR/bnhelp.conf deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/frFR/bnhelp.conf +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/frFR/common.xml b/conf/i18n/frFR/common.xml deleted file mode 100644 index 19d5716c7..000000000 --- a/conf/i18n/frFR/common.xml +++ /dev/null @@ -1,1819 +0,0 @@ - - - - English - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/frFR/newaccount.txt b/conf/i18n/frFR/newaccount.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/frFR/newaccount.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/frFR/termsofservice.txt b/conf/i18n/frFR/termsofservice.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/frFR/termsofservice.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/frFR/w3motd.txt b/conf/i18n/frFR/w3motd.txt deleted file mode 100644 index 8bc4a5911..000000000 --- a/conf/i18n/frFR/w3motd.txt +++ /dev/null @@ -1,11 +0,0 @@ -|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF - -There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. - - - - - - - -This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/itIT/bnhelp.conf b/conf/i18n/itIT/bnhelp.conf deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/itIT/bnhelp.conf +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/itIT/chathelp-war3.txt b/conf/i18n/itIT/chathelp-war3.txt deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/itIT/chathelp-war3.txt +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/itIT/common.xml b/conf/i18n/itIT/common.xml deleted file mode 100644 index 19d5716c7..000000000 --- a/conf/i18n/itIT/common.xml +++ /dev/null @@ -1,1819 +0,0 @@ - - - - English - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/itIT/newaccount.txt b/conf/i18n/itIT/newaccount.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/itIT/newaccount.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/itIT/termsofservice.txt b/conf/i18n/itIT/termsofservice.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/itIT/termsofservice.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/itIT/w3motd.txt b/conf/i18n/itIT/w3motd.txt deleted file mode 100644 index 8bc4a5911..000000000 --- a/conf/i18n/itIT/w3motd.txt +++ /dev/null @@ -1,11 +0,0 @@ -|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF - -There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. - - - - - - - -This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/jpJA/bnhelp.conf b/conf/i18n/jpJA/bnhelp.conf deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/jpJA/bnhelp.conf +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/jpJA/chathelp-war3.txt b/conf/i18n/jpJA/chathelp-war3.txt deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/jpJA/chathelp-war3.txt +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/jpJA/common.xml b/conf/i18n/jpJA/common.xml deleted file mode 100644 index 19d5716c7..000000000 --- a/conf/i18n/jpJA/common.xml +++ /dev/null @@ -1,1819 +0,0 @@ - - - - English - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/jpJA/newaccount.txt b/conf/i18n/jpJA/newaccount.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/jpJA/newaccount.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/jpJA/termsofservice.txt b/conf/i18n/jpJA/termsofservice.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/jpJA/termsofservice.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/jpJA/w3motd.txt b/conf/i18n/jpJA/w3motd.txt deleted file mode 100644 index 8bc4a5911..000000000 --- a/conf/i18n/jpJA/w3motd.txt +++ /dev/null @@ -1,11 +0,0 @@ -|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF - -There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. - - - - - - - -This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/plPL/bnhelp.conf b/conf/i18n/plPL/bnhelp.conf deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/plPL/bnhelp.conf +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/plPL/chathelp-war3.txt b/conf/i18n/plPL/chathelp-war3.txt deleted file mode 100644 index 65f5dce3c..000000000 --- a/conf/i18n/plPL/chathelp-war3.txt +++ /dev/null @@ -1,15 +0,0 @@ -PvPGN Bnet Emulation Chat Help Commands - -New Commands: - -use /f help for a friend lists help -use /users to view users online -use /w or /msg to whisper people -use /join to join a channel - -For Chan Ops: - -use /ban bans a user from channel -use /kick kicks a user from channel - -For a more detailed help type: /help \ No newline at end of file diff --git a/conf/i18n/plPL/common.xml b/conf/i18n/plPL/common.xml deleted file mode 100644 index 19d5716c7..000000000 --- a/conf/i18n/plPL/common.xml +++ /dev/null @@ -1,1819 +0,0 @@ - - - - English - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/plPL/newaccount.txt b/conf/i18n/plPL/newaccount.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/plPL/newaccount.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/plPL/termsofservice.txt b/conf/i18n/plPL/termsofservice.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/plPL/termsofservice.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/plPL/w3motd.txt b/conf/i18n/plPL/w3motd.txt deleted file mode 100644 index 8bc4a5911..000000000 --- a/conf/i18n/plPL/w3motd.txt +++ /dev/null @@ -1,11 +0,0 @@ -|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF - -There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. - - - - - - - -This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/conf/i18n/ruRU/bnhelp.conf b/conf/i18n/ruRU/bnhelp.conf deleted file mode 100644 index c8e119ad9..000000000 --- a/conf/i18n/ruRU/bnhelp.conf +++ /dev/null @@ -1,615 +0,0 @@ -############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # -#----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # -# # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # -# # -############################################################################## - -%whois whereis where --------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. - - Example: /whois nomad - -%msg whisper m w --------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to - - Example: /whisper nomad How are you doing? - -%ignore squelch --------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . - - Example: /squelch nomad - -%unignore unsquelch --------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. - - Example: /unsquelch nomad - -%away --------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. - - Example: /away Eating dinner - -%dnd --------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. - - Example: /dnd I'm playing a game and don't want to hear whispers. - -%who --------------------------------------------------------- -/who - Displays a list of users in - - Example: /who Moderated Support - -%stats astat --------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. - - Example: /stats nomad - -%status users --------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP - -%time --------------------------------------------------------- -/time - Displays the current server and your local time. - -%channel join j --------------------------------------------------------- -/channel (alias: /join /j) - Moves you to - - Example: /channel Moderated Support - -%rejoin --------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. - -%me emote --------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. - - Example: /emote wants to play a game. - -%kick --------------------------------------------------------- -/kick - Kicks from the channel. - - Example: /kick nomad - -%ban --------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. - - Example: /ban nomad - -%unban --------------------------------------------------------- -/unban - Allows a banned to return to the channel. - - Example: /unban nomad - -%serverban --------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account - - Example: /serverban nomad - -%ipscan --------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . - - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad - -%whoami --------------------------------------------------------- -/whoami - Displays where you are on the server. - -%uptime --------------------------------------------------------- -/uptime - Displays how long the server has been running. - -%version --------------------------------------------------------- -/version - Displays the version of the server - -%lusers --------------------------------------------------------- -/lusers - Displays a list of players who have been banned from the channel - -%games --------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) --------------------------------------------------------- - /games all - Displays a list of all games. - /games l[obby] - Displays a list of games in lobby. - -%channels chs --------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. --------------------------------------------------------- - /channels all - Displays a list of all channels. - -%connections con --------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. - -%finger --------------------------------------------------------- -/finger - Displays detailed information about - - Example: /finger nomad - -%admins --------------------------------------------------------- -/admins - Displays a list of all currently logged in administrators. - -%reply r --------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . - - Example: /r Hi, mate! - -%announce ann --------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. - - Example: /ann Hello everyone! - -%realmann --------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. - - Example: /realmann Hello everyone! - -%alert --------------------------------------------------------- -/alert - Show MessageBox with to everyone. Use \n as a new line symbol. - - Example: /alert Hello\neveryone! - -%news --------------------------------------------------------- -/news - Displays the news. - -%logout quit exit --------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. - -%kill --------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. - - Example: /kill nomad 5 - -%killsession --------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. - - Example: /killsession 1 5 - -%watch --------------------------------------------------------- -/watch - Enables notifications for . - - Example: /watch nomad - -%unwatch --------------------------------------------------------- -/unwatch - Disables notifications for . - - Example: /unwatch nomad - -%watchall --------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. - - Example: /watchall SEXP - -%unwatchall --------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. - - Example: /unwatchall SEXP - -%gameinfo --------------------------------------------------------- -/gameinfo - Displays information about . - - Example: /gameinfo FS 1v1!!! - -%ladderactivate --------------------------------------------------------- -/ladderactivate - Copies current ladder statistics to active ladder statistics. - -%ladderinfo --------------------------------------------------------- -/ladderinfo [gametag] - Displays ladder information for of [gametag] - - Example: /ladderinfo 1000 SEXP - -%timer --------------------------------------------------------- -/timer [message] - Displays [message] after seconds. - - Example: /timer 60 one minute has passed - -%netinfo --------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. - - Example: /netinfo nomad - -%addacct --------------------------------------------------------- -/addacct - Creates a new account named with password . - - Example: /addacct nomad password - -%chpass --------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. - - Example: /chpass nomad password - -%quota --------------------------------------------------------- -/quota - Displays your message quota. - -%shutdown --------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. - - Example: /shutdown 300 - -%lock lockacct --------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. - - Example: /lock nomad 0 bye noob! - -%unlock unlockacct --------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. - - Example: /unlock nomad - -%mute muteacct --------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. - - Example: /mute nomad 6 stop spam! - -%unmute unmuteacct --------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. - - Example: /unmute nomad - -%friends f --------------------------------------------------------- -/friends [options] (alias: /f) --------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list - /friends list - Displays your friends list. - /friends online - Displays your online friends list. - /friends msg - Whisper to all of your online friends. - -%mail --------------------------------------------------------- -/mail [options] --------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] - /mail del[ete] {all|} - Deletes mail or [all] mail. - -%flag --------------------------------------------------------- -/flag - A debug tool for icon flags. - -%tag --------------------------------------------------------- -/tag - A debug tool for client tags. - -%help --------------------------------------------------------- -/help [command] - Displays help about [command] - - Example: /help whisper - -%ipban --------------------------------------------------------- -/ipban [option] [time] --------------------------------------------------------- - /ipban l[ist] - Displays a list of banned IP addresses - /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban - -%set --------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 - -%motd --------------------------------------------------------- -/motd - Displays the MOTD. - -%tos --------------------------------------------------------- -/tos /warranty /license - Displays the Terms of Service. - -%admin --------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. - - Example: /admin +nomad - -%rehash --------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua - -%clan --------------------------------------------------------- -/clan [option] --------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - -Commands for clan members: - /clan m[sg] (alias [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. - /clan inv[ite] get - Show clanname which you have been invited - /clan inv[ite] accept - Accept invitation to clan - /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) - Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) - Closes the clan channel such that only members of the clan may enter. - /clan dis[band] - Disband your clan. - -%ping p latency --------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. - -%command_groups cg --------------------------------------------------------- -/command_groups [groups] (alias: /cg) --------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - -%operator --------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. - - Example: /operator +nomad - -%aop --------------------------------------------------------- -/aop - Promotes to channel administrator. - - Example: /aop nomad - -%op --------------------------------------------------------- -/op - Promotes to channel operator. - - Example: /op nomad -%deop --------------------------------------------------------- -/deop - Demotes from channel administrator or operator. - - Example: /deop nomad - -%tmpop --------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. - - Example: /tmpop - -%vop --------------------------------------------------------- -/vop - Adds to the VOP list. - - Example: /vop nomad - -%voice --------------------------------------------------------- -/voice - Temporarily gives voice privileges to . - - Example: /voice nomad - -%devoice --------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. - - Example: /devoice nomad - -%topic --------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Example: /topic Supported is given in this channel...\n(some text on a new line) - -%moderate --------------------------------------------------------- -/moderate - Toggles the current channel's moderated status. - -%clearstats --------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - - Example: /clearstats nomad SEXP - -%find --------------------------------------------------------- -/find - Finds users with in their username. MUST be lowercase! - -%save --------------------------------------------------------- -/save - Forces the server to save account and clan changes to the database. - -%icon --------------------------------------------------------- -/icon [name] - Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. --------------------------------------------------------- -Syntax for operator/admin: - /icon a[dd] - Add icon into user stash - /icon d[el] - Remove icon from user stash - /icon s[et] - Set custom icon to user without adding it in user stash - /icon l[ist] - Display icons in user's stash - /icon l[ist] - Display availaible icons in server stash that can be assigned to users - -%quiz --------------------------------------------------------- -/quiz [option] - Trivia Quiz Game --------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel - /quiz stop - Finish game by force - /quiz stats [username] - Display record statistics for user - /quiz stats - Display Top records diff --git a/conf/i18n/ruRU/common.xml b/conf/i18n/ruRU/common.xml deleted file mode 100644 index 19d5716c7..000000000 --- a/conf/i18n/ruRU/common.xml +++ /dev/null @@ -1,1819 +0,0 @@ - - - - English - - - - - - - by {} - - - - for {} - - - - permanently - - - - with a reason "{}" - - - - No such alias. Use // to show the list. - - - - Alias list: - - - - you are now tempOP for this channel - - - - Account name contains some invalid symbol! - - - - Maximum password length allowed is {} - - - - Trying to add account "{}" with password "{}" - - - - Hash is: {} - - - - Failed to create account! - - - - Account {} created. - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Admin - - - - {} has been promoted to a Server Admin - - - - {} has promoted you to a Server Admin - - - - {} is not a Server Admin. - - - - {} has been demoted from a Server Admin - - - - {} has demoted you from a Server Admin - - - - Currently logged on Administrators: - - - - Your game client doesn't support MessageBox. - - - - \n\n***************************\nBy {} - - - - Information from {} - - - - for {} - - - - Announcement from {}: {} - - - - Could not broadcast message. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Admin - - - - {} has been promoted to a Channel Admin - - - - {} has promoted you to a Channel Admin for channel "{}" - - - - You are now marked as being away. - - - - You are no longer marked as away. - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator to use this command. - - - - That account doesn't currently exist. - - - - You cannot ban administrators. - - - - Audible notification on. - - - - Channel Arranged Teams is a RESTRICTED Channel! - - - - Max channel name length exceeded (max {} symbols) - - - - Command disabled while inside a game. - - - - Currently accessible channels: - - - - All current channels: - - - - Current channels of type {} - - - - -----------name----------- users ----admin/operator---- - - - - Only admins may change passwords for other accounts. - - - - Account does not exist. - - - - Maximum password length allowed is {} - - - - Trying to change password for account "{}" to "{}" - - - - Unable to set password. - - - - Message was sent to all currently available clan members. - - - - All fellow members of your clan are currently offline. - - - - Clan channel is opened up! - - - - Clan channel has already been opened up! - - - - Clan channel is closed! - - - - Clan channel has already been closed! - - - - Clan message of day is updated! - - - - User {} was invited to your clan! - - - - You are invited to {} by {}! - - - - User {} is not online or is already member of clan! - - - - This is one-way action! If you really want - - - - to disband your clan, type /clan disband yes - - - - Your clan was disbanded. - - - - You have been invited to {} - - - - You are now a clan member of {} - - - - Clan {} was be created - - - - You are no longer ivited to {} - - - - You are already in clan "{}" - - - - Clan with your specified &lt;clantag&gt; already exist! - - - - Please choice another one. - - - - Clan {} is created! - - - - Clan {} is pre-created, please invite - - - - at least {} players to your clan by using - - - - /clan invite &lt;username&gt; command. - - - - Invalid user. - - - - Invalid user. - - - - {}'s command group(s): {} - - - - Got bad group: {} - - - - Groups {} has been added to {} - - - - Groups {} has been deleted from {} - - - - Got unknown command: {} - - - - This command is only enabled for admins. - - - - Current connections: - - - - -class -tag -----name------ -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - - - - -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- - - - - Unknown option. - - - - (none) - - - - none - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - You must be at least a Channel Admin to demote another Channel Admin - - - - {} has been demoted from a Channel Admin. - - - - {} has demoted you from a Channel Admin of channel "{}" - - - - {} has been demoted from a Channel Operator - - - - {} has demoted you from a Channel Operator of channel "{}" - - - - {} has been demoted from a tempOP of this channel - - - - {} has demoted you from a tmpOP of channel "{}" - - - - {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. - - - - {} has demoted you from a tempOP of channel "{}" - - - - {} is no tempOP in this channel, so you can't demote him - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} has been removed from VOP list. - - - - {} has removed you from VOP list of channel "{}" - - - - You must be at least Channel Admin to remove {} from the VOP list - - - - Voice has been taken from {} in this channel - - - - {} has taken your Voice in channel "{}" - - - - {} has no Voice in this channel, so it can't be taken away - - - - Do Not Disturb mode engaged. - - - - Not available - - - - Do Not Disturb mode canceled. - - - - -- name -- similar to {} - - - - Invalid user. - - - - Login: {} {} Sex: {} - - - - Created: {} - - - - Clan: {} - - - - Rank: Chieftain - - - - Rank: Shaman - - - - Rank: Grunt - - - - Rank: Peon - - - - Location: {} Age: {} - - - - Client: {} Ver: {} Country: {} - - - - unknown - - - - Last login {} from - - - - On since {} from - - - - Operator: {}, Admin: {}, Locked: {}, Muted: {} - - - - Yes - - - - Email: {} - - - - Last login Owner: {} - - - - Idle {} - - - - Flags set to {}. - - - - That user does not exist. - - - - Server error. - - - - You can't add yourself to your friends list. - - - - You can only have a maximum of {} friends. - - - - {} is already on your friends list! - - - - Added {} to your friends list. - - - - {} added you to his/her friends list. - - - - All of your friends are offline. - - - - {} was not found on your friends list. - - - - Removed {} from your friends list. - - - - Promoted {} in your friends list. - - - - Demoted {} in your friends list. - - - - Your {} - Friends List - - - - Your {} - Online Friends List - - - - , offline - - - - using {} - - - - , in game "{}" - - - - , in game AT Preparation - - - - , in channel "{}", - - - - , is in AT Preparation - - - - , is in a game - - - - , is in a chat channel - - - - End of Friends List - - - - You are not in a game. - - - - That game does not exist. - - - - Name: {} ID: {} ({}) - - - - none - - - - unknown - - - - Owner: {} - - - - Address: {} - - - - Address: {} (trans {}) - - - - Client: {} (version {}, startver {}) - - - - Created: {} - - - - Started: {} - - - - Status: {} - - - - Type: {} - - - - Speed: {} - - - - Difficulty: {} - - - - Option: {} - - - - Map: {} - - - - Map Size: {}x{} - - - - Map Tileset: {} - - - - Map Type: {} - - - - Players: {} current, {} total, {} max - - - - Description: {} - - - - Currently accessible games: - - - - All current games: - - - - Games in lobby: - - - - Current games of type {} - - - - Current games of type {} {} - - - - ------name------ p -status- --------type--------- count - - - - ctag - - - - --------addr-------- - - - - Warning: That user is not online, using last known address. - - - - Sorry, no IP address could be retrieved. - - - - Scanning online users for IP {}... - - - - There are no online users with that IP address - - - - This command can only be used inside a channel. - - - - You have to be at least a Channel Operator or tempOP to use this command. - - - - That user is not logged in. - - - - That user is not in this channel. - - - - That connection doesn't exist. - - - - That user is not logged in? - - - - An admin has closed your connection and banned your IP address. - - - - Connection closed by admin. - - - - Operation successful. - - - - That is not a valid session. - - - - That session does not exist. - - - - Connection closed by admin and banned your IP's. - - - - Connection closed by admin. - - - - Copied current scores to active scores on all ladders. - - - - This game does not support win/loss records. - - - - You must supply a rank and a valid program ID. - - - - Example: /ladderinfo 1 STAR - - - - Invalid user. - - - - Account {} is now locked - - - - Your account has just been locked - - - - This command can only be used inside a channel. - - - - Banned users: - - - - You are not in a channel. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - Unable to change channel flags. - - - - Channel is now unmoderated. - - - - Channel is now moderated. - - - - Unable to open motd. - - - - No motd. - - - - Invalid user. - - - - Account {} is now muted - - - - Your account has just been muted - - - - That user is not logged on. - - - - Address information for other users is only available to admins. - - - - Server TCP: {} (bind {}) - - - - Client TCP: {} - - - - Client UDP: {} - - - - Client UDP: {} (trans {}) - - - - Game UDP: {} - - - - Game UDP: {} (trans {}) - - - - Game UDP: none - - - - Audible notification off. - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tempOP to use this command. - - - - There's no account with username {}. - - - - {} is already a Channel Operator - - - - {} has been promoted to a Channel Operator - - - - {} has promoted you to a Channel Operator in channel "{}" - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to a tempOP - - - - {} has promoted you to a tempOP in this channel - - - - You must supply a username. - - - - There's no account with username {}. - - - - {} is already a Server Operator - - - - {} has been promoted to a Server Operator - - - - {} has promoted you to a Server Operator - - - - {} is no Server Operator, so you can't demote him - - - - {} has been demoted from a Server Operator - - - - {} latency: {} - - - - Your latency {} - - - - {} latency () - - - - Invalid user. - - - - Connection closed. - - - - Your quota allows you to write {} line(s) per {} second(s). - - - - Long lines will be wrapped every {} characters. - - - - You are not allowed to send lines with more than {} characters. - - - - You must join a realm first - - - - Announcement from {}@{}: {} - - - - Invalid mode. - - - - Rehash of "{}" is complete! - - - - You are not in a channel. - - - - No one messaged you, use /m instead - - - - Pending changes has been saved into the database. - - - - That user is not logged on. - - - - Banning {} who is using IP address {} - - - - User's account is also LOCKED! Only an admin can unlock it! - - - - /ipban a {} - - - - You have been banned by Admin: {} - - - - Your account is also LOCKED! Only an admin can UNLOCK it! - - - - Access denied due to security reasons. - - - - Invalid user. - - - - Current value of {} is "{}" - - - - Value currently not set - - - - Unable to set key for - - - - Key set successfully for - - - - Invalid delay. - - - - You've initialized the shutdown sequence. - - - - You've canceled the shutdown sequence. - - - - No such user. - - - - You can't squelch yourself. - - - - Could not squelch user. - - - - {} has been squelched. - - - - Invalid user. - - - - Unable to determine client game. - - - - This game does not support win/loss records. - - - - You must supply a user name and a valid program ID. - - - - Example: /stats joe STAR - - - - {}'s record: - - - - level: {} - - - - class: {} - - - - stats: {} str {} mag {} dex {} vit {} gld - - - - Diablo kills: {} - - - - Normal games: {}-{}-{} - - - - Ladder games: {}-{}-{} (rating {}) - - - - Ladder games: 0-0-0 - - - - IronMan games: {}-{}-{} (rating {}) - - - - IronMan games: 0-0-0 - - - - {}'s Ladder Record's: - - - - Users Solo Level: {}, Experience: {} - - - - SOLO Ladder Record: {}-{}-0 - - - - SOLO Rank: {} - - - - Users Team Level: {}, Experience: {} - - - - TEAM Ladder Record: {}-{}-0 - - - - TEAM Rank: {} - - - - Users FFA Level: {}, Experience: {} - - - - FFA Ladder Record: {}-{}-0 - - - - FFA Rank: {} - - - - Users AT Team No. {} - - - - Users AT TEAM Level: {}, Experience: {} - - - - AT TEAM Ladder Record: {}-{}-0 - - - - AT TEAM Rank: {} - - - - There are currently {} user(s) in {} games of {} - - - - There are currently {} users online, in {} games, and in {} channels. - - - - Client tag set to {}. - - - - Invalid clienttag {} specified - - - - Server Time: {} - - - - Your local time: {} - - - - Invalid duration. - - - - Your timer has expired. - - - - Could not set timer. - - - - Timer set for {} second(s) - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator or tmpOP to use this command. - - - - There's no account with username {}. - - - - {} has already tmpOP in this channel - - - - {} must be on the same channel to tempOP him - - - - {} already is operator or admin, no need to tempOP him - - - - {} has been promoted to tmpOP in this channel - - - - {} has promoted you to a tempOP in this channel - - - - This command can only be used inside a channel. - - - - Max topic length exceeded (max {} symbols) - - - - You must be at least a Channel Operator of {} to set the topic - - - - {} topic: no topic - - - - Unable to send TOS (Terms of Service). - - - - This command can only be used inside a channel. - - - - You are not a channel operator. - - - - That user is not banned. - - - - {} is no longer banned from this channel. - - - - Invalid user. - - - - Your account has just been unlocked by {} - - - - That user's account is now unlocked. - - - - Invalid user. - - - - Your account has just been unmuted by {} - - - - That user's account is now unmuted. - - - - No such user. - - - - User was not being ignored. - - - - No longer ignoring. - - - - That user does not exist. - - - - Removal from watch list failed. - - - - User {} removed from your watch list. - - - - Removal from watch list failed. - - - - All {} users removed from your watch list. - - - - All users removed from your watch list. - - - - Uptime: {} - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Operator to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list, no need to Voice him - - - - {} must be on the same channel to voice him - - - - {} already has Voice in this channel - - - - {} is already an operator or admin. - - - - {} has been granted Voice in this channel - - - - {} has granted you Voice in this channel - - - - This command can only be used inside a channel. - - - - You must be at least a Channel Admin to use this command. - - - - There's no account with username {}. - - - - {} is already on VOP list - - - - {} has been added to the VOP list - - - - {} has added you to the VOP list of channel "{}" - - - - That user does not exist. - - - - Add to watch list failed. - - - - User {} added to your watch list. - - - - Add to watch list failed. - - - - All {} users added to your watch list. - - - - All users added to your watch list. - - - - That channel does not exist. - - - - (If you are trying to search for a user, use the /whois command.) - - - - You are banned from that channel. - - - - Users in channel {}: - - - - Unable to obtain your account name. - - - - (invalid date) - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - Reset {}'s {} stats - - - - You cannot kick administrators. - - - - You cannot kick operators. - - - - {} has been kicked by {} ({}). - - - - {} has been kicked by {}. - - - - You cannot ban operators. - - - - Unable to ban {}. - - - - {} has been banned by {} ({}). - - - - {} has been banned by {}. - - - - Password for account {} updated. - - - - Hash is: {} - - - - Your account has been muted, you can't whisper to other users. - - - - That user is not logged on. - - - - {} is unavailable ({}) - - - - {} is away ({}) - - - - Unknown user. - - - - User was last seen on: {} - - - - User is offline - - - - You - - - - are - - - - is - - - - {} {} using {} and {} currently in {} game "{}". - - - - {} {} using {} and {} currently in channel "{}". - - - - {} {} using {}. - - - - {} {} refusing messages ({}) - - - - {} away ({}) - - - - You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - - - - This command has been deactivated - - - - This command is reserved for admins. - - - - Unknown command. - - - - This account has been locked - - - - This account has been locked - - - - Oops ! There is a problem with the help file. Please contact the administrator of the server. - - - - This command can only be used inside a channel. - - - - This command can only be used from the game. - - - - Bad icon. - - - - {} banned permamently by {}. - - - - {} banned permamently. - - - - {} banned for {} by {}. - - - - {} banned for {}. - - - - Banning only for: {} minutes. - - - - This server has NO mail support. - - - - Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . - - - - Successfully deleted messages. - - - - Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - - - - Succesfully deleted message. - - - - You have no mail. - - - - There was an error completing your request. - - - - Receiver UNKNOWN! - - - - Receiver has reached his mail quota. Your message will NOT be sent. - - - - Your mail has been sent successfully. - - - - There was an error completing your request! - - - - You must be at least a Channel Operator to use this command. - - - - This command can only be used inside a channel. - - - - Quiz has already ran in channel "{}". Use /quiz stop to force finish. - - - - Available Quiz dictionaries: - - - - Quiz is not running. - - - - {}'s Quiz record: - - - - {} has never played Quiz. - - - - Top {} Quiz records: - - - - points - - - - This command is reserved for admins. - - - - User "{}" is offline - - - - \ No newline at end of file diff --git a/conf/i18n/ruRU/newaccount.txt b/conf/i18n/ruRU/newaccount.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/ruRU/newaccount.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/ruRU/termsofservice.txt b/conf/i18n/ruRU/termsofservice.txt deleted file mode 100644 index d457818ca..000000000 --- a/conf/i18n/ruRU/termsofservice.txt +++ /dev/null @@ -1,21 +0,0 @@ -You are currently connected to a PvPGN Server (Player -vs- Player Gaming Network) - -PvPGN TERMS OF USE: - -PvPGN is a Battle.net(R) emulation server and in no way affiliated with bnetd, warforge, or Blizzard Entertainment(R). -PvPGN is provided "as is" without warrenties of any kind. -We do not support the idea of Pirated software and urge you to purchase a legit copy of any games that you play on our servers. - -1. Information found on PvPGN. -PvPGN does not endorse or stand behind the accuracy, truthfulness or reliability of any information (including statements of opinion or advice) provided on or by means of PvPGN. Any and all statements made in forums, chat or during game play reflect only the views of their author. - -2. Disclaimer of Warrenty. -PvPGN is provided to you "as is" without warrenty of any kind. PvPGN does not warrent that their programm will be uninterrupted or error free. - -3. Limitations of Liability -PvPGN is in no way liable for loss or damage of any kind resulting from the use of PvPGN, including but not limited to, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses, commercial or otherwise. - -Battle.net(R) and Blizzard Entertainment(R) are trademarks or registered trademarks of Blizzard Entertainment in the U.S. and/or other countries. - -Besides all this... Happy gaming.. -PvPGN Project Page: http://pvpgn.berlios.de/ diff --git a/conf/i18n/ruRU/w3motd.txt b/conf/i18n/ruRU/w3motd.txt deleted file mode 100644 index 8bc4a5911..000000000 --- a/conf/i18n/ruRU/w3motd.txt +++ /dev/null @@ -1,11 +0,0 @@ -|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF - -There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. - - - - - - - -This text invisible, because of limitation of 11 lines \ No newline at end of file diff --git a/src/bnetd/i18n.cpp b/src/bnetd/i18n.cpp index 4df7981ec..4e5bc42f6 100644 --- a/src/bnetd/i18n.cpp +++ b/src/bnetd/i18n.cpp @@ -141,12 +141,6 @@ namespace pvpgn { "LIE", "deDE" }, { "LUX", "deDE" }, - /* German */ - { "DEU", "deDE" }, - { "AUT", "deDE" }, - { "LIE", "deDE" }, - { "LUX", "deDE" }, - /* Russian */ { "RUS", "ruRU" }, { "UZB", "ruRU" }, From fc152f8c169f913debb95c3b2858d1a034847936 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 14:21:20 -0700 Subject: [PATCH 114/144] Create bnhelp.conf --- conf/i18n/esES/bnhelp.conf | 615 +++++++++++++++++++++++++++++++++++++ 1 file changed, 615 insertions(+) create mode 100644 conf/i18n/esES/bnhelp.conf diff --git a/conf/i18n/esES/bnhelp.conf b/conf/i18n/esES/bnhelp.conf new file mode 100644 index 000000000..c8e119ad9 --- /dev/null +++ b/conf/i18n/esES/bnhelp.conf @@ -0,0 +1,615 @@ +############################################################################## +# bnhelp - This Help File is used for describing the commands to the user # +#----------------------------------------------------------------------------# +# Entries are separated by a percent sign (%) at the beginning of the line. # +# The commands that correspond with the entry should follow the % on the # +# same line. # +# # +# You can enter comments by starting a line with #. Comments extend to the # +# end of the line. # +# Tabs replaces with 3 spaces. # +# Empty lines are ignored. # +# # +############################################################################## + +%whois whereis where +-------------------------------------------------------- +/whois (aliases: /where /whereis) + Displays where a is on the server. + + Example: /whois nomad + +%msg whisper m w +-------------------------------------------------------- +/whisper (aliases: /w /m /msg) + Sends a private to + + Example: /whisper nomad How are you doing? + +%ignore squelch +-------------------------------------------------------- +/squelch (alias: ignore, see also: /unsquelch) + Blocks future messages sent from . + + Example: /squelch nomad + +%unignore unsquelch +-------------------------------------------------------- +/unsquelch (alias: /unignore) + Allows a previously squelched to talk to you normally. + + Example: /unsquelch nomad + +%away +-------------------------------------------------------- +/away [message] + Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. + + Example: /away Eating dinner + +%dnd +-------------------------------------------------------- +/dnd [message] + Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. + + Example: /dnd I'm playing a game and don't want to hear whispers. + +%who +-------------------------------------------------------- +/who + Displays a list of users in + + Example: /who Moderated Support + +%stats astat +-------------------------------------------------------- +/stats [player] [client] (alias: /astat) + Displays a [player]'s Win/Loss record. + + Example: /stats nomad + +%status users +-------------------------------------------------------- +/users [gametag] (alias: /status) + Displays the current number of users connected to the server. + Example: /users W3XP + +%time +-------------------------------------------------------- +/time + Displays the current server and your local time. + +%channel join j +-------------------------------------------------------- +/channel (alias: /join /j) + Moves you to + + Example: /channel Moderated Support + +%rejoin +-------------------------------------------------------- +/rejoin (alias: /resign) + Removes your status as the channel Operator. + +%me emote +-------------------------------------------------------- +/me (alias: /emote) + Displays your name and in a different color. + + Example: /emote wants to play a game. + +%kick +-------------------------------------------------------- +/kick + Kicks from the channel. + + Example: /kick nomad + +%ban +-------------------------------------------------------- +/ban (see also: /unban) + Bans from the channel, and prevents him from returning. + + Example: /ban nomad + +%unban +-------------------------------------------------------- +/unban + Allows a banned to return to the channel. + + Example: /unban nomad + +%serverban +-------------------------------------------------------- +/serverban (see also: /unban) + Bans by IP and lock his account + + Example: /serverban nomad + +%ipscan +-------------------------------------------------------- +/ipscan + Finds all currently logged in users with the given or . + + Example: /ipscan 127.0.0.1 + Example: /ipscan nomad + +%whoami +-------------------------------------------------------- +/whoami + Displays where you are on the server. + +%uptime +-------------------------------------------------------- +/uptime + Displays how long the server has been running. + +%version +-------------------------------------------------------- +/version + Displays the version of the server + +%lusers +-------------------------------------------------------- +/lusers + Displays a list of players who have been banned from the channel + +%games +-------------------------------------------------------- +/games [gametag] [difficulty] + Displays a list of online games. + Set [difficulty] for Diablo games only (norm|night|hell) +-------------------------------------------------------- + /games all + Displays a list of all games. + /games l[obby] + Displays a list of games in lobby. + +%channels chs +-------------------------------------------------------- +/channels [gametag] (alias: /chs) + Displays a list of channels. +-------------------------------------------------------- + /channels all + Displays a list of all channels. + +%connections con +-------------------------------------------------------- +/connections (alis: /con) + Displays a list of connections. + +%finger +-------------------------------------------------------- +/finger + Displays detailed information about + + Example: /finger nomad + +%admins +-------------------------------------------------------- +/admins + Displays a list of all currently logged in administrators. + +%reply r +-------------------------------------------------------- +/reply (alias: /r) + Replies to the last player who whispered you with . + + Example: /r Hi, mate! + +%announce ann +-------------------------------------------------------- +/announce (alias: /ann) + Announces to everyone. + + Example: /ann Hello everyone! + +%realmann +-------------------------------------------------------- +/realmann + Announces to everyone in the current Diablo 2 realm. + + Example: /realmann Hello everyone! + +%alert +-------------------------------------------------------- +/alert + Show MessageBox with to everyone. Use \n as a new line symbol. + + Example: /alert Hello\neveryone! + +%news +-------------------------------------------------------- +/news + Displays the news. + +%logout quit exit +-------------------------------------------------------- +/logout (alias: /quit /exit) + Disconnects you from the server. + +%kill +-------------------------------------------------------- +/kill {|#} [min] + Disconnects from the server and bans the player's IP address for [min] minutes. + + Example: /kill nomad 5 + +%killsession +-------------------------------------------------------- +/killsession [min] + Disconnects the session from the server and bans the session's IP address for [min] minutes. + + Example: /killsession 1 5 + +%watch +-------------------------------------------------------- +/watch + Enables notifications for . + + Example: /watch nomad + +%unwatch +-------------------------------------------------------- +/unwatch + Disables notifications for . + + Example: /unwatch nomad + +%watchall +-------------------------------------------------------- +/watchall [gametag] + Enables notifications for everyone. + + Example: /watchall SEXP + +%unwatchall +-------------------------------------------------------- +/unwatchall [gametag] + Disables notifications for everyone. + + Example: /unwatchall SEXP + +%gameinfo +-------------------------------------------------------- +/gameinfo + Displays information about . + + Example: /gameinfo FS 1v1!!! + +%ladderactivate +-------------------------------------------------------- +/ladderactivate + Copies current ladder statistics to active ladder statistics. + +%ladderinfo +-------------------------------------------------------- +/ladderinfo [gametag] + Displays ladder information for of [gametag] + + Example: /ladderinfo 1000 SEXP + +%timer +-------------------------------------------------------- +/timer [message] + Displays [message] after seconds. + + Example: /timer 60 one minute has passed + +%netinfo +-------------------------------------------------------- +/netinfo [player] + Displays [player]'s network information. + + Example: /netinfo nomad + +%addacct +-------------------------------------------------------- +/addacct + Creates a new account named with password . + + Example: /addacct nomad password + +%chpass +-------------------------------------------------------- +/chpass [] - change a player's password + Changes []'s password to . + If [] is empty then change password for your account. + + Example: /chpass nomad password + +%quota +-------------------------------------------------------- +/quota + Displays your message quota. + +%shutdown +-------------------------------------------------------- +/shutdown [duration] + Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. + + Example: /shutdown 300 + +%lock lockacct +-------------------------------------------------------- +/lock [hours] [reason] (alias: /lockacct) + Locks 's account to prevent him/her from logging in with it. + Set [hours] = 0 to ban permanently. + + Example: /lock nomad 0 bye noob! + +%unlock unlockacct +-------------------------------------------------------- +/unlock (alias: /unlockacct) + Unlocks 's account to allow him/her to log in with it. + + Example: /unlock nomad + +%mute muteacct +-------------------------------------------------------- +/mute [hours] [reason] (alias: /muteacct) + Mutes 's account to prevent him/her from talking on channels. + Set [hours] = 0 to mute permanently. + + Example: /mute nomad 6 stop spam! + +%unmute unmuteacct +-------------------------------------------------------- +/unmute (alias: /unmuteacct) + Unmutes 's account to allow him/her to talk on channels. + + Example: /unmute nomad + +%friends f +-------------------------------------------------------- +/friends [options] (alias: /f) +-------------------------------------------------------- + /friends add + Adds to your friends list. + /friends del + Removes from your friends list. + /friends promote + Promotes one line up your friends list. + /friends demote + Demotes one line down your friends list + /friends list + Displays your friends list. + /friends online + Displays your online friends list. + /friends msg + Whisper to all of your online friends. + +%mail +-------------------------------------------------------- +/mail [options] +-------------------------------------------------------- + /mail s[end] + Sends mail to with . + /mail r[ead] [index] + Reads mail [index] + /mail del[ete] {all|} + Deletes mail or [all] mail. + +%flag +-------------------------------------------------------- +/flag + A debug tool for icon flags. + +%tag +-------------------------------------------------------- +/tag + A debug tool for client tags. + +%help +-------------------------------------------------------- +/help [command] + Displays help about [command] + + Example: /help whisper + +%ipban +-------------------------------------------------------- +/ipban [option] [time] +-------------------------------------------------------- + /ipban l[ist] + Displays a list of banned IP addresses + /ipban c[heck] + Checks if IP address is banned or not. + /ipban d[el] + Deletes IP address or + /ipban a[dd] [time] + Bans IP address for [time] minutes. [time] = 0 - permanent ban + +%set +-------------------------------------------------------- +/set [value] + Sets or returns the value of for account . + Set [value] = null to erase value. + + Example: /set nomad BNET\auth\botlogin true + Example: /set nomad Record\SEXP\0_wins 999 + +%motd +-------------------------------------------------------- +/motd + Displays the MOTD. + +%tos +-------------------------------------------------------- +/tos /warranty /license + Displays the Terms of Service. + +%admin +-------------------------------------------------------- +/admin [+|-] + Promotes/demotes to/from server administrator. + + Example: /admin +nomad + +%rehash +-------------------------------------------------------- +/rehash + Forces the server to reload specified config. Set "all" to reload all configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua + +%clan +-------------------------------------------------------- +/clan [option] +-------------------------------------------------------- + /clan create + Create a new clan (max length = 4; spaces are allowed in ) + +Commands for clan members: + /clan m[sg] (alias [w]hisper) + Whispers a message to all your fellow clan members + /clan inv[ite] + Invite to your clan. + /clan inv[ite] get + Show clanname which you have been invited + /clan inv[ite] accept + Accept invitation to clan + /clan inv[ite] decline + Decline invitation to clan + +Commands for clan chieftain: + /clan motd + Update the clan's Message of the Day to . + /clan pub[lic] (alias: pub) + Opens the clan channel up to the public so that anyone may enter. + /clan priv[ate] (alias: priv) + Closes the clan channel such that only members of the clan may enter. + /clan dis[band] + Disband your clan. + +%ping p latency +-------------------------------------------------------- +/ping (alias: /p /latency) + Displays your ping to the server. + +%command_groups cg +-------------------------------------------------------- +/command_groups [groups] (alias: /cg) +-------------------------------------------------------- + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + +%operator +-------------------------------------------------------- +/operator [+|-] (alias: /op) + Promotes/demotes to/from server operator. + + Example: /operator +nomad + +%aop +-------------------------------------------------------- +/aop + Promotes to channel administrator. + + Example: /aop nomad + +%op +-------------------------------------------------------- +/op + Promotes to channel operator. + + Example: /op nomad +%deop +-------------------------------------------------------- +/deop + Demotes from channel administrator or operator. + + Example: /deop nomad + +%tmpop +-------------------------------------------------------- +/tmpop + Promotes to temporary channel operator. + + Example: /tmpop + +%vop +-------------------------------------------------------- +/vop + Adds to the VOP list. + + Example: /vop nomad + +%voice +-------------------------------------------------------- +/voice + Temporarily gives voice privileges to . + + Example: /voice nomad + +%devoice +-------------------------------------------------------- +/devoice + Removes from the VOP list and removes temporary voice privileges. + + Example: /devoice nomad + +%topic +-------------------------------------------------------- +/topic [message] + Sets or displays current channel's topic. + + Example: /topic Supported is given in this channel...\n(some text on a new line) + +%moderate +-------------------------------------------------------- +/moderate + Toggles the current channel's moderated status. + +%clearstats +-------------------------------------------------------- +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients + Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + + Example: /clearstats nomad SEXP + +%find +-------------------------------------------------------- +/find + Finds users with in their username. MUST be lowercase! + +%save +-------------------------------------------------------- +/save + Forces the server to save account and clan changes to the database. + +%icon +-------------------------------------------------------- +/icon [name] + Set custom icon for normal user. + Use /icon without [name] to display list of available icons in your stash. +-------------------------------------------------------- +Syntax for operator/admin: + /icon a[dd] + Add icon into user stash + /icon d[el] + Remove icon from user stash + /icon s[et] + Set custom icon to user without adding it in user stash + /icon l[ist] + Display icons in user's stash + /icon l[ist] + Display availaible icons in server stash that can be assigned to users + +%quiz +-------------------------------------------------------- +/quiz [option] + Trivia Quiz Game +-------------------------------------------------------- + /quiz start + Start game with given dictionary name in current channel + /quiz stop + Finish game by force + /quiz stats [username] + Display record statistics for user + /quiz stats + Display Top records From 9006328883008501674ffb2f88e8a76d840416d1 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 14:22:45 -0700 Subject: [PATCH 115/144] Create chathelp-war3.txt --- conf/i18n/esES/chathelp-war3.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 conf/i18n/esES/chathelp-war3.txt diff --git a/conf/i18n/esES/chathelp-war3.txt b/conf/i18n/esES/chathelp-war3.txt new file mode 100644 index 000000000..36d631512 --- /dev/null +++ b/conf/i18n/esES/chathelp-war3.txt @@ -0,0 +1,15 @@ +Comandos de Ayuda para el Chat de la Emulación de Bnet PvPGN + +Nuevos Comandos: + +usar /f help para ayuda sobre la lista de amigos +usar /users para ver usuarios online +usar /w o /msg para sususrrar a gente +usar /join para unirse a un canal + +Para Operadores de Canal: + +usar /ban prohibe permanentenmente al usuario usar el canal +usar /kick expulsa al usuario del canal + +Para una ayuda más detallada escribir: /help From 79922328e603540ac92678b80ebe9f94031a8baa Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 14:23:24 -0700 Subject: [PATCH 116/144] Create newaccount.txt --- conf/i18n/esES/newaccount.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 conf/i18n/esES/newaccount.txt diff --git a/conf/i18n/esES/newaccount.txt b/conf/i18n/esES/newaccount.txt new file mode 100644 index 000000000..0cbb3d934 --- /dev/null +++ b/conf/i18n/esES/newaccount.txt @@ -0,0 +1,21 @@ +Actualmente está conectado al Servidor PvPGN ( Player -vs- Player Gaming Network) + +TÉRMINOS DE USO del PvPGN: + +PVPGN es una emulación del servidor de Battle.net(r) y de ninguna manera afiliado con bnetd, warforge o Blizzard Entertainment (R). +PVPGN está disponible al público "tal y como es" sin ningún tipo de garantias. +No apoyamos la idea de software Pirata y incitamos a todos a obtener una copia legal de cualquiera de los juegos disponibles en nuestros servidores. + +1. Información sobre PvPGN. +PvPGN no aprueba ni se apela a la precisión, veracidad o fiabilidad de cualquier información ( incluídas declaraciones sobre opinión o consejos) dada en o por cualquier medio de PvPGN. Cualquiera y todas las declaraciones hechas en foros, chat o durante juegos reflejan solamente el parecer de su autor. + +2. Exclusión de Garantía. +PvPGN está disponible al público "tal y como es" sin ningún tipo de garantias. PvPGN no garantiza que su programa sea ininterrumpido o libre de errores. + +3. Limitaciones de Responsabilidad. +PvPGN es de ninguna manera responsable por pérdidas o daños de cualquier tipo al usar PvPGN, incluyendo pero no limitándose a, pérdida de libre voluntad, paro laboral, fallos o defectos en los ordenadores, o cualquier y todos otros tipos de daños o perdidas, comerciales o de cualquier otro tipo. + +Battle.net(R) y Blizzard Entertainment(R) son marcas registrada de Blizzard Entertainment en los E.U. y/o otros países. + +Aparte de todo esto... Disfrutar jugando.. +PvPGN Project Page: http://pvpgn.berlios.de/ From 83d7011eb37e292f1cb299f842c4811b888f38cf Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 14:23:54 -0700 Subject: [PATCH 117/144] Create termsofservice.txt --- conf/i18n/esES/termsofservice.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 conf/i18n/esES/termsofservice.txt diff --git a/conf/i18n/esES/termsofservice.txt b/conf/i18n/esES/termsofservice.txt new file mode 100644 index 000000000..0cbb3d934 --- /dev/null +++ b/conf/i18n/esES/termsofservice.txt @@ -0,0 +1,21 @@ +Actualmente está conectado al Servidor PvPGN ( Player -vs- Player Gaming Network) + +TÉRMINOS DE USO del PvPGN: + +PVPGN es una emulación del servidor de Battle.net(r) y de ninguna manera afiliado con bnetd, warforge o Blizzard Entertainment (R). +PVPGN está disponible al público "tal y como es" sin ningún tipo de garantias. +No apoyamos la idea de software Pirata y incitamos a todos a obtener una copia legal de cualquiera de los juegos disponibles en nuestros servidores. + +1. Información sobre PvPGN. +PvPGN no aprueba ni se apela a la precisión, veracidad o fiabilidad de cualquier información ( incluídas declaraciones sobre opinión o consejos) dada en o por cualquier medio de PvPGN. Cualquiera y todas las declaraciones hechas en foros, chat o durante juegos reflejan solamente el parecer de su autor. + +2. Exclusión de Garantía. +PvPGN está disponible al público "tal y como es" sin ningún tipo de garantias. PvPGN no garantiza que su programa sea ininterrumpido o libre de errores. + +3. Limitaciones de Responsabilidad. +PvPGN es de ninguna manera responsable por pérdidas o daños de cualquier tipo al usar PvPGN, incluyendo pero no limitándose a, pérdida de libre voluntad, paro laboral, fallos o defectos en los ordenadores, o cualquier y todos otros tipos de daños o perdidas, comerciales o de cualquier otro tipo. + +Battle.net(R) y Blizzard Entertainment(R) son marcas registrada de Blizzard Entertainment en los E.U. y/o otros países. + +Aparte de todo esto... Disfrutar jugando.. +PvPGN Project Page: http://pvpgn.berlios.de/ From 0f19a2d8f094f54b3739677e477865cc5f18e77b Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 14:24:44 -0700 Subject: [PATCH 118/144] Create w3motd.txt --- conf/i18n/esES/w3motd.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 conf/i18n/esES/w3motd.txt diff --git a/conf/i18n/esES/w3motd.txt b/conf/i18n/esES/w3motd.txt new file mode 100644 index 000000000..a618452bf --- /dev/null +++ b/conf/i18n/esES/w3motd.txt @@ -0,0 +1,11 @@ +|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF + +There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. + + + + + + + +This text invisible, because of limitation of 11 lines From 08eb67c7b5abbd4f1a0da2e62007f745eba7e2e3 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 14:26:44 -0700 Subject: [PATCH 119/144] Create common.xml --- conf/i18n/esES/common.xml | 1819 +++++++++++++++++++++++++++++++++++++ 1 file changed, 1819 insertions(+) create mode 100644 conf/i18n/esES/common.xml diff --git a/conf/i18n/esES/common.xml b/conf/i18n/esES/common.xml new file mode 100644 index 000000000..106897edf --- /dev/null +++ b/conf/i18n/esES/common.xml @@ -0,0 +1,1819 @@ + + + + Spanish + + + + + + + by {} + por {} + + + for {} + para {} + + + permanently + permanentemente + + + with a reason "{}" + con una razón "{}" + + + No such alias. Use // to show the list. + No existe tal alias. Usar // para mostrar la lista. + + + Alias list: + Lista de alias: + + + you are now tempOP for this channel + ahora eres OPtempo para este canal + + + Account name contains some invalid symbol! + ¡El nombre de cuenta contiene algun carácter invalido! + + + Maximum password length allowed is {} + La longitud máxima permitida para la contraseña es de {} + + + Trying to add account "{}" with password "{}" + Intentando añadir cuenta "{}" con contraseña "{}" + + + Hash is: {} + La etiqueta hash es: {} + + + Failed to create account! + ¡No ha sido posible crear la cuenta! + + + Account {} created. + Cuenta {} creada. + + + You must supply a username. + Se debe proporcionar una nombre de usuario. + + + There's no account with username {}. + No existe ninguna cuenta con el nombre de usuario {}. + + + {} is already a Server Admin + {} ya es Admin del Servidor + + + {} has been promoted to a Server Admin + {} ha sido ascendido a Admin del Servidor + + + {} has promoted you to a Server Admin + {} le ha ascendido a Admin del Servidor + + + {} is not a Server Admin. + {} no es un Admin del Servidor + + + {} has been demoted from a Server Admin + {} ha sido degradado a no ser Admin del Servidor + + + {} has demoted you from a Server Admin + {} le ha degradado a no ser Admin del Servidor + + + Currently logged on Administrators: + Actualmente conectado en Administradores: + + + Your game client doesn't support MessageBox. + El cliente no es compatible con MessageBox. + + + \n\n***************************\nBy {} + + + + Information from {} + Información de {} + + + for {} + + + + Announcement from {}: {} + Notificación de {}: {} + + + Could not broadcast message. + No se ha podido transmitir el mensaje. + + + This command can only be used inside a channel. + Este comando solamente se puede usar dentro de un canal. + + + You must be at least a Channel Admin to use this command. + Se debe ser como mínimo Admin del Canal para poder usar este comando. + + + There's no account with username {}. + + + + {} is already a Channel Admin + {} ya es Administrador del Canal + + + {} has been promoted to a Channel Admin + {} ha sido ascendido a Administrador del Canal + + + {} has promoted you to a Channel Admin for channel "{}" + {} le ha ascendido a Administrador del Canal "{}" + + + You are now marked as being away. + Su estado ha sido marcado como ausente. + + + You are no longer marked as away. + Su estado ya no es ausente. + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator to use this command. + Se debe ser como mínimo Operador de Canal para poder usar este comando. + + + That account doesn't currently exist. + Esta cuenta no existe actualmente. + + + You cannot ban administrators. + No se puede banear a los administradores. + + + Audible notification on. + Notificacíon acústica activada. + + + Channel Arranged Teams is a RESTRICTED Channel! + ¡El Canal Arranged Teams es un Canal RESTRINGIDO! + + + Max channel name length exceeded (max {} symbols) + Longitud máxima para el nombre del canal sobrepasada (máximo de {} carácteres) + + + Command disabled while inside a game. + Comando desactivado durante partidas. + + + Currently accessible channels: + Canales actualmente accesibles: + + + All current channels: + Todos los canales actuales: + + + Current channels of type {} + Canales de tipo {} actuales + + + -----------name----------- users ----admin/operator---- + -----------nombre----------- usuarios ----admin/operador---- + + + Only admins may change passwords for other accounts. + Solo los administradores pueden cambiar la contraseña para otras cuentas. + + + Account does not exist. + La cuenta no existe. + + + Maximum password length allowed is {} + + + + Trying to change password for account "{}" to "{}" + Intentando cambiar contraseña para la cuenta "{}" por "{}" + + + Unable to set password. + Incapaz de establecer contraseña. + + + Message was sent to all currently available clan members. + El mensaje ha sido enviado a todos los miembros del clan actualmente disponibles. + + + All fellow members of your clan are currently offline. + Todos los miembros del clan se encuentran actualmente offline. + + + Clan channel is opened up! + ¡El canal del clan acaba de abrirse! + + + Clan channel has already been opened up! + ¡El canal del clan ya está abierto! + + + Clan channel is closed! + ¡El canal del clan se ha cerrado! + + + Clan channel has already been closed! + El canal del clan ya está cerrado! + + + Clan message of day is updated! + ¡Los mensajes del dia del clan han sido actualizados! + + + User {} was invited to your clan! + El usuario {} ha sido invitado al clan! + + + You are invited to {} by {}! + ¡Ha sido invitado a {} por {}! + + + User {} is not online or is already member of clan! + ¡El usuario {} no está online o ya es un miembro del clan! + + + This is one-way action! If you really want + ¡Esta acción no tiene marcha atrás! Si de verdad se desea + + + to disband your clan, type /clan disband yes + disolver el clan, escribir /clan disband yes + + + Your clan was disbanded. + El clan ha sido disuelto. + + + You have been invited to {} + Has sido invitado a {} + + + You are now a clan member of {} + Ahora eres un miembro del clan {} + + + Clan {} was be created + El clan {} ha sido creado + + + You are no longer ivited to {} + La invitación a {} ha expirado + + + You are already in clan "{}" + Ya se es miembro del clan "{}" + + + Clan with your specified &lt;clantag&gt; already exist! + ¡El clan con el &lt;clantag&gt; especificado ya existe! + + + Please choice another one. + Por favor, escoger otro distinto. + + + Clan {} is created! + El clan {} ha sido creado! + + + Clan {} is pre-created, please invite + El clan {} está pre-creado, por favor invitar + + + at least {} players to your clan by using + como mínimo {} jugadores a su clan usando + + + /clan invite &lt;username&gt; command. + el comando /clan invite &lt;username&gt; + + + Invalid user. + + + + Invalid user. + + + + {}'s command group(s): {} + Comando de grupo(s) de {} + + + Got bad group: {} + Grupo erróneo: {} + + + Groups {} has been added to {} + Se ha añadio los grupos {} a {} + + + Groups {} has been deleted from {} + Se han eliminado los grupos {} de {} + + + Got unknown command: {} + Comando introducido desconocido: {} + + + This command is only enabled for admins. + Este comando está solo activo para admins. + + + Current connections: + Conexiones actuales: + + + -class -tag -----name------ -lat(ms)- ----channel---- --game-- + -clase -etiqueta -----nombre------ -lat(ms)- ----canal---- --juego-- + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- + -#- -clase ----estado--- -etiqueta-----nombre------ -sesión-- -condición- -lat(ms)- ----canal---- --juego-- + + + -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- + -#- -clase ----estado--- -etiqueta-----nombre------ -sesión-- -condición- -lat(ms)- ----canal---- --juego-- ---------dirección-------- + + + Unknown option. + Opción desconocida. + + + (none) + (Ninguno/a) + + + none + ninguno/a + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + + + + There's no account with username {}. + + + + You must be at least a Channel Admin to demote another Channel Admin + Se debe ser Administrador del Canal como mínimo para degradar a otro Administrador del Canal + + + {} has been demoted from a Channel Admin. + {} ha sido degrado a no ser Administrador del Canal + + + {} has demoted you from a Channel Admin of channel "{}" + {} le ha degradado a no ser Administrador del Canal "{}" + + + {} has been demoted from a Channel Operator + [] ha sido degrado a no ser Operador del Canal + + + {} has demoted you from a Channel Operator of channel "{}" + {} le ha degradado a no ser Operador del Canal "{}" + + + {} has been demoted from a tempOP of this channel + {} ha sido degradado a no ser tempOP de este canal + + + {} has demoted you from a tmpOP of channel "{}" + {} le ha degradado a no ser tempOP del canal "{}" + + + {} is no Channel Admin or Channel Operator or tempOP, so you can't demote him. + {} no es ni Administrador ni Operador del Canala ni tempOP, así que no se le puede degradar. + + + {} has demoted you from a tempOP of channel "{}" + + + + {} is no tempOP in this channel, so you can't demote him + {} no es OPtemp en este canal, así que no se le puede degradar + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + There's no account with username {}. + + + + {} has been removed from VOP list. + {} ha sido eliminado de la lista VOP. + + + {} has removed you from VOP list of channel "{}" + [] le ha eliminado de la lista VOP del canal "{}" + + + You must be at least Channel Admin to remove {} from the VOP list + Se debe ser como mínimo Administrador del canal para eliminar {} de la lista VOP + + + Voice has been taken from {} in this channel + La voz de {} ha sido denegada en este canal + + + {} has taken your Voice in channel "{}" + {} le ha denegado la voz en el canal "{}" + + + {} has no Voice in this channel, so it can't be taken away + {} tiene la Voz denegada en este canal, por lo tanto ya no se le puede denegar + + + Do Not Disturb mode engaged. + Modo No Molestar encendido. + + + Not available + No disponible + + + Do Not Disturb mode canceled. + Modo No Molestar cancleado. + + + -- name -- similar to {} + -- nombre -- similar a {} + + + Invalid user. + + + + Login: {} {} Sex: {} + Conexión: {} {} Sexo: {} + + + Created: {} + Creado: {} + + + Clan: {} + Clan: {} + + + Rank: Chieftain + Rango: Caudillo + + + Rank: Shaman + Rango: Chamán + + + Rank: Grunt + Rango: Bruto + + + Rank: Peon + Rango: Peón + + + Location: {} Age: {} + Localidad: {} Edad: {} + + + Client: {} Ver: {} Country: {} + Cliente: {} Ver: {} País: {} + + + unknown + desconocido/a + + + Last login {} from + Última conexion {} de + + + On since {} from + El dia desde {} de + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + Operador: {}, Admin: {}, Bloqueado: {}, Silenciado: {} + + + Yes + Si + + + Email: {} + Email: {} + + + Last login Owner: {} + Última conexión del Dueño: {} + + + Idle {} + Parado {} + + + Flags set to {}. + Condiciones establecidas como {} + + + That user does not exist. + Este usuario no existe. + + + Server error. + Error del servidor. + + + You can't add yourself to your friends list. + No se puede añadir uno mismo a la lista de amgios. + + + You can only have a maximum of {} friends. + Solamente se pueden tener {} amigos como máximo. + + + {} is already on your friends list! + ¡{} ya está en tu lista de amigos! + + + Added {} to your friends list. + {} ha sido añadido a la lista de amigos. + + + {} added you to his/her friends list. + {} le ha añadido en su lista de amigos. + + + All of your friends are offline. + Todos tus amigos están offline. + + + {} was not found on your friends list. + No se ha encontrado a {} en la lista de amigos. + + + Removed {} from your friends list. + Eliminado {} de la lista de amigos. + + + Promoted {} in your friends list. + Ascendido {} en la lista de amigos. + + + Demoted {} in your friends list. + Descendido {} en la lista de amigos. + + + Your {} - Friends List + Su {} - Lista de Amigos + + + Your {} - Online Friends List + Su {} - Lista de Amigos Conectados + + + , offline + , desconectado/a + + + using {} + está usando {} + + + , in game "{}" + , dentro del juego "{}" + + + , in game AT Preparation + , dentro del juego en + + + , in channel "{}", + , en el canal "{}" + + + , is in AT Preparation + , está en la Antesala AT + + + , is in a game + , está en una partida + + + , is in a chat channel + , está en un canal de chat + + + End of Friends List + Final de la Lista de Amigos + + + You are not in a game. + No se está en una partida. + + + That game does not exist. + Ese juego no existe. + + + Name: {} ID: {} ({}) + Nombre: {} ID: {} ({}) + + + none + + + + unknown + + + + Owner: {} + Propietario: {} + + + Address: {} + Dirección {} + + + Address: {} (trans {}) + Dirección: {} (trans {}) + + + Client: {} (version {}, startver {}) + Cliente: {} (versión {}, startver {}) + + + Created: {} + + + + Started: {} + Iniciado: {} + + + Status: {} + Estado: {} + + + Type: {} + Tipo: {} + + + Speed: {} + Velocidad: {} + + + Difficulty: {} + Dificultad: {} + + + Option: {} + Opciones: {} + + + Map: {} + Mapa: {} + + + Map Size: {}x{} + Tamaño del MApa {}x{} + + + Map Tileset: {} + Ambientación del Mapa:{} + + + Map Type: {} + Tipo de Mapa: {} + + + Players: {} current, {} total, {} max + Jugadores: {} actuales, {} total, {} max + + + Description: {} + Descripción: {} + + + Currently accessible games: + Juegos actualmente accesibles: + + + All current games: + Todos los juegos actuales: + + + Games in lobby: + Juegos en lobby: + + + Current games of type {} + Juegos actuales de tipo {} + + + Current games of type {} {} + Juegos actuales de tipo {} {} + + + ------name------ p -status- --------type--------- count + ------nombre------ p -estado- --------tipo--------- cuenta + + + ctag + ctag + + + --------addr-------- + --------direc-------- + + + Warning: That user is not online, using last known address. + Atención: El usuario no está online, usando la última dirección conocida. + + + Sorry, no IP address could be retrieved. + Lo siento, pero no se ha podido recuperar ninguna dirección IP. + + + Scanning online users for IP {}... + Escaneando usuarios online para IP {}... + + + There are no online users with that IP address + No hay usuarios conectados con esa dirección IP + + + This command can only be used inside a channel. + + + + You have to be at least a Channel Operator or tempOP to use this command. + Se debe ser como mínimo Operador del Canal o OPtemp para usar este comando. + + + That user is not logged in. + Ese usuario no está conectado. + + + That user is not in this channel. + Ese usuario no esta en este canal. + + + That connection doesn't exist. + Esa conexión no existe. + + + That user is not logged in? + Ese usuario no esta conectado. + + + An admin has closed your connection and banned your IP address. + Un Admmin ha cerrado su conexión y baneado su dirección IP. + + + Connection closed by admin. + Conexión cerrada por admin. + + + Operation successful. + Operación con éxito. + + + That is not a valid session. + Esa no es una sesión válida. + + + That session does not exist. + Esa sesión no existe. + + + Connection closed by admin and banned your IP's. + Conexión cerrada por admin, su dirección IP ha sido baneada. + + + Connection closed by admin. + + + + Copied current scores to active scores on all ladders. + Se han copiado las puntuaciones actuales a las puntuaciones activas en todas las clasificaciones. + + + This game does not support win/loss records. + + + + You must supply a rank and a valid program ID. + Se debe proporcionar un rango y una ID de programa válidos. + + + Example: /ladderinfo 1 STAR + Ejemplo: /ladderinfo 1 STAR + + + Invalid user. + + + + Account {} is now locked + La cuenta {} ha sido bloqueada + + + Your account has just been locked + Su cuenta acaba de ser bloqueada + + + This command can only be used inside a channel. + + + + Banned users: + Usuarios baneados: + + + You are not in a channel. + No se encuentra en un canal. + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + + + + Unable to change channel flags. + No ha sido posible cambiar las del canal + + + Channel is now unmoderated. + El canal ahora está sin moderación. + + + Channel is now moderated. + El canal ahora está moderado. + + + Unable to open motd. + No es posible abrir motd (mapa del dia) + + + No motd. + No hay motd (mapa del dia) + + + Invalid user. + + + + Account {} is now muted + La cuenta {} ahora está silenciada. + + + Your account has just been muted + Su cuenta acaba de ser silenciada + + + That user is not logged on. + + + + Address information for other users is only available to admins. + La información sobre las direcciones de otros usuarios solo esta avalible para los administradores. + + + Server TCP: {} (bind {}) + TCP del Servidor: {} (enlazar {}) + + + Client TCP: {} + TCP del Cliente: {} + + + Client UDP: {} + UDP del Cliente: {} + + + Client UDP: {} (trans {}) + UDP del Cliente: {} (trans{}) + + + Game UDP: {} + UDP del Juego: {} + + + Game UDP: {} (trans {}) + UDP del Juego {} (trans {}) + + + Game UDP: none + UDP del Juego: No hay + + + Audible notification off. + Notificación acústica desactivada. + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tempOP to use this command. + Se debe ser como mínimo Operador del Canal o tempoOP para usar este comando. + + + There's no account with username {}. + + + + {} is already a Channel Operator + {} ya es un Operador del Canal. + + + {} has been promoted to a Channel Operator + {} ha sido ascendido a Operador del Canal + + + {} has promoted you to a Channel Operator in channel "{}" + {} le ha ascendido a Operador del Canal "{}" + + + {} must be on the same channel to tempOP him + {} debe estar en el mismo canal para darle el privilegio OPtemp + + + {} already is operator or admin, no need to tempOP him + {} ya es operador o administrador, no es necesario darle el privilegio de OPtemp + + + {} has been promoted to a tempOP + {} ha sido ascendido a OPtemp + + + {} has promoted you to a tempOP in this channel + {} le ha ascendido a ser OPtemp en este canal + + + You must supply a username. + + + + There's no account with username {}. + + + + {} is already a Server Operator + {} ya es un Operador del Servidor + + + {} has been promoted to a Server Operator + {} ha sido ascendido a Operador del Servidor + + + {} has promoted you to a Server Operator + {} le ha ascendido a Operador del Servidor + + + {} is no Server Operator, so you can't demote him + {} no es Operador del Servidor, así que no se le puede degradar + + + {} has been demoted from a Server Operator + {} ha sido degradado a no ser Operador del Servidor + + + {} latency: {} + {} latencia: {} + + + Your latency {} + Su latencia {} + + + {} latency () + {} latencia () + + + Invalid user. + + + + Connection closed. + Conexión cerrada. + + + Your quota allows you to write {} line(s) per {} second(s). + Su cuota le permite escribir {} línea(s) por {} segundo(s). + + + Long lines will be wrapped every {} characters. + Las líneas demasiado extensas serán comprimidas cada {} carácteres. + + + You are not allowed to send lines with more than {} characters. + No le está permitido enviar líneas con más de {} carácteres. + + + You must join a realm first + Primero se debe unir a un reino + + + Announcement from {}@{}: {} + Notificación de {}@{}: {} + + + Invalid mode. + Modo no válido. + + + Rehash of "{}" is complete! + + + + You are not in a channel. + + + + No one messaged you, use /m instead + Nadie le ha enviado ningún mensaje, en ese caso usar /m + + + Pending changes has been saved into the database. + Los cambios pendientes han sido guardados en la base de datos. + + + That user is not logged on. + + + + Banning {} who is using IP address {} + Baneando {} quién está usando la dirección IP {} + + + User's account is also LOCKED! Only an admin can unlock it! + ¡La cuenta del usuario también está BLOQUEADA! ¡Solamente un administrador puede desbloquearla! + + + /ipban a {} + /ipban a {} + + + You have been banned by Admin: {} + Ha sido baneado por el Administrador: {} + + + Your account is also LOCKED! Only an admin can UNLOCK it! + ¡Su cuenta también está BLOQUEADA! ¡Solamente un administrador puede desbloquearla! + + + Access denied due to security reasons. + Acceso denegado debido a razones de seguridad. + + + Invalid user. + + + + Current value of {} is "{}" + El valor actual de {} es "{}" + + + Value currently not set + Valor actual no fijado + + + Unable to set key for + No es posible establecer tecla para + + + Key set successfully for + Tecla establecida con éxito para + + + Invalid delay. + Retraso no válido. + + + You've initialized the shutdown sequence. + Se ha iniciado la secuencia de cierre. + + + You've canceled the shutdown sequence. + Se ha cancelado la secuencia de cierre. + + + No such user. + No existe tal usuario. + + + You can't squelch yourself. + No se puede ignorar a uno mismo. + + + Could not squelch user. + No se ha podido ignorar al usuario. + + + {} has been squelched. + {} esta siendo ignorado. + + + Invalid user. + Usuario no válido. + + + Unable to determine client game. + No es posible determinar el cliente del juego + + + This game does not support win/loss records. + Este juego no soporta records de victoria/derrota. + + + You must supply a user name and a valid program ID. + Se debe subministrar un nombre de usuario y una ID de programa válidos. + + + Example: /stats joe STAR + Ejemplo: /stats joe STAR + + + {}'s record: + record de {} + + + level: {} + nivel: {} + + + class: {} + clase: {} + + + stats: {} str {} mag {} dex {} vit {} gld + estaditicas: {} str {} mag {} dex {} vit {} gld + + + Diablo kills: {} + Muertes de Diablo: {} + + + Normal games: {}-{}-{} + Juegos en normal: {}-{}-{} + + + Ladder games: {}-{}-{} (valuación {}) + Juegos en ladder: {}-{}-{} (valuación {}) + + + Ladder games: 0-0-0 + Juegos en ladder: 0-0-0 + + + IronMan games: {}-{}-{} (rating {}) + Juegos IronMan: {}-{}-{} + + + IronMan games: 0-0-0 + Juegos IronMan: 0-0-0 + + + {}'s Ladder Record's: + Record en ladder de {} + + + Users Solo Level: {}, Experience: {} + Nivel de los usuarios en Solitario : {}, Experiencia: {} + + + SOLO Ladder Record: {}-{}-0 + Record en Ladder en Solitario: {}-{}-0 + + + SOLO Rank: {} + Rango en Solitario: {} + + + Users Team Level: {}, Experience: {} + Nivel de los usuarios en Equipos: {}. Experiencia: {} + + + TEAM Ladder Record: {}-{}-0 + Record en Ladder en Equipos: {}-{}-0 + + + TEAM Rank: {} + Rango en Equipos: {} + + + Users FFA Level: {}, Experience: {} + Nivel de los usuarios en TCT (Todos Contra Todos): {}, Experiencia: {} + + + FFA Ladder Record: {}-{}-0 + Records en Ladder para TCT (Todos Contra Todos): {}-{}-0 + + + FFA Rank: {} + Rango TCT (Todos Contra Todos): {} + + + Users AT Team No. {} + + + + Users AT TEAM Level: {}, Experience: {} + + + + AT TEAM Ladder Record: {}-{}-0 + + + + AT TEAM Rank: {} + + + + There are currently {} user(s) in {} games of {} + Actualmente hay {} usuario(s) en {} juegos de {} + + + There are currently {} users online, in {} games, and in {} channels. + Actualmente hay {} usuarios conectados, en {} juegos, y en {} canales. + + + Client tag set to {}. + Etiqueta del cliente fijada en {} + + + Invalid clienttag {} specified + Etiqueta del cliente especificada {} no válida + + + Server Time: {} + Hora del Servidor: {} + + + Your local time: {} + Hora local: {} + + + Invalid duration. + Duración no válida + + + Your timer has expired. + El temporizador ha expirado. + + + Could not set timer. + No se ha podido establecer el temporizador. + + + Timer set for {} second(s) + Temporizador establecido para {} segundo(s) + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator or tmpOP to use this command. + Se debe ser como mínimo Operador de Canal o tempOP para usar este comando. + + + There's no account with username {}. + + + + {} has already tmpOP in this channel + + + + {} must be on the same channel to tempOP him + + + + {} already is operator or admin, no need to tempOP him + + + + {} has been promoted to tmpOP in this channel + {} ha sido ascendido a OPtemp en este canal + + + {} has promoted you to a tempOP in this channel + + + + This command can only be used inside a channel. + + + + Max topic length exceeded (max {} symbols) + Longitud máxima del hilo excedida ( max {} cáracteres) + + + You must be at least a Channel Operator of {} to set the topic + Se debe ser como mínimo Operador del Canal {} para establecer el hilo + + + {} topic: no topic + {} hilo: sin hilo + + + Unable to send TOS (Terms of Service). + No ha sido posible enviar los TDS (Términos del Servicio) + + + This command can only be used inside a channel. + + + + You are not a channel operator. + No se es un operador de canal. + + + That user is not banned. + Ese usuario no está baneado. + + + {} is no longer banned from this channel. + {} ya no esta baneado en este canal. + + + Invalid user. + + + + Your account has just been unlocked by {} + Su cuenta acaba de ser desbloqueada por {} + + + That user's account is now unlocked. + La cuenta de ese usuario ahora está desbloqueada. + + + Invalid user. + + + + Your account has just been unmuted by {} + Su cuenta acaban de devolverle la voz por {} + + + That user's account is now unmuted. + Esa cuenta de usuario vuelve a tener voz. + + + No such user. + + + + User was not being ignored. + El usuario no estaba siendo ignorado. + + + No longer ignoring. + Ya no se le ignora más. + + + That user does not exist. + + + + Removal from watch list failed. + Eliminación fallida de la lista de vigilancia. + + + User {} removed from your watch list. + Usuario {} eliminado de la lista de vigilancia. + + + Removal from watch list failed. + + + + All {} users removed from your watch list. + Todos los {} usuarios han sido eliminados de la lista de vigilancia. + + + All users removed from your watch list. + Todos los usuarios han sido eliminados de la lista de vigilancia. + + + Uptime: {} + Tiempo de actividad: {} + + + This command can only be used inside a channel. + + + + You must be at least a Channel Operator to use this command. + Se debe ser como mínimo Operador del Canal para poder usar este comando. + + + There's no account with username {}. + + + + {} is already on VOP list, no need to Voice him + {} ya se encuentra en la lista VOP, no es necesario darle Voz. + + + {} must be on the same channel to voice him + {} debe estar en el mismo canal para darle voz + + + {} already has Voice in this channel + {} ya tiene Voz en en este canal + + + {} is already an operator or admin. + {} ya es un operador o admin. + + + {} has been granted Voice in this channel + Se le ha concedido la Voz a {} en este canal + + + {} has granted you Voice in this channel + {} le ha concedido la Voz en este canal + + + This command can only be used inside a channel. + + + + You must be at least a Channel Admin to use this command. + + + + There's no account with username {}. + + + + {} is already on VOP list + {} ya se encuentra en al lista VOP + + + {} has been added to the VOP list + Se ha añadido a {} a la lista VOP + + + {} has added you to the VOP list of channel "{}" + {} le ha añadido a la lista VOP del canal "{}" + + + That user does not exist. + + + + Add to watch list failed. + Inclusión fallida a la lista de vigilancia. + + + User {} added to your watch list. + Usuario {} incluido en la lista de vigilancia. + + + Add to watch list failed. + + + + All {} users added to your watch list. + Todos los {} usuarios han sido incluidos a la lisa de vigilancia. + + + All users added to your watch list. + Todos los usuarios han sido incluidos a la lista de vigilancia. + + + That channel does not exist. + Ese canal no existe. + + + (If you are trying to search for a user, use the /whois command.) + (Si se está intentando buscar a un usuario, usar el comando /whois) + + + You are banned from that channel. + Está expulsado de ese canal. + + + Users in channel {}: + Usuarios en el canal {}: + + + Unable to obtain your account name. + No es posible obtener su nombre de cuenta. + + + (invalid date) + (Fecha no válida) + + + Reset {}'s {} stats + Reiniciar los stats de {} en {} + + + Reset {}'s {} stats + + + + Reset {}'s {} stats + + + + You cannot kick administrators. + No se puede echar a administradores. + + + You cannot kick operators. + No se puede echar a operadores. + + + {} has been kicked by {} ({}). + {} ha sido echado por {} ({}). + + + {} has been kicked by {}. + {} ha sido echado por {}. + + + You cannot ban operators. + No se puede banear a operadores. + + + Unable to ban {}. + No es posible banear a {}. + + + {} has been banned by {} ({}). + {} ha sido baneado por {} ({}). + + + {} has been banned by {}. + {} ha sido baneado por {}. + + + Password for account {} updated. + Contraseña para la cuenta {} actualizada. + + + Hash is: {} + + + + Your account has been muted, you can't whisper to other users. + Su cuenta ha sido silenciada, no se puede susurrar a otros usuarios. + + + That user is not logged on. + Ese usuario no esta conectado. + + + {} is unavailable ({}) + {} no esta disponible ({}) + + + {} is away ({}) + {} está ausente ({}) + + + Unknown user. + Usuario desconocido. + + + User was last seen on: {} + Usuario última vez viste el: {} + + + User is offline + El usuario está desconectado + + + You + + + + are + + + + is + + + + {} {} using {} and {} currently in {} game "{}". + {} {} está usando {} y {} actualmente dentro de {} juego "{}". + + + {} {} using {} and {} currently in channel "{}". + {} {} está usando {} y {} actualmente dentro del canal "{}". + + + {} {} using {}./original> + {} {} está usando {}. + + + {} {} refusing messages ({}) + {} {} denegando mensajes ({}) + + + {} away ({}) + {} ausente ({}) + + + You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. + Se están mandando comandos a {} demasiado rápido con el riesgo a ser desconectado por sobrecarga. Por favor introducir comandos más depspacio. + + + This command has been deactivated + Este comando ha sido desactivado + + + This command is reserved for admins. + Este comando esta reservado para admins. + + + Unknown command. + + + + This account has been locked + Esta cuenta ha sido bloqueada + + + This account has been locked + + + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + ¡Ups! Hay un problema con el archivo de ayuda. Por favor contactar con el administrador del servidor. + + + This command can only be used inside a channel. + + + + This command can only be used from the game. + Este comando tan solo se puede usar dentro del juego. + + + Bad icon. + Icono incorrecto. + + + {} banned permamently by {}. + {} baneado permanentemente por {} + + + {} banned permamently. + {} baneado permanentemente. + + + {} banned for {} by {}. + {} baneado por {} por {} + + + {} banned for {}. + {} baneado por {}. + + + Banning only for: {} minutes. + Baneando tan solo por: {} minutos. + + + This server has NO mail support. + Este servidor NO soporta correos. + + + Please specify which message to delete. Use the following syntax: /mail delete {&lt;index&gt;|all} . + Por favor especificar cual mensaje se va a eliminar. Utilizar la siguiente sintaxis: /mail delete {&lt;index&gt;|all} . + + + Successfully deleted messages. + Mensajes eliminados satisfactoriamente. + + + Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. + Índice no válido. Por favor usar /mail delete {&lt;index&gt;|all} donde &lt;index&gt; is un número. + + + Succesfully deleted message. + Mensaje eliminado satisfactoriamente. + + + You have no mail. + No hay correo. + + + There was an error completing your request. + Ha ocurrido un error mientras se completaba su petición. + + + Receiver UNKNOWN! + ¡Destinatario DESCONOCIDO! + + + Receiver has reached his mail quota. Your message will NOT be sent. + El destinatario ha alcanzado su cuota de correos. El mensaje NO será enviado. + + + Your mail has been sent successfully. + El correo ha sido enviado satisfactoriamente + + + There was an error completing your request! + ¡Ha ocurrido un error mientras se completaba la petición! + + + You must be at least a Channel Operator to use this command. + + + + This command can only be used inside a channel. + + + + Quiz has already ran in channel "{}". Use /quiz stop to force finish. + + + + Available Quiz dictionaries: + Diccionarios para Quiz dispnobiles: + + + Quiz is not running. + El Quiz no está en marcha. + + + {}'s Quiz record: + Quiz record de {} + + + {} has never played Quiz. + {} nunca ha jugado al Quiz. + + + Top {} Quiz records: + Top {} Quiz records: + + + points + puntos + + + This command is reserved for admins. + + + + User "{}" is offline + Usuario "{}" está offline + + + From a1eab03abed0eaa2f125c77c07ed513d61829cee Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 15:04:19 -0700 Subject: [PATCH 120/144] Update bnhelp.conf --- conf/i18n/esES/bnhelp.conf | 176 +++++++++++++++++++------------------ 1 file changed, 89 insertions(+), 87 deletions(-) diff --git a/conf/i18n/esES/bnhelp.conf b/conf/i18n/esES/bnhelp.conf index c8e119ad9..b8dcc12f2 100644 --- a/conf/i18n/esES/bnhelp.conf +++ b/conf/i18n/esES/bnhelp.conf @@ -1,219 +1,221 @@ ############################################################################## -# bnhelp - This Help File is used for describing the commands to the user # +# bnhelp - Este Archivo de Ayuda se usa para describir comandos al usuario # #----------------------------------------------------------------------------# -# Entries are separated by a percent sign (%) at the beginning of the line. # -# The commands that correspond with the entry should follow the % on the # -# same line. # +# Cada entrada está separada por un signo de porcentaje (%) al inicio # +# de la línea. # +# Los comandos que se corresponden con la entrada deberán estar seguidos de # +# % en la mísma línea # # # -# You can enter comments by starting a line with #. Comments extend to the # -# end of the line. # -# Tabs replaces with 3 spaces. # -# Empty lines are ignored. # +# Se pueden insertar comentarios al empezar una línea con #. # +# Los comentarios se extienden hasta el final de la línea. # +# Las pestañas se reemplazan con 3 espacios. # +# Las líneas vacias se ignoran. # # # ############################################################################## %whois whereis where -------------------------------------------------------- -/whois (aliases: /where /whereis) - Displays where a is on the server. +/whois (también se puede usar: /where /whereis) + Muestra donde un se encuentra en el servidor. - Example: /whois nomad + Ejemplo: /whois nomad %msg whisper m w -------------------------------------------------------- -/whisper (aliases: /w /m /msg) - Sends a private to +/whisper (también se puede usar: /w /m /msg) + Envía un privado para - Example: /whisper nomad How are you doing? + Ejemplo: /whisper nomad ¿Qué tal todo? %ignore squelch -------------------------------------------------------- -/squelch (alias: ignore, see also: /unsquelch) - Blocks future messages sent from . +/squelch (también se puede usar: /ignore, Véase también: /unsquelch) + Bloquea mensajes futuros enviados por . - Example: /squelch nomad + Ejemplo: /squelch nomad %unignore unsquelch -------------------------------------------------------- -/unsquelch (alias: /unignore) - Allows a previously squelched to talk to you normally. +/unsquelch (también se puede usar: /unignore) + Permite a previamente ignorado poder volver a hablar con normalidad. - Example: /unsquelch nomad + Ejemplo: /unsquelch nomad %away -------------------------------------------------------- -/away [message] - Displays [message] to users who whisper to you. To disable, use the /away command again with no [message]. +/away [mensaje] + Muestra [mensaje] a los usuarios que le susurren (whisper). Para desactivar, usar el comando /away de nuevo sin [mensaje]. - Example: /away Eating dinner + Ejemplo: /away Estoy cenando. %dnd -------------------------------------------------------- -/dnd [message] - Prevents all whispers from displaying to your screen. To disable, use the command again with no [message]. +/dnd [mensaje] + Previene que se muestre cualquier susurro en su pantalla. Para desactivar, usar el comando /dnd de nuevo sin [mensaje]. - Example: /dnd I'm playing a game and don't want to hear whispers. + Ejemplo: /dnd Estoy jugando y no quiero leer mensajes. %who -------------------------------------------------------- -/who - Displays a list of users in +/who + Muestra una lista de los usuarios en - Example: /who Moderated Support + Ejemplo: /who Moderated Support %stats astat -------------------------------------------------------- -/stats [player] [client] (alias: /astat) - Displays a [player]'s Win/Loss record. +/stats [jugador] [cliente] (también se puede usar: /astat) + Muestra el record de Victorias/Derrotas de un [jugador]. - Example: /stats nomad + Ejemplo: /stats nomad %status users -------------------------------------------------------- -/users [gametag] (alias: /status) - Displays the current number of users connected to the server. - Example: /users W3XP +/users [SiglasJuego] (también se puede usar: /status) + Muestra el actual número de usuarios conectados al servidor. + + Ejemplo: /users W3XP %time -------------------------------------------------------- /time - Displays the current server and your local time. + Muestra su hora local y el servidor actual. %channel join j -------------------------------------------------------- -/channel (alias: /join /j) - Moves you to +/channel (también se puede usar: /join /j) + Mueve al usuario a - Example: /channel Moderated Support + Ejemplo: /channel Moderated Support %rejoin -------------------------------------------------------- -/rejoin (alias: /resign) - Removes your status as the channel Operator. +/rejoin (también se puede usar: /resign) + Elimina su status como Operador del canal. %me emote -------------------------------------------------------- -/me (alias: /emote) - Displays your name and in a different color. +/me (también se puede usar: /emote) + Muestra su nombre y el en diferente color. - Example: /emote wants to play a game. + Ejemplo: /emote quiere jugar una partida. %kick -------------------------------------------------------- -/kick - Kicks from the channel. +/kick + Expulsa del canal. - Example: /kick nomad + Ejemplo: /kick nomad %ban -------------------------------------------------------- -/ban (see also: /unban) - Bans from the channel, and prevents him from returning. +/ban (véase también: /unban) + Banea al del canal, previniendo que regrese. - Example: /ban nomad + Ejemplo: /ban nomad %unban -------------------------------------------------------- -/unban - Allows a banned to return to the channel. +/unban + Permite a un baneado poder volver a entrar al canal. Example: /unban nomad %serverban -------------------------------------------------------- -/serverban (see also: /unban) - Bans by IP and lock his account +/serverban (véase también: /unban) + Banea por su IP y bloquea la cuenta. - Example: /serverban nomad + Ejemplo: /serverban nomad %ipscan -------------------------------------------------------- -/ipscan - Finds all currently logged in users with the given or . +/ipscan + Busca a todos los usuarios actualmente conectados con el o dados. - Example: /ipscan 127.0.0.1 - Example: /ipscan nomad + Ejemplo: /ipscan 127.0.0.1 + Ejemplo: /ipscan nomad %whoami -------------------------------------------------------- /whoami - Displays where you are on the server. + Muestra donde se encuentra uno mismo en el servidor. %uptime -------------------------------------------------------- /uptime - Displays how long the server has been running. + Muestra durante cuanto tiempo el servidor ha estado en marcha. %version -------------------------------------------------------- /version - Displays the version of the server + Muestra la versión del servidor. %lusers -------------------------------------------------------- /lusers - Displays a list of players who have been banned from the channel + Muestra una lista de los jugadores que han sido baneados del canal. %games -------------------------------------------------------- -/games [gametag] [difficulty] - Displays a list of online games. - Set [difficulty] for Diablo games only (norm|night|hell) +/games [SiglasJuego] [dificultad] + Muestra una lista de los juegos online. + Establece [dificultad] solamente para juegos en Diablo (norm|night|hell) -------------------------------------------------------- /games all - Displays a list of all games. + Muestra una lista de todos los juegos. /games l[obby] - Displays a list of games in lobby. + Muestra una lista de los juegos en la sala de espera (lobby). %channels chs -------------------------------------------------------- -/channels [gametag] (alias: /chs) - Displays a list of channels. +/channels [SiglasJuego] (también se puede usar: /chs) + Muestra una lista de los canales. -------------------------------------------------------- /channels all - Displays a list of all channels. + Muestra una lista de todos los canales. %connections con -------------------------------------------------------- -/connections (alis: /con) - Displays a list of connections. +/connections (también se puede usar: /con) + Muestra una lista de las conexiones. %finger -------------------------------------------------------- -/finger - Displays detailed information about +/finger + Muestra informaciónd detallada sobre - Example: /finger nomad + Ejemplo: /finger nomad %admins -------------------------------------------------------- /admins - Displays a list of all currently logged in administrators. + Muestra una lista de todos los administradores actualmente conectados. %reply r -------------------------------------------------------- -/reply (alias: /r) - Replies to the last player who whispered you with . +/reply (también se puede usar: /r) + Contesta al último jugador que le haya susurrado con . - Example: /r Hi, mate! + Ejemplo:/r Hey, ¿como vá? %announce ann -------------------------------------------------------- -/announce (alias: /ann) - Announces to everyone. +/announce (también se puede usar: /ann) + Anuncia un para todos. - Example: /ann Hello everyone! + Ejemplo: /ann ¡Hola a todos! %realmann -------------------------------------------------------- -/realmann - Announces to everyone in the current Diablo 2 realm. +/realmann + Anuncia un para todos en el reino actual de Diablo 2. - Example: /realmann Hello everyone! + Ejemplo: /realmann ¡Hola a todos! %alert -------------------------------------------------------- -/alert +/alert Show MessageBox with to everyone. Use \n as a new line symbol. Example: /alert Hello\neveryone! From c44eefe44263a74bdfc7441faf2d00f9d40c9c4e Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 00:35:11 +0200 Subject: [PATCH 121/144] Update bnhelp.conf --- conf/i18n/esES/bnhelp.conf | 276 ++++++++++++++++++------------------- 1 file changed, 138 insertions(+), 138 deletions(-) diff --git a/conf/i18n/esES/bnhelp.conf b/conf/i18n/esES/bnhelp.conf index b8dcc12f2..1dc9e3375 100644 --- a/conf/i18n/esES/bnhelp.conf +++ b/conf/i18n/esES/bnhelp.conf @@ -215,171 +215,171 @@ %alert -------------------------------------------------------- -/alert +/alert Show MessageBox with to everyone. Use \n as a new line symbol. - Example: /alert Hello\neveryone! + Ejemplo: /alert Hello\neveryone! %news -------------------------------------------------------- /news - Displays the news. + Muestra las noticias. %logout quit exit -------------------------------------------------------- -/logout (alias: /quit /exit) - Disconnects you from the server. +/logout (también se puede usar: /quit /exit) + Le desconecta del servidor. %kill -------------------------------------------------------- -/kill {|#} [min] - Disconnects from the server and bans the player's IP address for [min] minutes. +/kill {|#} [min] + Desconecta a del servidor y banea la dirección IP del jugador durante [min] minutos. - Example: /kill nomad 5 + Ejemplo: /kill nomad 5 %killsession -------------------------------------------------------- -/killsession [min] - Disconnects the session from the server and bans the session's IP address for [min] minutes. +/killsession [min] + Desconecta la sesión del servidor y banea la dirección IP de la sesión durante [min] minutos. - Example: /killsession 1 5 + Ejemplo: /killsession 1 5 %watch -------------------------------------------------------- -/watch - Enables notifications for . +/watch + Activa las notificicacions para . - Example: /watch nomad + Ejemplo: /watch nomad %unwatch -------------------------------------------------------- -/unwatch - Disables notifications for . +/unwatch + Desactiva las notificaciones para . - Example: /unwatch nomad + Ejemplo: /unwatch nomad %watchall -------------------------------------------------------- -/watchall [gametag] - Enables notifications for everyone. +/watchall [SiglasJuego] + Activa las notificaciones para todos. - Example: /watchall SEXP + Ejemplo: /watchall SEXP %unwatchall -------------------------------------------------------- -/unwatchall [gametag] - Disables notifications for everyone. +/unwatchall [SiglasJuego] + Desactiva las notificaciones para todos. - Example: /unwatchall SEXP + Ejemplo: /unwatchall SEXP %gameinfo -------------------------------------------------------- -/gameinfo - Displays information about . +/gameinfo + Muestra información sobre . - Example: /gameinfo FS 1v1!!! + Ejemplo: /gameinfo FS 1v1!!! %ladderactivate -------------------------------------------------------- /ladderactivate - Copies current ladder statistics to active ladder statistics. + Copia las estadísitcas actuales en ladder para las estadísitcas activas en ladder. %ladderinfo -------------------------------------------------------- /ladderinfo [gametag] - Displays ladder information for of [gametag] + Muestra información en ladder para en [SiglasJuego] - Example: /ladderinfo 1000 SEXP + Ejemplo: /ladderinfo 1000 SEXP %timer -------------------------------------------------------- -/timer [message] - Displays [message] after seconds. +/timer [mensaje] + Muestra [mensaje] al cabo de segundos. - Example: /timer 60 one minute has passed + Ejemplo: /timer 60 ha pasado un minuto %netinfo -------------------------------------------------------- -/netinfo [player] - Displays [player]'s network information. +/netinfo [jugador] + Muestra la información de red de [jugador]. - Example: /netinfo nomad + Ejemplo: /netinfo nomad %addacct -------------------------------------------------------- -/addacct - Creates a new account named with password . +/addacct + Crea una nueva cuenta con nombre con el password . - Example: /addacct nomad password + Ejemplo: /addacct nomad password %chpass -------------------------------------------------------- -/chpass [] - change a player's password - Changes []'s password to . - If [] is empty then change password for your account. +/chpass [] - cambia el password de un jugador + Cambia el password de [] por . + Si [] se deja vacia entonces cambia el password de su cuenta. - Example: /chpass nomad password + Ejemplo: /chpass nomad password %quota -------------------------------------------------------- /quota - Displays your message quota. + Muestra su cuota de mensajes. %shutdown -------------------------------------------------------- -/shutdown [duration] - Sets the shutdown sequence at [duration] seconds or cancels it if set to zero. +/shutdown [duración] + Establece la secuencia de apagado en [duración] segundos o la cancela si se establece en cero. - Example: /shutdown 300 + Ejemplo: /shutdown 300 %lock lockacct -------------------------------------------------------- -/lock [hours] [reason] (alias: /lockacct) - Locks 's account to prevent him/her from logging in with it. - Set [hours] = 0 to ban permanently. +/lock [horas] [razón] (también se puede usar: /lockacct) + Bloquea la cuenta de y le previene de volverse a conectar. + Establecer [horas] = 0 para banear permanentemente. - Example: /lock nomad 0 bye noob! + Ejemplo: /lock nomad 0 ¡bye noob! %unlock unlockacct -------------------------------------------------------- -/unlock (alias: /unlockacct) - Unlocks 's account to allow him/her to log in with it. +/unlock (también se puede usar: /unlockacct) + Desbloquea la cuenta de permitiendole volverse a conectar. - Example: /unlock nomad + Ejemplo: /unlock nomad %mute muteacct -------------------------------------------------------- -/mute [hours] [reason] (alias: /muteacct) - Mutes 's account to prevent him/her from talking on channels. - Set [hours] = 0 to mute permanently. +/mute [horas] [razón] (también se puede usar: /muteacct) + Silencia la cuenta de y previene que hable en los canales. + Establecer [horas] = 0 para silenciar permanentemente. - Example: /mute nomad 6 stop spam! + Ejemplo: /mute nomad 6 ¡Basta con el spam! %unmute unmuteacct -------------------------------------------------------- -/unmute (alias: /unmuteacct) - Unmutes 's account to allow him/her to talk on channels. +/unmute (también se puede usar: /unmuteacct) + Devuelve la voz a la cuenta de y le permite volver a hablar en los canales. - Example: /unmute nomad + Ejemplo: /unmute nomad %friends f -------------------------------------------------------- -/friends [options] (alias: /f) +/friends [opciones] (también se puede usar: /f) -------------------------------------------------------- - /friends add - Adds to your friends list. - /friends del - Removes from your friends list. - /friends promote - Promotes one line up your friends list. - /friends demote - Demotes one line down your friends list + /friends add + Añade a su lista de amigos. + /friends del + Elimina de su lista de amigos. + /friends promote + Asciende una línea arriba en su lista de amigos. + /friends demote + Desciende una línea abajo en su lista de amigos. /friends list - Displays your friends list. + Muestra su lista de amigos. /friends online - Displays your online friends list. + Muestra su lista de amigos conectados actualmente. /friends msg - Whisper to all of your online friends. + Susurra a todos sus amigos conectados actualmente. %mail -------------------------------------------------------- @@ -404,23 +404,23 @@ %help -------------------------------------------------------- -/help [command] - Displays help about [command] +/help [comando] + Muestra ayuda sobre [comando] - Example: /help whisper + Ejemplo: /help whisper %ipban -------------------------------------------------------- -/ipban [option] [time] +/ipban [opción] [tiepo] -------------------------------------------------------- /ipban l[ist] - Displays a list of banned IP addresses + Muestra una lista de las direcciones IP baneadas. /ipban c[heck] - Checks if IP address is banned or not. - /ipban d[el] - Deletes IP address or - /ipban a[dd] [time] - Bans IP address for [time] minutes. [time] = 0 - permanent ban + Comprueba si la dirección está baneada o no. + /ipban d[el] + Elimina dirección IP o <índice> + /ipban a[dd] [tiempo] + Banea la dirección IP durante [tiempo] minutos. [tiempo] = 0 - ban permanente %set -------------------------------------------------------- @@ -434,19 +434,19 @@ %motd -------------------------------------------------------- /motd - Displays the MOTD. + Muestra el Mensaje del Dia. %tos -------------------------------------------------------- /tos /warranty /license - Displays the Terms of Service. + Muestra los Términos de Servicio. %admin -------------------------------------------------------- -/admin [+|-] - Promotes/demotes to/from server administrator. +/admin [+|-] + Promotes/demotes to/from server administrator. - Example: /admin +nomad + Ejemplo: /admin +nomad %rehash -------------------------------------------------------- @@ -462,7 +462,7 @@ Create a new clan (max length = 4; spaces are allowed in ) Commands for clan members: - /clan m[sg] (alias [w]hisper) + /clan m[sg] (también se puede usar [w]hisper) Whispers a message to all your fellow clan members /clan inv[ite] Invite to your clan. @@ -476,90 +476,90 @@ Commands for clan members: Commands for clan chieftain: /clan motd Update the clan's Message of the Day to . - /clan pub[lic] (alias: pub) + /clan pub[lic] (también se puede usar: pub) Opens the clan channel up to the public so that anyone may enter. - /clan priv[ate] (alias: priv) + /clan priv[ate] (también se puede usar: priv) Closes the clan channel such that only members of the clan may enter. /clan dis[band] Disband your clan. %ping p latency -------------------------------------------------------- -/ping (alias: /p /latency) - Displays your ping to the server. +/ping (también se puede usar: /p /latency) + Muestra el ping en el servidor. %command_groups cg -------------------------------------------------------- -/command_groups [groups] (alias: /cg) +/command_groups [groups] (alias: /cg) -------------------------------------------------------- - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . + /cg list + Displays 's comando groups. + /cg add + Adds comando group(s) to . + /cg del + Deletes comando group(s) from . %operator -------------------------------------------------------- -/operator [+|-] (alias: /op) - Promotes/demotes to/from server operator. +/operator [+|-] (también se puede usar: /op) + Promotes/demotes to/from server operator. - Example: /operator +nomad + Ejemplo: /operator +nomad %aop -------------------------------------------------------- -/aop - Promotes to channel administrator. +/aop + Promotes to channel administrator. - Example: /aop nomad + Ejemplo: /aop nomad %op -------------------------------------------------------- -/op - Promotes to channel operator. +/op + Promotes to channel operator. - Example: /op nomad + Ejemplo: /op nomad %deop -------------------------------------------------------- -/deop - Demotes from channel administrator or operator. +/deop + Demotes from channel administrator or operator. - Example: /deop nomad + Ejemplo: /deop nomad %tmpop -------------------------------------------------------- -/tmpop - Promotes to temporary channel operator. +/tmpop + Promotes to temporary channel operator. - Example: /tmpop + Ejemplo: /tmpop %vop -------------------------------------------------------- -/vop - Adds to the VOP list. +/vop + Adds to the VOP list. - Example: /vop nomad + Ejemplo: /vop nomad %voice -------------------------------------------------------- -/voice - Temporarily gives voice privileges to . +/voice + Temporarily gives voice privileges to . - Example: /voice nomad + Ejemplo: /voice nomad %devoice -------------------------------------------------------- -/devoice - Removes from the VOP list and removes temporary voice privileges. +/devoice + Removes from the VOP list and removes temporary voice privileges. - Example: /devoice nomad + Ejemplo: /devoice nomad %topic -------------------------------------------------------- /topic [message] Sets or displays current channel's topic. - Example: /topic Supported is given in this channel...\n(some text on a new line) + Ejemplo: /topic Supported is given in this channel...\n(some text on a new line) %moderate -------------------------------------------------------- @@ -568,16 +568,16 @@ Commands for clan chieftain: %clearstats -------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients +/clearstats + Clears 's statistics, where can be any valid client or ALL for all clients Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - Example: /clearstats nomad SEXP + Ejemplo: /clearstats nomad SEXP %find -------------------------------------------------------- /find - Finds users with in their username. MUST be lowercase! + Finds users with in their nombre de usuario. MUST be lowercase! %save -------------------------------------------------------- @@ -586,32 +586,32 @@ Commands for clan chieftain: %icon -------------------------------------------------------- -/icon [name] +/icon [nombre] Set custom icon for normal user. - Use /icon without [name] to display list of available icons in your stash. + Use /icon without [nombre] to display list of available icons in your stash. -------------------------------------------------------- Syntax for operator/admin: - /icon a[dd] + /icon a[dd] Add icon into user stash - /icon d[el] + /icon d[el] Remove icon from user stash - /icon s[et] + /icon s[et] Set custom icon to user without adding it in user stash - /icon l[ist] + /icon l[ist] Display icons in user's stash /icon l[ist] Display availaible icons in server stash that can be assigned to users %quiz -------------------------------------------------------- -/quiz [option] +/quiz [option] Trivia Quiz Game -------------------------------------------------------- - /quiz start - Start game with given dictionary name in current channel + /quiz start + Start game with given dictionary nombre in current channel /quiz stop Finish game by force - /quiz stats [username] + /quiz stats [nombreusuario] Display record statistics for user /quiz stats Display Top records From 7ca9f7aa0e79b87c93faf879dd1ed4977898e431 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 15:36:27 -0700 Subject: [PATCH 122/144] Update bnhelp.conf --- conf/i18n/esES/bnhelp.conf | 320 ++++++++++++++++++------------------- 1 file changed, 160 insertions(+), 160 deletions(-) diff --git a/conf/i18n/esES/bnhelp.conf b/conf/i18n/esES/bnhelp.conf index 1dc9e3375..295685fe3 100644 --- a/conf/i18n/esES/bnhelp.conf +++ b/conf/i18n/esES/bnhelp.conf @@ -17,63 +17,63 @@ -------------------------------------------------------- /whois (también se puede usar: /where /whereis) Muestra donde un se encuentra en el servidor. - + Ejemplo: /whois nomad %msg whisper m w -------------------------------------------------------- /whisper (también se puede usar: /w /m /msg) Envía un privado para - + Ejemplo: /whisper nomad ¿Qué tal todo? %ignore squelch -------------------------------------------------------- /squelch (también se puede usar: /ignore, Véase también: /unsquelch) Bloquea mensajes futuros enviados por . - + Ejemplo: /squelch nomad %unignore unsquelch -------------------------------------------------------- /unsquelch (también se puede usar: /unignore) Permite a previamente ignorado poder volver a hablar con normalidad. - + Ejemplo: /unsquelch nomad %away -------------------------------------------------------- /away [mensaje] Muestra [mensaje] a los usuarios que le susurren (whisper). Para desactivar, usar el comando /away de nuevo sin [mensaje]. - + Ejemplo: /away Estoy cenando. %dnd -------------------------------------------------------- /dnd [mensaje] Previene que se muestre cualquier susurro en su pantalla. Para desactivar, usar el comando /dnd de nuevo sin [mensaje]. - + Ejemplo: /dnd Estoy jugando y no quiero leer mensajes. %who -------------------------------------------------------- /who Muestra una lista de los usuarios en - + Ejemplo: /who Moderated Support %stats astat -------------------------------------------------------- /stats [jugador] [cliente] (también se puede usar: /astat) Muestra el record de Victorias/Derrotas de un [jugador]. - + Ejemplo: /stats nomad %status users -------------------------------------------------------- /users [SiglasJuego] (también se puede usar: /status) Muestra el actual número de usuarios conectados al servidor. - + Ejemplo: /users W3XP %time @@ -85,7 +85,7 @@ -------------------------------------------------------- /channel (también se puede usar: /join /j) Mueve al usuario a - + Ejemplo: /channel Moderated Support %rejoin @@ -97,45 +97,45 @@ -------------------------------------------------------- /me (también se puede usar: /emote) Muestra su nombre y el en diferente color. - + Ejemplo: /emote quiere jugar una partida. %kick -------------------------------------------------------- /kick Expulsa del canal. - + Ejemplo: /kick nomad %ban -------------------------------------------------------- /ban (véase también: /unban) Banea al del canal, previniendo que regrese. - + Ejemplo: /ban nomad %unban -------------------------------------------------------- /unban Permite a un baneado poder volver a entrar al canal. - + Example: /unban nomad %serverban -------------------------------------------------------- /serverban (véase también: /unban) Banea por su IP y bloquea la cuenta. - + Ejemplo: /serverban nomad %ipscan -------------------------------------------------------- /ipscan Busca a todos los usuarios actualmente conectados con el o dados. - + Ejemplo: /ipscan 127.0.0.1 Ejemplo: /ipscan nomad - + %whoami -------------------------------------------------------- /whoami @@ -174,7 +174,7 @@ -------------------------------------------------------- /channels all Muestra una lista de todos los canales. - + %connections con -------------------------------------------------------- /connections (también se puede usar: /con) @@ -184,7 +184,7 @@ -------------------------------------------------------- /finger Muestra informaciónd detallada sobre - + Ejemplo: /finger nomad %admins @@ -196,29 +196,29 @@ -------------------------------------------------------- /reply (también se puede usar: /r) Contesta al último jugador que le haya susurrado con . - + Ejemplo:/r Hey, ¿como vá? %announce ann -------------------------------------------------------- /announce (también se puede usar: /ann) Anuncia un para todos. - + Ejemplo: /ann ¡Hola a todos! %realmann -------------------------------------------------------- /realmann Anuncia un para todos en el reino actual de Diablo 2. - + Ejemplo: /realmann ¡Hola a todos! %alert -------------------------------------------------------- -/alert +/alert Show MessageBox with to everyone. Use \n as a new line symbol. - - Ejemplo: /alert Hello\neveryone! + + Example: /alert Hello\neveryone! %news -------------------------------------------------------- @@ -228,96 +228,96 @@ %logout quit exit -------------------------------------------------------- /logout (también se puede usar: /quit /exit) - Le desconecta del servidor. + Desconecta del servidor. %kill -------------------------------------------------------- /kill {|#} [min] Desconecta a del servidor y banea la dirección IP del jugador durante [min] minutos. - + Ejemplo: /kill nomad 5 %killsession -------------------------------------------------------- -/killsession [min] +/killsession [min] Desconecta la sesión del servidor y banea la dirección IP de la sesión durante [min] minutos. - + Ejemplo: /killsession 1 5 %watch -------------------------------------------------------- /watch - Activa las notificicacions para . - + Activa notificaciones para . + Ejemplo: /watch nomad %unwatch -------------------------------------------------------- /unwatch - Desactiva las notificaciones para . - + Desactiva notificaciones para . + Ejemplo: /unwatch nomad %watchall -------------------------------------------------------- /watchall [SiglasJuego] - Activa las notificaciones para todos. - + Activa notificaciones para todos. + Ejemplo: /watchall SEXP %unwatchall -------------------------------------------------------- /unwatchall [SiglasJuego] - Desactiva las notificaciones para todos. + Desactiva notificaciones para todos. Ejemplo: /unwatchall SEXP - + %gameinfo -------------------------------------------------------- /gameinfo Muestra información sobre . - + Ejemplo: /gameinfo FS 1v1!!! %ladderactivate -------------------------------------------------------- /ladderactivate - Copia las estadísitcas actuales en ladder para las estadísitcas activas en ladder. + Copia las estadísticas actuales de ladder a las estadísticas de ladder activas. %ladderinfo -------------------------------------------------------- -/ladderinfo [gametag] - Muestra información en ladder para en [SiglasJuego] - +/ladderinfo [SiglasJuego] + Muestra información de ladder para en [SiglasJuego] + Ejemplo: /ladderinfo 1000 SEXP %timer -------------------------------------------------------- /timer [mensaje] - Muestra [mensaje] al cabo de segundos. - - Ejemplo: /timer 60 ha pasado un minuto + Muestra [mensaje] tras segundos. + + Example: /timer 60 ha pasado un minuto %netinfo -------------------------------------------------------- /netinfo [jugador] Muestra la información de red de [jugador]. - + Ejemplo: /netinfo nomad %addacct -------------------------------------------------------- /addacct - Crea una nueva cuenta con nombre con el password . - + Crea una nueva cuenta con el nombre con el . + Ejemplo: /addacct nomad password %chpass -------------------------------------------------------- /chpass [] - cambia el password de un jugador Cambia el password de [] por . - Si [] se deja vacia entonces cambia el password de su cuenta. - + Si [] está vacio, entonces se cambia el password de su cuenta. + Ejemplo: /chpass nomad password %quota @@ -328,38 +328,38 @@ %shutdown -------------------------------------------------------- /shutdown [duración] - Establece la secuencia de apagado en [duración] segundos o la cancela si se establece en cero. - + Establece la secuencia de apagado en [duración] segundos o la cancela si se introduce a cero. + Ejemplo: /shutdown 300 %lock lockacct -------------------------------------------------------- /lock [horas] [razón] (también se puede usar: /lockacct) - Bloquea la cuenta de y le previene de volverse a conectar. + Bloquea la cuenta de previnendole de que se conecte con tal cuenta. Establecer [horas] = 0 para banear permanentemente. - + Ejemplo: /lock nomad 0 ¡bye noob! %unlock unlockacct -------------------------------------------------------- /unlock (también se puede usar: /unlockacct) - Desbloquea la cuenta de permitiendole volverse a conectar. - + Desbloquea la cuenta de permitiendo poder volver a conectarse con ella. + Ejemplo: /unlock nomad %mute muteacct -------------------------------------------------------- /mute [horas] [razón] (también se puede usar: /muteacct) - Silencia la cuenta de y previene que hable en los canales. + Silencia la cuenta de previniendole de que pueda hablar en los canales. Establecer [horas] = 0 para silenciar permanentemente. - + Ejemplo: /mute nomad 6 ¡Basta con el spam! %unmute unmuteacct -------------------------------------------------------- /unmute (también se puede usar: /unmuteacct) - Devuelve la voz a la cuenta de y le permite volver a hablar en los canales. - + Devuelve la voz ala cuenta de permitiendole volver a hablar en los canales. + Ejemplo: /unmute nomad %friends f @@ -367,74 +367,74 @@ /friends [opciones] (también se puede usar: /f) -------------------------------------------------------- /friends add - Añade a su lista de amigos. + Añade a a su lista de amigos. /friends del - Elimina de su lista de amigos. + Elimina a de su lista de amigos. /friends promote - Asciende una línea arriba en su lista de amigos. + Asciende a una línea arriba en su lista de amigos. /friends demote - Desciende una línea abajo en su lista de amigos. + Desciende a una línea abajo en su lista de amigos. /friends list Muestra su lista de amigos. /friends online - Muestra su lista de amigos conectados actualmente. - /friends msg - Susurra a todos sus amigos conectados actualmente. + Muestra la lista de sus amigos online. + /friends msg + Susurra a todos sus amigos online. %mail -------------------------------------------------------- -/mail [options] +/mail [opciones] -------------------------------------------------------- - /mail s[end] - Sends mail to with . - /mail r[ead] [index] - Reads mail [index] + /mail s[end] + Envia mail a con . + /mail r[ead] [índice] + Leer mail [índice] /mail del[ete] {all|} Deletes mail or [all] mail. %flag -------------------------------------------------------- /flag - A debug tool for icon flags. + Una herramienta de depuración para iconos de estado. %tag -------------------------------------------------------- -/tag - A debug tool for client tags. +/tag + Una herramienta de depuración para etiquetas de clientes. %help -------------------------------------------------------- /help [comando] Muestra ayuda sobre [comando] - + Ejemplo: /help whisper %ipban -------------------------------------------------------- -/ipban [opción] [tiepo] +/ipban [opción] [tiempo] -------------------------------------------------------- /ipban l[ist] - Muestra una lista de las direcciones IP baneadas. + Muestra una lista de las direcciones IP baneadas /ipban c[heck] - Comprueba si la dirección está baneada o no. + Comprueba si la dirección IP ha sido baneada o no. /ipban d[el] - Elimina dirección IP o <índice> - /ipban a[dd] [tiempo] - Banea la dirección IP durante [tiempo] minutos. [tiempo] = 0 - ban permanente + Elimina la dirección IP o el <índice> + /ipban a[dd] [time] + Banea la dirección IP durante [tiempo] minutos. [tiempo] = 0 - ban permanente %set -------------------------------------------------------- -/set [value] - Sets or returns the value of for account . - Set [value] = null to erase value. - - Example: /set nomad BNET\auth\botlogin true - Example: /set nomad Record\SEXP\0_wins 999 +/set [valor] + Establece o retorna el valor de para la cuenta . + Establece [valor] = nulo para eliminar valor. + + Ejemplo: /set nomad BNET\auth\botlogin true + Ejemplo: /set nomad Record\SEXP\0_wins 999 %motd -------------------------------------------------------- /motd - Muestra el Mensaje del Dia. + Muestra el MOTD (Mensaje del Dia). %tos -------------------------------------------------------- @@ -444,174 +444,174 @@ %admin -------------------------------------------------------- /admin [+|-] - Promotes/demotes to/from server administrator. - + Asciende/Degrada a a ser /no ser administrador del servidor. + Ejemplo: /admin +nomad %rehash -------------------------------------------------------- -/rehash - Forces the server to reload specified config. Set "all" to reload all configs. - = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua +/rehash + Fuerza al servidor a recargar una config específica. Establecer "all" para recargar todas las configs. + = all | i18n | channels | realms | autoupdate | news | versioncheck | ipbans | helpfile | banners | tracker | commandgroups | aliasfile | transfile | tournament | icons | anongame | topiclist | lua %clan -------------------------------------------------------- -/clan [option] +/clan [opción] -------------------------------------------------------- - /clan create - Create a new clan (max length = 4; spaces are allowed in ) - + /clan create + Crea un nuevo clan (longitud max = 4; no se permiten espacios en ) + Commands for clan members: - /clan m[sg] (también se puede usar [w]hisper) - Whispers a message to all your fellow clan members - /clan inv[ite] - Invite to your clan. + /clan m[sg] (También se puede usar [w]hisper) + Susurra un mensaje a todos los compañeros del clan + /clan inv[ite] + Invita a a su clan /clan inv[ite] get - Show clanname which you have been invited + Muestra el nombre del clan al cual ha sido invitado /clan inv[ite] accept - Accept invitation to clan + Acepta invitación al clan /clan inv[ite] decline - Decline invitation to clan - -Commands for clan chieftain: - /clan motd - Update the clan's Message of the Day to . + Declina invitación al clan + +Comandos para jefe del clan: + /clan motd + Actualiza el Mensaje del Dia del clan a . /clan pub[lic] (también se puede usar: pub) - Opens the clan channel up to the public so that anyone may enter. + Abre el canal del clan al público para que cualquiera pueda entrar. /clan priv[ate] (también se puede usar: priv) - Closes the clan channel such that only members of the clan may enter. + Cierra el canal al público de manera que solamente miembros del clan pueden entrar. /clan dis[band] - Disband your clan. + Disuelve su clan. %ping p latency -------------------------------------------------------- /ping (también se puede usar: /p /latency) - Muestra el ping en el servidor. + Muestra su ping en el servidor. %command_groups cg -------------------------------------------------------- -/command_groups [groups] (alias: /cg) +/command_groups [grupos] (también se puede usar: /cg) -------------------------------------------------------- /cg list - Displays 's comando groups. - /cg add - Adds comando group(s) to . - /cg del - Deletes comando group(s) from . + Muestra los grupos de comandos de . + /cg add + Añade grupos de comandos al . + /cg del + Elimina grupos de comandos del . %operator -------------------------------------------------------- -/operator [+|-] (también se puede usar: /op) - Promotes/demotes to/from server operator. - +/operator [+|-] + Asciende/degrada a a ser/no ser operador del servidor. + Ejemplo: /operator +nomad %aop -------------------------------------------------------- /aop - Promotes to channel administrator. - + Asciende a a ser administrador del canal. + Ejemplo: /aop nomad %op -------------------------------------------------------- /op - Promotes to channel operator. - + Asciende a a ser operador del canal. + Ejemplo: /op nomad %deop -------------------------------------------------------- /deop - Demotes from channel administrator or operator. - + Degrada a a no ser operador o administrador del canal. + Ejemplo: /deop nomad %tmpop -------------------------------------------------------- /tmpop - Promotes to temporary channel operator. - + Asciende a operador del canal temporal. + Ejemplo: /tmpop %vop -------------------------------------------------------- /vop - Adds to the VOP list. - + Añade a a la lista VOP. + Ejemplo: /vop nomad %voice -------------------------------------------------------- /voice - Temporarily gives voice privileges to . - + Se dan privilegios de voz temporales a . + Ejemplo: /voice nomad %devoice -------------------------------------------------------- /devoice - Removes from the VOP list and removes temporary voice privileges. - + Elimina a de la lista VOP y elimina los privilegios de voz temporales. + Ejemplo: /devoice nomad %topic -------------------------------------------------------- -/topic [message] - Sets or displays current channel's topic. - - Ejemplo: /topic Supported is given in this channel...\n(some text on a new line) +/topic [mensaje] + Establece o muestra el tema del canal actual. + + Ejemplo: /topic En este canal se ofrece ayuda...\n(texto en una nueva línea) %moderate -------------------------------------------------------- /moderate - Toggles the current channel's moderated status. + Activa/desactiva el estado de la moderación del canal actual. %clearstats -------------------------------------------------------- -/clearstats - Clears 's statistics, where can be any valid client or ALL for all clients - Supported clients: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP - +/clearstats + Resetea las estadísitcas del para , donde puede ser cualquier cliente válido o ALL para todos. + Clientes soportados: DRTL|DSHR|W2BN|STAR|SEXP|SSHR|WAR3|W3XP + Ejemplo: /clearstats nomad SEXP %find -------------------------------------------------------- /find - Finds users with in their nombre de usuario. MUST be lowercase! + Encuentra usuarios con en su nombre de usuario. ¡ DEBE estar en minúsculas! %save -------------------------------------------------------- /save - Forces the server to save account and clan changes to the database. + Fuerza al servidor a guardar todos los cambios en cuentas y clanes a la base de datos. %icon -------------------------------------------------------- /icon [nombre] - Set custom icon for normal user. - Use /icon without [nombre] to display list of available icons in your stash. + Establece un icono personalizado para un usuario normal. + Usar /icon sin [nombre] para mostrar una lista de los iconos disponibles en su alijo. -------------------------------------------------------- -Syntax for operator/admin: +Sintaxis para operador/admin: /icon a[dd] - Add icon into user stash + Añadir icono al alijo del usuario /icon d[el] - Remove icon from user stash + Elimina icono del alijo del usuario /icon s[et] - Set custom icon to user without adding it in user stash + Establece el icono para el usuario sin añadirlo en su alijo /icon l[ist] - Display icons in user's stash + Muestra lista de los iconos en el alijo del usuario /icon l[ist] - Display availaible icons in server stash that can be assigned to users + Muestra los iconos disponibles en el alijo del servidor para asginar a los usuarios %quiz -------------------------------------------------------- -/quiz [option] +/quiz [opción] Trivia Quiz Game -------------------------------------------------------- /quiz start - Start game with given dictionary nombre in current channel + Comienza un juego con el nombre de diccionario introducido en el canal actual /quiz stop - Finish game by force + Finaliza el juego por la fuerza /quiz stats [nombreusuario] - Display record statistics for user + Muestra los records estadísticas del jugador /quiz stats - Display Top records + Muestra los Top Records From f245ac2690a87210a299d3d5b00720348a0be573 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 15:42:07 -0700 Subject: [PATCH 123/144] Update common.xml --- conf/i18n/esES/common.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/i18n/esES/common.xml b/conf/i18n/esES/common.xml index 106897edf..48b1fc495 100644 --- a/conf/i18n/esES/common.xml +++ b/conf/i18n/esES/common.xml @@ -1656,7 +1656,7 @@ {} {} está usando {} y {} actualmente dentro del canal "{}". - {} {} using {}./original> + {} {} using {}. {} {} está usando {}. From 08e893a76886638397c9531821bab2387682f689 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 15:45:16 -0700 Subject: [PATCH 124/144] Update common.xml --- conf/i18n/esES/common.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/i18n/esES/common.xml b/conf/i18n/esES/common.xml index 48b1fc495..c90898919 100644 --- a/conf/i18n/esES/common.xml +++ b/conf/i18n/esES/common.xml @@ -185,7 +185,7 @@ Currently accessible channels: - Canales actualmente accesibles: + Canales actualmente accesibles: All current channels: @@ -197,7 +197,7 @@ -----------name----------- users ----admin/operator---- - -----------nombre----------- usuarios ----admin/operador---- + -----------nombre----------- usuarios ----admin/operador---- Only admins may change passwords for other accounts. @@ -313,7 +313,7 @@ /clan invite &lt;username&gt; command. - el comando /clan invite &lt;username&gt; + el comando /clan invite &lt;username&gt; Invalid user. From 3276a9811da4a33836f784019ad5ed11da8a24e6 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 15:53:34 -0700 Subject: [PATCH 125/144] Update common.xml --- conf/i18n/esES/common.xml | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/conf/i18n/esES/common.xml b/conf/i18n/esES/common.xml index c90898919..9307a9f92 100644 --- a/conf/i18n/esES/common.xml +++ b/conf/i18n/esES/common.xml @@ -325,7 +325,7 @@ {}'s command group(s): {} - Comando de grupo(s) de {} + Comando de grupo(s) de {}: {} Got bad group: {} @@ -353,11 +353,11 @@ -class -tag -----name------ -lat(ms)- ----channel---- --game-- - -clase -etiqueta -----nombre------ -lat(ms)- ----canal---- --juego-- + -clase -etiqueta -----nombre------ -lat(ms)- ----canal---- --juego-- -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- - -#- -clase ----estado--- -etiqueta-----nombre------ -sesión-- -condición- -lat(ms)- ----canal---- --juego-- + -#- -clase ----estado--- -etiqueta-----nombre------ -sesión-- -condición- -lat(ms)- ----canal---- --juego-- -#- -class ----state--- -tag -----name------ -session-- -flag- -lat(ms)- ----channel---- --game-- ---------addr-------- @@ -401,7 +401,7 @@ {} has been demoted from a Channel Operator - [] ha sido degrado a no ser Operador del Canal + {} ha sido degrado a no ser Operador del Canal {} has demoted you from a Channel Operator of channel "{}" @@ -445,7 +445,7 @@ {} has removed you from VOP list of channel "{}" - [] le ha eliminado de la lista VOP del canal "{}" + {} le ha eliminado de la lista VOP del canal "{}" You must be at least Channel Admin to remove {} from the VOP list @@ -477,7 +477,7 @@ -- name -- similar to {} - -- nombre -- similar a {} + -- nombre -- similar a {} Invalid user. @@ -505,7 +505,7 @@ Rank: Grunt - Rango: Bruto + Rango: Bruto Rank: Peon @@ -757,7 +757,7 @@ ------name------ p -status- --------type--------- count - ------nombre------ p -estado- --------tipo--------- cuenta + ------nombre------ p -estado- --------tipo--------- cuenta ctag @@ -765,7 +765,7 @@ --------addr-------- - --------direc-------- + --------direc-------- Warning: That user is not online, using last known address. @@ -809,7 +809,7 @@ An admin has closed your connection and banned your IP address. - Un Admmin ha cerrado su conexión y baneado su dirección IP. + Un Admmin ha cerrado su conexión y baneado su dirección IP. Connection closed by admin. @@ -901,7 +901,7 @@ No motd. - No hay motd (mapa del dia) + No hay motd. Invalid user. @@ -1005,7 +1005,7 @@ {} is already a Server Operator - {} ya es un Operador del Servidor + {} ya es un Operador del Servidor {} has been promoted to a Server Operator @@ -1129,7 +1129,7 @@ Key set successfully for - Tecla establecida con éxito para + Tecla establecida con éxito para Invalid delay. @@ -1165,7 +1165,7 @@ Unable to determine client game. - No es posible determinar el cliente del juego + No es posible determinar el cliente del juego. This game does not support win/loss records. @@ -1213,7 +1213,7 @@ IronMan games: {}-{}-{} (rating {}) - Juegos IronMan: {}-{}-{} + Juegos IronMan: {}-{}-{} (puntuación {}) IronMan games: 0-0-0 @@ -1557,7 +1557,7 @@ Reset {}'s {} stats - Reiniciar los stats de {} en {} + Reiniciar los stats de {} en {} Reset {}'s {} stats @@ -1665,11 +1665,11 @@ {} away ({}) - {} ausente ({}) + {} ausente ({}) You are sending commands to {} too quickly and risk being disconnected for flooding. Please slow down. - Se están mandando comandos a {} demasiado rápido con el riesgo a ser desconectado por sobrecarga. Por favor introducir comandos más depspacio. + Se están mandando comandos a {} demasiado rápido con el riesgo a ser desconectado por sobrecarga. Por favor introducir comandos más depspacio. This command has been deactivated @@ -1741,7 +1741,7 @@ Invalid index. Please use /mail delete {&lt;index&gt;|all} where &lt;index&gt; is a number. - Índice no válido. Por favor usar /mail delete {&lt;index&gt;|all} donde &lt;index&gt; is un número. + Índice no válido. Por favor usar /mail delete {&lt;index&gt;|all} donde &lt;index&gt; es un número. Succesfully deleted message. @@ -1761,11 +1761,11 @@ Receiver has reached his mail quota. Your message will NOT be sent. - El destinatario ha alcanzado su cuota de correos. El mensaje NO será enviado. + El destinatario ha alcanzado su cuota de correos. El mensaje NO será enviado. Your mail has been sent successfully. - El correo ha sido enviado satisfactoriamente + El correo ha sido enviado satisfactoriamente. There was an error completing your request! From 7c3610be49ce1f939146df8b671f6f4246542f7b Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 16:06:24 -0700 Subject: [PATCH 126/144] Update w3motd.txt --- conf/i18n/esES/w3motd.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/i18n/esES/w3motd.txt b/conf/i18n/esES/w3motd.txt index a618452bf..d0e683b63 100644 --- a/conf/i18n/esES/w3motd.txt +++ b/conf/i18n/esES/w3motd.txt @@ -1,6 +1,6 @@ -|c00FF0000Welcome |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Version |c009999FF%v |c00FFFFFF +|c00FF0000Bienvenido |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Versión |c009999FF%v |c00FFFFFF -There are currently %U user(s) in %G games of %N, and %u user(s) playing %g games and chatting in %c channels. +Actualmente hay %U usuario(s) en %G partidas de %N, and %u user(s) playing %g games and chatting in %c channels. From b18fe0c569bcd825816c8e933494d8b93a2c0689 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 01:11:03 +0200 Subject: [PATCH 127/144] Update bnhelp.conf --- conf/i18n/esES/bnhelp.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/i18n/esES/bnhelp.conf b/conf/i18n/esES/bnhelp.conf index 295685fe3..f756a1150 100644 --- a/conf/i18n/esES/bnhelp.conf +++ b/conf/i18n/esES/bnhelp.conf @@ -216,9 +216,9 @@ %alert -------------------------------------------------------- /alert - Show MessageBox with to everyone. Use \n as a new line symbol. + Muestra MessageBox con para todos. Usar \n como símbolo para una nueva línea. - Example: /alert Hello\neveryone! + Example: /alert ¡Hola\na todos! %news -------------------------------------------------------- From 19e6ffc77cc5955df833e76769ae6fb484b12045 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 01:12:08 +0200 Subject: [PATCH 128/144] Update bnhelp.conf --- conf/i18n/esES/bnhelp.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/i18n/esES/bnhelp.conf b/conf/i18n/esES/bnhelp.conf index f756a1150..eab34158c 100644 --- a/conf/i18n/esES/bnhelp.conf +++ b/conf/i18n/esES/bnhelp.conf @@ -358,7 +358,7 @@ %unmute unmuteacct -------------------------------------------------------- /unmute (también se puede usar: /unmuteacct) - Devuelve la voz ala cuenta de permitiendole volver a hablar en los canales. + Devuelve la voz a la cuenta de permitiendole volver a hablar en los canales. Ejemplo: /unmute nomad From 87d39dab9551466d8568491ea9aa04e4fb493be6 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Thu, 10 Jul 2014 16:13:59 -0700 Subject: [PATCH 129/144] Update w3motd.txt --- conf/i18n/esES/w3motd.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/i18n/esES/w3motd.txt b/conf/i18n/esES/w3motd.txt index d0e683b63..05cf9c20c 100644 --- a/conf/i18n/esES/w3motd.txt +++ b/conf/i18n/esES/w3motd.txt @@ -1,6 +1,6 @@ |c00FF0000Bienvenido |c00FF9933to |c0000CCFFthe |c00FF66FF%s |c0000CC00Versión |c009999FF%v |c00FFFFFF -Actualmente hay %U usuario(s) en %G partidas de %N, and %u user(s) playing %g games and chatting in %c channels. +Actualmente hay %U usuario(s) en %G partidas de %N, y %u usuario(s) jugando %g partidas y chateando en %c canales. @@ -8,4 +8,4 @@ Actualmente hay %U usuario(s) en %G partidas de %N, and %u user(s) playing %g ga -This text invisible, because of limitation of 11 lines +Este texto es invisible, debido a limitación de 11 lineas. From 332744751457a62d3d86a27e660a57c8b647a135 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 01:14:16 +0200 Subject: [PATCH 130/144] Update bnhelp.conf --- conf/i18n/esES/bnhelp.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/i18n/esES/bnhelp.conf b/conf/i18n/esES/bnhelp.conf index eab34158c..d02bd98a8 100644 --- a/conf/i18n/esES/bnhelp.conf +++ b/conf/i18n/esES/bnhelp.conf @@ -592,15 +592,15 @@ Comandos para jefe del clan: -------------------------------------------------------- Sintaxis para operador/admin: /icon a[dd] - Añadir icono al alijo del usuario + Añadir icono a la reserva del usuario /icon d[el] - Elimina icono del alijo del usuario + Elimina icono de la reserva del usuario /icon s[et] - Establece el icono para el usuario sin añadirlo en su alijo + Establece el icono para el usuario sin añadirlo en su reserva /icon l[ist] - Muestra lista de los iconos en el alijo del usuario + Muestra lista de los iconos en la reserva del usuario /icon l[ist] - Muestra los iconos disponibles en el alijo del servidor para asginar a los usuarios + Muestra los iconos disponibles en la reserva del servidor para asginar a los usuarios %quiz -------------------------------------------------------- From 7af768fad3d500f04e7ae5000b4e3340f3356714 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 01:18:54 +0200 Subject: [PATCH 131/144] Update bnhelp.conf --- conf/i18n/esES/bnhelp.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/i18n/esES/bnhelp.conf b/conf/i18n/esES/bnhelp.conf index d02bd98a8..8f065069a 100644 --- a/conf/i18n/esES/bnhelp.conf +++ b/conf/i18n/esES/bnhelp.conf @@ -588,7 +588,7 @@ Comandos para jefe del clan: -------------------------------------------------------- /icon [nombre] Establece un icono personalizado para un usuario normal. - Usar /icon sin [nombre] para mostrar una lista de los iconos disponibles en su alijo. + Usar /icon sin [nombre] para mostrar una lista de los iconos disponibles en su reserva. -------------------------------------------------------- Sintaxis para operador/admin: /icon a[dd] From 5bdde32da7ff44e3c3b0bb1c22400df39b344df4 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 01:31:37 +0200 Subject: [PATCH 132/144] Update common.xml --- conf/i18n/esES/common.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/conf/i18n/esES/common.xml b/conf/i18n/esES/common.xml index 9307a9f92..2623484ea 100644 --- a/conf/i18n/esES/common.xml +++ b/conf/i18n/esES/common.xml @@ -325,7 +325,7 @@ {}'s command group(s): {} - Comando de grupo(s) de {}: {} + Grupo(s) de comandos de {}: {} Got bad group: {} @@ -333,7 +333,7 @@ Groups {} has been added to {} - Se ha añadio los grupos {} a {} + Se ha añadido los grupos {} a {} Groups {} has been deleted from {} @@ -1069,7 +1069,7 @@ Rehash of "{}" is complete! - + ¡Restablecimiento de etiqueta hash de "{}" completado! You are not in a channel. @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - + {} ya es OPtmp en este canal {} must be on the same channel to tempOP him @@ -1681,7 +1681,7 @@ Unknown command. - + Comando desconocido. This account has been locked @@ -1781,11 +1781,11 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - + El Quiz ya está en marcha en el canal "{}". Usar /quiz stop para forzar el apagado. Available Quiz dictionaries: - Diccionarios para Quiz dispnobiles: + Diccionarios para Quiz disponibles: Quiz is not running. @@ -1813,7 +1813,7 @@ User "{}" is offline - Usuario "{}" está offline + El usuario "{}" está offline From 6328a1ccedd4c6b2ca80779a8d83d9a7d6b12420 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 01:51:46 +0200 Subject: [PATCH 133/144] Update bnhelp.conf --- conf/i18n/esES/bnhelp.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/i18n/esES/bnhelp.conf b/conf/i18n/esES/bnhelp.conf index 8f065069a..84038721a 100644 --- a/conf/i18n/esES/bnhelp.conf +++ b/conf/i18n/esES/bnhelp.conf @@ -8,7 +8,7 @@ # # # Se pueden insertar comentarios al empezar una línea con #. # # Los comentarios se extienden hasta el final de la línea. # -# Las pestañas se reemplazan con 3 espacios. # +# Las tabulaciones se reemplazan con 3 espacios. # # Las líneas vacias se ignoran. # # # ############################################################################## From c72bfb8f4a55313919a8674709c6416923606ff2 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 01:52:36 +0200 Subject: [PATCH 134/144] Update bnhelp.conf --- conf/i18n/esES/bnhelp.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/i18n/esES/bnhelp.conf b/conf/i18n/esES/bnhelp.conf index 84038721a..3f50ab73f 100644 --- a/conf/i18n/esES/bnhelp.conf +++ b/conf/i18n/esES/bnhelp.conf @@ -216,7 +216,7 @@ %alert -------------------------------------------------------- /alert - Muestra MessageBox con para todos. Usar \n como símbolo para una nueva línea. + Muestra un cuadro de mensaje con para todos. Usar \n como símbolo para una nueva línea. Example: /alert ¡Hola\na todos! From 29ad92f76d253e989fdb2b0f3acf7f7e00a46e35 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 02:08:41 +0200 Subject: [PATCH 135/144] Update common.xml --- conf/i18n/esES/common.xml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/conf/i18n/esES/common.xml b/conf/i18n/esES/common.xml index 2623484ea..33020421e 100644 --- a/conf/i18n/esES/common.xml +++ b/conf/i18n/esES/common.xml @@ -3,7 +3,7 @@ Spanish - + @@ -101,7 +101,7 @@ \n\n***************************\nBy {} - + \n\n***************************\nBy {} Information from {} @@ -1261,19 +1261,19 @@ Users AT Team No. {} - + Usuarios en Equipo AT No. {} Users AT TEAM Level: {}, Experience: {} - + Usuarios Equipo AT Nivel: {}, Experiencia: {} AT TEAM Ladder Record: {}-{}-0 - + Record en Ladder Equipo AT: {}-{}-0 AT TEAM Rank: {} - + Equipo AT Rango: {} There are currently {} user(s) in {} games of {} @@ -1637,27 +1637,27 @@ You - + Usted are - + está is - + está {} {} using {} and {} currently in {} game "{}". - {} {} está usando {} y {} actualmente dentro de {} juego "{}". + {} {} usando {} y {} actualmente dentro de {} juego "{}". {} {} using {} and {} currently in channel "{}". - {} {} está usando {} y {} actualmente dentro del canal "{}". + {} {} usando {} y {} actualmente dentro del canal "{}". {} {} using {}. - {} {} está usando {}. + {} {} usando {}. {} {} refusing messages ({}) From 609c26d8c517af2ab3d9158189602cd692934e80 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 02:09:10 +0200 Subject: [PATCH 136/144] Update common.xml --- conf/i18n/esES/common.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/i18n/esES/common.xml b/conf/i18n/esES/common.xml index 33020421e..26989420f 100644 --- a/conf/i18n/esES/common.xml +++ b/conf/i18n/esES/common.xml @@ -33,7 +33,7 @@ you are now tempOP for this channel - ahora eres OPtempo para este canal + ahora eres OPtemp para este canal Account name contains some invalid symbol! From 75cada298611df5734b89b8d2aee019f09346923 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 02:15:03 +0200 Subject: [PATCH 137/144] Update common.xml --- conf/i18n/esES/common.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/i18n/esES/common.xml b/conf/i18n/esES/common.xml index 26989420f..abf391c3b 100644 --- a/conf/i18n/esES/common.xml +++ b/conf/i18n/esES/common.xml @@ -97,7 +97,7 @@ Your game client doesn't support MessageBox. - El cliente no es compatible con MessageBox. + El cliente no es compatible con cuadros de mensaje. \n\n***************************\nBy {} From 3a6b82f7d4848d27e39cedff952abdb57bc2a374 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 02:15:31 +0200 Subject: [PATCH 138/144] Update common.xml --- conf/i18n/esES/common.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/i18n/esES/common.xml b/conf/i18n/esES/common.xml index abf391c3b..786bec4d8 100644 --- a/conf/i18n/esES/common.xml +++ b/conf/i18n/esES/common.xml @@ -3,7 +3,7 @@ Spanish - + From 7be4c302295e366f2fdf0722b9540abe98f4a7af Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 11 Jul 2014 16:16:57 +0400 Subject: [PATCH 139/144] missing localized strings --- src/bnetd/channel.cpp | 2 +- src/bnetd/command.cpp | 2 +- src/bnetd/connection.cpp | 2 +- src/bnetd/helpfile.cpp | 4 ++-- src/bnetd/icons.cpp | 36 ++++++++++++++++++------------------ src/bnetd/ipban.cpp | 26 +++++++++++++------------- src/bnetd/mail.cpp | 6 +++--- 7 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/bnetd/channel.cpp b/src/bnetd/channel.cpp index d8caa4722..b75fb6ec8 100644 --- a/src/bnetd/channel.cpp +++ b/src/bnetd/channel.cpp @@ -762,7 +762,7 @@ namespace pvpgn if ((conn_get_wol(me) == 0)) { if (!heard && (type == message_type_talk || type == message_type_emote)) - message_send_text(me, message_type_info, me, localize(c, "No one hears you.")); + message_send_text(me, message_type_info, me, localize(me, "No one hears you.")); } #ifdef WITH_LUA diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 12f15d750..5aa6c534c 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -3921,7 +3921,7 @@ namespace pvpgn { if (!(clienttag = conn_get_clienttag(c))) { - message_send_text(c, message_type_error, c, "Unable to determine client game."); + message_send_text(c, message_type_error, c, localize(c, "Unable to determine client game.")); return 0; } } diff --git a/src/bnetd/connection.cpp b/src/bnetd/connection.cpp index 65cdca13a..4dd5c4b55 100644 --- a/src/bnetd/connection.cpp +++ b/src/bnetd/connection.cpp @@ -1948,7 +1948,7 @@ namespace pvpgn t_clan * ch_clan; if ((ch_clan = clanlist_find_clan_by_clantag(clantag)) && (clan_get_channel_type(ch_clan) == 1)) { - message_send_text(c, message_type_error, c, "This is a private clan channel, unable to join!"); + message_send_text(c, message_type_error, c, localize(c, "This is a private clan channel, unable to join!")); return 0; } } diff --git a/src/bnetd/helpfile.cpp b/src/bnetd/helpfile.cpp index 14a36afd1..e86b8bb85 100644 --- a/src/bnetd/helpfile.cpp +++ b/src/bnetd/helpfile.cpp @@ -142,7 +142,7 @@ namespace pvpgn char * line; int i; - message_send_text(c, message_type_info, c, "Chat commands:"); + message_send_text(c, message_type_info, c, localize(c, "Chat commands : ")); std::rewind(hfd); while ((line = file_get_line(hfd)) != NULL) { @@ -259,7 +259,7 @@ namespace pvpgn file_get_line(NULL); // clear file_get_line buffer /* no description was found for this command. inform the user */ - message_send_text(c, message_type_error, c, "No help available for that command"); + message_send_text(c, message_type_error, c, localize(c, "No help available for that command")); return -1; } diff --git a/src/bnetd/icons.cpp b/src/bnetd/icons.cpp index 690152c1f..c19ed758b 100644 --- a/src/bnetd/icons.cpp +++ b/src/bnetd/icons.cpp @@ -83,7 +83,7 @@ namespace pvpgn int count = 1; // 1 icon in stash ("default" icon) bool is_selected = false; - char msgtemp[MAX_MESSAGE_LEN]; + std::string msgtemp; if (!(conn_get_channel(c))) { message_send_text(c, message_type_error, c, localize(c, "This command can only be used inside a channel.")); @@ -164,7 +164,7 @@ namespace pvpgn // unset value if (strcasecmp(iconname, "default") == 0) { - snprintf(msgtemp, sizeof(msgtemp), "Set default icon.", clienttag_get_title(clienttag)); + msgtemp = localize(c, "Set default icon."); usericon = NULL; } // set usericon (reversed) @@ -182,7 +182,7 @@ namespace pvpgn message_send_text(c, message_type_error, c, localize(c, "Bad icon.")); return -1; } - snprintf(msgtemp, sizeof(msgtemp), "Set new icon is succeed.", account_get_name(account)); + msgtemp = localize(c, "Set new icon is succeed."); usericon = strreverse((char*)iconcode); } account_set_user_icon(account, clienttag, usericon); @@ -198,12 +198,12 @@ namespace pvpgn } // display icon list in user stash - snprintf(msgtemp, sizeof(msgtemp), "You have %u icons in stash:", count); + msgtemp = localize(c, "You have {} icons in stash:", count); message_send_text(c, message_type_info, c, msgtemp); output_icons = ((is_selected || usericon) ? "default" : "[default]") + std::string((count > 1) ? ", " : "") + output_icons; - snprintf(msgtemp, sizeof(msgtemp), " %s", output_icons.c_str()); + msgtemp = " " + output_icons; message_send_text(c, message_type_info, c, msgtemp); return 0; @@ -224,9 +224,9 @@ namespace pvpgn // subcommand = list if (subcommand[0] == 'l' && username[0] == '\0') { - message_send_text(c, message_type_info, c, "Available icons in server stash:"); + message_send_text(c, message_type_info, c, localize(c, "Available icons in server stash:")); std::string output_icons = customicons_stash_get_list(clienttag, true); - snprintf(msgtemp, sizeof(msgtemp), " %s", output_icons.c_str()); + msgtemp = " " + output_icons; message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -235,7 +235,7 @@ namespace pvpgn // find user account if (!(account = accountlist_find_account(username))) { - message_send_text(c, message_type_error, c, "Invalid user."); + message_send_text(c, message_type_error, c, localize(c, "Invalid user.")); return 0; } user_c = account_get_conn(account); @@ -254,7 +254,7 @@ namespace pvpgn // unset value if (strcasecmp(iconname, "default") == 0) { - snprintf(msgtemp, sizeof(msgtemp), "Set default icon for %.64s", account_get_name(account)); + msgtemp = localize(c, "Set default icon for {}", account_get_name(account)); usericon = NULL; } // set usericon (reversed) @@ -263,10 +263,10 @@ namespace pvpgn // find icon in server stash if (!(iconcode = customicons_stash_find(clienttag, iconname))) { - message_send_text(c, message_type_error, c, "That icon doesn't exist in server stash."); + message_send_text(c, message_type_error, c, localize(c, "That icon doesn't exist in server stash.")); return -1; } - snprintf(msgtemp, sizeof(msgtemp), "Set new icon is succeed for %.64s", account_get_name(account)); + msgtemp = localize(c, "Set new icon is succeed for {}", account_get_name(account)); usericon = strreverse((char*)iconcode); } account_set_user_icon(account, clienttag, usericon); @@ -323,12 +323,12 @@ namespace pvpgn } // display icon list in user stash - snprintf(msgtemp, sizeof(msgtemp), "%.64s has %u icons in stash:", account_get_name(account), count); + msgtemp = localize(c, "{} has {} icons in stash : ", account_get_name(account), count); message_send_text(c, message_type_info, c, msgtemp); output_icons = ((is_selected || usericon) ? "default" : "[default]") + std::string((count > 1) ? ", " : "") + output_icons; - snprintf(msgtemp, sizeof(msgtemp), " %s", output_icons.c_str()); + msgtemp = " " + output_icons; message_send_text(c, message_type_info, c, msgtemp); @@ -345,7 +345,7 @@ namespace pvpgn // find icon in server stash if (!(iconcode = customicons_stash_find(clienttag, iconname))) { - message_send_text(c, message_type_error, c, "That icon doesn't exist in server stash."); + message_send_text(c, message_type_error, c, localize(c, "That icon doesn't exist in server stash.")); return -1; } @@ -366,7 +366,7 @@ namespace pvpgn if (strcasecmp(_icon.c_str(), iconcode) == 0) { - message_send_text(c, message_type_error, c, "User already has that icon in stash."); + message_send_text(c, message_type_error, c, localize(c, "User already has that icon in stash.")); return 0; } } while (iss); @@ -379,7 +379,7 @@ namespace pvpgn // save stash account_set_user_iconstash(account, clienttag, output_icons.c_str()); - snprintf(msgtemp, sizeof(msgtemp), "Add new icon to %.64s's stash.", account_get_name(account)); + msgtemp = localize(c, "Add new icon to {}'s stash.", account_get_name(account)); message_send_text(c, message_type_info, c, msgtemp); return 0; @@ -429,13 +429,13 @@ namespace pvpgn } if (!is_found) { - message_send_text(c, message_type_error, c, "That icon doesn't exist in user stash."); + message_send_text(c, message_type_error, c, localize(c, "That icon doesn't exist in user stash.")); return -1; } // save stash account_set_user_iconstash(account, clienttag, output_icons.c_str()); - snprintf(msgtemp, sizeof(msgtemp), "Delete icon from %.64s's stash.", account_get_name(account)); + msgtemp = localize(c, "Delete icon from {}'s stash.", account_get_name(account)); message_send_text(c, message_type_info, c, msgtemp); return 0; diff --git a/src/bnetd/ipban.cpp b/src/bnetd/ipban.cpp index 5c69b43be..689325ae2 100644 --- a/src/bnetd/ipban.cpp +++ b/src/bnetd/ipban.cpp @@ -400,7 +400,7 @@ namespace pvpgn if (!(entry = ipban_str_to_ipban_entry(cp))) { if (c) - message_send_text(c, message_type_error, c, "Bad IP."); + message_send_text(c, message_type_error, c, localize(c, "Bad IP.")); eventlog(eventlog_level_error, __FUNCTION__, "could not convert to t_ipban_entry: \"%s\"", cp); return -1; } @@ -571,7 +571,7 @@ namespace pvpgn { if (!(to_delete = ipban_str_to_ipban_entry(cp))) { - message_send_text(c, message_type_error, c, "Illegal IP entry."); + message_send_text(c, message_type_error, c, localize(c, "Illegal IP entry.")); return -1; } LIST_TRAVERSE(ipbanlist_head, curr) @@ -595,7 +595,7 @@ namespace pvpgn ipban_unload_entry(to_delete); if (counter == 0) { - message_send_text(c, message_type_error, c, "No matching entry."); + message_send_text(c, message_type_error, c, localize(c, "No matching entry.")); return -1; } else @@ -612,7 +612,7 @@ namespace pvpgn to_delete_nmbr = std::atoi(cp); if (to_delete_nmbr <= 0) { - message_send_text(c, message_type_error, c, "Wrong entry number."); + message_send_text(c, message_type_error, c, localize(c, "Wrong entry number.")); return -1; } LIST_TRAVERSE(ipbanlist_head, curr) @@ -630,7 +630,7 @@ namespace pvpgn else { ipban_unload_entry(entry); - message_send_text(c, message_type_info, c, "Entry deleted."); + message_send_text(c, message_type_info, c, localize(c, "Entry deleted.")); } } } @@ -656,7 +656,7 @@ namespace pvpgn char * ipstr; counter = 0; - message_send_text(c, message_type_info, c, "Banned IPs:"); + message_send_text(c, message_type_info, c, localize(c, "Banned IPs:")); LIST_TRAVERSE_CONST(ipbanlist_head, curr) { entry = (t_ipban_entry*)elem_get_data(curr); @@ -667,7 +667,7 @@ namespace pvpgn } counter++; if (entry->endtime == 0) - std::sprintf(timestr, "(perm)"); + std::sprintf(timestr, localize(c, "(perm)").c_str()); else std::sprintf(timestr, "(%.48s)", seconds_to_timestr(entry->endtime - now)); @@ -682,7 +682,7 @@ namespace pvpgn } if (counter == 0) - message_send_text(c, message_type_info, c, "none"); + message_send_text(c, message_type_info, c, localize(c, "none")); return 0; } @@ -690,20 +690,20 @@ namespace pvpgn static int ipban_func_check(t_connection * c, char const * cp) { int res; - char entry[MAX_MESSAGE_LEN]; + std::string msgtemp; res = ipbanlist_check(cp); switch (res) { case 0: - message_send_text(c, message_type_info, c, "IP not banned."); + message_send_text(c, message_type_info, c, localize(c, "IP not banned.")); break; case -1: - message_send_text(c, message_type_error, c, "Error occured."); + message_send_text(c, message_type_error, c, localize(c, "Error occured.")); break; default: - std::sprintf(entry, "IP banned by rule #%i.", res); - message_send_text(c, message_type_info, c, entry); + msgtemp = localize(c, "IP banned by rule #{}.", res); + message_send_text(c, message_type_info, c, msgtemp); } return 0; diff --git a/src/bnetd/mail.cpp b/src/bnetd/mail.cpp index e91c41918..943790f91 100644 --- a/src/bnetd/mail.cpp +++ b/src/bnetd/mail.cpp @@ -379,7 +379,7 @@ namespace pvpgn std::ostringstream ostr; ostr << "You have " << mbox.size() << " messages. Your mail quote is set to " << get_mail_quota(user) << '.'; message_send_text(c, message_type_info, c, ostr.str().c_str()); - message_send_text(c, message_type_info, c, "ID Sender Date"); + message_send_text(c, message_type_info, c, localize(c, "ID Sender Date")); message_send_text(c, message_type_info, c, "-------------------------------------"); for (MailList::const_iterator it(mlist.begin()); it != mlist.end(); ++it) { @@ -392,11 +392,11 @@ namespace pvpgn message_send_text(c, message_type_info, c, ostr.str().c_str()); } - message_send_text(c, message_type_info, c, "Use /mail read to read the content of any message"); + message_send_text(c, message_type_info, c, localize(c, "Use /mail read to read the content of any message")); } else { /* user wants to read a message */ if (std::find_if(token.begin(), token.end(), NonNumericChar) != token.end()) { - message_send_text(c, message_type_error, c, "Invalid index. Please use /mail read where is a number."); + message_send_text(c, message_type_error, c, localize(c, "Invalid index. Please use /mail read where is a number.")); return; } From 095b94a538591acdfe13414d7776460692ce9cce Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 11 Jul 2014 18:40:02 +0400 Subject: [PATCH 140/144] update scripts for localization --- scripts/localize/pvpgn_localize_generator.cs | 3 +-- scripts/localize/pvpgn_localize_generator.exe | Bin 12800 -> 12800 bytes scripts/localize/update.bat | 25 +++++++++--------- scripts/localize/validate.bat | 23 ++++++++-------- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/scripts/localize/pvpgn_localize_generator.cs b/scripts/localize/pvpgn_localize_generator.cs index 8d5507604..bdaafa6aa 100644 --- a/scripts/localize/pvpgn_localize_generator.cs +++ b/scripts/localize/pvpgn_localize_generator.cs @@ -142,7 +142,6 @@ private static void parse_file(string filepath) { // reference to exist translation RefId = (reference != null) ? reference.Id : null, - InnerText = (reference != null) ? null : " ", } }); // insert example author @@ -366,7 +365,7 @@ public class TranslateItem [XmlAttribute("refid")] public string RefId; [XmlText] - public string InnerText; // default value is " " to save empty values when updating xml file + public string InnerText; } } diff --git a/scripts/localize/pvpgn_localize_generator.exe b/scripts/localize/pvpgn_localize_generator.exe index 33107d763d6d897547ad79fbbef326b639856e1c..e3fd30dfd84e73ec32d54e50a12bed355fd381ab 100644 GIT binary patch delta 1005 zcmY+DeMnPL6u{4Y?zs=Qx%s)d`Q4mOjVWoR76#@AL}pVnA}BG0vSue031urN%pe*U zr2Y{x!34?R{h<(K5QIdGl#mF5h>8j_k|>bK&U<%MKDh7ve&?S1?t7ef!(HL7nYm~?Z__p(dB47cMR`>3tXiSUHTQr*9=Q+mCqY18SpiuCzPgx-pP0emTS?8HCoKTMlHIqU5jq))M6%{ z)?ya+X))V~Ljp`VDj)%G2{7Z701M6vu;PM%L|hVJ3*m|&JH8ZuTKqjUL$U>7tP&T@`E8&VchjiFN z{glwhXA^pyH8MbcTL31~0I1K9-_X`nNAbQ=X8s}-_juIKM&K!wLL3Yh2zyPYgN2xV zB9kGBHzn>2J)=HRy~AQ?k&KW*{~y3rhmKW(5q1ePl(D^JwK1z^4P;IKRhpnXHrL5I z!34pW1z9)QV9bWtSxA6z%tqJ%*)^X~Z9_9mZ?U;8Hm?-fDr`z;PMT!fh>R{2^+%hh z$6FWQ|Ga!s8Ogh=E2UEyP+wo7;ili(PY2FVpLaM=7nn)C_hZkvz4pOl#lD!) ziMx^W$?QpFq|V+_0Z<3j4gkECc~h>-0$?T2F9-1PbSa-VupIWBpJL&(0V-Bo6?F+@ zm|O=?p9H|jsq6W(oFZkHG%2wF&yuUy3~!Uyvk^Wd`&kbkm&ff+U4a3!W1u~cxw;eh z6@6)npR79;K<6}IP-Tb4p#Xpx8~HDN2J7S=L$TMnw7l%6owoYuLv1JZ+qCUJ-ejl` zOwiQae40~oneviTPH0F7m8fe>sUsVS^21Kqme;9{iIE9DZ%AR&+-5xL|3p=&E)vS2 zQU^#lqh@ATW){`VZ+^>ID1nYo8(+}eAybeMo3g@*I%pr%doZX)FP3UC5v#SBgpFGC z;Xy4XW1ALJ@VFLJP1q~Ij28r0@R|TC4hyj1Jpp!nEFc!g1USMtCCG^%1jOMt0c-Gw z02fZv5eD_C@i;FsZd??QfPVyda7lm{b+T5Rh(-ZPXcyqaI04D%5s-prpP*Ds;|9xF z>sr!o8{MUZh5V|e)mth9WY*Te4L1PYF=STOZZD&FUrDykNqN0l#1Mg(PyjK|pDpYo znGVLH_MJ?IY#xZ+5dKW}MD-q Date: Fri, 11 Jul 2014 18:40:41 +0400 Subject: [PATCH 141/144] missing localize strings, update common.xml --- conf/i18n/common.xml | 252 +++++++++++++++++++++++++++++++++++++++ src/bnetd/channel.cpp | 2 +- src/bnetd/connection.cpp | 18 +-- 3 files changed, 262 insertions(+), 10 deletions(-) diff --git a/conf/i18n/common.xml b/conf/i18n/common.xml index 19d5716c7..456e46b21 100644 --- a/conf/i18n/common.xml +++ b/conf/i18n/common.xml @@ -35,6 +35,18 @@ you are now tempOP for this channel + + You can't talk on the channel. Your account has been muted + + + + This channel is moderated + + + + No one hears you. + + Account name contains some invalid symbol! @@ -735,6 +747,14 @@ Description: {} + + public + + + + private + + Currently accessible games: @@ -851,6 +871,10 @@ Example: /ladderinfo 1 STAR + + Unable to determine client game. + + Invalid user. @@ -1567,6 +1591,70 @@ Reset {}'s {} stats + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Yes + + + + No + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + You cannot kick administrators. @@ -1683,6 +1771,46 @@ Unknown command. + + Your line length quota has been exceeded! + + + + Your message quota has been exceeded! + + + + This is a private clan channel, unable to join! + + + + You are banned from that channel. + + + + That channel is for Admins/Operators only. + + + + The channel is currently full. + + + + This channel does not have chat privileges. + + + + This channel is moderated. + + + + Created ladder game + + + + Joined ladder game + + This account has been locked @@ -1691,10 +1819,26 @@ This account has been locked + + No help available for that command + + Oops ! There is a problem with the help file. Please contact the administrator of the server. + + Chat commands : + + + + Bad language code. + + + + Set your language to {} + + This command can only be used inside a channel. @@ -1707,6 +1851,98 @@ Bad icon. + + Set default icon. + + + + Set new icon is succeed. + + + + You have {} icons in stash: + + + + Available icons in server stash: + + + + Invalid user. + + + + Set default icon for {} + + + + That icon doesn't exist in server stash. + + + + Set new icon is succeed for {} + + + + {} has {} icons in stash : + + + + User already has that icon in stash. + + + + Add new icon to {}'s stash. + + + + That icon doesn't exist in user stash. + + + + Delete icon from {}'s stash. + + + + IP not banned. + + + + Error occured. + + + + IP banned by rule #{}. + + + + Illegal IP entry. + + + + No matching entry. + + + + Wrong entry number. + + + + Entry deleted. + + + + Banned IPs: + + + + (perm) + + + + none + + {} banned permamently by {}. @@ -1723,6 +1959,10 @@ {} banned for {}. + + Bad IP. + + Banning only for: {} minutes. @@ -1755,6 +1995,18 @@ There was an error completing your request. + + ID Sender Date + + + + Use /mail read &lt;ID&gt; to read the content of any message + + + + Invalid index. Please use /mail read &lt;index&gt; where &lt;index&gt; is a number. + + Receiver UNKNOWN! diff --git a/src/bnetd/channel.cpp b/src/bnetd/channel.cpp index b75fb6ec8..300cf1e8e 100644 --- a/src/bnetd/channel.cpp +++ b/src/bnetd/channel.cpp @@ -699,7 +699,7 @@ namespace pvpgn if (!((account_is_operator_or_admin(acc, channel_get_name(channel))) || (channel_conn_has_tmpVOICE(channel, me)) || (account_get_auth_voice(acc, channel_get_name(channel)) == 1))) { - message_send_text(me, message_type_error, me, "This channel is moderated"); + message_send_text(me, message_type_error, me, localize(c, "This channel is moderated")); return; } } diff --git a/src/bnetd/connection.cpp b/src/bnetd/connection.cpp index 4dd5c4b55..66e6ac285 100644 --- a/src/bnetd/connection.cpp +++ b/src/bnetd/connection.cpp @@ -1969,7 +1969,7 @@ namespace pvpgn { if (channel_check_banning(channel, c)) { - message_send_text(c, message_type_error, c, "You are banned from that channel."); + message_send_text(c, message_type_error, c, localize(c, "You are banned from that channel.")); return -1; } @@ -1977,7 +1977,7 @@ namespace pvpgn (account_get_auth_operator(acc, NULL) != 1) && (account_get_auth_operator(acc, channelname) != 1) && (channel_get_max(channel) == 0)) { - message_send_text(c, message_type_error, c, "That channel is for Admins/Operators only."); + message_send_text(c, message_type_error, c, localize(c, "That channel is for Admins/Operators only.")); return -1; } @@ -1985,7 +1985,7 @@ namespace pvpgn (account_get_auth_operator(acc, NULL) != 1) && (account_get_auth_operator(acc, channelname) != 1) && (channel_get_max(channel) != -1) && (channel_get_curr(channel) >= channel_get_max(channel))) { - message_send_text(c, message_type_error, c, "The channel is currently full."); + message_send_text(c, message_type_error, c, localize(c, "The channel is currently full.")); return -1; } } @@ -2033,7 +2033,7 @@ namespace pvpgn conn_send_welcome(c); if (c->protocol.chat.channel && (channel_get_flags(c->protocol.chat.channel) & channel_flags_thevoid)) - message_send_text(c, message_type_info, c, "This channel does not have chat privileges."); + message_send_text(c, message_type_info, c, localize(c, "This channel does not have chat privileges.")); if (clantag && clan && (clan_get_clantag(clan) == clantag)) { char msgtemp[MAX_MESSAGE_LEN]; @@ -2048,7 +2048,7 @@ namespace pvpgn } if (c->protocol.chat.channel && (channel_get_flags(c->protocol.chat.channel) & channel_flags_moderated)) - message_send_text(c, message_type_error, c, "This channel is moderated."); + message_send_text(c, message_type_error, c, localize(c, "This channel is moderated.")); if (c->protocol.chat.channel != oldchannel) clanmember_on_change_status_by_connection(c); @@ -2178,9 +2178,9 @@ namespace pvpgn if (game_is_ladder(c->protocol.game)) { if (c == game_get_owner(c->protocol.game)) - message_send_text(c, message_type_info, c, "Created ladder game"); + message_send_text(c, message_type_info, c, localize(c, "Created ladder game")); else - message_send_text(c, message_type_info, c, "Joined ladder game"); + message_send_text(c, message_type_info, c, localize(c, "Joined ladder game")); } } } @@ -3106,7 +3106,7 @@ namespace pvpgn if (std::strlen(text) > prefs_get_quota_maxline()) { - message_send_text(con, message_type_error, con, "Your line length quota has been exceeded!"); + message_send_text(con, message_type_error, con, localize(c, "Your line length quota has been exceeded!")); return 1; } @@ -3139,7 +3139,7 @@ namespace pvpgn if (con->protocol.chat.quota.totcount >= prefs_get_quota_lines()) { - message_send_text(con, message_type_error, con, "Your message quota has been exceeded!"); + message_send_text(con, message_type_error, con, localize(c, "Your message quota has been exceeded!")); if (con->protocol.chat.quota.totcount >= prefs_get_quota_dobae()) { /* kick out the dobae user for violation of the quota rule */ From 5d5cef9f40b761c3e47b7470d7f6cbe0cb66f5c4 Mon Sep 17 00:00:00 2001 From: plisskenwat Date: Fri, 11 Jul 2014 12:19:25 -0700 Subject: [PATCH 142/144] Update common.xml --- conf/i18n/esES/common.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/conf/i18n/esES/common.xml b/conf/i18n/esES/common.xml index 786bec4d8..a7d85ac93 100644 --- a/conf/i18n/esES/common.xml +++ b/conf/i18n/esES/common.xml @@ -325,7 +325,7 @@ {}'s command group(s): {} - Grupo(s) de comandos de {}: {} + Grupo(s) de comandos de {}: {} Got bad group: {} @@ -1069,7 +1069,7 @@ Rehash of "{}" is complete! - ¡Restablecimiento de etiqueta hash de "{}" completado! + ¡Restablecimiento de etiqueta hash de "{}" completado! You are not in a channel. @@ -1261,19 +1261,19 @@ Users AT Team No. {} - Usuarios en Equipo AT No. {} + Usuarios en Equipo AT No. {} Users AT TEAM Level: {}, Experience: {} - Usuarios Equipo AT Nivel: {}, Experiencia: {} + Usuarios Equipo AT Nivel: {}, Experiencia: {} AT TEAM Ladder Record: {}-{}-0 - Record en Ladder Equipo AT: {}-{}-0 + Record en Ladder Equipo AT: {}-{}-0 AT TEAM Rank: {} - Equipo AT Rango: {} + Equipo AT Rango: {} There are currently {} user(s) in {} games of {} @@ -1329,7 +1329,7 @@ {} has already tmpOP in this channel - {} ya es OPtmp en este canal + {} ya es OPtmp en este canal {} must be on the same channel to tempOP him @@ -1681,7 +1681,7 @@ Unknown command. - Comando desconocido. + Comando desconocido. This account has been locked @@ -1693,7 +1693,7 @@ Oops ! There is a problem with the help file. Please contact the administrator of the server. - ¡Ups! Hay un problema con el archivo de ayuda. Por favor contactar con el administrador del servidor. + ¡Ups! Hay un problema con el archivo de ayuda. Por favor contactar con el administrador del servidor. This command can only be used inside a channel. @@ -1781,7 +1781,7 @@ Quiz has already ran in channel "{}". Use /quiz stop to force finish. - El Quiz ya está en marcha en el canal "{}". Usar /quiz stop para forzar el apagado. + El Quiz ya está en marcha en el canal "{}". Usar /quiz stop para forzar el apagado. Available Quiz dictionaries: From 82c8f0a1c6e5e52c7fd7172c2be84fda1d636e83 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Fri, 11 Jul 2014 23:46:09 +0400 Subject: [PATCH 143/144] Update translations --- conf/i18n/bgBG/bnmotd.txt | 1 + conf/i18n/bnmotd.txt | 1 + conf/i18n/csCZ/bnmotd.txt | 1 + conf/i18n/deDE/bnmotd.txt | 1 + conf/i18n/esES/bnhelp.conf | 5 + conf/i18n/esES/bnmotd.txt | 1 + conf/i18n/esES/common.xml | 258 ++++++++++++++++++++++++++++++++++++- conf/i18n/frFR/bnmotd.txt | 1 + conf/i18n/itIT/bnmotd.txt | 1 + conf/i18n/jpJA/bnmotd.txt | 1 + conf/i18n/koKR/bnmotd.txt | 1 + conf/i18n/nlNL/bnmotd.txt | 1 + conf/i18n/plPL/bnmotd.txt | 1 + conf/i18n/ptBR/bnmotd.txt | 1 + conf/i18n/ruRU/bnmotd.txt | 1 + conf/i18n/svSE/bnmotd.txt | 1 + conf/i18n/zhCN/bnmotd.txt | 1 + conf/i18n/zhTW/bnmotd.txt | 1 + 18 files changed, 278 insertions(+), 1 deletion(-) diff --git a/conf/i18n/bgBG/bnmotd.txt b/conf/i18n/bgBG/bnmotd.txt index 722508d6d..6d00f1c52 100644 --- a/conf/i18n/bgBG/bnmotd.txt +++ b/conf/i18n/bgBG/bnmotd.txt @@ -7,5 +7,6 @@ %Iи общо %u потребители играещи общо %g игри и разговарящи в общо %c канала. %IИмате проблем с команда? Въведете /help за да %Iнаучите повече за нея. +%IType /language to switch translation. %I %I%m \ No newline at end of file diff --git a/conf/i18n/bnmotd.txt b/conf/i18n/bnmotd.txt index b02f52fe0..7974e7afa 100644 --- a/conf/i18n/bnmotd.txt +++ b/conf/i18n/bnmotd.txt @@ -7,5 +7,6 @@ %Iand %u users playing %g games and chatting in %c channels. %IHaving trouble with a command? Type /help to %Ilearn more about it. +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/csCZ/bnmotd.txt b/conf/i18n/csCZ/bnmotd.txt index c34858db7..ac7258531 100644 --- a/conf/i18n/csCZ/bnmotd.txt +++ b/conf/i18n/csCZ/bnmotd.txt @@ -8,5 +8,6 @@ %INevis si rady ? Napis /help pro napovedu. %I %ITvoje IP adresa: %r, tvoje ID %i a tvuj klient %t. +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/deDE/bnmotd.txt b/conf/i18n/deDE/bnmotd.txt index b67a60a47..3bcbe923b 100644 --- a/conf/i18n/deDE/bnmotd.txt +++ b/conf/i18n/deDE/bnmotd.txt @@ -7,5 +7,6 @@ %Iund %u Spieler spielen %g Spiele und chatten in %c Channels. %IEin Problem mit den Kommandos? Schreibe /help und %Ilerne mehr über die Kommandos. +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/esES/bnhelp.conf b/conf/i18n/esES/bnhelp.conf index 3f50ab73f..39629c466 100644 --- a/conf/i18n/esES/bnhelp.conf +++ b/conf/i18n/esES/bnhelp.conf @@ -602,6 +602,11 @@ Sintaxis para operador/admin: /icon l[ist] Muestra los iconos disponibles en la reserva del servidor para asginar a los usuarios +%language /lang +-------------------------------------------------------- +/lang [code] + Set your language to get another translation: + %quiz -------------------------------------------------------- /quiz [opción] diff --git a/conf/i18n/esES/bnmotd.txt b/conf/i18n/esES/bnmotd.txt index b06212111..c4ad302bf 100644 --- a/conf/i18n/esES/bnmotd.txt +++ b/conf/i18n/esES/bnmotd.txt @@ -7,5 +7,6 @@ %Iy %u usuarios jugando %g partidas y conversando en %c salas. %ITiene problemas con algun comando? Teclee "/help" para %Iaprender más sobre los comandos. +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/esES/common.xml b/conf/i18n/esES/common.xml index a7d85ac93..289630cf2 100644 --- a/conf/i18n/esES/common.xml +++ b/conf/i18n/esES/common.xml @@ -35,6 +35,18 @@ you are now tempOP for this channel ahora eres OPtemp para este canal + + You can't talk on the channel. Your account has been muted + + + + This channel is moderated + + + + No one hears you. + + Account name contains some invalid symbol! ¡El nombre de cuenta contiene algun carácter invalido! @@ -735,6 +747,14 @@ Description: {} Descripción: {} + + public + + + + private + + Currently accessible games: Juegos actualmente accesibles: @@ -851,6 +871,10 @@ Example: /ladderinfo 1 STAR Ejemplo: /ladderinfo 1 STAR + + Unable to determine client game. + + Invalid user. @@ -1275,6 +1299,10 @@ AT TEAM Rank: {} Equipo AT Rango: {} + + Ladder games: {}-{}-{} (rating {}) + + There are currently {} user(s) in {} games of {} Actualmente hay {} usuario(s) en {} juegos de {} @@ -1567,6 +1595,70 @@ Reset {}'s {} stats + + Created: {} + + + + Clan: {} + + + + Rank: Chieftain + + + + Rank: Shaman + + + + Rank: Grunt + + + + Rank: Peon + + + + Client: {} Ver: {} Country: {} + + + + unknown + + + + Last login {} from + + + + On since {} from + + + + Yes + + + + No + + + + Operator: {}, Admin: {}, Locked: {}, Muted: {} + + + + Email: {} + + + + Last login Owner: {} + + + + Idle {} + + You cannot kick administrators. No se puede echar a administradores. @@ -1683,6 +1775,46 @@ Unknown command. Comando desconocido. + + Your line length quota has been exceeded! + + + + Your message quota has been exceeded! + + + + This is a private clan channel, unable to join! + + + + You are banned from that channel. + + + + That channel is for Admins/Operators only. + + + + The channel is currently full. + + + + This channel does not have chat privileges. + + + + This channel is moderated. + + + + Created ladder game + + + + Joined ladder game + + This account has been locked Esta cuenta ha sido bloqueada @@ -1691,10 +1823,26 @@ This account has been locked + + No help available for that command + + Oops ! There is a problem with the help file. Please contact the administrator of the server. ¡Ups! Hay un problema con el archivo de ayuda. Por favor contactar con el administrador del servidor. + + Chat commands : + + + + Bad language code. + + + + Set your language to {} + + This command can only be used inside a channel. @@ -1707,6 +1855,98 @@ Bad icon. Icono incorrecto. + + Set default icon. + + + + Set new icon is succeed. + + + + You have {} icons in stash: + + + + Available icons in server stash: + + + + Invalid user. + + + + Set default icon for {} + + + + That icon doesn't exist in server stash. + + + + Set new icon is succeed for {} + + + + {} has {} icons in stash : + + + + User already has that icon in stash. + + + + Add new icon to {}'s stash. + + + + That icon doesn't exist in user stash. + + + + Delete icon from {}'s stash. + + + + IP not banned. + + + + Error occured. + + + + IP banned by rule #{}. + + + + Illegal IP entry. + + + + No matching entry. + + + + Wrong entry number. + + + + Entry deleted. + + + + Banned IPs: + + + + (perm) + + + + none + + {} banned permamently by {}. {} baneado permanentemente por {} @@ -1723,6 +1963,10 @@ {} banned for {}. {} baneado por {}. + + Bad IP. + + Banning only for: {} minutes. Baneando tan solo por: {} minutos. @@ -1755,6 +1999,18 @@ There was an error completing your request. Ha ocurrido un error mientras se completaba su petición. + + ID Sender Date + + + + Use /mail read &lt;ID&gt; to read the content of any message + + + + Invalid index. Please use /mail read &lt;index&gt; where &lt;index&gt; is a number. + + Receiver UNKNOWN! ¡Destinatario DESCONOCIDO! @@ -1816,4 +2072,4 @@ El usuario "{}" está offline - + \ No newline at end of file diff --git a/conf/i18n/frFR/bnmotd.txt b/conf/i18n/frFR/bnmotd.txt index 6b0e540b4..042abc5a9 100644 --- a/conf/i18n/frFR/bnmotd.txt +++ b/conf/i18n/frFR/bnmotd.txt @@ -7,5 +7,6 @@ %Iainsi que %u utilisateurs jouant dans %g parties et discutant dans %c canaux. %IUn problème avec une commande ? Tappez /help pour %Ien savoir plus. +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/itIT/bnmotd.txt b/conf/i18n/itIT/bnmotd.txt index b02f52fe0..7974e7afa 100644 --- a/conf/i18n/itIT/bnmotd.txt +++ b/conf/i18n/itIT/bnmotd.txt @@ -7,5 +7,6 @@ %Iand %u users playing %g games and chatting in %c channels. %IHaving trouble with a command? Type /help to %Ilearn more about it. +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/jpJA/bnmotd.txt b/conf/i18n/jpJA/bnmotd.txt index 8947f2496..6355c7cce 100644 --- a/conf/i18n/jpJA/bnmotd.txt +++ b/conf/i18n/jpJA/bnmotd.txt @@ -7,5 +7,6 @@ %Iすべては %u 名のユーザさんが %g 個のゲームをプレーします。 %I%c 個のチャンネが生成しました。 %Iコマンド・リストは「/help」をタイプして下さい。 +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/koKR/bnmotd.txt b/conf/i18n/koKR/bnmotd.txt index 5a1f0b6a7..7cc09840d 100644 --- a/conf/i18n/koKR/bnmotd.txt +++ b/conf/i18n/koKR/bnmotd.txt @@ -7,5 +7,6 @@ %I모두 %u 명의 유저가 %g 개의 게임을 즐기고 있으며 %c 개의 채널이 있습니다. %I명령어의 대해 궁금한 사항이 있으시다구요? %I/help 명령어를 이용해 보세요. +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/nlNL/bnmotd.txt b/conf/i18n/nlNL/bnmotd.txt index a3d8b6548..59db4ceb1 100644 --- a/conf/i18n/nlNL/bnmotd.txt +++ b/conf/i18n/nlNL/bnmotd.txt @@ -7,5 +7,6 @@ %Ien %u gebruikers spelen %g spellen en chatten in %c channels. %IProblemen met een commando? Type /help om %Ier meer te weten over te komen. +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/plPL/bnmotd.txt b/conf/i18n/plPL/bnmotd.txt index 77486af33..ad5438baf 100644 --- a/conf/i18n/plPL/bnmotd.txt +++ b/conf/i18n/plPL/bnmotd.txt @@ -7,5 +7,6 @@ %I%u użytkowników gra w %g gier, i rozmawia na %c kanałach. %IJeśli masz jakieś problemy z poleceniami, to napiszsz /help aby %Idowiedzieć się wiecej. +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/ptBR/bnmotd.txt b/conf/i18n/ptBR/bnmotd.txt index 75a70bd74..53df9cb47 100644 --- a/conf/i18n/ptBR/bnmotd.txt +++ b/conf/i18n/ptBR/bnmotd.txt @@ -7,5 +7,6 @@ %IE %u usuários jogando %g jogos e conversando em %c canais. %ITendo algum problema com comando? Digite /help ra %Aprender mais sobre. +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/ruRU/bnmotd.txt b/conf/i18n/ruRU/bnmotd.txt index 813faef18..469edfb1b 100644 --- a/conf/i18n/ruRU/bnmotd.txt +++ b/conf/i18n/ruRU/bnmotd.txt @@ -7,5 +7,6 @@ %Iиз них %u находятся в %g играх и общаются на %c каналах. %I %IВведите /help для получения помощи по командам чата +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/svSE/bnmotd.txt b/conf/i18n/svSE/bnmotd.txt index 75c03e3d4..c5642a588 100644 --- a/conf/i18n/svSE/bnmotd.txt +++ b/conf/i18n/svSE/bnmotd.txt @@ -7,5 +7,6 @@ %Ioch %u användare som spelar %g spel och chattar i %c kanaler. %IHar du problem med ett kommando? Skriv /help för %Iatt lära dig mer om det. +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/zhCN/bnmotd.txt b/conf/i18n/zhCN/bnmotd.txt index 5cca60656..0d9c6f6ca 100644 --- a/conf/i18n/zhCN/bnmotd.txt +++ b/conf/i18n/zhCN/bnmotd.txt @@ -7,5 +7,6 @@ %I有 %u 人在玩 %g 个游戏,以及在 %c 个频道中聊天 %I还不了解可以使用哪些命令? %I输入 /help 就可以学习了 +%IType /language to switch translation. %I %M%m \ No newline at end of file diff --git a/conf/i18n/zhTW/bnmotd.txt b/conf/i18n/zhTW/bnmotd.txt index f4f4dcf7a..6f066a6e9 100644 --- a/conf/i18n/zhTW/bnmotd.txt +++ b/conf/i18n/zhTW/bnmotd.txt @@ -6,5 +6,6 @@ %I共有 %U 個玩家在玩 %N 的 %G 個遊戲, %I其中有 %u 個玩家一邊在玩 %g 個遊戲一邊在 %c 個聊天頻道. %I不懂使用指令? 請輸入 /help 來了解更多... +%IType /language to switch translation. %I %M%m \ No newline at end of file From 1355b18dfc1f2eb325456c06a4fcfd18136c7c24 Mon Sep 17 00:00:00 2001 From: HarpyWar Date: Sat, 12 Jul 2014 00:22:13 +0400 Subject: [PATCH 144/144] fix compile errors --- src/bnetd/connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bnetd/connection.cpp b/src/bnetd/connection.cpp index 66e6ac285..0e7d1d591 100644 --- a/src/bnetd/connection.cpp +++ b/src/bnetd/connection.cpp @@ -3106,7 +3106,7 @@ namespace pvpgn if (std::strlen(text) > prefs_get_quota_maxline()) { - message_send_text(con, message_type_error, con, localize(c, "Your line length quota has been exceeded!")); + message_send_text(con, message_type_error, con, localize(con, "Your line length quota has been exceeded!")); return 1; } @@ -3139,7 +3139,7 @@ namespace pvpgn if (con->protocol.chat.quota.totcount >= prefs_get_quota_lines()) { - message_send_text(con, message_type_error, con, localize(c, "Your message quota has been exceeded!")); + message_send_text(con, message_type_error, con, localize(con, "Your message quota has been exceeded!")); if (con->protocol.chat.quota.totcount >= prefs_get_quota_dobae()) { /* kick out the dobae user for violation of the quota rule */