From caa33eee798305f8d6271273f20806bf31ce50e5 Mon Sep 17 00:00:00 2001 From: xboi209 Date: Sun, 13 Apr 2014 10:56:51 -0700 Subject: [PATCH 1/7] =?UTF-8?q?=E2=80=A2Corrected=20language=20errors=20?= =?UTF-8?q?=E2=80=A2Added=20/j=20command,=20alias=20of=20/join=20=E2=80=A2?= =?UTF-8?q?Replaced=20instances=20of=20"PVPGN"=20with=20the=20name=20of=20?= =?UTF-8?q?your=20server=20=E2=80=A2/warrenty=20-->=20/warranty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/command_groups.conf.in | 33 +++-- src/bnetd/command.cpp | 271 ++++++++++++++++++------------------ src/bnetd/handle_bnet.cpp | 2 +- version-history.txt | 2 +- 4 files changed, 162 insertions(+), 146 deletions(-) diff --git a/conf/command_groups.conf.in b/conf/command_groups.conf.in index bf7a7f5c4..9d104f6e5 100644 --- a/conf/command_groups.conf.in +++ b/conf/command_groups.conf.in @@ -27,7 +27,7 @@ # Add the following line to your user file to get access to all groups: # "BNET\\auth\\command_groups"="255" # -# For regualar users to be able to use the regualr commands make sure to +# For regular users to be able to use the regular commands make sure to # use the updated 'bnetd_default_user' file # # SQL MODE: @@ -35,7 +35,7 @@ # ALTER TABLE BNET ADD COLUMN auth_command_groups VARCHAR(128) default '1'; # UPDATE BNET SET auth_command_groups='255' WHERE uid='youruserid' # -# For regular users to be able to use the reqular commands +# For regular users to be able to use the regular commands # issue the following command: # UPDATE BNET SET auth_command_groups='1' WHERE uid='0' # @@ -49,14 +49,17 @@ 1 /c /clan 1 /f /friends 1 /me -1 /msg /whisper /w /m /r /reply +1 /msg /whisper /w /m +1 /r /reply 1 /status /users /lusers 1 /who /whois /whereis /where /whoami 1 /beep /nobeep -1 /version /copyright /warrenty /license -1 /uptime /stats /astat /time -1 /channel /join /rejoin -1 /away /dnd /ignore /squelch /unignore /unsquelch +1 /version /copyright /warranty /license +1 /uptime +1 /stats /astat +1 /time +1 /channel /join /j /rejoin +1 /away /dnd /ignore /unignore /squelch /unsquelch 1 /watch /unwatch /watchall /unwatchall 1 /news /games /channels /chs /admins 1 /logout /quit /exit @@ -144,11 +147,16 @@ # -- They are all locked out for regular users and require access to the Group to Use. # -- Use the /cg command to assign groups to users. -2 /realmann /ann /announce +2 /realmann +2 /ann /announce -3 /serverban /ipban /ipscan +3 /serverban /ipban +3 /ipscan -4 /kill /killsession /addacct /lockacct /unlockacct /muteacct /unmuteacct +4 /kill /killsession +4 /addacct +4 /lockacct /unlockacct +4 /muteacct /unmuteacct 5 /ladderactivate # 5 /rank_all_accounts @@ -158,7 +166,10 @@ 6 /operator /admin /flag /tag -7 /set /commandgroups /cg /clearstats /icon +7 /set +7 /commandgroups /cg +7 /clearstats +7 /icon 8 /shutdown /rehash /find /save diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 4c6c5e01e..19b28330f 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -387,7 +387,7 @@ namespace pvpgn { "/nobeep", _handle_nobeep_command }, { "/version", _handle_version_command }, { "/copyright", _handle_copyright_command }, - { "/warrenty", _handle_copyright_command }, + { "/warranty", _handle_copyright_command }, { "/license", _handle_copyright_command }, { "/uptime", _handle_uptime_command }, { "/stats", _handle_stats_command }, @@ -395,6 +395,7 @@ namespace pvpgn { "/time", _handle_time_command }, { "/channel", _handle_channel_command }, { "/join", _handle_channel_command }, + { "/j", _handle_channel_command }, { "/rejoin", _handle_rejoin_command }, { "/away", _handle_away_command }, { "/dnd", _handle_dnd_command }, @@ -500,7 +501,7 @@ namespace pvpgn if ((text[0] != '\0') && (conn_quota_exceeded(c, text))) { - message_send_text(c, message_type_error, c, "You are sending commands to Battle.net too quickly and risk being disconnected for flooding. Please slow down."); + message_send_text(c, message_type_error, c, "You are sending commands to "PVPGN_SOFTWARE" too quickly and risk being disconnected for flooding. Please slow down."); return 0; } @@ -575,7 +576,7 @@ namespace pvpgn /* 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, "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) { @@ -597,7 +598,7 @@ namespace pvpgn 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, "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."); } @@ -630,7 +631,7 @@ namespace pvpgn const char * 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, "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 ."); } @@ -645,7 +646,7 @@ namespace pvpgn 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, "Usage:"); message_send_text(c, message_type_info, c, "/clan invite "); message_send_text(c, message_type_info, c, "Invite to your clan."); } @@ -689,7 +690,7 @@ namespace pvpgn 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, "Usage:"); message_send_text(c, message_type_info, c, "/clan invite get (show clanname wich 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)"); @@ -697,7 +698,7 @@ namespace pvpgn 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, "Usage:"); message_send_text(c, message_type_info, c, "/clan invite get (show clanname wich 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)"); @@ -739,7 +740,7 @@ namespace pvpgn } else { if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "usage:"); + 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) { @@ -760,13 +761,13 @@ namespace pvpgn 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, "Usage:"); message_send_text(c, message_type_info, c, "/clan create (Create a new clan)"); return 0; } if (clan = clanlist_find_clan_by_clantag(str_to_clantag(clantag))) { - message_send_text(c, message_type_error, c, "Clan with your specifed allready exist!"); + 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; } @@ -781,7 +782,7 @@ namespace pvpgn clan_save(clan); } else { - clan_set_created(clan, -prefs_get_clan_min_invites() + 1); //Pelish: +1 means that creator of clan is allready invited + 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()); @@ -810,7 +811,7 @@ namespace pvpgn text = skip_command(text); 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, "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."); return -1; } @@ -819,7 +820,7 @@ namespace pvpgn username = &text[1]; if (!*username) { - message_send_text(c, message_type_info, c, "You need to supply a username."); + message_send_text(c, message_type_info, c, "You must supply a username."); return -1; } @@ -843,7 +844,7 @@ namespace pvpgn } else { if (account_get_auth_admin(acc, NULL) != 1) - snprintf(msgtemp, sizeof(msgtemp), "%.64s is no Server Admin, so you can't demote him", username); + snprintf(msgtemp, sizeof(msgtemp), "%.64s 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); @@ -869,7 +870,7 @@ namespace pvpgn text = skip_command(text); 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, "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."); return -1; } @@ -878,7 +879,7 @@ namespace pvpgn username = &text[1]; if (!*username) { - message_send_text(c, message_type_info, c, "You need to supply a username."); + message_send_text(c, message_type_info, c, "You must supply a username."); return -1; } @@ -937,7 +938,7 @@ namespace pvpgn text = skip_command(text); if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You need to supply a username."); + message_send_text(c, message_type_info, c, "You must supply a username."); return -1; } @@ -985,7 +986,7 @@ namespace pvpgn text = skip_command(text); if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You need to supply a username."); + message_send_text(c, message_type_info, c, "You must supply a username."); return -1; } @@ -1033,7 +1034,7 @@ namespace pvpgn text = skip_command(text); if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You need to supply a username."); + message_send_text(c, message_type_info, c, "You must supply a username."); return -1; } @@ -1054,10 +1055,10 @@ namespace pvpgn else { if (channel_conn_has_tmpVOICE(conn_get_channel(c), dst_c)) - snprintf(msgtemp, sizeof(msgtemp), "%.64s has already Voice in this channel", username); + snprintf(msgtemp, sizeof(msgtemp), "%.64s already has Voice in this channel", username); else { if (account_is_operator_or_admin(acc, channel)) - snprintf(msgtemp, sizeof(msgtemp), "%.64s allready is operator or admin, no need to voice him", username); + snprintf(msgtemp, sizeof(msgtemp), "%.64s is already an operator or admin.", username); else { conn_set_tmpVOICE_channel(dst_c, channel); @@ -1097,7 +1098,7 @@ namespace pvpgn text = skip_command(text); if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You need to supply a username."); + message_send_text(c, message_type_info, c, "You must supply a username."); return -1; } @@ -1181,7 +1182,7 @@ namespace pvpgn text = skip_command(text); if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You need to supply a username."); + message_send_text(c, message_type_info, c, "You must supply a username."); return -1; } @@ -1196,7 +1197,7 @@ 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 allready a Channel Operator", username); + snprintf(msgtemp, sizeof(msgtemp), "%.64s 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); @@ -1210,7 +1211,7 @@ namespace pvpgn else { if (account_is_operator_or_admin(acc, channel)) - snprintf(msgtemp, sizeof(msgtemp), "%.64s allready is operator or admin, no need to tempOP him", username); + snprintf(msgtemp, sizeof(msgtemp), "%.64s already is operator or admin, no need to tempOP him", username); else { conn_set_tmpOP_channel(dst_c, channel); @@ -1248,7 +1249,7 @@ namespace pvpgn text = skip_command(text); if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You need to supply a username."); + message_send_text(c, message_type_info, c, "You must supply a username."); return -1; } @@ -1269,7 +1270,7 @@ namespace pvpgn else { if (account_is_operator_or_admin(acc, channel)) - snprintf(msgtemp, sizeof(msgtemp), "%.64s allready is operator or admin, no need to tempOP him", username); + snprintf(msgtemp, sizeof(msgtemp), "%.64s already is operator or admin, no need to tempOP him", username); else { conn_set_tmpOP_channel(dst_c, channel); @@ -1317,7 +1318,7 @@ namespace pvpgn text = skip_command(text); if (!(username = &text[0])) { - message_send_text(c, message_type_info, c, "You need to supply a username."); + message_send_text(c, message_type_info, c, "You must supply a username."); return -1; } @@ -1418,7 +1419,7 @@ namespace pvpgn text = skip_command(text); if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /f add "); + message_send_text(c, message_type_info, c, "Usage: /f add "); return 0; } @@ -1541,7 +1542,7 @@ namespace pvpgn if (cnt) message_send_text(c, message_type_friendwhisperack, c, msg); else - message_send_text(c, message_type_info, c, "All your friends are offline."); + 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) { @@ -1553,7 +1554,7 @@ namespace pvpgn text = skip_command(text); if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /f remove "); + message_send_text(c, message_type_info, c, "Usage: /f remove "); return 0; } @@ -1595,7 +1596,7 @@ namespace pvpgn text = skip_command(text); if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /f promote "); + message_send_text(c, message_type_info, c, "Usage: /f promote "); return 0; } @@ -1610,7 +1611,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), "Premoted %.64s in your friends list.", dest_name); + snprintf(msgtemp, sizeof(msgtemp), "Promoted %.64s 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)))) @@ -1640,7 +1641,7 @@ namespace pvpgn text = skip_command(text); if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /f demote "); + message_send_text(c, message_type_info, c, "Usage: /f demote "); return 0; } @@ -1655,7 +1656,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), "Premoted %.64s in your friends list.", dest_name); + snprintf(msgtemp, sizeof(msgtemp), "Demoted %.64s 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)))) @@ -1690,10 +1691,10 @@ namespace pvpgn online_only = true; } if (!online_only) { - message_send_text(c, message_type_info, c, "Your PvPGN - Friends List"); + message_send_text(c, message_type_info, c, "Your "PVPGN_SOFTWARE" - Friends List"); } else { - message_send_text(c, message_type_info, c, "Your PvPGN - Online Friends List"); + message_send_text(c, message_type_info, c, "Your "PVPGN_SOFTWARE" - Online Friends List"); } message_send_text(c, message_type_info, c, "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="); num = account_get_friendcount(my_acc); @@ -1794,7 +1795,7 @@ namespace pvpgn if ((dest[0] == '\0') || (text[i] == '\0')) { - message_send_text(c, message_type_info, c, "usage: /whisper "); + message_send_text(c, message_type_info, c, "Usage: /whisper "); return 0; } @@ -1816,7 +1817,7 @@ namespace pvpgn ctag[j] = '\0'; if (ctag[0] == '\0') { - snprintf(msgtemp, sizeof(msgtemp), "There are currently %d users online, in %d games and %d channels.", + 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()); @@ -1998,7 +1999,7 @@ namespace pvpgn if (text[i] == '\0') { - message_send_text(c, message_type_info, c, "usage: /who "); + message_send_text(c, message_type_info, c, "Usage: /who "); return 0; } @@ -2041,7 +2042,7 @@ namespace pvpgn if (text[i] == '\0') { - message_send_text(c, message_type_info, c, "usage: /whois "); + message_send_text(c, message_type_info, c, "Usage: /whois "); return 0; } @@ -2075,7 +2076,7 @@ namespace pvpgn if (text[i] == '\0') { - message_send_text(c, message_type_info, c, "usage: /announce "); + message_send_text(c, message_type_info, c, "Usage: /announce "); return 0; } @@ -2368,9 +2369,9 @@ namespace pvpgn btlocal = bnettime_add_tzbias(btsystem, local_tzbias()); now = bnettime_to_time(btlocal); if (!(tmnow = std::gmtime(&now))) - std::strcpy(msgtemp, "PvPGN Server Time: ?"); + std::strcpy(msgtemp, PVPGN_SOFTWARE" Server Time: ?"); else - std::strftime(msgtemp, sizeof(msgtemp), "PvPGN Server Time: %a %b %d %H:%M:%S", tmnow); + std::strftime(msgtemp, sizeof(msgtemp), PVPGN_SOFTWARE" Server Time: %a %b %d %H:%M:%S", tmnow); message_send_text(c, message_type_info, c, msgtemp); if (conn_get_class(c) == conn_class_bnet) { @@ -2413,7 +2414,7 @@ namespace pvpgn } if ((channel = conn_get_channel(c)) && (strcasecmp(channel_get_name(channel), text) == 0)) - return 0; // we don't have to do anything, we are allready in this channel + return 0; // we don't have to do anything, we are already in this channel if (conn_set_channel(c, text) < 0) conn_set_channel(c, CHANNEL_NAME_BANNED); /* should not fail */ @@ -2480,7 +2481,7 @@ namespace pvpgn } else { - message_send_text(c, message_type_info, c, "Do Not Disturb mode cancelled."); + message_send_text(c, message_type_info, c, "Do Not Disturb mode canceled."); conn_set_dndstr(c, NULL); } } @@ -2505,7 +2506,7 @@ namespace pvpgn if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /squelch "); + message_send_text(c, message_type_info, c, "Usage: /squelch "); return 0; } @@ -2545,7 +2546,7 @@ namespace pvpgn if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /unsquelch "); + message_send_text(c, message_type_info, c, "Usage: /unsquelch "); return 0; } @@ -2592,7 +2593,7 @@ namespace pvpgn if (dest[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /kick "); + message_send_text(c, message_type_info, c, "Usage: /kick "); return 0; } @@ -2743,7 +2744,7 @@ namespace pvpgn if (text[i] == '\0') { - message_send_text(c, message_type_info, c, "usage: /unban "); + message_send_text(c, message_type_info, c, "Usage: /unban "); return 0; } @@ -2788,7 +2789,7 @@ namespace pvpgn if (text[i] == '\0') { - message_send_text(c, message_type_info, c, "usage: /reply "); + message_send_text(c, message_type_info, c, "Usage: /reply "); return 0; } do_whisper(c, dest, &text[i]); @@ -2814,7 +2815,7 @@ namespace pvpgn if (text[i] == '\0') { - message_send_text(c, message_type_info, c, "usage: /realmann "); + message_send_text(c, message_type_info, c, "Usage: /realmann "); return 0; } @@ -2849,7 +2850,7 @@ namespace pvpgn if (text[i] == '\0') { - message_send_text(c, message_type_info, c, "usage: /watch "); + message_send_text(c, message_type_info, c, "Usage: /watch "); return 0; } if (!(account = accountlist_find_account(&text[i]))) @@ -2879,7 +2880,7 @@ namespace pvpgn if (text[i] == '\0') { - message_send_text(c, message_type_info, c, "usage: /unwatch "); + message_send_text(c, message_type_info, c, "Usage: /unwatch "); return 0; } if (!(account = accountlist_find_account(&text[i]))) @@ -3090,7 +3091,7 @@ namespace pvpgn if (dest[0] == '\0') { cbdata.tag = conn_get_clienttag(c); - message_send_text(c, message_type_info, c, "Currently accessable games:"); + message_send_text(c, message_type_info, c, "Currently accessible games:"); } else if (strcasecmp(&dest[0], "all") == 0) { @@ -3149,7 +3150,7 @@ namespace pvpgn if (text[i] == '\0') { clienttag = conn_get_clienttag(c); - message_send_text(c, message_type_info, c, "Currently accessable channels:"); + message_send_text(c, message_type_info, c, "Currently accessible channels:"); } else if (std::strcmp(&text[i], "all") == 0) { @@ -3229,7 +3230,7 @@ namespace pvpgn pass[j] = '\0'; if (username[0] == '\0' || pass[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /addacct "); + message_send_text(c, message_type_info, c, "Usage: /addacct "); return 0; } @@ -3300,7 +3301,7 @@ namespace pvpgn if (pass[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /chpass [username] "); + message_send_text(c, message_type_info, c, "Usage: /chpass [username] "); return 0; } @@ -3479,7 +3480,7 @@ namespace pvpgn if (dest[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /finger "); + message_send_text(c, message_type_info, c, "Usage: /finger "); return 0; } @@ -3573,15 +3574,19 @@ namespace pvpgn if ((account_get_command_groups(conn_get_account(c)) & command_get_group("/admin-addr"))) { /* the player who requested /finger has admin privileges - give him more info about the one he querys; + give him more info about the one he queries; is_admin, is_operator, is_locked, email */ - snprintf(msgtemp, sizeof(msgtemp), "Email: %.128s, Operator: %s, Admin: %s, Locked: %s, Muted: %s", - account_get_email(account), + 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"); message_send_text(c, message_type_info, c, msgtemp); + + snprintf(msgtemp, sizeof(msgtemp), "Email: %.128s", + 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)); message_send_text(c, message_type_info, c, msgtemp); @@ -3693,13 +3698,13 @@ namespace pvpgn if (usrnick[0] == '\0' || (usrnick[0] == '#' && (usrnick[1] < '0' || usrnick[1] > '9'))) { - message_send_text(c, message_type_info, c, "usage: /kill {|#} []"); + message_send_text(c, message_type_info, c, "Usage: /kill {|#} []"); return 0; } if (usrnick[0] == '#') { if (!(user = connlist_find_connection_by_socket(std::atoi(usrnick + 1)))) { - message_send_text(c, message_type_error, c, "That connection doesnt exist."); + message_send_text(c, message_type_error, c, "That connection doesn't exist."); return 0; } } @@ -3713,7 +3718,7 @@ namespace pvpgn 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) { ipbanlist_save(prefs_get_ipbanfile()); - message_send_text(user, message_type_info, user, "Connection closed by admin and banned your ip."); + message_send_text(user, message_type_info, user, "An admin has closed your connection and banned your IP address."); } else message_send_text(user, message_type_info, user, "Connection closed by admin."); @@ -3739,7 +3744,7 @@ namespace pvpgn if (session[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /killsession [min]"); + message_send_text(c, message_type_info, c, "Usage: /killsession [min]"); return 0; } if (!std::isxdigit((int)session[0])) @@ -3755,7 +3760,7 @@ namespace pvpgn 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) { 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, "Connection closed by admin and banned your IP's."); } else message_send_text(user, message_type_info, user, "Connection closed by admin."); @@ -3933,7 +3938,7 @@ namespace pvpgn 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, " has to be in lower case"); + message_send_text(c, message_type_info, c, " must be lower case."); return -1; } @@ -3969,7 +3974,7 @@ namespace pvpgn accountlist_save(FS_FORCE | FS_ALL); accountlist_flush(FS_FORCE | FS_ALL); - message_send_text(c, message_type_info, c, "Changes of accounts and clans are saved to the database."); + message_send_text(c, message_type_info, c, "Account and clan changes has been saved to the database."); return 0; } @@ -4007,9 +4012,9 @@ namespace pvpgn server_quit_delay(delay); if (delay) - message_send_text(c, message_type_info, c, "You initialized the shutdown sequence."); + message_send_text(c, message_type_info, c, "You've initialized the shutdown sequence."); else - message_send_text(c, message_type_info, c, "You canceled the shutdown sequence."); + message_send_text(c, message_type_info, c, "You've canceled the shutdown sequence."); return 0; } @@ -4033,7 +4038,7 @@ namespace pvpgn if (dest[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /ladderinfo [clienttag]"); + message_send_text(c, message_type_info, c, "Usage: /ladderinfo [clienttag]"); return 0; } if (str_to_uint(dest, &rank) < 0 || rank < 1) @@ -4062,7 +4067,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(msgtemp, sizeof(msgtemp), "StarCraft active %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), @@ -4071,14 +4076,14 @@ namespace pvpgn account_get_ladder_active_rating(account, CLIENTTAG_STARCRAFT_UINT, ladder_id_normal)); } else - snprintf(msgtemp, sizeof(msgtemp), "Starcraft active %5u: ", rank); + snprintf(msgtemp, sizeof(msgtemp), "StarCraft active %5u: ", rank); message_send_text(c, message_type_info, c, msgtemp); 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(msgtemp, sizeof(msgtemp), "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), @@ -4087,7 +4092,7 @@ namespace pvpgn account_get_ladder_rating(account, CLIENTTAG_STARCRAFT_UINT, ladder_id_normal)); } else - snprintf(msgtemp, sizeof(msgtemp), "Starcraft current %5u: ", rank); + snprintf(msgtemp, sizeof(msgtemp), "StarCraft current %5u: ", rank); message_send_text(c, message_type_info, c, msgtemp); } else if (clienttag == CLIENTTAG_BROODWARS_UINT) @@ -4130,7 +4135,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(msgtemp, sizeof(msgtemp), "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), @@ -4139,14 +4144,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); + snprintf(msgtemp, sizeof(msgtemp), "WarCraft II standard active %5u: ", rank); message_send_text(c, message_type_info, c, msgtemp); 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(msgtemp, sizeof(msgtemp), "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), @@ -4155,14 +4160,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); + snprintf(msgtemp, sizeof(msgtemp), "WarCraft II IronMan active %5u: ", rank); message_send_text(c, message_type_info, c, msgtemp); 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(msgtemp, sizeof(msgtemp), "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), @@ -4171,14 +4176,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); + snprintf(msgtemp, sizeof(msgtemp), "WarCraft II standard current %5u: ", rank); message_send_text(c, message_type_info, c, msgtemp); 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(msgtemp, sizeof(msgtemp), "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), @@ -4187,7 +4192,7 @@ namespace pvpgn account_get_ladder_rating(account, CLIENTTAG_WARCIIBNE_UINT, ladder_id_ironman)); } else - snprintf(msgtemp, sizeof(msgtemp), "Warcraft II IronMan current %5u: ", rank); + snprintf(msgtemp, sizeof(msgtemp), "WarCraft II IronMan current %5u: ", rank); message_send_text(c, message_type_info, c, msgtemp); } // --> aaron @@ -4282,7 +4287,7 @@ namespace pvpgn if (deltastr[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /timer "); + message_send_text(c, message_type_info, c, "Usage: /timer "); return 0; } @@ -4299,7 +4304,7 @@ namespace pvpgn if (timerlist_add_timer(c, std::time(NULL) + (std::time_t)delta, user_timer_cb, data) < 0) { - eventlog(eventlog_level_error, __FUNCTION__, "could not add timer"); + eventlog(eventlog_level_error, __FUNCTION__, "Could not add timer"); xfree(data.p); message_send_text(c, message_type_error, c, "Could not set timer."); } @@ -4327,7 +4332,7 @@ namespace pvpgn if (dest[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /serverban "); + message_send_text(c, message_type_info, c, "Usage: /serverban "); return 0; } @@ -4336,16 +4341,16 @@ namespace pvpgn message_send_text(c, message_type_error, c, "That user is not logged on."); return 0; } - snprintf(msgtemp, sizeof(msgtemp), "Banning User %.64s who is using IP %.64s", conn_get_username(dest_c), addr_num_to_ip_str(conn_get_game_addr(dest_c))); + 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))); message_send_text(c, message_type_info, c, msgtemp); - message_send_text(c, message_type_info, c, "Users Account is also LOCKED! Only a Admin can Unlock it!"); + 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); 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)); 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 a admin can UNLOCK it!"); + message_send_text(dest_c, message_type_error, dest_c, "Your account is also LOCKED! Only an admin can UNLOCK it!"); conn_set_state(dest_c, conn_state_destroy); return 0; } @@ -4426,9 +4431,9 @@ namespace pvpgn static int _handle_quota_command(t_connection * c, char const * text) { - snprintf(msgtemp, sizeof(msgtemp), "Your quota allows you to write %u lines per %u seconds.", prefs_get_quota_lines(), prefs_get_quota_time()); + 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()); message_send_text(c, message_type_info, c, msgtemp); - snprintf(msgtemp, sizeof(msgtemp), "Long lines will be considered to wrap every %u characters.", prefs_get_quota_wrapline()); + snprintf(msgtemp, sizeof(msgtemp), "Long lines will be wrapped every %u 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()); message_send_text(c, message_type_info, c, msgtemp); @@ -4445,7 +4450,7 @@ namespace pvpgn if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /lockacct "); + message_send_text(c, message_type_info, c, "Usage: /lockacct "); return 0; } @@ -4455,10 +4460,10 @@ namespace pvpgn 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 admin."); + 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 account is now locked."); + message_send_text(c, message_type_error, c, "That user's account is now locked."); return 0; } @@ -4471,7 +4476,7 @@ namespace pvpgn if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /unlockacct "); + message_send_text(c, message_type_info, c, "Usage: /unlockacct "); return 0; } if (!(account = accountlist_find_account(text))) @@ -4481,10 +4486,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 admin."); + message_send_text(user, message_type_info, user, "Your account has just been unlocked by an admin."); account_set_auth_lock(account, 0); - message_send_text(c, message_type_error, c, "That user account is now unlocked."); + message_send_text(c, message_type_error, c, "That user's account is now unlocked."); return 0; } @@ -4498,7 +4503,7 @@ namespace pvpgn if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /muteacct "); + message_send_text(c, message_type_info, c, "Usage: /muteacct "); return 0; } @@ -4508,10 +4513,10 @@ namespace pvpgn 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 admin."); + 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 account is now muted."); + message_send_text(c, message_type_error, c, "That user's account is now muted."); return 0; } @@ -4524,7 +4529,7 @@ namespace pvpgn if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /unmuteacct "); + message_send_text(c, message_type_info, c, "Usage: /unmuteacct "); return 0; } if (!(account = accountlist_find_account(text))) @@ -4534,10 +4539,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 admin."); + message_send_text(user, message_type_info, user, "Your account has just been unmuted by an admin."); account_set_auth_mute(account, 0); - message_send_text(c, message_type_error, c, "That user account is now unmuted."); + message_send_text(c, message_type_error, c, "That user's account is now unmuted."); return 0; } @@ -4556,7 +4561,7 @@ namespace pvpgn if (dest[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /flag "); + message_send_text(c, message_type_info, c, "Usage: /flag "); return 0; } @@ -4583,12 +4588,12 @@ namespace pvpgn if (dest[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /tag "); + 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 should be four characters long."); + message_send_text(c, message_type_error, c, "Client tag must be four characters long."); return 0; } newtag = tag_case_str_to_uint(dest); @@ -4623,7 +4628,7 @@ namespace pvpgn */ if (text[0] == '\0') { - message_send_text(c, message_type_error, c, "usage: /ipscan "); + message_send_text(c, message_type_error, c, "Usage: /ipscan "); return 0; } @@ -4636,9 +4641,9 @@ namespace pvpgn 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"); + message_send_text(c, message_type_info, 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 address could be retrieved"); + message_send_text(c, message_type_error, c, "Sorry, no IP address could be retrieved."); return 0; } } @@ -4664,7 +4669,7 @@ namespace pvpgn } if (count == 0) { - message_send_text(c, message_type_error, c, "There are no online users with that address"); + message_send_text(c, message_type_error, c, "There are no online users with that IP address"); } return 0; @@ -4707,13 +4712,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 reason."); + message_send_text(c, message_type_info, c, "Access denied due to security reasons."); 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, "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)"); @@ -4734,7 +4739,7 @@ namespace pvpgn 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, "Value currently not set"); return 0; } @@ -4751,7 +4756,7 @@ namespace pvpgn } else { - std::sprintf(msgtemp2, "Key set succesfully %s", msgtemp); + 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); } @@ -4833,7 +4838,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, "Unable to send TOS (Terms of Service)."); } xfree((void *)filename); return 0; @@ -4869,7 +4874,7 @@ namespace pvpgn else if ((user = connlist_find_connection_by_accountname(&text[i]))) snprintf(msgtemp, sizeof(msgtemp), "%.64s latency %9u", &text[i], conn_get_latency(user)); else - snprintf(msgtemp, sizeof(msgtemp), "Invalid user"); + snprintf(msgtemp, sizeof(msgtemp), "Invalid user."); message_send_text(c, message_type_info, c, msgtemp); return 0; @@ -4919,7 +4924,7 @@ namespace pvpgn username = arg2; if (arg1[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /cg []"); + message_send_text(c, message_type_info, c, "Usage: /cg []"); return 0; } @@ -4932,7 +4937,7 @@ namespace pvpgn } if (arg2[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /cg []"); + message_send_text(c, message_type_info, c, "Usage: /cg []"); return 0; } @@ -4959,7 +4964,7 @@ namespace pvpgn } if (arg3[0] == '\0') { - message_send_text(c, message_type_info, c, "usage: /cg []"); + message_send_text(c, message_type_info, c, "Usage: /cg []"); return 0; } @@ -4973,7 +4978,7 @@ namespace pvpgn else if (arg3[i] == '7') groups |= 64; else if (arg3[i] == '8') groups |= 128; else { - snprintf(msgtemp, sizeof(msgtemp), "got bad group: %c", arg3[i]); + snprintf(msgtemp, sizeof(msgtemp), "Got bad group: %c", arg3[i]); message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -4981,19 +4986,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 user: %.64s", arg3, username); + snprintf(msgtemp, sizeof(msgtemp), "Groups %.64s has been added to %.64s", arg3, 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 user: %.64s", arg3, username); + snprintf(msgtemp, sizeof(msgtemp), "Groups %.64s has been deleted from %.64s", arg3, username); message_send_text(c, message_type_info, c, msgtemp); return 0; } - snprintf(msgtemp, sizeof(msgtemp), "got unknown command: %.128s", command); + snprintf(msgtemp, sizeof(msgtemp), "Got unknown command: %.128s", command); message_send_text(c, message_type_info, c, msgtemp); return 0; } @@ -5054,14 +5059,14 @@ namespace pvpgn if (!(channel = channellist_find_channel_by_name(channel_name, conn_get_country(c), realm_get_name(conn_get_realm(c))))) { - snprintf(msgtemp, sizeof(msgtemp), "no such channel, can't set topic"); + snprintf(msgtemp, sizeof(msgtemp), "There is no such channel."); message_send_text(c, message_type_error, c, msgtemp); return -1; } if (std::strlen(topic) >= MAX_TOPIC_LEN) { - snprintf(msgtemp, sizeof(msgtemp), "max topic length exceeded (max %d symbols)", 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; } @@ -5109,9 +5114,9 @@ namespace pvpgn } 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, "Channel is now unmoderated."); else - channel_message_send(channel, message_type_info, c, "Channel is now moderated"); + channel_message_send(channel, message_type_info, c, "Channel is now moderated."); } return 0; @@ -5126,7 +5131,7 @@ namespace pvpgn account_set_normal_vitality(account, ctag, 0), account_set_normal_gold(account, ctag, 0); - snprintf(msgtemp, sizeof(msgtemp), "Resetted %.64s's %.64s Stats", account_get_name(account), clienttag_get_title(ctag)); + snprintf(msgtemp, sizeof(msgtemp), "Reseted %.64s's %.64s Stats", account_get_name(account), clienttag_get_title(ctag)); message_send_text(c, message_type_info, c, msgtemp); } @@ -5250,7 +5255,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), "Resetted %.64s's %.64s Stats", account_get_name(account), clienttag_get_title(ctag)); + snprintf(msgtemp, sizeof(msgtemp), "Reseted %.64s's %.64s Stats", account_get_name(account), clienttag_get_title(ctag)); message_send_text(c, message_type_info, c, msgtemp); } @@ -5360,9 +5365,9 @@ namespace pvpgn if (accname == '\0') { - message_send_text(c, message_type_info, c, "usage: /icon [CODE]"); + 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 unset icon)"); + message_send_text(c, message_type_info, c, " (set [CODE] = null to enable default icon)"); return 0; } diff --git a/src/bnetd/handle_bnet.cpp b/src/bnetd/handle_bnet.cpp index 76fd50463..4f2de7e23 100644 --- a/src/bnetd/handle_bnet.cpp +++ b/src/bnetd/handle_bnet.cpp @@ -2028,7 +2028,7 @@ namespace pvpgn account_set_salt(account, salt); account_set_verifier(account, verifier); - eventlog(eventlog_level_info, __FUNCTION__, "[%d] (W3) \"%s\" successfull passchange (right client password proof)", conn_get_socket(c), username); + eventlog(eventlog_level_info, __FUNCTION__, "[%d] (W3) \"%s\" successful passchange (right client password proof)", conn_get_socket(c), username); bn_int_set(&rpacket->u.server_passchangeproofreply.response, SERVER_PASSCHANGEPROOFREPLY_RESPONSE_OK); } else { diff --git a/version-history.txt b/version-history.txt index c70b1b47c..a3e3ad64e 100644 --- a/version-history.txt +++ b/version-history.txt @@ -2,7 +2,7 @@ PvPGN Version History: Changelog for SVN TRUNK (since 1.8.5) ========================================= - -- The list of changes mentioned in here is most propably incomplete. + -- The list of changes mentioned in here is most probably incomplete. For more details also take a peek view into conversion-changelog. [CMAKE] From 8cefee9065186ae4fef54f386f24d6a197ed81d5 Mon Sep 17 00:00:00 2001 From: xboi209 Date: Mon, 14 Apr 2014 19:15:07 -0700 Subject: [PATCH 2/7] Updated help messages for commands --- conf/bnhelp.conf.in | 354 ++++++++++++++++++++++++++++---------------- 1 file changed, 230 insertions(+), 124 deletions(-) diff --git a/conf/bnhelp.conf.in b/conf/bnhelp.conf.in index 95fb21606..e23ce9502 100644 --- a/conf/bnhelp.conf.in +++ b/conf/bnhelp.conf.in @@ -9,205 +9,311 @@ # end of the line. # # # %whois whereis where -whois - looks up some basic information on a user, including their account number and their current location +/whois (aliases: /where /whereis) +Displays where a is on the server. +Example: /whois user %msg whisper m w -/msg, /whisper, /m, /w - sends a private message to a user online regardless of the channel they are in +/whisper (aliases: /w /m /msg) +Sends a private to +Example: /whisper user How are you doing? %ignore squelch -/ignore, /squelch - ignores any future messages from that user effectively muting that user to you +/squelch (alias: ignore, see also: /unsquelch) +Blocks future messages sent from . +Example: /squelch user %unignore unsquelch -/unignore /unsquelch - unignores a user so u can listen to him again +/unsquelch (alias: /unignore) +Allows a previously squelched to talk to you normally. +Example: /unsquelch user %away -/away [] - displays a message that you are away from your keyboard whenever someone whispers to you or does a /whois command on you +/away [] +Displays [] to users who whisper to you. To disable, use the /away command again with no []. +Example: /away Eating dinner %dnd -/dnd [] - prevents ALL whispers from displaying to your screen +/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. %who -/who - displays a list of all users in the given channel +/who +Displays a list of users in +Example: /who Moderated Support %stats astat -/stats /astat [] [] - displays a player's game record +/stats [] [] (alias: /astat) +Displays a []'s Win/Loss record. +Example: /stats user %status users -/status, /users - displays the number of users currently on this server +/users (alias: /status) +Displays the current number of users connected to the server. %time -/time - displays the current server time -%channel join -/channel /join - switches to a channel without having to use the channel join screen +/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 - join the channel you are already in -%me -/me - displays emotion text, as in 'tN is rolling on the floor laughing' +/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 a user out of the channel +/kick +Kicks from the channel. +Example: /kick user %ban -/ban - kicks a user out of the channel and prevents them from returning until the current operator steps down or leaves the channel +/ban (see also: /unban) +Bans from the channel, and prevents him from returning. +Example: /ban user %unban -/unban - allows a banned user to return to the channel +/unban +Allows a banned to return to the channel. +Example: /unban user %whoami -/whoami - looks up some basic information on yourself, including your account number and your current location +/whoami +Displays where you are on the server. %uptime -/uptime - show the amount of time the server has been running -%beep -/beep - enable audible notifications -%nobeep -/nobeep - disable audible notifications +/uptime +Displays how long the server has been running. %version -/version - shows the version of the server +/version +Displays the version of the server %lusers -/lusers - shows list of banned players in this channel +/lusers +Displays a list of players who have been banned from the channel %games -/games [] - displays current game list of client type gametag, e.g. W3XP - Warcraft 3 TFT -/games [lobby], /games [l] - displays current list of games that are in the lobby (i.e. haven't started) +/games [] +Displays a list of games. %channels chs -/channels /chs [all] - displays current channel list +/channels [all] (alias: /chs) +Displays a list of channels. %connections con -/connections /con - displays current connections +/connections (alis: /con) +Displays a list of connections. %finger -/finger [] - displays information about player +/finger [] +Displays detailed information about [] +Example: /finger user %admins -/admins - shows all currently logged in administrators +/admins +Displays a list of all currently logged in administrators. %reply r -/reply /r - reply to the last person that whispered to you +/reply (alias: /r) +Replies to the last player who whispered you with . +Example: /r Hello user! %announce ann -/announce /ann - announces a message in all channels +/announce (alias: /ann) +Announces to everyone. +Example: /ann Hello everyone! %realmann -/realmann - makes an announcement in the real u are currenlty in -%copyright warranty license -/copyright /warranty /license - shows the legal information for bnetd +/realmann +Announces to everyone in the current realm. +Example: /realmann Hello everyone! %news -/news - show some system-specific news +/news +Displays the news. %logout quit exit -/logout /quit /exit - closes your connection to the server +/logout (alias: /quit /exit) +Disconnects you from the server. %kill -/kill [] [min] - close a player's connection to the server and ban players IP for min minutes +/kill [] [min] +Disconnects [] from the server and bans the player's IP address for [min] minutes. +Example: /kill user 5 %killsession -/killsession [] [min] - close a connection to the server and ban sesion's IP for min minutes +/killsession [] [min] +Disconnects the session from the server and bans the session's IP address for [min] minutes. +Example: /killsession 1 5 %watch -/watch - sends notification when a player logs out or joins a game +/watch +Enables notifications for . +Example: /watch user %unwatch -/unwatch - stops sending notification about a player +/unwatch +Disables notifications for . +Example: /unwatch user %watchall -/watchall - sends notification when any player logs in or out +/watchall +Enables notifications for everyone. %unwatchall -/unwatchall - stops sending notification about all players +/unwatchall +Disables notifications for everyone. %gameinfo -/gameinfo [] - prints information about a game +/gameinfo [] +Displays information about []. +Example: /gameinfo FS 1v1!!! %ladderactivate -/ladderactivate - copy current ladder stats to active ladder stats +/ladderactivate +Copies current ladder statistics to active ladder statistics. %ladderinfo -/ladderinfo [] - display ladder info for given rank +/ladderinfo [] +Displays ladder information for of [] +Example: /ladderinfo 1000 SEXP %timer -/timer [] [] - send notification after a period of time +/timer [] [] +Displays [] after [] seconds. +Example: /timer 60 1 minute has passed. %netinfo -/netinfo [] - display a player's IP and port information +/netinfo [] +Displays []'s network information. +Example: /netinfo user %addacct -/addacct - create a new player account +/addacct +Creates a new account named with password . +Example: /addacct user password %chpass /chpass [] - change a player's password +Changes []'s password to . +Example: /chpass user password %quota -/quota - displays the channel quota +/quota +Displays your message quota. %shutdown -/shutdown [] - starts the shutdown sequence or cancels if duration is zero +/shutdown [] +Sets the shutdown sequence at [] seconds or cancels it if set to zero. +Example: /shutdown 300 %lockacct -/lockacct - locks that users account +/lockacct +Locks 's account to prevent him/her from logging in with it. +Example: /lockacct user %unlockacct -/unlockacct - unlocks that users account +/unlockacct +Unlocks 's account to allow him/her to log in with it. +Example: /unlockacct user %friends f -/friends add - add user to your friends list -/friends del - remove user from your friends list -/friends promote - promote user in your friends list -/friends demote - demote user in your friends list -/friends list - list all users in your friends list -/friends online - list all online users in your friends list -/friends msg - whispers to all your online friends +/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. %mail -/mail [] - mail management commands - Syntax: +/mail [] /mail send + Sends mail to with . /mail read [] + Reads mail [] /mail delete {all|} + Deletes mail or [all] mail. %flag -/flag - debug tool for icon flags +/flag +A debug tool for icon flags. %tag -/tag - debug tool for client tags +/tag +A debug tool for client tags. %help -/help [] - does this +/help [] +Displays help about [] +Example: /help whisper %ipban -/ipban [] [option] [time] - ban management commands - Syntax: - /ipban [l[ist]] - shows banned IPs - /ipban c[heck] - check is IP banned - /ipban d[el] - deletes ban for IP, or rule number index - /ipban a[dd] [time] - ban specified IP for time minutes (time = 0 - permanently ban) - /ipban h[elp] - show help screen +/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 + /ipban h[elp] + Displays help for this command. %set -/set [value] - set an attribute in a player profile - if no value given returns current value - key is like BNET\acct\lastlogin_owner +/set [value] +Sets or returns the value of for account . +Example: /set user BNET\acct\lastlogin_owner user %motd -/motd - display the motd +/motd +Displays the MOTD. %tos -/tos - shows terms of service once more +/tos /warranty /license +Displays the Terms of Service. %admin -/admin - +username to make user a admin, or -username to remove admin status of a user +/admin [+|-] +Promotes/demotes to/from server administrator. +Example: /admin +user %rank_all_accounts -/rank_all_accounts - brute force adds all accounts to war3 ladder +/rank_all_accounts +Forces the server to add all accounts to the WarCraft 3 ladder. %rehash -/rehash - forces reload of bnetd.conf +/rehash +Forces the server to reload bnetd.conf %clan -/clan create -Create a new clan -/clan msg -Whispers a message to all your fellow clan members -/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 message of the day to message -/clan invite -Invite to your clan -/clan disband -Disband your 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 . %ping p latency -/ping, /p, /latency - returns your latency to the server +/ping (alias: /p /latency) +Displays your ping to the server. %command_groups cg -/command_groups, /cg [] - adds, deletes, or lists command groups for user - Syntax: - /cg list - shows command groups avialiable to user - /cg add - adds group(s) to users command groups - /cg del - deletes groups from users command groups - /cg help - show help screen -%admin -/admin + - promote to Server Admin -/admin - - demote from Server Admin +/command_groups [] (alias: /cg) + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + /cg help + Displays help for this command. %operator -/operator + - promote to Server Operator -/operator - - demote from Server Operator +/operator [+|-] (alias: /op) +Promotes/demotes to/from server operator. +Example: /operator +user %aop -/aop - make user Channel Admin +/aop +Promotes to channel administrator. +Example: /aop user %op -/op - make user Channel Operator +/op +Promotes to channel operator. +Example: /op user %deop -/deop - take away channel Admin/Operator privileges +/deop +Demotes from channel administrator or operator. +Example: /deop user %tmpop -/tmpop - make user a temporary Channel Operator +/tmpop +Promotes to temporary channel operator. +Example: /tmpop %vop -/vop - add user to VOP list +/vop +Adds to the VOP list. +Example: /vop user %voice -/voice - give temporary voice to user +/voice +Temporarily gives voice privileges to . +Example: /voice user %devoice -/devoice - remove user from VOP list and take away temporary voice +/devoice +Removes from the VOP list and removes temporary voice privileges. +Example: /devoice user %topic -/topic [ [channel name] "topic " ] - used to get/set a channels topic +/topic [[channel] "[message]"] +Sets or displays [channel]'s topic. +Example: /topic Moderated Support "Supported is given in this channel..." %moderate -/moderate - used to get/set channel moderated status +/moderate +Toggles the current channel's moderated status. %clearstats -/clearstats - used to clear game statistics of a given user/clienttag -Syntax: /clearstats - can be one of DSHR,DRTL,SSHR,STAR,SEXP,W2BNE,WAR3,W3XP,ALL +/clearstats +Clears 's statistics. +Example: /clearstats user SEXP %find -/find - used to find users with similar name -Syntax: /find - needs to be in lower case +/find +Finds users with in their username. MUST be lowercase! %save -/save - used to force save accounts changes from a cache into database -Syntax: /save +/save +Forces the server to save account and clan changes to the database. # # ############################################################################## From f2dd4eccbd39f6478862eb4b01402fa117b1c805 Mon Sep 17 00:00:00 2001 From: xboi209 Date: Mon, 14 Apr 2014 19:30:37 -0700 Subject: [PATCH 3/7] =?UTF-8?q?=E2=80=A2Replaced=20instances=20of=20PVPGN?= =?UTF-8?q?=5FSOFTWARE=20to=20prefs=5Fget=5Fservername()=20=E2=80=A2Added?= =?UTF-8?q?=20command=20/=3F,=20alias=20of=20/help=20=E2=80=A2Added=20comm?= =?UTF-8?q?and=20/emote,=20alias=20of=20/me=20=E2=80=A2Fixed=20a=20few=20s?= =?UTF-8?q?pelling=20mistakes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bnetd/command.cpp | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index 19b28330f..aaa3c4df7 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -371,6 +371,7 @@ namespace pvpgn { "/f", _handle_friends_command }, { "/friends", _handle_friends_command }, { "/me", _handle_me_command }, + { "/emote", _handle_me_command }, { "/msg", _handle_whisper_command }, { "/whisper", _handle_whisper_command }, { "/w", _handle_whisper_command }, @@ -466,6 +467,7 @@ namespace pvpgn { "/flag", _handle_flag_command }, { "/tag", _handle_tag_command }, { "/help", handle_help_command }, + { "/?", handle_help_command }, { "/mail", handle_mail_command }, { "/ipban", handle_ipban_command }, // in ipban.c { "/ipscan", _handle_ipscan_command }, @@ -501,7 +503,8 @@ namespace pvpgn if ((text[0] != '\0') && (conn_quota_exceeded(c, text))) { - message_send_text(c, message_type_error, c, "You are sending commands to "PVPGN_SOFTWARE" too quickly and risk being disconnected for flooding. Please slow down."); + snprintf(msgtemp, sizeof(msgtemp), "You are sending commands to %s 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; } @@ -691,7 +694,7 @@ namespace pvpgn /* 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 wich you have been invited)"); + 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)"); } @@ -699,7 +702,7 @@ namespace pvpgn 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 wich you have been invited)"); + 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)"); } @@ -712,7 +715,7 @@ namespace pvpgn clanmember_set_fullmember(member, 1); clanmember_set_join_time(member, std::time(NULL)); - snprintf(msgtemp, sizeof(msgtemp), "You are now clanmember of %s", clan_get_name(clan)); + snprintf(msgtemp, sizeof(msgtemp), "You are now a clan member of %s", 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)); @@ -1687,14 +1690,19 @@ namespace pvpgn unsigned int uid; bool online_only = false; - if (strstart(text, "online") == 0 || strstart(text, "o") == 0) { + if (strstart(text, "online") == 0 || strstart(text, "o") == 0) + { online_only = true; } - if (!online_only) { - message_send_text(c, message_type_info, c, "Your "PVPGN_SOFTWARE" - Friends List"); + if (!online_only) + { + snprintf(msgtemp, sizeof(msgtemp), "Your %s - Friends List", prefs_get_servername()); + message_send_text(c, message_type_info, c, msgtemp); } - else { - message_send_text(c, message_type_info, c, "Your "PVPGN_SOFTWARE" - Online Friends List"); + else + { + snprintf(msgtemp, sizeof(msgtemp), "Your %s - Online Friends List", prefs_get_servername()); + message_send_text(c, message_type_info, c, msgtemp); } message_send_text(c, message_type_info, c, "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="); num = account_get_friendcount(my_acc); @@ -2369,9 +2377,9 @@ namespace pvpgn btlocal = bnettime_add_tzbias(btsystem, local_tzbias()); now = bnettime_to_time(btlocal); if (!(tmnow = std::gmtime(&now))) - std::strcpy(msgtemp, PVPGN_SOFTWARE" Server Time: ?"); + std::strcpy(msgtemp, "%s Server Time: ?", prefs_get_servername()); else - std::strftime(msgtemp, sizeof(msgtemp), PVPGN_SOFTWARE" Server Time: %a %b %d %H:%M:%S", tmnow); + std::strftime(msgtemp, sizeof(msgtemp), "%s Server Time: %a %b %d %H:%M:%S", prefs_get_servername(), tmnow); message_send_text(c, message_type_info, c, msgtemp); if (conn_get_class(c) == conn_class_bnet) { @@ -2395,7 +2403,7 @@ namespace pvpgn if (text[0] == '\0') { - message_send_text(c, message_type_info, c, "usage /channel "); + message_send_text(c, message_type_info, c, "Usage: /channel "); return 0; } @@ -2408,7 +2416,7 @@ namespace pvpgn if (!(std::strlen(text) < MAX_CHANNELNAME_LEN)) { - snprintf(msgtemp, sizeof(msgtemp), "max channel name length exceeded (max %d symbols)", MAX_CHANNELNAME_LEN - 1); + snprintf(msgtemp, sizeof(msgtemp), "Max channel name length exceeded (max %d symbols)", MAX_CHANNELNAME_LEN - 1); message_send_text(c, message_type_error, c, msgtemp); return 0; } From 721cd838562d614f711ffae7e7f67c72bf5c623f Mon Sep 17 00:00:00 2001 From: xboi209 Date: Sat, 19 Apr 2014 10:43:13 -0700 Subject: [PATCH 4/7] Updated more help messages --- conf/bnhelp.conf | 313 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 313 insertions(+) create mode 100644 conf/bnhelp.conf diff --git a/conf/bnhelp.conf b/conf/bnhelp.conf new file mode 100644 index 000000000..aaa3cb18e --- /dev/null +++ b/conf/bnhelp.conf @@ -0,0 +1,313 @@ +############################################################################## +# 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. # +# # +%whois whereis where +/whois (aliases: /where /whereis) +Displays where a is on the server. +Example: /whois user +%msg whisper m w +/whisper (aliases: /w /m /msg) +Sends a private to +Example: /whisper user How are you doing? +%ignore squelch +/squelch (alias: ignore, see also: /unsquelch) +Blocks future messages sent from . +Example: /squelch user +%unignore unsquelch +/unsquelch (alias: /unignore) +Allows a previously squelched to talk to you normally. +Example: /unsquelch user +%away +/away [] +Displays [] to users who whisper to you. To disable, use the /away command again with no []. +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. +%who +/who +Displays a list of users in +Example: /who Moderated Support +%stats astat +/stats [] [] (alias: /astat) +Displays a []'s Win/Loss record. +Example: /stats user +%status users +/users (alias: /status) +Displays the current number of users connected to the server. +%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 user +%ban +/ban (see also: /unban) +Bans from the channel, and prevents him from returning. +Example: /ban user +%unban +/unban +Allows a banned to return to the channel. +Example: /unban user +%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 [] +Displays a list of games. +%channels chs +/channels [all] (alias: /chs) +Displays a list of channels. +%connections con +/connections (alis: /con) +Displays a list of connections. +%finger +/finger [] +Displays detailed information about [] +Example: /finger user +%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 Hello user! +%announce ann +/announce (alias: /ann) +Announces to everyone. +Example: /ann Hello everyone! +%realmann +/realmann +Announces to everyone in the current realm. +Example: /realmann Hello everyone! +%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 user 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 user +%unwatch +/unwatch +Disables notifications for . +Example: /unwatch user +%watchall +/watchall +Enables notifications for everyone. +%unwatchall +/unwatchall +Disables notifications for everyone. +%gameinfo +/gameinfo [] +Displays information about []. +Example: /gameinfo FS 1v1!!! +%ladderactivate +/ladderactivate +Copies current ladder statistics to active ladder statistics. +%ladderinfo +/ladderinfo [] +Displays ladder information for of [] +Example: /ladderinfo 1000 SEXP +%timer +/timer [] [] +Displays [] after [] seconds. +Example: /timer 60 1 minute has passed. +%netinfo +/netinfo [] +Displays []'s network information. +Example: /netinfo user +%addacct +/addacct +Creates a new account named with password . +Example: /addacct user password +%chpass +/chpass [] - change a player's password +Changes []'s password to . +Example: /chpass user password +%quota +/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 +%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. +%mail +/mail [] + /mail send + Sends mail to with . + /mail read [] + Reads mail [] + /mail delete {all|} + Deletes mail or [all] mail. +%flag +/flag +A debug tool for icon flags. +%tag +/tag +A debug tool for client tags. +%help +/help [] +Displays help about [] +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 + /ipban h[elp] + Displays help for this command. +%set +/set [value] +Sets or returns the value of for account . +Example: /set user BNET\acct\lastlogin_owner user +%motd +/motd +Displays the MOTD. +%tos +/tos /warranty /license +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. +%rehash +/rehash +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 . +%ping p latency +/ping (alias: /p /latency) +Displays your ping to the server. +%command_groups cg +/command_groups [] (alias: /cg) + /cg list + Displays 's command groups. + /cg add + Adds command group(s) to . + /cg del + Deletes command group(s) from . + /cg help + Displays help for this command. +%operator +/operator [+|-] (alias: /op) +Promotes/demotes to/from server operator. +Example: /operator +user +%aop +/aop +Promotes to channel administrator. +Example: /aop user +%op +/op +Promotes to channel operator. +Example: /op user +%deop +/deop +Demotes from channel administrator or operator. +Example: /deop user +%tmpop +/tmpop +Promotes to temporary channel operator. +Example: /tmpop +%vop +/vop +Adds to the VOP list. +Example: /vop user +%voice +/voice +Temporarily gives voice privileges to . +Example: /voice user +%devoice +/devoice +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..." +%moderate +/moderate +Toggles the current channel's moderated status. +%clearstats +/clearstats +Clears 's statistics. +Example: /clearstats user SEXP +# # +############################################################################## From 3549b74ed971b28e4a9ea4623bf145a7b1506244 Mon Sep 17 00:00:00 2001 From: xboi209 Date: Sat, 19 Apr 2014 11:36:04 -0700 Subject: [PATCH 5/7] Forgot to add /? and /emote to command_groups.conf.in --- conf/command_groups.conf.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/command_groups.conf.in b/conf/command_groups.conf.in index 9d104f6e5..bf39358ff 100644 --- a/conf/command_groups.conf.in +++ b/conf/command_groups.conf.in @@ -48,7 +48,7 @@ 1 /c /clan 1 /f /friends -1 /me +1 /me /emote 1 /msg /whisper /w /m 1 /r /reply 1 /status /users /lusers @@ -65,7 +65,7 @@ 1 /logout /quit /exit 1 /ladderinfo 1 /timer /quota -1 /help +1 /help /? 1 /mail 1 /motd 1 /tos From 8f797f7fbf2bab4a450606c2c1a0fc6042dfd074 Mon Sep 17 00:00:00 2001 From: xboi209 Date: Sat, 19 Apr 2014 23:54:00 -0700 Subject: [PATCH 6/7] This is actually an older version.... --- conf/bnhelp.conf | 313 ----------------------------------------------- 1 file changed, 313 deletions(-) delete mode 100644 conf/bnhelp.conf diff --git a/conf/bnhelp.conf b/conf/bnhelp.conf deleted file mode 100644 index aaa3cb18e..000000000 --- a/conf/bnhelp.conf +++ /dev/null @@ -1,313 +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. # -# # -%whois whereis where -/whois (aliases: /where /whereis) -Displays where a is on the server. -Example: /whois user -%msg whisper m w -/whisper (aliases: /w /m /msg) -Sends a private to -Example: /whisper user How are you doing? -%ignore squelch -/squelch (alias: ignore, see also: /unsquelch) -Blocks future messages sent from . -Example: /squelch user -%unignore unsquelch -/unsquelch (alias: /unignore) -Allows a previously squelched to talk to you normally. -Example: /unsquelch user -%away -/away [] -Displays [] to users who whisper to you. To disable, use the /away command again with no []. -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. -%who -/who -Displays a list of users in -Example: /who Moderated Support -%stats astat -/stats [] [] (alias: /astat) -Displays a []'s Win/Loss record. -Example: /stats user -%status users -/users (alias: /status) -Displays the current number of users connected to the server. -%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 user -%ban -/ban (see also: /unban) -Bans from the channel, and prevents him from returning. -Example: /ban user -%unban -/unban -Allows a banned to return to the channel. -Example: /unban user -%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 [] -Displays a list of games. -%channels chs -/channels [all] (alias: /chs) -Displays a list of channels. -%connections con -/connections (alis: /con) -Displays a list of connections. -%finger -/finger [] -Displays detailed information about [] -Example: /finger user -%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 Hello user! -%announce ann -/announce (alias: /ann) -Announces to everyone. -Example: /ann Hello everyone! -%realmann -/realmann -Announces to everyone in the current realm. -Example: /realmann Hello everyone! -%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 user 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 user -%unwatch -/unwatch -Disables notifications for . -Example: /unwatch user -%watchall -/watchall -Enables notifications for everyone. -%unwatchall -/unwatchall -Disables notifications for everyone. -%gameinfo -/gameinfo [] -Displays information about []. -Example: /gameinfo FS 1v1!!! -%ladderactivate -/ladderactivate -Copies current ladder statistics to active ladder statistics. -%ladderinfo -/ladderinfo [] -Displays ladder information for of [] -Example: /ladderinfo 1000 SEXP -%timer -/timer [] [] -Displays [] after [] seconds. -Example: /timer 60 1 minute has passed. -%netinfo -/netinfo [] -Displays []'s network information. -Example: /netinfo user -%addacct -/addacct -Creates a new account named with password . -Example: /addacct user password -%chpass -/chpass [] - change a player's password -Changes []'s password to . -Example: /chpass user password -%quota -/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 -%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. -%mail -/mail [] - /mail send - Sends mail to with . - /mail read [] - Reads mail [] - /mail delete {all|} - Deletes mail or [all] mail. -%flag -/flag -A debug tool for icon flags. -%tag -/tag -A debug tool for client tags. -%help -/help [] -Displays help about [] -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 - /ipban h[elp] - Displays help for this command. -%set -/set [value] -Sets or returns the value of for account . -Example: /set user BNET\acct\lastlogin_owner user -%motd -/motd -Displays the MOTD. -%tos -/tos /warranty /license -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. -%rehash -/rehash -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 . -%ping p latency -/ping (alias: /p /latency) -Displays your ping to the server. -%command_groups cg -/command_groups [] (alias: /cg) - /cg list - Displays 's command groups. - /cg add - Adds command group(s) to . - /cg del - Deletes command group(s) from . - /cg help - Displays help for this command. -%operator -/operator [+|-] (alias: /op) -Promotes/demotes to/from server operator. -Example: /operator +user -%aop -/aop -Promotes to channel administrator. -Example: /aop user -%op -/op -Promotes to channel operator. -Example: /op user -%deop -/deop -Demotes from channel administrator or operator. -Example: /deop user -%tmpop -/tmpop -Promotes to temporary channel operator. -Example: /tmpop -%vop -/vop -Adds to the VOP list. -Example: /vop user -%voice -/voice -Temporarily gives voice privileges to . -Example: /voice user -%devoice -/devoice -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..." -%moderate -/moderate -Toggles the current channel's moderated status. -%clearstats -/clearstats -Clears 's statistics. -Example: /clearstats user SEXP -# # -############################################################################## From 5449ae69abfc369f05ea3cd5b91dbc6e7ef014df Mon Sep 17 00:00:00 2001 From: xboi209 Date: Sun, 20 Apr 2014 10:21:39 -0700 Subject: [PATCH 7/7] Fixed compile errors --- src/bnetd/command.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bnetd/command.cpp b/src/bnetd/command.cpp index aaa3c4df7..185723da3 100644 --- a/src/bnetd/command.cpp +++ b/src/bnetd/command.cpp @@ -504,7 +504,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()); - message_send_text(c, message_type_error, c, ,msgtemp); + message_send_text(c, message_type_error, c, msgtemp); return 0; } @@ -2377,9 +2377,9 @@ namespace pvpgn btlocal = bnettime_add_tzbias(btsystem, local_tzbias()); now = bnettime_to_time(btlocal); if (!(tmnow = std::gmtime(&now))) - std::strcpy(msgtemp, "%s Server Time: ?", prefs_get_servername()); + std::strcpy(msgtemp, "Server Time: ?"); else - std::strftime(msgtemp, sizeof(msgtemp), "%s Server Time: %a %b %d %H:%M:%S", prefs_get_servername(), tmnow); + std::strftime(msgtemp, sizeof(msgtemp), "Server Time: %a %b %d %H:%M:%S", tmnow); message_send_text(c, message_type_info, c, msgtemp); if (conn_get_class(c) == conn_class_bnet) { @@ -3592,7 +3592,7 @@ namespace pvpgn message_send_text(c, message_type_info, c, msgtemp); snprintf(msgtemp, sizeof(msgtemp), "Email: %.128s", - account_get_email(account); + account_get_email(account)); message_send_text(c, message_type_info, c, msgtemp); snprintf(msgtemp, sizeof(msgtemp), "Last login Owner: %.128s",