| 1 | /* |
| 2 | * Copyright (C) 1998,1999,2000,2001 Ross Combs ([email protected]) |
| 3 | * Copyright (C) 1999 Oleg Drokin ([email protected]) |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version 2 |
| 8 | * of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 18 | */ |
| 19 | #include "common/setup_before.h"cxx . . $ `<file>/src/common/setup_before.h`/ |
| 20 | #include <cstring> |
| 21 | #include <cstdio> |
| 22 | #include <cctype> |
| 23 | #include <cstdarg> |
| 24 | #include <cstdlib> |
| 25 | |
| 26 | #ifdef WIN32 |
| 27 | # include <conio.h> |
| 28 | #endif |
| 29 | #ifdef HAVE_TERMIOS_Hcxx . . $ `build/config.h:15:9`! |
| 30 | # include <termios.h> |
| 31 | #endif |
| 32 | #ifdef HAVE_SIGACTIONcxx . . $ `build/config.h:73:9`! |
| 33 | # include <signal.h> |
| 34 | #endif |
| 35 | |
| 36 | #include "compat/psock.h"cxx . . $ `<file>/src/compat/psock.h`/ |
| 37 | #include "compat/termios.h"cxx . . $ `<file>/src/compat/termios.h`/ |
| 38 | #include "compat/strcasecmp.h"cxx . . $ `<file>/src/compat/strcasecmp.h`/ |
| 39 | #include "common/field_sizes.h"cxx . . $ `<file>/src/common/field_sizes.h`/ |
| 40 | #include "common/bnet_protocol.h"cxx . . $ `<file>/src/common/bnet_protocol.h`/ |
| 41 | #include "common/packet.h"cxx . . $ `<file>/src/common/packet.h`/ |
| 42 | #include "common/tag.h"cxx . . $ `<file>/src/common/tag.h`/ |
| 43 | #include "common/file_protocol.h"cxx . . $ `<file>/src/common/file_protocol.h`/ |
| 44 | #include "common/bn_type.h"cxx . . $ `<file>/src/common/bn_type.h`/ |
| 45 | #include "common/util.h"cxx . . $ `<file>/src/common/util.h`/ |
| 46 | #include "common/init_protocol.h"cxx . . $ `<file>/src/common/init_protocol.h`/ |
| 47 | #include "common/bnethash.h"cxx . . $ `<file>/src/common/bnethash.h`/ |
| 48 | #include "common/bnethashconv.h"cxx . . $ `<file>/src/common/bnethashconv.h`/ |
| 49 | #include "common/xalloc.h"cxx . . $ `<file>/src/common/xalloc.h`/ |
| 50 | #include "common/network.h"cxx . . $ `<file>/src/common/network.h`/ |
| 51 | #include "common/hexdump.h"cxx . . $ `<file>/src/common/hexdump.h`/ |
| 52 | #include "common/version.h"cxx . . $ `<file>/src/common/version.h`/ |
| 53 | #include "common/xstring.h"cxx . . $ `<file>/src/common/xstring.h`/ |
| 54 | #ifdef CLIENTDEBUGcxx . . $ `src/common/setup_before.h:49:9`! |
| 55 | # include "common/eventlog.h"cxx . . $ `<file>/src/common/eventlog.h`/ |
| 56 | #endif |
| 57 | #include "ansi_term.h"cxx . . $ `<file>/src/client/ansi_term.h`/ |
| 58 | #include "client_connect.h"cxx . . $ `<file>/src/client/client_connect.h`/ |
| 59 | #include "client.h"cxx . . $ `<file>/src/client/client.h`/ |
| 60 | #include "common/setup_after.h"cxx . . $ `<file>/src/common/setup_after.h`/ |
| 61 | |
| 62 | |
| 63 | #ifdef CLIENTDEBUGcxx . . $ `src/common/setup_before.h:49:9`! |
| 64 | # define dprintfcxx . . $ `src/client/bnchat.cpp:64:10`! printf |
| 65 | #else |
| 66 | # define dprintf if (0) printf |
| 67 | #endif |
| 68 | |
| 69 | #define CHANNEL_BNCHATBOTcxx . . $ `src/client/bnchat.cpp:69:9`! "Chat" |
| 70 | #define CHANNEL_STARCRAFTcxx . . $ `src/client/bnchat.cpp:70:9`! "Starcraft" |
| 71 | #define CHANNEL_BROODWARScxx . . $ `src/client/bnchat.cpp:71:9`! "Brood War" |
| 72 | #define CHANNEL_SHAREWAREcxx . . $ `src/client/bnchat.cpp:72:9`! "Starcraft Shareware" |
| 73 | #define CHANNEL_DIABLORTLcxx . . $ `src/client/bnchat.cpp:73:9`! "Diablo Retail" |
| 74 | #define CHANNEL_DIABLOSHRcxx . . $ `src/client/bnchat.cpp:74:9`! "Diablo Shareware" /* FIXME: is this one right? */ |
| 75 | #define CHANNEL_WARCIIBNEcxx . . $ `src/client/bnchat.cpp:75:9`! "War2BNE" |
| 76 | #define CHANNEL_DIABLO2DVcxx . . $ `src/client/bnchat.cpp:76:9`! "Diablo II" |
| 77 | #define CHANNEL_DIABLO2XPcxx . . $ `src/client/bnchat.cpp:77:9`! "Diablo II" |
| 78 | #define CHANNEL_WARCRAFT3cxx . . $ `src/client/bnchat.cpp:78:9`! "W3" |
| 79 | #define CHANNEL_WAR3XPcxx . . $ `src/client/bnchat.cpp:79:9`! "W3" |
| 80 | |
| 81 | using namespace pvpgn; |
| 82 | using namespace pvpgncxx . . $ pvpgn/::client; |
| 83 | |
| 84 | namespacecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ |
| 85 | { |
| 86 | |
| 87 | volatile int handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch. = 0; |
| 88 | |
| 89 | typedef enumcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/$anonymous_type_33dc312a46998953_0# { |
| 90 | mode_chatcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_chat., |
| 91 | mode_commandcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_command., |
| 92 | mode_waitstatcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_waitstat., |
| 93 | mode_waitgamescxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_waitgames., |
| 94 | mode_waitladdercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_waitladder., |
| 95 | mode_gamenamecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamename., |
| 96 | mode_gamepasscxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamepass., |
| 97 | mode_gamewaitcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamewait., |
| 98 | mode_gamestopcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamestop., |
| 99 | mode_claninvitecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_claninvite., |
| 100 | mode_clancreateinvitecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_clancreateinvite. |
| 101 | } t_modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/t_mode#; |
| 102 | |
| 103 | typedef struct _client_statecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state# |
| 104 | { |
| 105 | int useansicxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#useansi.; |
| 106 | int sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd.; |
| 107 | struct sockaddr_in saddrcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#saddr.; |
| 108 | unsigned int sessionkeycxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sessionkey.; |
| 109 | unsigned int sessionnumcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sessionnum.; |
| 110 | unsigned int currsizecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#currsize.; |
| 111 | unsigned int commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos.; |
| 112 | struct termios in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.; |
| 113 | struct termios in_attr_newcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_new.; |
| 114 | int changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.; |
| 115 | int fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin.; |
| 116 | unsigned int screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width., screen_heightcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_height.; |
| 117 | int mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged.; |
| 118 | t_modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/t_mode# modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode.; |
| 119 | char textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN.]; |
| 120 | } t_client_statecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/t_client_state#; |
| 121 | |
| 122 | typedef struct _user_infocxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info# |
| 123 | { |
| 124 | char const * clienttagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clienttag.; |
| 125 | char const * archtagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#archtag.; |
| 126 | char const * gamelangcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#gamelang.; |
| 127 | char playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player.[MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN.]; |
| 128 | char const * cdownercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#cdowner.; |
| 129 | char const * cdkeycxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#cdkey.; |
| 130 | char const * channelcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#channel.; |
| 131 | char curr_gamenamecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#curr_gamename.[MAX_GAMENAME_LENcxx . . $ MAX_GAMENAME_LEN.]; |
| 132 | char curr_gamepasscxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#curr_gamepass.[MAX_GAMEPASS_LENcxx . . $ MAX_GAMEPASS_LEN.]; |
| 133 | int countcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#count., clantagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clantag.; |
| 134 | char const * invitercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#inviter.; |
| 135 | int ignoreversioncxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#ignoreversion.; |
| 136 | |
| 137 | } t_user_infocxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/t_user_info#; |
| 138 | |
| 139 | |
| 140 | char const * mflags_get_strcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mflags_get_str(81a3ae90da26a711).(unsigned int flags); |
| 141 | char const * cflags_get_strcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/cflags_get_str(81a3ae90da26a711).(unsigned int flags); |
| 142 | char const * mode_get_promptcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_get_prompt(712bb7cbb4b8ba9d).(t_modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/t_mode# mode); |
| 143 | int print_filecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/print_file(f2e8c84f0552bce3).(struct sockaddr_in * saddr, char const * filename, char const * progname, char const * clienttag); |
| 144 | void usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(char const * progname); |
| 145 | #ifdef HAVE_SIGACTIONcxx . . $ `build/config.h:73:9`! |
| 146 | void winch_sig_handlecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/winch_sig_handle(d4f767463ce0a6b3).(int unused); |
| 147 | #endif |
| 148 | |
| 149 | |
| 150 | #ifdef HAVE_SIGACTIONcxx . . $ `build/config.h:73:9`! |
| 151 | void winch_sig_handlecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/winch_sig_handle(d4f767463ce0a6b3).(int unused) |
| 152 | { |
| 153 | handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch. = 1; |
| 154 | } |
| 155 | #endif |
| 156 | |
| 157 | |
| 158 | char const * mflags_get_strcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mflags_get_str(81a3ae90da26a711).(unsigned int flags) |
| 159 | { |
| 160 | static char buffer[32]; |
| 161 | |
| 162 | buffer[0] = buffer[1] = '\0'; |
| 163 | if (flags&MF_BLIZZARDcxx . . $ `src/common/bnet_protocol.h:2570:9`!) |
| 164 | stdcxx . . $ std/::strcat(buffer, ",Blizzard"); |
| 165 | if (flags&MF_GAVELcxx . . $ `src/common/bnet_protocol.h:2572:9`!) |
| 166 | stdcxx . . $ std/::strcat(buffer, ",Gavel"); |
| 167 | if (flags&MF_VOICEcxx . . $ `src/common/bnet_protocol.h:2574:9`!) |
| 168 | stdcxx . . $ std/::strcat(buffer, ",Megaphone"); |
| 169 | if (flags&MF_BNETcxx . . $ `src/common/bnet_protocol.h:2576:9`!) |
| 170 | stdcxx . . $ std/::strcat(buffer, ",BNET"); |
| 171 | if (flags&MF_PLUGcxx . . $ `src/common/bnet_protocol.h:2578:9`!) |
| 172 | stdcxx . . $ std/::strcat(buffer, ",Plug"); |
| 173 | if (flags&MF_Xcxx . . $ `src/common/bnet_protocol.h:2580:9`!) |
| 174 | stdcxx . . $ std/::strcat(buffer, ",X"); |
| 175 | if (flags&MF_SHADEScxx . . $ `src/common/bnet_protocol.h:2582:9`!) |
| 176 | stdcxx . . $ std/::strcat(buffer, ",Shades"); |
| 177 | if (flags&MF_PGLPLAYcxx . . $ `src/common/bnet_protocol.h:2588:9`!) |
| 178 | stdcxx . . $ std/::strcat(buffer, ",PGL_Player"); |
| 179 | if (flags&MF_PGLOFFLcxx . . $ `src/common/bnet_protocol.h:2590:9`!) |
| 180 | stdcxx . . $ std/::strcat(buffer, ",PGL_Official"); |
| 181 | buffer[0] = '['; |
| 182 | stdcxx . . $ std/::strcat(buffer, "]"); |
| 183 | |
| 184 | return buffer; |
| 185 | } |
| 186 | |
| 187 | |
| 188 | char const * cflags_get_strcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/cflags_get_str(81a3ae90da26a711).(unsigned int flags) |
| 189 | { |
| 190 | static char buffer[32]; |
| 191 | |
| 192 | buffer[0] = buffer[1] = '\0'; |
| 193 | if (flags&CF_PUBLICcxx . . $ `src/common/bnet_protocol.h:2599:9`!) |
| 194 | stdcxx . . $ std/::strcat(buffer, ",Public"); |
| 195 | if (flags&CF_MODERATEDcxx . . $ `src/common/bnet_protocol.h:2600:9`!) |
| 196 | stdcxx . . $ std/::strcat(buffer, ",Moderated"); |
| 197 | if (flags&CF_RESTRICTEDcxx . . $ `src/common/bnet_protocol.h:2601:9`!) |
| 198 | stdcxx . . $ std/::strcat(buffer, ",Restricted"); |
| 199 | if (flags&CF_THEVOIDcxx . . $ `src/common/bnet_protocol.h:2602:9`!) |
| 200 | stdcxx . . $ std/::strcat(buffer, ",The Void"); |
| 201 | if (flags&CF_SYSTEMcxx . . $ `src/common/bnet_protocol.h:2603:9`!) |
| 202 | stdcxx . . $ std/::strcat(buffer, ",System"); |
| 203 | if (flags&CF_OFFICIALcxx . . $ `src/common/bnet_protocol.h:2604:9`!) |
| 204 | stdcxx . . $ std/::strcat(buffer, ",Official"); |
| 205 | buffer[0] = '['; |
| 206 | stdcxx . . $ std/::strcat(buffer, "]"); |
| 207 | |
| 208 | return buffer; |
| 209 | } |
| 210 | |
| 211 | |
| 212 | char const * mode_get_promptcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_get_prompt(712bb7cbb4b8ba9d).(t_modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/t_mode# mode) |
| 213 | { |
| 214 | switch (mode) |
| 215 | { |
| 216 | case mode_chatcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_chat.: |
| 217 | return "] "; |
| 218 | case mode_commandcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_command.: |
| 219 | return "command> "; |
| 220 | case mode_waitstatcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_waitstat.: |
| 221 | case mode_waitgamescxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_waitgames.: |
| 222 | case mode_waitladdercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_waitladder.: |
| 223 | case mode_gamewaitcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamewait.: |
| 224 | return "*please wait* "; |
| 225 | case mode_gamenamecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamename.: |
| 226 | return "Name: "; |
| 227 | case mode_gamepasscxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamepass.: |
| 228 | return "Password: "; |
| 229 | case mode_gamestopcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamestop.: |
| 230 | return "[Return to kill game] "; |
| 231 | default: |
| 232 | return "? "; |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | |
| 237 | int print_filecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/print_file(f2e8c84f0552bce3).(struct sockaddr_in * saddr, char const * filename, char const * progname, char const * clienttag) |
| 238 | { |
| 239 | int sd; |
| 240 | t_packetcxx . . $ pvpgn/t_packet# * ipacket; |
| 241 | t_packetcxx . . $ pvpgn/t_packet# * packet; |
| 242 | t_packetcxx . . $ pvpgn/t_packet# * rpacket; |
| 243 | t_packetcxx . . $ pvpgn/t_packet# * fpacket; |
| 244 | unsigned int currsize; |
| 245 | unsigned int filelen; |
| 246 | |
| 247 | if (!saddr || !filename || !progname) |
| 248 | return -1; |
| 249 | |
| 250 | if ((sd = psock_socketcxx . . $ `src/compat/psock.h:287:9`!(PSOCK_PF_INETcxx . . $ `src/compat/psock.h:186:9`!, PSOCK_SOCK_STREAMcxx . . $ `src/compat/psock.h:192:9`!, PSOCK_IPPROTO_TCPcxx . . $ `src/compat/psock.h:197:10`!)) < 0) |
| 251 | { |
| 252 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create socket (psock_socket: %s)\n", progname, stdcxx . . $ std/::strerror(psock_errnocxx . . $ `src/compat/psock.h:286:9`!())); |
| 253 | return -1; |
| 254 | } |
| 255 | |
| 256 | if (psock_connectcxx . . $ `src/compat/psock.h:294:9`!(sd, (struct sockaddr *)saddr, sizeof(*saddr)) < 0) |
| 257 | { |
| 258 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not connect to server (psock_connect: %s)\n", progname, stdcxx . . $ std/::strerror(psock_errnocxx . . $ `src/compat/psock.h:286:9`!())); |
| 259 | return -1; |
| 260 | } |
| 261 | |
| 262 | if (!(ipacket = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_initcxx . . $ pvpgn/packet_class_init.))) |
| 263 | { |
| 264 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", progname); |
| 265 | return -1; |
| 266 | } |
| 267 | bn_byte_set(&ipacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_initconncxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_initconn..cclasscxx . . $ pvpgn/$anonymous_type_7cca3803bac3bad7_0#cclass., CLIENT_INITCONN_CLASS_FILEcxx . . $ `src/common/init_protocol.h:60:9`!); |
| 268 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(sd, ipacket); |
| 269 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(ipacket); |
| 270 | |
| 271 | if (!(rpacket = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_filecxx . . $ pvpgn/packet_class_file.))) |
| 272 | { |
| 273 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", progname); |
| 274 | return -1; |
| 275 | } |
| 276 | |
| 277 | if (!(fpacket = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_rawcxx . . $ pvpgn/packet_class_raw.))) |
| 278 | { |
| 279 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", progname); |
| 280 | return -1; |
| 281 | } |
| 282 | |
| 283 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_filecxx . . $ pvpgn/packet_class_file.))) |
| 284 | { |
| 285 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", progname); |
| 286 | return -1; |
| 287 | } |
| 288 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_file_reqcxx . . $ pvpgn/t_client_file_req#)); |
| 289 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_FILE_REQcxx . . $ `src/common/file_protocol.h:68:9`!); |
| 290 | bn_int_tag_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_file_reqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_file_req..archtagcxx . . $ pvpgn/$anonymous_type_d2bac4e24f922c3_2#archtag., ARCHTAG_WINX86cxx . . $ `src/common/tag.h:155:9`!); |
| 291 | bn_int_tag_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_file_reqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_file_req..clienttagcxx . . $ pvpgn/$anonymous_type_d2bac4e24f922c3_2#clienttag., clienttag); |
| 292 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_file_reqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_file_req..adidcxx . . $ pvpgn/$anonymous_type_d2bac4e24f922c3_2#adid., 0); |
| 293 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_file_reqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_file_req..extensiontagcxx . . $ pvpgn/$anonymous_type_d2bac4e24f922c3_2#extensiontag., 0); |
| 294 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_file_reqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_file_req..startoffsetcxx . . $ pvpgn/$anonymous_type_d2bac4e24f922c3_2#startoffset., 0); |
| 295 | bn_long_set_a_b(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_file_reqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_file_req..timestampcxx . . $ pvpgn/$anonymous_type_d2bac4e24f922c3_2#timestamp., 0x00000000, 0x00000000); |
| 296 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, filename); |
| 297 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(sd, packet); |
| 298 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 299 | |
| 300 | do |
| 301 | if (client_blockrecv_packetcxx . . $ pvpgn/client/client_blockrecv_packet(98f963a6be74727b).(sd, rpacket) < 0) |
| 302 | { |
| 303 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: server closed file connection\n", progname); |
| 304 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(fpacket); |
| 305 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(rpacket); |
| 306 | return -1; |
| 307 | } |
| 308 | while (packet_get_typecxx . . $ pvpgn/packet_get_type(e4ac9e2b4744cb4b).(rpacket) != SERVER_FILE_REPLYcxx . . $ `src/common/file_protocol.h:130:9`!); |
| 309 | |
| 310 | filelen = bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_file_replycxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_file_reply..filelencxx . . $ pvpgn/$anonymous_type_d2bac4e24f922c3_5#filelen.); |
| 311 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(rpacket); |
| 312 | |
| 313 | for (currsize = 0; currsize + MAX_PACKET_SIZEcxx . . $ MAX_PACKET_SIZE. <= filelen; currsize += MAX_PACKET_SIZEcxx . . $ MAX_PACKET_SIZE.) |
| 314 | { |
| 315 | if (client_blockrecv_raw_packetcxx . . $ pvpgn/client/client_blockrecv_raw_packet(8525baaf8ed3d6bc).(sd, fpacket, MAX_PACKET_SIZEcxx . . $ MAX_PACKET_SIZE.) < 0) |
| 316 | { |
| 317 | stdcxx . . $ std/::fflushcxx . . $ std/fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!); |
| 318 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: server closed file connection\n", progname); |
| 319 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(fpacket); |
| 320 | return -1; |
| 321 | } |
| 322 | str_print_termcxx . . $ pvpgn/str_print_term(977aada8a81832c9).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!, (const char*)packet_get_raw_data_constcxx . . $ pvpgn/packet_get_raw_data_const(1f58ab00371793b4).(fpacket, 0), MAX_PACKET_SIZEcxx . . $ MAX_PACKET_SIZE., 1); |
| 323 | } |
| 324 | filelen -= currsize; |
| 325 | if (filelen) |
| 326 | { |
| 327 | if (client_blockrecv_raw_packetcxx . . $ pvpgn/client/client_blockrecv_raw_packet(8525baaf8ed3d6bc).(sd, fpacket, filelen) < 0) |
| 328 | { |
| 329 | stdcxx . . $ std/::fflushcxx . . $ std/fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!); |
| 330 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: server closed file connection\n", progname); |
| 331 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(fpacket); |
| 332 | return -1; |
| 333 | } |
| 334 | str_print_termcxx . . $ pvpgn/str_print_term(977aada8a81832c9).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!, (const char*)packet_get_raw_data_constcxx . . $ pvpgn/packet_get_raw_data_const(1f58ab00371793b4).(fpacket, 0), filelen, 1); |
| 335 | } |
| 336 | stdcxx . . $ std/::fflushcxx . . $ std/fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!); |
| 337 | |
| 338 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(sd); |
| 339 | |
| 340 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(fpacket); |
| 341 | |
| 342 | return 0; |
| 343 | } |
| 344 | |
| 345 | |
| 346 | void usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(char const * progname) |
| 347 | { |
| 348 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "usage: %s [<options>] [<servername> [<TCP portnumber>]]\n", progname); |
| 349 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, |
| 350 | " -a, --ansi-color use ANSI colors\n" |
| 351 | " -n, --new-account create a new account\n" |
| 352 | " -c, --change-password change account password\n" |
| 353 | " --client=CHAT report client as a chat bot\n" |
| 354 | " -b, --client=SEXP report client as Brood Wars\n" |
| 355 | " -d, --client=DRTL report client as Diablo Retail\n" |
| 356 | " --client=DSHR report client as Diablo Shareware\n"); |
| 357 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, |
| 358 | " -s, --client=STAR report client as Starcraft (default)\n" |
| 359 | " --client=SSHR report client as Starcraft Shareware\n" |
| 360 | " -w, --client=W2BN report client as Warcraft II BNE\n" |
| 361 | " --client=D2DV report client as Diablo II\n" |
| 362 | " --client=D2XP report client as Diablo II: LoD\n" |
| 363 | " --client=WAR3 report client as Warcraft III\n" |
| 364 | " --client=W3XP report client as Warcraft III Frozen Throne\n" |
| 365 | " --arch=IX86 report architecture as Intel x86 (default)\n" |
| 366 | " --arch=PMAC report architecture as PowerPC MacOS\n" |
| 367 | " --arch=XMAC report architecture as PowerPC MacOSX\n"); |
| 368 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, |
| 369 | " -o NAME, --owner=NAME report CD owner as NAME\n" |
| 370 | " -k KEY, --cdkey=KEY report CD key as KEY\n" |
| 371 | " -l LANG --lang=LANG report language as LANG (default \"enUS\")\n" |
| 372 | " -i, --ignore-version ignore version request (do not send game version, CD owner/key)\n" |
| 373 | " -h, --help, --usage show this information and exit\n" |
| 374 | " -v, --version print version number and exit\n"); |
| 375 | stdcxx . . $ std/::exit(EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!); |
| 376 | } |
| 377 | |
| 378 | int read_commandlinecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/read_commandline(28509d2e3d6b185a).(int argc, char * * argv, |
| 379 | char const * * servname, unsigned short * servport, |
| 380 | char const * * clienttag, |
| 381 | char const * * archtag, |
| 382 | int * changepass, int * newacct, |
| 383 | char const * * channel, |
| 384 | char const * * cdowner, |
| 385 | char const * * cdkey, |
| 386 | char const * * gamelang, |
| 387 | int * ignoreversion, |
| 388 | int * useansi) |
| 389 | { |
| 390 | int a; |
| 391 | |
| 392 | if (argc < 1 || !argv || !argv[0]) |
| 393 | { |
| 394 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "bad arguments\n"); |
| 395 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 396 | } |
| 397 | |
| 398 | for (a = 1; a < argc; a++) |
| 399 | if (*servname && stdcxx . . $ std/::isdigitcxx . . $ std/isdigit(a1851578aea3f541).((int)argv[a][0]) && a + 1 >= argc) |
| 400 | { |
| 401 | if (str_to_ushortcxx . . $ pvpgn/str_to_ushort(c9bce2f4bcd31d4).(argv[a], servport) < 0) |
| 402 | { |
| 403 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: \"%s\" should be a positive integer\n", argv[0], argv[a]); |
| 404 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 405 | } |
| 406 | } |
| 407 | else if (!(*servname) && argv[a][0] != '-' && a + 2 >= argc) |
| 408 | *servname = argv[a]; |
| 409 | else if (stdcxx . . $ std/::strcmp(argv[a], "-a") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--use-ansi") == 0) |
| 410 | *useansi = 1; |
| 411 | else if (stdcxx . . $ std/::strcmp(argv[a], "-n") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--new-account") == 0) |
| 412 | { |
| 413 | if (*changepass) |
| 414 | { |
| 415 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: can not create new account when changing passwords\n", argv[0]); |
| 416 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 417 | } |
| 418 | *newacct = 1; |
| 419 | } |
| 420 | else if (stdcxx . . $ std/::strcmp(argv[a], "-c") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--change-password") == 0) |
| 421 | { |
| 422 | if (*newacct) |
| 423 | { |
| 424 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: can not change passwords when creating a new account\n", argv[0]); |
| 425 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 426 | } |
| 427 | *changepass = 1; |
| 428 | } |
| 429 | else if (stdcxx . . $ std/::strcmp(argv[a], "--client=CHAT") == 0) |
| 430 | { |
| 431 | if (*clienttag) |
| 432 | { |
| 433 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: client type was already specified as \"%s\"\n", argv[0], *clienttag); |
| 434 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 435 | } |
| 436 | *clienttag = CLIENTTAG_BNCHATBOTcxx . . $ `src/common/tag.h:84:9`!; |
| 437 | *channel = CHANNEL_BNCHATBOTcxx . . $ `src/client/bnchat.cpp:69:9`!; |
| 438 | } |
| 439 | else if (stdcxx . . $ std/::strcmp(argv[a], "-b") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--client=SEXP") == 0) |
| 440 | { |
| 441 | if (*clienttag) |
| 442 | { |
| 443 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: client type was already specified as \"%s\"\n", argv[0], *clienttag); |
| 444 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 445 | } |
| 446 | *clienttag = CLIENTTAG_BROODWARScxx . . $ `src/common/tag.h:88:9`!; |
| 447 | *channel = CHANNEL_BROODWARScxx . . $ `src/client/bnchat.cpp:71:9`!; |
| 448 | } |
| 449 | else if (stdcxx . . $ std/::strcmp(argv[a], "-d") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--client=DRTL") == 0) |
| 450 | { |
| 451 | if (*clienttag) |
| 452 | { |
| 453 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: client type was already specified as \"%s\"\n", argv[0], *clienttag); |
| 454 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 455 | } |
| 456 | *clienttag = CLIENTTAG_DIABLORTLcxx . . $ `src/common/tag.h:92:9`!; |
| 457 | *channel = CHANNEL_DIABLORTLcxx . . $ `src/client/bnchat.cpp:73:9`!; |
| 458 | } |
| 459 | else if (stdcxx . . $ std/::strcmp(argv[a], "--client=DSHR") == 0) |
| 460 | { |
| 461 | if (*clienttag) |
| 462 | { |
| 463 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: client type was already specified as \"%s\"\n", argv[0], *clienttag); |
| 464 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 465 | } |
| 466 | *clienttag = CLIENTTAG_DIABLOSHRcxx . . $ `src/common/tag.h:94:9`!; |
| 467 | *channel = CHANNEL_DIABLOSHRcxx . . $ `src/client/bnchat.cpp:74:9`!; |
| 468 | } |
| 469 | else if (stdcxx . . $ std/::strcmp(argv[a], "-s") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--client=STAR") == 0) |
| 470 | { |
| 471 | if (*clienttag) |
| 472 | { |
| 473 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: client type was already specified as \"%s\"\n", argv[0], *clienttag); |
| 474 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 475 | } |
| 476 | *clienttag = CLIENTTAG_STARCRAFTcxx . . $ `src/common/tag.h:86:9`!; |
| 477 | *channel = CHANNEL_STARCRAFTcxx . . $ `src/client/bnchat.cpp:70:9`!; |
| 478 | } |
| 479 | else if (stdcxx . . $ std/::strcmp(argv[a], "--client=SSHR") == 0) |
| 480 | { |
| 481 | if (*clienttag) |
| 482 | { |
| 483 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: client type was already specified as \"%s\"\n", argv[0], *clienttag); |
| 484 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 485 | } |
| 486 | *clienttag = CLIENTTAG_SHAREWAREcxx . . $ `src/common/tag.h:90:9`!; |
| 487 | *channel = CHANNEL_SHAREWAREcxx . . $ `src/client/bnchat.cpp:72:9`!; |
| 488 | } |
| 489 | else if (stdcxx . . $ std/::strcmp(argv[a], "-w") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--client=W2BN") == 0) |
| 490 | { |
| 491 | if (*clienttag) |
| 492 | { |
| 493 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: client type was already specified as \"%s\"\n", argv[0], *clienttag); |
| 494 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 495 | } |
| 496 | *clienttag = CLIENTTAG_WARCIIBNEcxx . . $ `src/common/tag.h:96:9`!; |
| 497 | *channel = CHANNEL_WARCIIBNEcxx . . $ `src/client/bnchat.cpp:75:9`!; |
| 498 | } |
| 499 | else if (stdcxx . . $ std/::strcmp(argv[a], "--client=D2DV") == 0) |
| 500 | { |
| 501 | if (*clienttag) |
| 502 | { |
| 503 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: client type was already specified as \"%s\"\n", argv[0], *clienttag); |
| 504 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 505 | } |
| 506 | *clienttag = CLIENTTAG_DIABLO2DVcxx . . $ `src/common/tag.h:98:9`!; |
| 507 | *channel = CHANNEL_DIABLO2DVcxx . . $ `src/client/bnchat.cpp:76:9`!; |
| 508 | } |
| 509 | else if (stdcxx . . $ std/::strcmp(argv[a], "--client=D2XP") == 0) |
| 510 | { |
| 511 | if (*clienttag) |
| 512 | { |
| 513 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: client type was already specified as \"%s\"\n", argv[0], *clienttag); |
| 514 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 515 | } |
| 516 | *clienttag = CLIENTTAG_DIABLO2XPcxx . . $ `src/common/tag.h:104:9`!; |
| 517 | *channel = CHANNEL_DIABLO2XPcxx . . $ `src/client/bnchat.cpp:77:9`!; |
| 518 | } |
| 519 | else if (stdcxx . . $ std/::strcmp(argv[a], "--client=WAR3") == 0) |
| 520 | { |
| 521 | if (*clienttag) |
| 522 | { |
| 523 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: client type was already specified as \"%s\"\n", argv[0], *clienttag); |
| 524 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 525 | } |
| 526 | *clienttag = CLIENTTAG_WARCRAFT3cxx . . $ `src/common/tag.h:110:9`!; |
| 527 | *channel = CHANNEL_WARCRAFT3cxx . . $ `src/client/bnchat.cpp:78:9`!; |
| 528 | } |
| 529 | else if (stdcxx . . $ std/::strcmp(argv[a], "--client=W3XP") == 0) |
| 530 | { |
| 531 | if (*clienttag) |
| 532 | { |
| 533 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: client type was already specified as \"%s\"\n", argv[0], *clienttag); |
| 534 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 535 | } |
| 536 | *clienttag = CLIENTTAG_WAR3XPcxx . . $ `src/common/tag.h:112:9`!; |
| 537 | *channel = CHANNEL_WAR3XPcxx . . $ `src/client/bnchat.cpp:79:9`!; |
| 538 | } |
| 539 | else if (stdcxx . . $ std/::strncmp(argv[a], "--client=", 9) == 0) |
| 540 | { |
| 541 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: unknown client tag \"%s\"\n", argv[0], &argv[a][9]); |
| 542 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 543 | } |
| 544 | else if (stdcxx . . $ std/::strcmp(argv[a], "--arch=IX86") == 0) |
| 545 | { |
| 546 | *archtag = ARCHTAG_WINX86cxx . . $ `src/common/tag.h:155:9`!; |
| 547 | } |
| 548 | else if (stdcxx . . $ std/::strcmp(argv[a], "--arch=PMAC") == 0) |
| 549 | { |
| 550 | *archtag = ARCHTAG_MACPPCcxx . . $ `src/common/tag.h:156:9`!; |
| 551 | } |
| 552 | else if (stdcxx . . $ std/::strcmp(argv[a], "--arch=XMAC") == 0) |
| 553 | { |
| 554 | *archtag = ARCHTAG_OSXPPCcxx . . $ `src/common/tag.h:157:9`!; |
| 555 | } |
| 556 | else if (stdcxx . . $ std/::strncmp(argv[a], "--arch=", 7) == 0) |
| 557 | { |
| 558 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: unknown architecture tag \"%s\"\n", argv[0], &argv[a][7]); |
| 559 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 560 | } |
| 561 | else if (stdcxx . . $ std/::strcmp(argv[a], "-o") == 0) |
| 562 | { |
| 563 | if (a + 1 >= argc) |
| 564 | { |
| 565 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: option \"%s\" requires an argument\n", argv[0], argv[a]); |
| 566 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 567 | } |
| 568 | if (*cdowner) |
| 569 | { |
| 570 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: CD owner was already specified as \"%s\"\n", argv[0], *cdowner); |
| 571 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 572 | } |
| 573 | *cdowner = argv[++a]; |
| 574 | } |
| 575 | else if (stdcxx . . $ std/::strncmp(argv[a], "--owner=", 8) == 0) |
| 576 | { |
| 577 | if (*cdowner) |
| 578 | { |
| 579 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: CD owner was already specified as \"%s\"\n", argv[0], *cdowner); |
| 580 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 581 | } |
| 582 | *cdowner = &argv[a][8]; |
| 583 | } |
| 584 | else if (stdcxx . . $ std/::strcmp(argv[a], "-k") == 0) |
| 585 | { |
| 586 | if (a + 1 >= argc) |
| 587 | { |
| 588 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: option \"%s\" requires an argument\n", argv[0], argv[a]); |
| 589 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 590 | } |
| 591 | if (*cdkey) |
| 592 | { |
| 593 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: CD key was already specified as \"%s\"\n", argv[0], *cdkey); |
| 594 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 595 | } |
| 596 | *cdkey = argv[++a]; |
| 597 | } |
| 598 | else if (stdcxx . . $ std/::strncmp(argv[a], "--cdkey=", 8) == 0) |
| 599 | { |
| 600 | if (*cdkey) |
| 601 | { |
| 602 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: CD key was already specified as \"%s\"\n", argv[0], *cdkey); |
| 603 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 604 | } |
| 605 | *cdkey = &argv[a][8]; |
| 606 | } |
| 607 | else if (stdcxx . . $ std/::strcmp(argv[a], "-l") == 0) |
| 608 | { |
| 609 | if (a + 1 >= argc) |
| 610 | { |
| 611 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: option \"%s\" requires an argument\n", argv[0], argv[a]); |
| 612 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 613 | } |
| 614 | if (stdcxx . . $ std/::strlen(argv[a + 1]) != 4) |
| 615 | { |
| 616 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: language has to be 4 characters long\n", argv[0]); |
| 617 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 618 | } |
| 619 | *gamelang = argv[++a]; |
| 620 | } |
| 621 | else if (stdcxx . . $ std/::strncmp(argv[a], "--lang=", 7) == 0) |
| 622 | { |
| 623 | if (stdcxx . . $ std/::strlen(argv[a] + 7) != 4) |
| 624 | { |
| 625 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: language has to be 4 characters long\n", argv[0]); |
| 626 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 627 | } |
| 628 | *gamelang = &argv[a][7]; |
| 629 | } |
| 630 | else if (stdcxx . . $ std/::strcmp(argv[a], "-v") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--version") == 0) |
| 631 | { |
| 632 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("version " PVPGN_VERSIONcxx . . $ `src/common/version.h:23:9`! "\n"); |
| 633 | return EXIT_SUCCESScxx . . $ `<external>/10696550936717951914/stdlib.h:93:9`!; |
| 634 | } |
| 635 | else if (stdcxx . . $ std/::strcmp(argv[a], "-h") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--help") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--usage") == 0) |
| 636 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 637 | else if (stdcxx . . $ std/::strcmp(argv[a], "--client") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--owner") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--cdkey") == 0) |
| 638 | { |
| 639 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: option \"%s\" requires an argument\n", argv[0], argv[a]); |
| 640 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 641 | } |
| 642 | else if (stdcxx . . $ std/::strcmp(argv[a], "-i") == 0 || stdcxx . . $ std/::strcmp(argv[a], "--ignore-version") == 0) |
| 643 | { |
| 644 | *ignoreversion = 1; |
| 645 | } |
| 646 | else |
| 647 | { |
| 648 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: unknown option \"%s\"\n", argv[0], argv[a]); |
| 649 | usagecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/usage(85c52e162fed56f9).(argv[0]); |
| 650 | } |
| 651 | |
| 652 | if (*servport == 0) |
| 653 | *servport = BNETD_SERV_PORTcxx . . $ BNETD_SERV_PORT.; |
| 654 | if (!(*cdowner)) |
| 655 | *cdowner = BNETD_DEFAULT_OWNERcxx . . $ BNETD_DEFAULT_OWNER.; |
| 656 | if (!(*cdkey)) |
| 657 | *cdkey = BNETD_DEFAULT_KEYcxx . . $ BNETD_DEFAULT_KEY.; |
| 658 | if (!(*clienttag)) |
| 659 | { |
| 660 | *clienttag = CLIENTTAG_STARCRAFTcxx . . $ `src/common/tag.h:86:9`!; |
| 661 | *channel = CHANNEL_STARCRAFTcxx . . $ `src/client/bnchat.cpp:70:9`!; |
| 662 | } |
| 663 | if (!(*servname)) |
| 664 | *servname = BNETD_DEFAULT_HOSTcxx . . $ BNETD_DEFAULT_HOST.; |
| 665 | |
| 666 | return 0; |
| 667 | } |
| 668 | |
| 669 | void mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(t_client_statecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/t_client_state# * client) |
| 670 | { |
| 671 | if (!client->mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged.) |
| 672 | { |
| 673 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\r"); |
| 674 | size_t client_modelen = stdcxx . . $ std/::strlen(mode_get_promptcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_get_prompt(712bb7cbb4b8ba9d).(client->modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode.)); |
| 675 | for (unsigned i = 0; i < client_modelen; i++) |
| 676 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" "); |
| 677 | |
| 678 | size_t client_textlen = stdcxx . . $ std/::strlen(client->textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.); |
| 679 | for (unsigned i = 0; i < client_textlen && i < client->screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width. - client_modelen; i++) |
| 680 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" "); |
| 681 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\r"); |
| 682 | client->mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 683 | } |
| 684 | } |
| 685 | |
| 686 | void ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(t_client_statecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/t_client_state# * client, int color, char const * fmt, ...) |
| 687 | { |
| 688 | stdcxx . . $ std/::va_listcxx . . $ std/va_list# args; |
| 689 | char buffer[2048]; |
| 690 | |
| 691 | if (!(client)) |
| 692 | return; |
| 693 | |
| 694 | if (!(fmt)) |
| 695 | return; |
| 696 | |
| 697 | if (client->useansicxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#useansi.) |
| 698 | ansi_text_color_forecxx . . $ `src/client/ansi_term.h:63:9`!(color); |
| 699 | |
| 700 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(args, fmt); |
| 701 | stdcxx . . $ std/::vsnprintfcxx . . $ std/vsnprintf(348eb892742d8727).(buffer, 2048, fmt, args); |
| 702 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(args); |
| 703 | |
| 704 | str_print_termcxx . . $ pvpgn/str_print_term(977aada8a81832c9).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!, buffer, 0, 1); |
| 705 | |
| 706 | if (client->useansicxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#useansi.) |
| 707 | ansi_text_resetcxx . . $ `src/client/ansi_term.h:57:9`!(); |
| 708 | |
| 709 | stdcxx . . $ std/::fflushcxx . . $ std/fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!); |
| 710 | |
| 711 | } |
| 712 | |
| 713 | } |
| 714 | |
| 715 | extern int maincxx . . $ main(afcd3168fc1188a4).(int argc, char * argv[]) |
| 716 | { |
| 717 | int newacct = 0; |
| 718 | int changepass = 0; |
| 719 | t_client_statecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/t_client_state# client; |
| 720 | t_user_infocxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/t_user_info# user; |
| 721 | t_packetcxx . . $ pvpgn/t_packet# * packet; |
| 722 | t_packetcxx . . $ pvpgn/t_packet# * rpacket; |
| 723 | char const * servname = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 724 | unsigned short servport = 0; |
| 725 | char const * * channellist; |
| 726 | unsigned int statsmatch = 24; /* any random number that is rare in uninitialized fields */ |
| 727 | |
| 728 | stdcxx . . $ std/::memset(&user, 0, sizeof(t_user_infocxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/t_user_info#)); |
| 729 | stdcxx . . $ std/::memset(&client, 0, sizeof(t_client_statecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/t_client_state#)); |
| 730 | |
| 731 | /* default values */ |
| 732 | user.archtagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#archtag. = ARCHTAG_WINX86cxx . . $ `src/common/tag.h:155:9`!; |
| 733 | user.gamelangcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#gamelang. = CLIENT_AUTH_INFO_GAMELANGcxx . . $ `src/client/client_connect.h:72:9`!; |
| 734 | user.ignoreversioncxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#ignoreversion. = 0; |
| 735 | |
| 736 | read_commandlinecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/read_commandline(28509d2e3d6b185a).(argc, argv, &servname, &servport, &user.clienttagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clienttag., &user.archtagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#archtag., &changepass, |
| 737 | &newacct, &user.channelcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#channel., &user.cdownercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#cdowner., &user.cdkeycxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#cdkey., &user.gamelangcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#gamelang., &user.ignoreversioncxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#ignoreversion., &client.useansicxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#useansi.); |
| 738 | |
| 739 | client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin. = fileno(stdincxx . . $ `<external>/232824719582829767/stdio.h:153:9`!); |
| 740 | if (tcgetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.) >= 0) |
| 741 | { |
| 742 | client.in_attr_newcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_new. = client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.; |
| 743 | client.in_attr_newcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_new..c_lflag &= ~(ECHOcxx . . $ `<external>/2220421410900157355/termios-c_lflag.h:29:9`! | ICANONcxx . . $ `<external>/2220421410900157355/termios-c_lflag.h:25:9`!); /* turn off ECHO and ICANON */ |
| 744 | client.in_attr_newcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_new..c_cc[VMINcxx . . $ `<external>/5505922754558120548/termios-c_cc.h:30:9`!] = 0; /* don't require reads to return data */ |
| 745 | client.in_attr_newcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_new..c_cc[VTIMEcxx . . $ `<external>/5505922754558120548/termios-c_cc.h:29:9`!] = 1; /* timeout = .1 seconds */ |
| 746 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSANOWcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:24:9`!, &client.in_attr_newcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_new.); |
| 747 | client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in. = 1; |
| 748 | } |
| 749 | else |
| 750 | { |
| 751 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not set terminal attributes for stdin\n", argv[0]); |
| 752 | client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in. = 0; |
| 753 | } |
| 754 | |
| 755 | #ifdef HAVE_SIGACTIONcxx . . $ `build/config.h:73:9`! |
| 756 | { |
| 757 | struct sigaction winch_action; |
| 758 | |
| 759 | winch_action.sa_handlercxx . . $ `<external>/16635209305659446502/sigaction.h:39:10`! = winch_sig_handlecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/winch_sig_handle(d4f767463ce0a6b3).; |
| 760 | sigemptyset(&winch_action.sa_mask); |
| 761 | winch_action.sa_flags = SA_RESTARTcxx . . $ `<external>/16635209305659446502/sigaction.h:64:10`!; |
| 762 | |
| 763 | sigaction(SIGWINCHcxx . . $ `<external>/1457673850468744829/signum-arch.h:54:9`!, &winch_action, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 764 | } |
| 765 | #endif |
| 766 | |
| 767 | |
| 768 | if (client_get_termsizecxx . . $ pvpgn/client/client_get_termsize(1ea1e3350d45fd0e).(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., &client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width., &client.screen_heightcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_height.) < 0) |
| 769 | { |
| 770 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not determine screen size\n", argv[0]); |
| 771 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 772 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 773 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 774 | } |
| 775 | |
| 776 | if (client.useansicxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#useansi.) |
| 777 | { |
| 778 | ansi_text_resetcxx . . $ `src/client/ansi_term.h:57:9`!(); |
| 779 | ansi_screen_clearcxx . . $ `src/client/ansi_term.h:27:9`!(); |
| 780 | ansi_cursor_move_homecxx . . $ `src/client/ansi_term.h:45:9`!(); |
| 781 | stdcxx . . $ std/::fflushcxx . . $ std/fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!); |
| 782 | } |
| 783 | |
| 784 | if ((client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd. = client_connectcxx . . $ pvpgn/client/client_connect(20c2760950162537).(argv[0], |
| 785 | servname, servport, user.cdownercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#cdowner., user.cdkeycxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#cdkey., user.clienttagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clienttag., user.ignoreversioncxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#ignoreversion., |
| 786 | &client.saddrcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#saddr., &client.sessionkeycxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sessionkey., &client.sessionnumcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sessionnum., user.archtagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#archtag., user.gamelangcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#gamelang.)) < 0) |
| 787 | { |
| 788 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: fatal error during handshake\n", argv[0]); |
| 789 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 790 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 791 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 792 | } |
| 793 | |
| 794 | /* reuse this same packet over and over */ |
| 795 | if (!(rpacket = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 796 | { |
| 797 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", argv[0]); |
| 798 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 799 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 800 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 801 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 802 | } |
| 803 | |
| 804 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 805 | { |
| 806 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", argv[0]); |
| 807 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 808 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 809 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 810 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 811 | } |
| 812 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_fileinforeqcxx . . $ pvpgn/t_client_fileinforeq#)); |
| 813 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_FILEINFOREQcxx . . $ `src/common/bnet_protocol.h:1917:9`!); |
| 814 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_fileinforeqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_fileinforeq..typecxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_84#type., CLIENT_FILEINFOREQ_TYPE_TOScxx . . $ `src/common/bnet_protocol.h:1925:9`!); |
| 815 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_fileinforeqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_fileinforeq..unknown2cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_84#unknown2., CLIENT_FILEINFOREQ_UNKNOWN2cxx . . $ `src/common/bnet_protocol.h:1930:9`!); |
| 816 | |
| 817 | if (strcasecmp(user.clienttagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clienttag., CLIENTTAG_DIABLO2DVcxx . . $ `src/common/tag.h:98:9`!) == 0 || strcasecmp(user.clienttagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clienttag., CLIENTTAG_DIABLO2XPcxx . . $ `src/common/tag.h:104:9`!) == 0) |
| 818 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, CLIENT_FILEINFOREQ_FILE_TOSUNICODEUSAcxx . . $ `src/common/bnet_protocol.h:1932:9`!); |
| 819 | else |
| 820 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, CLIENT_FILEINFOREQ_FILE_TOSUSAcxx . . $ `src/common/bnet_protocol.h:1931:9`!); |
| 821 | |
| 822 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 823 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 824 | do |
| 825 | if (client_blockrecv_packetcxx . . $ pvpgn/client/client_blockrecv_packet(98f963a6be74727b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., rpacket) < 0) |
| 826 | { |
| 827 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: server closed connection\n", argv[0]); |
| 828 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 829 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 830 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 831 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 832 | } |
| 833 | while (packet_get_typecxx . . $ pvpgn/packet_get_type(e4ac9e2b4744cb4b).(rpacket) != SERVER_FILEINFOREPLYcxx . . $ `src/common/bnet_protocol.h:1945:9`!); |
| 834 | |
| 835 | /* real client would also send statsreq on past logins here */ |
| 836 | |
| 837 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("----\n"); |
| 838 | if (newacct) |
| 839 | { |
| 840 | if (client.useansicxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#useansi.) |
| 841 | ansi_text_color_forecxx . . $ `src/client/ansi_term.h:63:9`!(ansi_text_color_redcxx . . $ `src/client/ansi_term.h:75:9`!); |
| 842 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("###### Terms Of Service ######\n"); |
| 843 | print_filecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/print_file(f2e8c84f0552bce3).(&client.saddrcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#saddr., packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, sizeof(t_server_fileinforeplycxx . . $ pvpgn/t_server_fileinforeply#), 1024), argv[0], user.clienttagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clienttag.); |
| 844 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("##############################\n\n"); |
| 845 | if (client.useansicxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#useansi.) |
| 846 | ansi_text_resetcxx . . $ `src/client/ansi_term.h:57:9`!(); |
| 847 | } |
| 848 | |
| 849 | for (;;) |
| 850 | { |
| 851 | char password[MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN.]; |
| 852 | int status; |
| 853 | |
| 854 | if (newacct) |
| 855 | { |
| 856 | char passwordvrfy[MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN.]; |
| 857 | t_hashcxx . . $ pvpgn/t_hash# passhash1; |
| 858 | |
| 859 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Enter information for your new account\n"); |
| 860 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 861 | client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. = 0; |
| 862 | user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player.[0] = '\0'; |
| 863 | while ((status = client_get_commcxx . . $ pvpgn/client/client_get_comm(e9a6a98b384956c7).("Username: ", user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN., &client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos., |
| 864 | 1, client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged., client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width.)) == 0) |
| 865 | if (handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch.) |
| 866 | { |
| 867 | client_get_termsizecxx . . $ pvpgn/client/client_get_termsize(1ea1e3350d45fd0e).(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., &client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width., &client.screen_heightcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_height.); |
| 868 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" \r"); |
| 869 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 870 | handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch. = 0; |
| 871 | } |
| 872 | else |
| 873 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 0; |
| 874 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 875 | if (status < 0) |
| 876 | continue; |
| 877 | if (stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., ' ') || stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '\t') || |
| 878 | stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '\r') || stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '\n')) |
| 879 | { |
| 880 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Spaces are not allowed in usernames. Try again.\n"); |
| 881 | continue; |
| 882 | } |
| 883 | /* we could use std::strcspn() but it doesn't exist everywhere */ |
| 884 | if (stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '#') || |
| 885 | stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '%') || |
| 886 | stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '&') || |
| 887 | stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '*') || |
| 888 | stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '\\') || |
| 889 | stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '"') || |
| 890 | stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., ',') || |
| 891 | stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '<') || |
| 892 | stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '/') || |
| 893 | stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '>') || |
| 894 | stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., '?')) |
| 895 | { |
| 896 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("The special characters #%%&*\\\",</>? are not allowed in usernames. Try again.\n"); |
| 897 | } |
| 898 | if (stdcxx . . $ std/::strlen(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player.) >= MAX_USERNAME_LENcxx . . $ MAX_USERNAME_LEN.) |
| 899 | { |
| 900 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Usernames must not be more than %u characters long. Try again.\n", MAX_USERNAME_LENcxx . . $ MAX_USERNAME_LEN. - 1); |
| 901 | continue; |
| 902 | } |
| 903 | |
| 904 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 905 | client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. = 0; |
| 906 | password[0] = '\0'; |
| 907 | while ((status = client_get_commcxx . . $ pvpgn/client/client_get_comm(e9a6a98b384956c7).("Password: ", password, MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN., &client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos., 0, |
| 908 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged., client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width.)) == 0) |
| 909 | if (handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch.) |
| 910 | { |
| 911 | client_get_termsizecxx . . $ pvpgn/client/client_get_termsize(1ea1e3350d45fd0e).(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., &client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width., &client.screen_heightcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_height.); |
| 912 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" \r"); |
| 913 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 914 | handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch. = 0; |
| 915 | } |
| 916 | else |
| 917 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 0; |
| 918 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 919 | if (status<0) |
| 920 | continue; |
| 921 | if (stdcxx . . $ std/::strlen(password)>MAX_USERPASS_LENcxx . . $ MAX_USERPASS_LEN.) |
| 922 | { |
| 923 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("password must not be more than %u characters long. Try again.\n", MAX_USERPASS_LENcxx . . $ MAX_USERPASS_LEN.); |
| 924 | continue; |
| 925 | } |
| 926 | strtolowercxx . . $ pvpgn/strtolower(7a9722d75b371431).(password); |
| 927 | |
| 928 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 929 | client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. = 0; |
| 930 | passwordvrfy[0] = '\0'; |
| 931 | while ((status = client_get_commcxx . . $ pvpgn/client/client_get_comm(e9a6a98b384956c7).("Retype password: ", passwordvrfy, MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN., &client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos., 0, |
| 932 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged., client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width.)) == 0) |
| 933 | if (handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch.) |
| 934 | { |
| 935 | client_get_termsizecxx . . $ pvpgn/client/client_get_termsize(1ea1e3350d45fd0e).(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., &client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width., &client.screen_heightcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_height.); |
| 936 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" \r"); |
| 937 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 938 | handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch. = 0; |
| 939 | } |
| 940 | else |
| 941 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 0; |
| 942 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 943 | if (status < 0) |
| 944 | continue; |
| 945 | strtolowercxx . . $ pvpgn/strtolower(7a9722d75b371431).(passwordvrfy); |
| 946 | |
| 947 | if (stdcxx . . $ std/::strcmp(password, passwordvrfy) != 0) |
| 948 | { |
| 949 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Passwords do not match. Try again.\n"); |
| 950 | continue; |
| 951 | } |
| 952 | |
| 953 | bnet_hashcxx . . $ pvpgn/bnet_hash(2a8392f275be648).(&passhash1, stdcxx . . $ std/::strlen(password), password); /* do the single hash */ |
| 954 | |
| 955 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 956 | { |
| 957 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", argv[0]); |
| 958 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 959 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 960 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 961 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 962 | } |
| 963 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_createacctreq1cxx . . $ pvpgn/t_client_createacctreq1#)); |
| 964 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_CREATEACCTREQ1cxx . . $ `src/common/bnet_protocol.h:620:9`!); |
| 965 | hash_to_bnhashcxx . . $ pvpgn/hash_to_bnhash(50eab12f45c1086c).((t_hashcxx . . $ pvpgn/t_hash# const *)&passhash1, packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_createacctreq1cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_createacctreq1..password_hash1cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_31#password_hash1.); /* avoid warning */ |
| 966 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player.); |
| 967 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 968 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 969 | |
| 970 | do |
| 971 | if (client_blockrecv_packetcxx . . $ pvpgn/client/client_blockrecv_packet(98f963a6be74727b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., rpacket) < 0) |
| 972 | { |
| 973 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: server closed connection\n", argv[0]); |
| 974 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 975 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 976 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 977 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 978 | } |
| 979 | while (packet_get_typecxx . . $ pvpgn/packet_get_type(e4ac9e2b4744cb4b).(rpacket) != SERVER_CREATEACCTREPLY1cxx . . $ `src/common/bnet_protocol.h:638:9`!); |
| 980 | dprintfcxx . . $ `src/client/bnchat.cpp:64:10`!("Got CREATEACCTREPLY1\n"); |
| 981 | if (bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_createacctreply1cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_createacctreply1..resultcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_32#result.) == SERVER_CREATEACCTREPLY1_RESULT_NOcxx . . $ `src/common/bnet_protocol.h:645:9`!) |
| 982 | { |
| 983 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Could not create an account under that name. Try another one.\n"); |
| 984 | continue; |
| 985 | } |
| 986 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Account created.\n"); |
| 987 | } |
| 988 | else if (changepass) |
| 989 | { |
| 990 | char passwordprev[MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN.]; |
| 991 | char passwordvrfy[MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN.]; |
| 992 | structcxx . . $ main(afcd3168fc1188a4).$anonymous_type_1# |
| 993 | { |
| 994 | bn_intcxx . . $ pvpgn/bn_int# tickscxx . . $ main(afcd3168fc1188a4).$anonymous_type_1#ticks.; |
| 995 | bn_intcxx . . $ pvpgn/bn_int# sessionkeycxx . . $ main(afcd3168fc1188a4).$anonymous_type_1#sessionkey.; |
| 996 | bn_intcxx . . $ pvpgn/bn_int# passhash1cxx . . $ main(afcd3168fc1188a4).$anonymous_type_1#passhash1.[5]; |
| 997 | } temp; |
| 998 | t_hashcxx . . $ pvpgn/t_hash# oldpasshash1; |
| 999 | t_hashcxx . . $ pvpgn/t_hash# oldpasshash2; |
| 1000 | t_hashcxx . . $ pvpgn/t_hash# newpasshash1; |
| 1001 | unsigned int ticks; |
| 1002 | |
| 1003 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Enter your old and new login information\n"); |
| 1004 | |
| 1005 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1006 | client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. = 0; |
| 1007 | user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player.[0] = '\0'; |
| 1008 | while ((status = client_get_commcxx . . $ pvpgn/client/client_get_comm(e9a6a98b384956c7).("Username: ", user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN., &client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos., 1, |
| 1009 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged., client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width.)) == 0) |
| 1010 | if (handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch.) |
| 1011 | { |
| 1012 | client_get_termsizecxx . . $ pvpgn/client/client_get_termsize(1ea1e3350d45fd0e).(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., &client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width., &client.screen_heightcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_height.); |
| 1013 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" \r"); |
| 1014 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1015 | handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch. = 0; |
| 1016 | } |
| 1017 | else |
| 1018 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 0; |
| 1019 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1020 | if (status < 0) |
| 1021 | continue; |
| 1022 | if (stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., ' ')) |
| 1023 | { |
| 1024 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Spaces not allowed in username. Try again.\n"); |
| 1025 | continue; |
| 1026 | } |
| 1027 | if (stdcxx . . $ std/::strlen(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player.) >= MAX_USERNAME_LENcxx . . $ MAX_USERNAME_LEN.) |
| 1028 | { |
| 1029 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Usernames must not be more than %u characters long. Try again.\n", MAX_USERNAME_LENcxx . . $ MAX_USERNAME_LEN. - 1); |
| 1030 | continue; |
| 1031 | } |
| 1032 | |
| 1033 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1034 | client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. = 0; |
| 1035 | passwordprev[0] = '\0'; |
| 1036 | while ((status = client_get_commcxx . . $ pvpgn/client/client_get_comm(e9a6a98b384956c7).("Old password: ", passwordprev, MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN., &client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos., 0, |
| 1037 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged., client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width.)) == 0) |
| 1038 | if (handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch.) |
| 1039 | { |
| 1040 | client_get_termsizecxx . . $ pvpgn/client/client_get_termsize(1ea1e3350d45fd0e).(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., &client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width., &client.screen_heightcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_height.); |
| 1041 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" \r"); |
| 1042 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1043 | handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch. = 0; |
| 1044 | } |
| 1045 | else |
| 1046 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 0; |
| 1047 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1048 | if (status < 0) |
| 1049 | continue; |
| 1050 | strtolowercxx . . $ pvpgn/strtolower(7a9722d75b371431).(passwordprev); |
| 1051 | |
| 1052 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1053 | client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. = 0; |
| 1054 | password[0] = '\0'; |
| 1055 | while ((status = client_get_commcxx . . $ pvpgn/client/client_get_comm(e9a6a98b384956c7).("New password: ", password, MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN., &client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos., 0, |
| 1056 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged., client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width.)) == 0) |
| 1057 | if (handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch.) |
| 1058 | { |
| 1059 | client_get_termsizecxx . . $ pvpgn/client/client_get_termsize(1ea1e3350d45fd0e).(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., &client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width., &client.screen_heightcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_height.); |
| 1060 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" \r"); |
| 1061 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1062 | handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch. = 0; |
| 1063 | } |
| 1064 | else |
| 1065 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 0; |
| 1066 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1067 | if (status < 0) |
| 1068 | continue; |
| 1069 | strtolowercxx . . $ pvpgn/strtolower(7a9722d75b371431).(password); |
| 1070 | |
| 1071 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1072 | client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. = 0; |
| 1073 | passwordvrfy[0] = '\0'; |
| 1074 | while ((status = client_get_commcxx . . $ pvpgn/client/client_get_comm(e9a6a98b384956c7).("Retype new password: ", passwordvrfy, MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN., &client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos., 0, |
| 1075 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged., client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width.)) == 0) |
| 1076 | if (handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch.) |
| 1077 | { |
| 1078 | client_get_termsizecxx . . $ pvpgn/client/client_get_termsize(1ea1e3350d45fd0e).(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., &client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width., &client.screen_heightcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_height.); |
| 1079 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" \r"); |
| 1080 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1081 | handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch. = 0; |
| 1082 | } |
| 1083 | else |
| 1084 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 0; |
| 1085 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1086 | if (status < 0) |
| 1087 | continue; |
| 1088 | strtolowercxx . . $ pvpgn/strtolower(7a9722d75b371431).(passwordvrfy); |
| 1089 | |
| 1090 | if (stdcxx . . $ std/::strcmp(password, passwordvrfy) != 0) |
| 1091 | { |
| 1092 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("New passwords do not match. Try again.\n"); |
| 1093 | continue; |
| 1094 | } |
| 1095 | |
| 1096 | ticks = 0; /* FIXME: what to use here? */ |
| 1097 | bn_int_set(&temp.tickscxx . . $ main(afcd3168fc1188a4).$anonymous_type_1#ticks., ticks); |
| 1098 | bn_int_set(&temp.sessionkeycxx . . $ main(afcd3168fc1188a4).$anonymous_type_1#sessionkey., client.sessionkeycxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sessionkey.); |
| 1099 | bnet_hashcxx . . $ pvpgn/bnet_hash(2a8392f275be648).(&oldpasshash1, stdcxx . . $ std/::strlen(passwordprev), passwordprev); /* do the single hash for old */ |
| 1100 | hash_to_bnhashcxx . . $ pvpgn/hash_to_bnhash(50eab12f45c1086c).((t_hashcxx . . $ pvpgn/t_hash# const *)&oldpasshash1, temp.passhash1cxx . . $ main(afcd3168fc1188a4).$anonymous_type_1#passhash1.); /* avoid warning */ |
| 1101 | bnet_hashcxx . . $ pvpgn/bnet_hash(2a8392f275be648).(&oldpasshash2, sizeof(temp), &temp); /* do the double hash for old */ |
| 1102 | bnet_hashcxx . . $ pvpgn/bnet_hash(2a8392f275be648).(&newpasshash1, stdcxx . . $ std/::strlen(password), password); /* do the single hash for new */ |
| 1103 | |
| 1104 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1105 | { |
| 1106 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", argv[0]); |
| 1107 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 1108 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 1109 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 1110 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 1111 | } |
| 1112 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_changepassreqcxx . . $ pvpgn/t_client_changepassreq#)); |
| 1113 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_CHANGEPASSREQcxx . . $ `src/common/bnet_protocol.h:2138:9`!); |
| 1114 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_changepassreqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_changepassreq..tickscxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_90#ticks., ticks); |
| 1115 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_changepassreqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_changepassreq..sessionkeycxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_90#sessionkey., client.sessionkeycxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sessionkey.); |
| 1116 | hash_to_bnhashcxx . . $ pvpgn/hash_to_bnhash(50eab12f45c1086c).((t_hashcxx . . $ pvpgn/t_hash# const *)&oldpasshash2, packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_changepassreqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_changepassreq..oldpassword_hash2cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_90#oldpassword_hash2.); /* avoid warning */ |
| 1117 | hash_to_bnhashcxx . . $ pvpgn/hash_to_bnhash(50eab12f45c1086c).((t_hashcxx . . $ pvpgn/t_hash# const *)&newpasshash1, packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_changepassreqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_changepassreq..newpassword_hash1cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_90#newpassword_hash1.); /* avoid warning */ |
| 1118 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player.); |
| 1119 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1120 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1121 | |
| 1122 | do |
| 1123 | if (client_blockrecv_packetcxx . . $ pvpgn/client/client_blockrecv_packet(98f963a6be74727b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., rpacket) < 0) |
| 1124 | { |
| 1125 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: server closed connection\n", argv[0]); |
| 1126 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 1127 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 1128 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 1129 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 1130 | } |
| 1131 | while (packet_get_typecxx . . $ pvpgn/packet_get_type(e4ac9e2b4744cb4b).(rpacket) != SERVER_CHANGEPASSACKcxx . . $ `src/common/bnet_protocol.h:2157:9`!); |
| 1132 | dprintfcxx . . $ `src/client/bnchat.cpp:64:10`!("Got CHANGEPASSACK\n"); |
| 1133 | if (bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_changepassackcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_changepassack..messagecxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_91#message.) == SERVER_CHANGEPASSACK_MESSAGE_FAILcxx . . $ `src/common/bnet_protocol.h:2163:9`!) |
| 1134 | { |
| 1135 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Could not change password. Try again.\n"); |
| 1136 | continue; |
| 1137 | } |
| 1138 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Password changed.\n"); |
| 1139 | } |
| 1140 | else |
| 1141 | { |
| 1142 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Enter your login information\n"); |
| 1143 | |
| 1144 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1145 | client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. = 0; |
| 1146 | user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player.[0] = '\0'; |
| 1147 | while ((status = client_get_commcxx . . $ pvpgn/client/client_get_comm(e9a6a98b384956c7).("Username: ", user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN., &client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos., 1, |
| 1148 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged., client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width.)) == 0) |
| 1149 | if (handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch.) |
| 1150 | { |
| 1151 | client_get_termsizecxx . . $ pvpgn/client/client_get_termsize(1ea1e3350d45fd0e).(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., &client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width., &client.screen_heightcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_height.); |
| 1152 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" \r"); |
| 1153 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1154 | handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch. = 0; |
| 1155 | } |
| 1156 | else |
| 1157 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 0; |
| 1158 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1159 | if (status < 0) |
| 1160 | continue; |
| 1161 | if (stdcxx . . $ std/::strchr(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player., ' ')) |
| 1162 | { |
| 1163 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Spaces not allowed in username. Try again.\n"); |
| 1164 | continue; |
| 1165 | } |
| 1166 | if (stdcxx . . $ std/::strlen(user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player.) >= MAX_USERNAME_LENcxx . . $ MAX_USERNAME_LEN.) |
| 1167 | { |
| 1168 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Usernames must not be more than %u characters long. Try again.\n", MAX_USERNAME_LENcxx . . $ MAX_USERNAME_LEN. - 1); |
| 1169 | continue; |
| 1170 | } |
| 1171 | |
| 1172 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1173 | client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. = 0; |
| 1174 | password[0] = '\0'; |
| 1175 | while ((status = client_get_commcxx . . $ pvpgn/client/client_get_comm(e9a6a98b384956c7).("Password: ", password, MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN., &client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos., 0, |
| 1176 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged., client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width.)) == 0) |
| 1177 | if (handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch.) |
| 1178 | { |
| 1179 | client_get_termsizecxx . . $ pvpgn/client/client_get_termsize(1ea1e3350d45fd0e).(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., &client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width., &client.screen_heightcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_height.); |
| 1180 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" \r"); |
| 1181 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1182 | handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch. = 0; |
| 1183 | } |
| 1184 | else |
| 1185 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 0; |
| 1186 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1187 | if (status < 0) |
| 1188 | continue; |
| 1189 | strtolowercxx . . $ pvpgn/strtolower(7a9722d75b371431).(password); |
| 1190 | } |
| 1191 | |
| 1192 | /* now login */ |
| 1193 | { |
| 1194 | structcxx . . $ main(afcd3168fc1188a4).$anonymous_type_2# |
| 1195 | { |
| 1196 | bn_intcxx . . $ pvpgn/bn_int# tickscxx . . $ main(afcd3168fc1188a4).$anonymous_type_2#ticks.; |
| 1197 | bn_intcxx . . $ pvpgn/bn_int# sessionkeycxx . . $ main(afcd3168fc1188a4).$anonymous_type_2#sessionkey.; |
| 1198 | bn_intcxx . . $ pvpgn/bn_int# passhash1cxx . . $ main(afcd3168fc1188a4).$anonymous_type_2#passhash1.[5]; |
| 1199 | } temp; |
| 1200 | t_hashcxx . . $ pvpgn/t_hash# passhash1; |
| 1201 | t_hashcxx . . $ pvpgn/t_hash# passhash2; |
| 1202 | unsigned int ticks; |
| 1203 | |
| 1204 | ticks = 0; /* FIXME: what to use here? */ |
| 1205 | bn_int_set(&temp.tickscxx . . $ main(afcd3168fc1188a4).$anonymous_type_2#ticks., ticks); |
| 1206 | bn_int_set(&temp.sessionkeycxx . . $ main(afcd3168fc1188a4).$anonymous_type_2#sessionkey., client.sessionkeycxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sessionkey.); |
| 1207 | bnet_hashcxx . . $ pvpgn/bnet_hash(2a8392f275be648).(&passhash1, stdcxx . . $ std/::strlen(password), password); /* do the single hash */ |
| 1208 | hash_to_bnhashcxx . . $ pvpgn/hash_to_bnhash(50eab12f45c1086c).((t_hashcxx . . $ pvpgn/t_hash# const *)&passhash1, temp.passhash1cxx . . $ main(afcd3168fc1188a4).$anonymous_type_2#passhash1.); /* avoid warning */ |
| 1209 | bnet_hashcxx . . $ pvpgn/bnet_hash(2a8392f275be648).(&passhash2, sizeof(temp), &temp); /* do the double hash */ |
| 1210 | |
| 1211 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1212 | { |
| 1213 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", argv[0]); |
| 1214 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 1215 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 1216 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 1217 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 1218 | } |
| 1219 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_loginreq1cxx . . $ pvpgn/t_client_loginreq1#)); |
| 1220 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_LOGINREQ1cxx . . $ `src/common/bnet_protocol.h:2096:9`!); |
| 1221 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_loginreq1cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_loginreq1..tickscxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_88#ticks., ticks); |
| 1222 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_loginreq1cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_loginreq1..sessionkeycxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_88#sessionkey., client.sessionkeycxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sessionkey.); |
| 1223 | hash_to_bnhashcxx . . $ pvpgn/hash_to_bnhash(50eab12f45c1086c).((t_hashcxx . . $ pvpgn/t_hash# const *)&passhash2, packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_loginreq1cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_loginreq1..password_hash2cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_88#password_hash2.); /* avoid warning */ |
| 1224 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player.); |
| 1225 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1226 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1227 | } |
| 1228 | |
| 1229 | do |
| 1230 | if (client_blockrecv_packetcxx . . $ pvpgn/client/client_blockrecv_packet(98f963a6be74727b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., rpacket) < 0) |
| 1231 | { |
| 1232 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: server closed connection\n", argv[0]); |
| 1233 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 1234 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 1235 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 1236 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 1237 | } |
| 1238 | while (packet_get_typecxx . . $ pvpgn/packet_get_type(e4ac9e2b4744cb4b).(rpacket) != SERVER_LOGINREPLY1cxx . . $ `src/common/bnet_protocol.h:2109:9`!); |
| 1239 | if (bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_loginreply1cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_loginreply1..messagecxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_89#message.) == SERVER_LOGINREPLY1_MESSAGE_SUCCESScxx . . $ `src/common/bnet_protocol.h:2116:9`!) |
| 1240 | break; |
| 1241 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Login incorrect.\n"); |
| 1242 | } |
| 1243 | |
| 1244 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "Logged in.\n"); |
| 1245 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("----\n"); |
| 1246 | |
| 1247 | if (newacct && (stdcxx . . $ std/::strcmp(user.clienttagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clienttag., CLIENTTAG_DIABLORTLcxx . . $ `src/common/tag.h:92:9`!) == 0 || |
| 1248 | stdcxx . . $ std/::strcmp(user.clienttagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clienttag., CLIENTTAG_DIABLOSHRcxx . . $ `src/common/tag.h:94:9`!) == 0)) |
| 1249 | { |
| 1250 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1251 | { |
| 1252 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", argv[0]); |
| 1253 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 1254 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 1255 | } |
| 1256 | else |
| 1257 | { |
| 1258 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_playerinforeqcxx . . $ pvpgn/t_client_playerinforeq#)); |
| 1259 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_PLAYERINFOREQcxx . . $ `src/common/bnet_protocol.h:2182:9`!); |
| 1260 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player.); |
| 1261 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, "LTRD 1 2 0 20 25 15 20 100 0"); /* FIXME: don't hardcode */ |
| 1262 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1263 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1264 | } |
| 1265 | } |
| 1266 | |
| 1267 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1268 | { |
| 1269 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", argv[0]); |
| 1270 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 1271 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 1272 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 1273 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 1274 | } |
| 1275 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_progident2cxx . . $ pvpgn/t_client_progident2#)); |
| 1276 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_PROGIDENT2cxx . . $ `src/common/bnet_protocol.h:2298:9`!); |
| 1277 | bn_int_tag_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_progident2cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_progident2..clienttagcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_94#clienttag., user.clienttagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clienttag.); |
| 1278 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1279 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1280 | |
| 1281 | do |
| 1282 | if (client_blockrecv_packetcxx . . $ pvpgn/client/client_blockrecv_packet(98f963a6be74727b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., rpacket) < 0) |
| 1283 | { |
| 1284 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: server closed connection\n", argv[0]); |
| 1285 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 1286 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 1287 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 1288 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 1289 | } |
| 1290 | while (packet_get_typecxx . . $ pvpgn/packet_get_type(e4ac9e2b4744cb4b).(rpacket) != SERVER_CHANNELLISTcxx . . $ `src/common/bnet_protocol.h:2321:9`!); |
| 1291 | |
| 1292 | { |
| 1293 | unsigned int i; |
| 1294 | unsigned int chann_off; |
| 1295 | char const * chann; |
| 1296 | |
| 1297 | channellist = (const char**)xmalloccxx . . $ `src/common/xalloc.h:43:9`!(sizeof(char*)* 1); |
| 1298 | for (i = 0, chann_off = sizeof(t_server_channellistcxx . . $ pvpgn/t_server_channellist#); |
| 1299 | (chann = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, chann_off, 128)); |
| 1300 | i++, chann_off += stdcxx . . $ std/::strlen(chann) + 1) |
| 1301 | { |
| 1302 | if (chann[0] == '\0') break; /* channel list ends with a "" */ |
| 1303 | |
| 1304 | channellist = (const char**)xrealloccxx . . $ `src/common/xalloc.h:47:9`!(channellist, sizeof(char*)*(i + 2)); |
| 1305 | channellist[i] = xstrdupcxx . . $ `src/common/xalloc.h:49:9`!(chann); |
| 1306 | } |
| 1307 | channellist[i] = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 1308 | } |
| 1309 | |
| 1310 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1311 | { |
| 1312 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", argv[0]); |
| 1313 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 1314 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 1315 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 1316 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 1317 | } |
| 1318 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_joinchannelcxx . . $ pvpgn/t_client_joinchannel#)); |
| 1319 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_JOINCHANNELcxx . . $ `src/common/bnet_protocol.h:2308:9`!); |
| 1320 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_joinchannelcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_joinchannel..channelflagcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_95#channelflag., CLIENT_JOINCHANNEL_GENERICcxx . . $ `src/common/bnet_protocol.h:2315:9`!); |
| 1321 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, user.channelcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#channel.); |
| 1322 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1323 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1324 | |
| 1325 | if (psock_ctlcxx . . $ psock_ctl(bba9d6e9fb34fad7).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., PSOCK_NONBLOCKcxx . . $ `src/compat/psock.h:214:9`!) < 0) |
| 1326 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not set TCP socket to non-blocking mode (psock_ctl: %s)\n", argv[0], stdcxx . . $ std/::strerror(psock_errnocxx . . $ `src/compat/psock.h:286:9`!())); |
| 1327 | |
| 1328 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_chatcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_chat.; |
| 1329 | |
| 1330 | { |
| 1331 | unsigned int i; |
| 1332 | int highest_fd; |
| 1333 | t_psock_fd_setcxx . . $ `src/compat/psock.h:277:9`! rfds; |
| 1334 | #ifdef WIN32 |
| 1335 | static struct timeval tv; |
| 1336 | |
| 1337 | tv.tv_sec = 50 / 1000; |
| 1338 | tv.tv_usec = 50 % 1000; |
| 1339 | #endif |
| 1340 | |
| 1341 | PSOCK_FD_ZEROcxx . . $ `src/compat/psock.h:278:9`!(&rfds); |
| 1342 | |
| 1343 | #ifndef WIN32 |
| 1344 | highest_fd = client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin.; |
| 1345 | if (client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd. > highest_fd) |
| 1346 | #endif |
| 1347 | highest_fd = client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd.; |
| 1348 | |
| 1349 | client.currsizecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#currsize. = 0; |
| 1350 | |
| 1351 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; /* == need to draw prompt */ |
| 1352 | client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. = 0; |
| 1353 | client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[0] = '\0'; |
| 1354 | |
| 1355 | for (;;) |
| 1356 | { |
| 1357 | |
| 1358 | |
| 1359 | if (handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch.) |
| 1360 | { |
| 1361 | client_get_termsizecxx . . $ pvpgn/client/client_get_termsize(1ea1e3350d45fd0e).(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., &client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width., &client.screen_heightcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_height.); |
| 1362 | handle_winchcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/handle_winch. = 0; |
| 1363 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" \r"); |
| 1364 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1365 | } |
| 1366 | |
| 1367 | if (client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged.) |
| 1368 | { |
| 1369 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("%s%s", mode_get_promptcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_get_prompt(712bb7cbb4b8ba9d).(client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode.), client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text. + ((client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width. <= stdcxx . . $ std/::strlen(mode_get_promptcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_get_prompt(712bb7cbb4b8ba9d).(client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode.)) + client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos.) ? stdcxx . . $ std/::strlen(mode_get_promptcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_get_prompt(712bb7cbb4b8ba9d).(client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode.)) + client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. + 1 - client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width. : 0)); |
| 1370 | stdcxx . . $ std/::fflushcxx . . $ std/fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!); |
| 1371 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 0; |
| 1372 | } |
| 1373 | PSOCK_FD_ZEROcxx . . $ `src/compat/psock.h:278:9`!(&rfds); |
| 1374 | #ifndef WIN32 |
| 1375 | PSOCK_FD_SETcxx . . $ `src/compat/psock.h:280:9`!(client.fd_stdin, &rfds); |
| 1376 | #endif |
| 1377 | PSOCK_FD_SETcxx . . $ `src/compat/psock.h:280:9`!(client.sd, &rfds); |
| 1378 | errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = 0; |
| 1379 | |
| 1380 | #ifndef WIN32 |
| 1381 | if (psock_selectcxx . . $ `src/compat/psock.h:301:9`!(highest_fd + 1, &rfds, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!, NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!) < 0) |
| 1382 | #else |
| 1383 | if (psock_select(highest_fd + 1, &rfds, NULL, NULL, &tv) < 0) |
| 1384 | #endif |
| 1385 | { |
| 1386 | if (psock_errnocxx . . $ `src/compat/psock.h:286:9`!() != PSOCK_EINTRcxx . . $ `src/compat/psock.h:224:10`!) |
| 1387 | { |
| 1388 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1389 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Select failed (select: %s)\n", stdcxx . . $ std/::strerror(psock_errnocxx . . $ `src/compat/psock.h:286:9`!())); |
| 1390 | } |
| 1391 | continue; |
| 1392 | } |
| 1393 | #ifndef WIN32 |
| 1394 | if (PSOCK_FD_ISSETcxx . . $ `src/compat/psock.h:281:9`!(client.fd_stdin, &rfds)) /* got keyboard data */ |
| 1395 | #else |
| 1396 | if (kbhit()) |
| 1397 | #endif |
| 1398 | { |
| 1399 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 0; |
| 1400 | |
| 1401 | switch (client_get_commcxx . . $ pvpgn/client/client_get_comm(e9a6a98b384956c7).(mode_get_promptcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_get_prompt(712bb7cbb4b8ba9d).(client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode.), client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., MAX_MESSAGE_LENcxx . . $ MAX_MESSAGE_LEN., &client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos., 1, |
| 1402 | 0, client.screen_widthcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#screen_width.)) |
| 1403 | { |
| 1404 | case -1: /* cancel */ |
| 1405 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1406 | if (client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. == mode_commandcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_command.) |
| 1407 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_chatcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_chat.; |
| 1408 | else |
| 1409 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_commandcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_command.; |
| 1410 | client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. = 0; |
| 1411 | client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[0] = '\0'; |
| 1412 | break; |
| 1413 | |
| 1414 | case 0: /* timeout */ |
| 1415 | break; |
| 1416 | |
| 1417 | case 1: |
| 1418 | switch (client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode.) |
| 1419 | { |
| 1420 | case mode_claninvitecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_claninvite.: |
| 1421 | |
| 1422 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1423 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1424 | |
| 1425 | if ((client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[0] != '\0') && strcasecmp(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "yes") && strcasecmp(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "no")) |
| 1426 | { |
| 1427 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Do you want to accept invitation (yes/no) ? [yes] "); |
| 1428 | break; |
| 1429 | } |
| 1430 | |
| 1431 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1432 | { |
| 1433 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Packet creation failed.\n"); |
| 1434 | } |
| 1435 | else |
| 1436 | { |
| 1437 | char result; |
| 1438 | |
| 1439 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_clan_invitereplycxx . . $ pvpgn/t_client_clan_invitereply#)); |
| 1440 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_CLAN_INVITEREPLYcxx . . $ `src/common/bnet_protocol.h:3924:9`!); |
| 1441 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_clan_invitereplycxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_clan_invitereply..countcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_167#count., user.countcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#count.); |
| 1442 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_clan_invitereplycxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_clan_invitereply..clantagcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_167#clantag., user.clantagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clantag.); |
| 1443 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, user.invitercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#inviter.); |
| 1444 | |
| 1445 | if (!strcasecmp(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "no")) |
| 1446 | result = CLAN_RESPONSE_DECLINEDcxx . . $ `src/common/bnet_protocol.h:3955:9`!; |
| 1447 | else |
| 1448 | result = CLAN_RESPONSE_ACCEPTcxx . . $ `src/common/bnet_protocol.h:3957:9`!; |
| 1449 | |
| 1450 | packet_append_datacxx . . $ pvpgn/packet_append_data(d82347a7305550af).(packet, &result, 1); |
| 1451 | |
| 1452 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1453 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1454 | |
| 1455 | if (user.invitercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#inviter.) |
| 1456 | xfreecxx . . $ `src/common/xalloc.h:51:9`!((void *)user.inviter); |
| 1457 | user.invitercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#inviter. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 1458 | |
| 1459 | } |
| 1460 | |
| 1461 | case mode_clancreateinvitecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_clancreateinvite.: |
| 1462 | |
| 1463 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1464 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1465 | |
| 1466 | if ((client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[0] != '\0') && strcasecmp(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "yes") && strcasecmp(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "no")) |
| 1467 | { |
| 1468 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Do you want to accept invitation (yes/no) ? [yes] "); |
| 1469 | break; |
| 1470 | } |
| 1471 | |
| 1472 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1473 | { |
| 1474 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Packet creation failed.\n"); |
| 1475 | } |
| 1476 | else |
| 1477 | { |
| 1478 | char result; |
| 1479 | |
| 1480 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_clan_createinvitereplycxx . . $ pvpgn/t_client_clan_createinvitereply#)); |
| 1481 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_CLAN_CREATEINVITEREPLYcxx . . $ `src/common/bnet_protocol.h:3823:9`!); |
| 1482 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_clan_createinvitereplycxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_clan_createinvitereply..countcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_155#count., user.countcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#count.); |
| 1483 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_clan_createinvitereplycxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_clan_createinvitereply..clantagcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_155#clantag., user.clantagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clantag.); |
| 1484 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, user.invitercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#inviter.); |
| 1485 | |
| 1486 | if (!strcasecmp(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "no")) |
| 1487 | result = CLAN_RESPONSE_DECLINEDcxx . . $ `src/common/bnet_protocol.h:3955:9`!; |
| 1488 | else |
| 1489 | result = CLAN_RESPONSE_ACCEPTcxx . . $ `src/common/bnet_protocol.h:3957:9`!; |
| 1490 | |
| 1491 | packet_append_datacxx . . $ pvpgn/packet_append_data(d82347a7305550af).(packet, &result, 1); |
| 1492 | |
| 1493 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1494 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1495 | |
| 1496 | if (user.invitercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#inviter.) |
| 1497 | xfreecxx . . $ `src/common/xalloc.h:51:9`!((void *)user.inviter); |
| 1498 | user.invitercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#inviter. = NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!; |
| 1499 | |
| 1500 | } |
| 1501 | |
| 1502 | |
| 1503 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_chatcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_chat.; |
| 1504 | break; |
| 1505 | |
| 1506 | case mode_gamenamecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamename.: |
| 1507 | if (client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[0] == '\0') |
| 1508 | { |
| 1509 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1510 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Games must have a name.\n"); |
| 1511 | break; |
| 1512 | } |
| 1513 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1514 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1515 | stdcxx . . $ std/::strncpy(user.curr_gamenamecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#curr_gamename., client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., sizeof(user.curr_gamenamecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#curr_gamename.)); |
| 1516 | user.curr_gamenamecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#curr_gamename.[sizeof(user.curr_gamenamecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#curr_gamename.) - 1] = '\0'; |
| 1517 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_gamepasscxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamepass.; |
| 1518 | break; |
| 1519 | case mode_gamepasscxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamepass.: |
| 1520 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1521 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1522 | stdcxx . . $ std/::strncpy(user.curr_gamepasscxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#curr_gamepass., client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., sizeof(user.curr_gamepasscxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#curr_gamepass.)); |
| 1523 | user.curr_gamepasscxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#curr_gamepass.[sizeof(user.curr_gamepasscxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#curr_gamepass.) - 1] = '\0'; |
| 1524 | |
| 1525 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1526 | { |
| 1527 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Packet creation failed.\n"); |
| 1528 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_commandcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_command.; |
| 1529 | } |
| 1530 | else |
| 1531 | { |
| 1532 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_startgame4cxx . . $ pvpgn/t_client_startgame4#)); |
| 1533 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_STARTGAME4cxx . . $ `src/common/bnet_protocol.h:2919:9`!); |
| 1534 | bn_short_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_startgame4cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_startgame4..statuscxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_106#status., CLIENT_STARTGAME4_STATUS_INITcxx . . $ `src/common/bnet_protocol.h:2938:9`!); |
| 1535 | bn_short_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_startgame4cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_startgame4..flagcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_106#flag., 0x0000); |
| 1536 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_startgame4cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_startgame4..unknown2cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_106#unknown2., CLIENT_STARTGAME4_UNKNOWN2cxx . . $ `src/common/bnet_protocol.h:2934:9`!); |
| 1537 | bn_short_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_startgame4cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_startgame4..gametypecxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_106#gametype., CLIENT_GAMELISTREQ_MELEEcxx . . $ `src/common/bnet_protocol.h:2650:9`!); |
| 1538 | bn_short_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_startgame4cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_startgame4..optioncxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_106#option., CLIENT_STARTGAME4_OPTION_MELEE_NORMALcxx . . $ `src/common/bnet_protocol.h:2945:9`!); |
| 1539 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_startgame4cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_startgame4..unknown4cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_106#unknown4., CLIENT_STARTGAME4_UNKNOWN4cxx . . $ `src/common/bnet_protocol.h:2979:9`!); |
| 1540 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_startgame4cxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_startgame4..unknown5cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_106#unknown5., CLIENT_STARTGAME4_UNKNOWN5cxx . . $ `src/common/bnet_protocol.h:2980:9`!); |
| 1541 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, user.curr_gamenamecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#curr_gamename.); |
| 1542 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, user.curr_gamepasscxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#curr_gamepass.); |
| 1543 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, ",,,,1,3,1,3e37a84c,7,Player\rAshrigo\r"); |
| 1544 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1545 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1546 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_gamewaitcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamewait.; |
| 1547 | } |
| 1548 | break; |
| 1549 | case mode_gamestopcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamestop.: |
| 1550 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1551 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1552 | |
| 1553 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1554 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Packet creation failed.\n"); |
| 1555 | else |
| 1556 | { |
| 1557 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_closegamecxx . . $ pvpgn/t_client_closegame#)); |
| 1558 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_CLOSEGAMEcxx . . $ `src/common/bnet_protocol.h:3059:9`!); |
| 1559 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1560 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1561 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Game closed.\n"); |
| 1562 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_commandcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_command.; |
| 1563 | } |
| 1564 | break; |
| 1565 | case mode_commandcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_command.: |
| 1566 | if (client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[0] == '\0') |
| 1567 | break; |
| 1568 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1569 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1570 | if (strstartcxx . . $ pvpgn/strstart(5ae29d726ae57f88).(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "channel") == 0) |
| 1571 | { |
| 1572 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Available channels:\n"); |
| 1573 | if (client.useansicxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#useansi.) |
| 1574 | ansi_text_color_forecxx . . $ `src/client/ansi_term.h:63:9`!(ansi_text_color_yellowcxx . . $ `src/client/ansi_term.h:77:9`!); |
| 1575 | for (i = 0; channellist[i]; i++) |
| 1576 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" %s\n", channellist[i]); |
| 1577 | if (client.useansicxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#useansi.) |
| 1578 | ansi_text_resetcxx . . $ `src/client/ansi_term.h:57:9`!(); |
| 1579 | } |
| 1580 | else if (strstartcxx . . $ pvpgn/strstart(5ae29d726ae57f88).(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "create") == 0) |
| 1581 | { |
| 1582 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Enter new game information\n"); |
| 1583 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_gamenamecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamename.; |
| 1584 | } |
| 1585 | else if (strstartcxx . . $ pvpgn/strstart(5ae29d726ae57f88).(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "join") == 0) |
| 1586 | { |
| 1587 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Not implemented yet.\n"); |
| 1588 | } |
| 1589 | else if (strstartcxx . . $ pvpgn/strstart(5ae29d726ae57f88).(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "ladder") == 0) |
| 1590 | { |
| 1591 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Not implemented yet.\n"); |
| 1592 | } |
| 1593 | else if (strstartcxx . . $ pvpgn/strstart(5ae29d726ae57f88).(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "stats") == 0) |
| 1594 | { |
| 1595 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Not implemented yet.\n"); |
| 1596 | } |
| 1597 | else if (strstartcxx . . $ pvpgn/strstart(5ae29d726ae57f88).(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "help") == 0 || stdcxx . . $ std/::strcmp(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "?") == 0) |
| 1598 | { |
| 1599 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Available commands:\n" |
| 1600 | " channel - join or create a channel\n" |
| 1601 | " create - create a new game\n" |
| 1602 | " join - list current games\n" |
| 1603 | " ladder - list ladder rankings\n" |
| 1604 | " help - show this text\n" |
| 1605 | " info <PLAYER> - print a player's profile\n" |
| 1606 | " chinfo - modify your profile\n" |
| 1607 | " quit - exit bnchat\n" |
| 1608 | " stats <PLAYER> - print a player's game record\n" |
| 1609 | " invite <PLAYER> - invite a player to your clan\n" |
| 1610 | "Use the escape key to toggle between chat and command modes.\n"); |
| 1611 | } |
| 1612 | else if (strstartcxx . . $ pvpgn/strstart(5ae29d726ae57f88).(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "invite") == 0) |
| 1613 | { |
| 1614 | for (i = 6; client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[i] == ' ' || client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[i] == '\t'; i++); |
| 1615 | if (client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[i] == '\0') |
| 1616 | { |
| 1617 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_redcxx . . $ `src/client/ansi_term.h:75:9`!, "You must specify the player.\n"); |
| 1618 | } |
| 1619 | else |
| 1620 | { |
| 1621 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1622 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", argv[0]); |
| 1623 | else |
| 1624 | { |
| 1625 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Inviting: %s\n", &client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[i]); |
| 1626 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_clan_invitereqcxx . . $ pvpgn/t_client_clan_invitereq#)); |
| 1627 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_CLAN_INVITEREQcxx . . $ `src/common/bnet_protocol.h:3885:9`!); |
| 1628 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_clan_invitereqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_clan_invitereq..countcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_162#count., 1); |
| 1629 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, &client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[i]); |
| 1630 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1631 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1632 | } |
| 1633 | } |
| 1634 | } |
| 1635 | else if (strstartcxx . . $ pvpgn/strstart(5ae29d726ae57f88).(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "info") == 0) |
| 1636 | { |
| 1637 | for (i = 4; client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[i] == ' ' || client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[i] == '\t'; i++); |
| 1638 | if (client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[i] == '\0') |
| 1639 | { |
| 1640 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_redcxx . . $ `src/client/ansi_term.h:75:9`!, "You must specify the player.\n"); |
| 1641 | } |
| 1642 | else |
| 1643 | { |
| 1644 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1645 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", argv[0]); |
| 1646 | else |
| 1647 | { |
| 1648 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Profile info for %s:\n", &client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[i]); |
| 1649 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_statsreqcxx . . $ pvpgn/t_client_statsreq#)); |
| 1650 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_STATSREQcxx . . $ `src/common/bnet_protocol.h:2023:9`!); |
| 1651 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_statsreqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_statsreq..name_countcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_86#name_count., 1); |
| 1652 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_statsreqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_statsreq..key_countcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_86#key_count., 4); |
| 1653 | statsmatch = (unsigned int)stdcxx . . $ std/::timecxx . . $ std/time(a7cd306b2d326b09).(NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!); |
| 1654 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_statsreqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_statsreq..requestidcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_86#requestid., statsmatch); |
| 1655 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, &client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[i]); |
| 1656 | #if 0 |
| 1657 | packet_append_string(packet, "BNET\\acct\\username"); |
| 1658 | packet_append_string(packet, "BNET\\acct\\userid"); |
| 1659 | #endif |
| 1660 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, "profile\\sex"); |
| 1661 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, "profile\\age"); |
| 1662 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, "profile\\location"); |
| 1663 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, "profile\\description"); |
| 1664 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1665 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1666 | |
| 1667 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_waitstatcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_waitstat.; |
| 1668 | } |
| 1669 | } |
| 1670 | } |
| 1671 | else if (strstartcxx . . $ pvpgn/strstart(5ae29d726ae57f88).(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "chinfo") == 0) |
| 1672 | { |
| 1673 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Not implemented yet.\n"); |
| 1674 | } |
| 1675 | else if (strstartcxx . . $ pvpgn/strstart(5ae29d726ae57f88).(client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., "quit") == 0) |
| 1676 | { |
| 1677 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 1678 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 1679 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 1680 | return EXIT_SUCCESScxx . . $ `<external>/10696550936717951914/stdlib.h:93:9`!; |
| 1681 | } |
| 1682 | else |
| 1683 | { |
| 1684 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_redcxx . . $ `src/client/ansi_term.h:75:9`!, "Unknown local command \"%s\".\n", client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.); |
| 1685 | } |
| 1686 | break; |
| 1687 | |
| 1688 | case mode_chatcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_chat.: |
| 1689 | if (client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[0] == '\0') |
| 1690 | break; |
| 1691 | if (client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[0] == '/') |
| 1692 | { |
| 1693 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1694 | } |
| 1695 | else |
| 1696 | { |
| 1697 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_bluecxx . . $ `src/client/ansi_term.h:78:9`!, "\r<%s>", user.playercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#player.); |
| 1698 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" "); |
| 1699 | str_print_termcxx . . $ pvpgn/str_print_term(977aada8a81832c9).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!, client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text., 0, 0); |
| 1700 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 1701 | client.mungedcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#munged. = 1; |
| 1702 | } |
| 1703 | |
| 1704 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1705 | { |
| 1706 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", argv[0]); |
| 1707 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 1708 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 1709 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 1710 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 1711 | } |
| 1712 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_messagecxx . . $ pvpgn/t_client_message#)); |
| 1713 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_MESSAGEcxx . . $ `src/common/bnet_protocol.h:2620:9`!); |
| 1714 | packet_append_stringcxx . . $ pvpgn/packet_append_string(41801851180b7cbb).(packet, client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.); |
| 1715 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1716 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1717 | break; |
| 1718 | |
| 1719 | default: |
| 1720 | /* one of the wait states; erase what they typed */ |
| 1721 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1722 | break; |
| 1723 | } |
| 1724 | |
| 1725 | client.commposcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#commpos. = 0; |
| 1726 | client.textcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#text.[0] = '\0'; |
| 1727 | break; |
| 1728 | } |
| 1729 | } |
| 1730 | |
| 1731 | if (PSOCK_FD_ISSETcxx . . $ `src/compat/psock.h:281:9`!(client.sd, &rfds)) /* got network data */ |
| 1732 | { |
| 1733 | /* rpacket is from server, packet is from client */ |
| 1734 | switch (net_recv_packetcxx . . $ pvpgn/net_recv_packet(364823e0b5ea3b9f).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., rpacket, &client.currsizecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#currsize.)) |
| 1735 | { |
| 1736 | case 0: /* nothing */ |
| 1737 | break; |
| 1738 | |
| 1739 | case 1: |
| 1740 | switch (packet_get_typecxx . . $ pvpgn/packet_get_type(e4ac9e2b4744cb4b).(rpacket)) |
| 1741 | { |
| 1742 | case SERVER_ECHOREQcxx . . $ `src/common/bnet_protocol.h:3444:9`!: /* might as well support it */ |
| 1743 | if (packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket) < sizeof(t_server_echoreqcxx . . $ pvpgn/t_server_echoreq#)) |
| 1744 | { |
| 1745 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1746 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got bad SERVER_ECHOREQ packet (expected %lu bytes, got %u)\n", sizeof(t_server_echoreqcxx . . $ pvpgn/t_server_echoreq#), packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket)); |
| 1747 | break; |
| 1748 | } |
| 1749 | |
| 1750 | if (!(packet = packet_createcxx . . $ pvpgn/packet_create(f721c565085e24c0).(packet_class_bnetcxx . . $ pvpgn/packet_class_bnet.))) |
| 1751 | { |
| 1752 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1753 | stdcxx . . $ std/::fprintfcxx . . $ std/fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "%s: could not create packet\n", argv[0]); |
| 1754 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 1755 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 1756 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 1757 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 1758 | } |
| 1759 | packet_set_sizecxx . . $ pvpgn/packet_set_size(a12d8724e4c46208).(packet, sizeof(t_client_echoreplycxx . . $ pvpgn/t_client_echoreply#)); |
| 1760 | packet_set_typecxx . . $ pvpgn/packet_set_type(a12d8724e4c46208).(packet, CLIENT_ECHOREPLYcxx . . $ `src/common/bnet_protocol.h:3434:9`!); |
| 1761 | bn_int_set(&packet->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..client_echoreplycxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#client_echoreply..tickscxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_129#ticks., bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_echoreqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_echoreq..tickscxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_130#ticks.)); |
| 1762 | client_blocksend_packetcxx . . $ pvpgn/client/client_blocksend_packet(906e81e3c6d5802b).(client.sdcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#sd., packet); |
| 1763 | packet_del_refcxx . . $ pvpgn/packet_del_ref(d23439d9c1f63082).(packet); |
| 1764 | |
| 1765 | break; |
| 1766 | |
| 1767 | case SERVER_STARTGAME4_ACKcxx . . $ `src/common/bnet_protocol.h:3047:9`!: |
| 1768 | if (client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. == mode_gamewaitcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamewait.) |
| 1769 | { |
| 1770 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1771 | |
| 1772 | if (bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_startgame4_ackcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_startgame4_ack..replycxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_109#reply.) == SERVER_STARTGAME4_ACK_OKcxx . . $ `src/common/bnet_protocol.h:3054:9`!) |
| 1773 | { |
| 1774 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Game created.\n"); |
| 1775 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_gamestopcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamestop.; |
| 1776 | } |
| 1777 | else |
| 1778 | { |
| 1779 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Game could not be created, try another name.\n"); |
| 1780 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_gamenamecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_gamename.; |
| 1781 | } |
| 1782 | } |
| 1783 | break; |
| 1784 | |
| 1785 | case SERVER_CLAN_INVITEREQcxx . . $ `src/common/bnet_protocol.h:3915:9`!: |
| 1786 | if (packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket) < sizeof(t_server_clan_invitereqcxx . . $ pvpgn/t_server_clan_invitereq#)) |
| 1787 | { |
| 1788 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1789 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got bad SERVER_CLAN_INVITEREQ packet (expected %lu bytes, got %u)\n", sizeof(t_server_clan_invitereqcxx . . $ pvpgn/t_server_clan_invitereq#), packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket)); |
| 1790 | break; |
| 1791 | } |
| 1792 | |
| 1793 | { |
| 1794 | char const * clan; |
| 1795 | char const * inviter; |
| 1796 | int offset; |
| 1797 | |
| 1798 | offset = sizeof(t_server_clan_invitereqcxx . . $ pvpgn/t_server_clan_invitereq#); |
| 1799 | if (!(clan = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, offset, CLAN_NAME_MAXcxx . . $ CLAN_NAME_MAX.))) |
| 1800 | { |
| 1801 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1802 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got SERVER_CLAN_INVITEREQ with bad or missing clanname\n"); |
| 1803 | break; |
| 1804 | } |
| 1805 | offset += stdcxx . . $ std/::strlen(clan) + 1; |
| 1806 | if (!(inviter = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, offset, MAX_USERNAME_LENcxx . . $ MAX_USERNAME_LEN.))) |
| 1807 | { |
| 1808 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1809 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got SERVER_CLAN_INVITEREQ with bad or missing inviter\n"); |
| 1810 | break; |
| 1811 | } |
| 1812 | user.countcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#count. = bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_clan_invitereqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_clan_invitereq..countcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_166#count.); |
| 1813 | user.clantagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clantag. = bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_clan_invitereqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_clan_invitereq..clantagcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_166#clantag.); |
| 1814 | if (user.invitercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#inviter.) |
| 1815 | xfreecxx . . $ `src/common/xalloc.h:51:9`!((void *)user.inviter); |
| 1816 | user.invitercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#inviter. = xstrdupcxx . . $ `src/common/xalloc.h:49:9`!(inviter); |
| 1817 | |
| 1818 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1819 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("%s invited you to Clan %s\n", inviter, clan); |
| 1820 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Do you want to accept invitation (yes/no) ? [yes] "); |
| 1821 | |
| 1822 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_claninvitecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_claninvite.; |
| 1823 | break; |
| 1824 | } |
| 1825 | |
| 1826 | case SERVER_CLAN_INVITEREPLYcxx . . $ `src/common/bnet_protocol.h:3892:9`!: |
| 1827 | if (packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket) < sizeof(t_server_clan_invitereplycxx . . $ pvpgn/t_server_clan_invitereply#)) |
| 1828 | { |
| 1829 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1830 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got bad SERVER_CLAN_INVITEREPLY packet (expected %lu bytes, got %u)\n", sizeof(t_server_clan_invitereplycxx . . $ pvpgn/t_server_clan_invitereply#), packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket)); |
| 1831 | break; |
| 1832 | } |
| 1833 | |
| 1834 | { |
| 1835 | char result = bn_byte_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_clan_invitereplycxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_clan_invitereply..resultcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_163#result.); |
| 1836 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Recieved result: %i\n", result); |
| 1837 | break; |
| 1838 | } |
| 1839 | |
| 1840 | case SERVER_CLAN_CREATEINVITEREQcxx . . $ `src/common/bnet_protocol.h:3812:9`!: |
| 1841 | if (packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket) < sizeof(t_server_clan_createinvitereqcxx . . $ pvpgn/t_server_clan_createinvitereq#)) |
| 1842 | { |
| 1843 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1844 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got bad SERVER_CLAN_CREATEINVITEREQ packet (expected %lu bytes, got %u)\n", sizeof(t_server_clan_createinvitereqcxx . . $ pvpgn/t_server_clan_createinvitereq#), packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket)); |
| 1845 | break; |
| 1846 | } |
| 1847 | |
| 1848 | { |
| 1849 | char const * clan; |
| 1850 | char const * inviter; |
| 1851 | char invited_count; |
| 1852 | stdcxx . . $ std/::size_tcxx . . $ std/size_t# offset = sizeof(t_server_clan_createinvitereqcxx . . $ pvpgn/t_server_clan_createinvitereq#); |
| 1853 | |
| 1854 | if (!(clan = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, offset, CLAN_NAME_MAXcxx . . $ CLAN_NAME_MAX.))) |
| 1855 | { |
| 1856 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1857 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got SERVER_CLAN_CREATEINVITEREQ with bad or missing clanname\n"); |
| 1858 | break; |
| 1859 | } |
| 1860 | offset += stdcxx . . $ std/::strlen(clan) + 1; |
| 1861 | if (!(inviter = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, offset, MAX_USERNAME_LENcxx . . $ MAX_USERNAME_LEN.))) |
| 1862 | { |
| 1863 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1864 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got SERVER_CLAN_CREATEINVITEREQ with bad or missing inviter\n"); |
| 1865 | break; |
| 1866 | } |
| 1867 | offset += stdcxx . . $ std/::strlen(inviter) + 1; |
| 1868 | if (packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket) < offset + 4) |
| 1869 | { |
| 1870 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1871 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got SERVER_CLAN_CREATEINVITEREQ with missing invited count\n"); |
| 1872 | break; |
| 1873 | } |
| 1874 | invited_count = *((char *)packet_get_data_constcxx . . $ pvpgn/packet_get_data_const(9664b14508d475e9).(rpacket, offset, 1)); |
| 1875 | offset++; |
| 1876 | |
| 1877 | user.countcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#count. = bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_clan_invitereqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_clan_invitereq..countcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_166#count.); |
| 1878 | user.clantagcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#clantag. = bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_clan_invitereqcxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_clan_invitereq..clantagcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_166#clantag.); |
| 1879 | if (user.invitercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#inviter.) |
| 1880 | xfreecxx . . $ `src/common/xalloc.h:51:9`!((void *)user.inviter); |
| 1881 | user.invitercxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_user_info#inviter. = xstrdupcxx . . $ `src/common/xalloc.h:49:9`!(inviter); |
| 1882 | |
| 1883 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1884 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("%s invited you to Clan %s along with %i other players\n", inviter, clan, invited_count); |
| 1885 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Do you want to accept invitation (yes/no) ? [yes] "); |
| 1886 | |
| 1887 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_clancreateinvitecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_clancreateinvite.; |
| 1888 | break; |
| 1889 | } |
| 1890 | |
| 1891 | |
| 1892 | case SERVER_CLANMEMBERUPDATEcxx . . $ `src/common/bnet_protocol.h:4059:9`!: |
| 1893 | if (packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket) < sizeof(t_server_clanmemberupdatecxx . . $ pvpgn/t_server_clanmemberupdate#)) |
| 1894 | { |
| 1895 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1896 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got bad SERVER_CLANMEMBERUPDATE packet (expected %lu bytes, got %u)\n", sizeof(t_server_clanmemberupdatecxx . . $ pvpgn/t_server_clanmemberupdate#), packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket)); |
| 1897 | break; |
| 1898 | } |
| 1899 | |
| 1900 | if (client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. == mode_claninvitecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_claninvite.) |
| 1901 | break; |
| 1902 | |
| 1903 | { |
| 1904 | char const * member; |
| 1905 | char rank, online; |
| 1906 | char const * rank_p; |
| 1907 | char const * online_p; |
| 1908 | char const * append_str; |
| 1909 | int offset; |
| 1910 | char const * rank_str; |
| 1911 | char const * online_str; |
| 1912 | |
| 1913 | offset = sizeof(t_server_clanmemberupdatecxx . . $ pvpgn/t_server_clanmemberupdate#); |
| 1914 | if (!(member = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, offset, MAX_USERNAME_LENcxx . . $ MAX_USERNAME_LEN.))) |
| 1915 | { |
| 1916 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1917 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got SERVER_CLANMEMBERUPDATE with bad or missing member\n"); |
| 1918 | break; |
| 1919 | } |
| 1920 | offset += stdcxx . . $ std/::strlen(member) + 1; |
| 1921 | if (!(rank_p = (char *)packet_get_data_constcxx . . $ pvpgn/packet_get_data_const(9664b14508d475e9).(rpacket, offset, 1))) |
| 1922 | { |
| 1923 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1924 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got SERVER_CLANMEMBERUPDATE with bad or missing rank\n"); |
| 1925 | break; |
| 1926 | } |
| 1927 | rank = *rank_p; |
| 1928 | offset += 1; |
| 1929 | if (!(online_p = (char *)packet_get_data_constcxx . . $ pvpgn/packet_get_data_const(9664b14508d475e9).(rpacket, offset, 1))) |
| 1930 | { |
| 1931 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1932 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got SERVER_CLAN_MEMBERUPDATE with bad or missing online status\n"); |
| 1933 | break; |
| 1934 | } |
| 1935 | online = *online_p; |
| 1936 | offset += 1; |
| 1937 | if (!(append_str = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, offset, MAX_USERNAME_LENcxx . . $ MAX_USERNAME_LEN.))) |
| 1938 | { |
| 1939 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1940 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got SERVER_CLANMEMBERUPDATE with bad or missing append_str\n"); |
| 1941 | break; |
| 1942 | } |
| 1943 | |
| 1944 | switch (rank) |
| 1945 | { |
| 1946 | case SERVER_CLAN_MEMBER_NEWcxx . . $ `src/common/bnet_protocol.h:3718:9`!: |
| 1947 | rank_str = "New clan member"; |
| 1948 | break; |
| 1949 | case SERVER_CLAN_MEMBER_PEONcxx . . $ `src/common/bnet_protocol.h:3717:9`!: |
| 1950 | rank_str = "Peon"; |
| 1951 | break; |
| 1952 | case SERVER_CLAN_MEMBER_GRUNTcxx . . $ `src/common/bnet_protocol.h:3716:9`!: |
| 1953 | rank_str = "Grunt"; |
| 1954 | break; |
| 1955 | case SERVER_CLAN_MEMBER_SHAMANcxx . . $ `src/common/bnet_protocol.h:3715:9`!: |
| 1956 | rank_str = "Shaman"; |
| 1957 | break; |
| 1958 | case SERVER_CLAN_MEMBER_CHIEFTAINcxx . . $ `src/common/bnet_protocol.h:3714:9`!: |
| 1959 | rank_str = "Chieftain"; |
| 1960 | break; |
| 1961 | default: |
| 1962 | rank_str = ""; |
| 1963 | |
| 1964 | } |
| 1965 | |
| 1966 | switch (online) |
| 1967 | { |
| 1968 | case SERVER_CLAN_MEMBER_OFFLINEcxx . . $ `src/common/bnet_protocol.h:3719:9`!: |
| 1969 | online_str = "offline"; |
| 1970 | break; |
| 1971 | case SERVER_CLAN_MEMBER_ONLINEcxx . . $ `src/common/bnet_protocol.h:3720:9`!: |
| 1972 | online_str = "online"; |
| 1973 | break; |
| 1974 | case SERVER_CLAN_MEMBER_CHANNELcxx . . $ `src/common/bnet_protocol.h:3721:9`!: |
| 1975 | online_str = "in channel"; |
| 1976 | break; |
| 1977 | case SERVER_CLAN_MEMBER_GAMEcxx . . $ `src/common/bnet_protocol.h:3722:9`!: |
| 1978 | online_str = "in game"; |
| 1979 | break; |
| 1980 | case SERVER_CLAN_MEMBER_PRIVATE_GAMEcxx . . $ `src/common/bnet_protocol.h:3723:9`!: |
| 1981 | online_str = "in private game"; |
| 1982 | break; |
| 1983 | default: |
| 1984 | online_str = ""; |
| 1985 | } |
| 1986 | |
| 1987 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 1988 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("%s %s is now %s %s\n", rank_str, member, online_str, append_str); |
| 1989 | } |
| 1990 | |
| 1991 | |
| 1992 | case SERVER_STATSREPLYcxx . . $ `src/common/bnet_protocol.h:2078:9`!: |
| 1993 | if (client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. == mode_waitstatcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_waitstat.) |
| 1994 | { |
| 1995 | unsigned int names, keys; |
| 1996 | unsigned int match; |
| 1997 | unsigned int strpos; |
| 1998 | char const * temp; |
| 1999 | |
| 2000 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2001 | |
| 2002 | names = bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_statsreplycxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_statsreply..name_countcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_87#name_count.); |
| 2003 | keys = bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_statsreplycxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_statsreply..key_countcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_87#key_count.); |
| 2004 | match = bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_statsreplycxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_statsreply..requestidcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_87#requestid.); |
| 2005 | |
| 2006 | if (names != 1 || keys != 4 || match != statsmatch) |
| 2007 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("mangled reply (name_count=%u key_count=%u unknown1=%u)\n", |
| 2008 | names, keys, match); |
| 2009 | |
| 2010 | strpos = sizeof(t_server_statsreplycxx . . $ pvpgn/t_server_statsreply#); |
| 2011 | if ((temp = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, strpos, 256))) |
| 2012 | { |
| 2013 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" Sex: "); |
| 2014 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_yellowcxx . . $ `src/client/ansi_term.h:77:9`!, "%s\n", temp); |
| 2015 | strpos += stdcxx . . $ std/::strlen(temp) + 1; |
| 2016 | } |
| 2017 | if ((temp = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, strpos, 256))) |
| 2018 | { |
| 2019 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" Age: "); |
| 2020 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_yellowcxx . . $ `src/client/ansi_term.h:77:9`!, "%s\n", temp); |
| 2021 | strpos += stdcxx . . $ std/::strlen(temp) + 1; |
| 2022 | } |
| 2023 | if ((temp = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, strpos, 256))) |
| 2024 | { |
| 2025 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" Location: "); |
| 2026 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_yellowcxx . . $ `src/client/ansi_term.h:77:9`!, "%s\n", temp); |
| 2027 | strpos += stdcxx . . $ std/::strlen(temp) + 1; |
| 2028 | } |
| 2029 | if ((temp = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, strpos, 256))) |
| 2030 | { |
| 2031 | char msgtemp[1024]; |
| 2032 | char * tok; |
| 2033 | |
| 2034 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" Description: \n"); |
| 2035 | if (client.useansicxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#useansi.) |
| 2036 | ansi_text_color_forecxx . . $ `src/client/ansi_term.h:63:9`!(ansi_text_color_yellowcxx . . $ `src/client/ansi_term.h:77:9`!); |
| 2037 | stdcxx . . $ std/::strncpy(msgtemp, temp, sizeof(msgtemp)); |
| 2038 | msgtemp[sizeof(msgtemp)-1] = '\0'; |
| 2039 | for (tok = stdcxx . . $ std/::strtok(msgtemp, "\r\n"); tok; tok = stdcxx . . $ std/::strtok(NULLcxx . . $ `<external>/15298297234472979974/stddef.h:416:9`!, "\r\n")) |
| 2040 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" %s\n", tok); |
| 2041 | if (client.useansicxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#useansi.) |
| 2042 | ansi_text_resetcxx . . $ `src/client/ansi_term.h:57:9`!(); |
| 2043 | strpos += stdcxx . . $ std/::strlen(temp) + 1; |
| 2044 | } |
| 2045 | |
| 2046 | if (match == statsmatch) |
| 2047 | client.modecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#mode. = mode_commandcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mode_command.; |
| 2048 | } |
| 2049 | break; |
| 2050 | |
| 2051 | case SERVER_PLAYERINFOREPLYcxx . . $ `src/common/bnet_protocol.h:2234:9`!: /* hmm. we didn't ask for one... */ |
| 2052 | break; |
| 2053 | |
| 2054 | case SERVER_MESSAGEcxx . . $ `src/common/bnet_protocol.h:2427:9`!: |
| 2055 | if (packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket) < sizeof(t_server_messagecxx . . $ pvpgn/t_server_message#)) |
| 2056 | { |
| 2057 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2058 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got bad SERVER_MESSAGE packet (expected %lu bytes, got %u)", sizeof(t_server_messagecxx . . $ pvpgn/t_server_message#), packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket)); |
| 2059 | break; |
| 2060 | } |
| 2061 | |
| 2062 | { |
| 2063 | char const * speaker; |
| 2064 | char const * message; |
| 2065 | |
| 2066 | if (!(speaker = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, sizeof(t_server_messagecxx . . $ pvpgn/t_server_message#), 32))) |
| 2067 | { |
| 2068 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2069 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got SERVER_MESSAGE packet with bad or missing speaker\n"); |
| 2070 | break; |
| 2071 | } |
| 2072 | if (!(message = packet_get_str_constcxx . . $ pvpgn/packet_get_str_const(2621638e840efcc6).(rpacket, sizeof(t_server_messagecxx . . $ pvpgn/t_server_message#)+stdcxx . . $ std/::strlen(speaker) + 1, 1024))) |
| 2073 | { |
| 2074 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2075 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Got SERVER_MESSAGE packet with bad or missing message (speaker=\"%s\" start=%lu len=%u)\n", speaker, sizeof(t_server_messagecxx . . $ pvpgn/t_server_message#)+stdcxx . . $ std/::strlen(speaker) + 1, packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket)); |
| 2076 | break; |
| 2077 | } |
| 2078 | |
| 2079 | switch (bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_messagecxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_message..typecxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_98#type.)) |
| 2080 | { |
| 2081 | case SERVER_MESSAGE_TYPE_JOINcxx . . $ `src/common/bnet_protocol.h:2487:9`!: |
| 2082 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2083 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_greencxx . . $ `src/client/ansi_term.h:76:9`!, "\"%s\" %s enters\n", speaker, |
| 2084 | mflags_get_strcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mflags_get_str(81a3ae90da26a711).(bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_messagecxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_message..flagscxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_98#flags.))); |
| 2085 | break; |
| 2086 | case SERVER_MESSAGE_TYPE_CHANNELcxx . . $ `src/common/bnet_protocol.h:2492:9`!: |
| 2087 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2088 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_greencxx . . $ `src/client/ansi_term.h:76:9`!, "Joining channel :\"%s\" %s\n", message, |
| 2089 | cflags_get_strcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/cflags_get_str(81a3ae90da26a711).(bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_messagecxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_message..flagscxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_98#flags.))); |
| 2090 | break; |
| 2091 | case SERVER_MESSAGE_TYPE_ADDUSERcxx . . $ `src/common/bnet_protocol.h:2486:9`!: |
| 2092 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2093 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_greencxx . . $ `src/client/ansi_term.h:76:9`!, "\"%s\" %s is here\n", speaker, |
| 2094 | mflags_get_strcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mflags_get_str(81a3ae90da26a711).(bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_messagecxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_message..flagscxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_98#flags.))); |
| 2095 | break; |
| 2096 | case SERVER_MESSAGE_TYPE_USERFLAGScxx . . $ `src/common/bnet_protocol.h:2494:9`!: |
| 2097 | break; |
| 2098 | case SERVER_MESSAGE_TYPE_PARTcxx . . $ `src/common/bnet_protocol.h:2488:9`!: |
| 2099 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2100 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_greencxx . . $ `src/client/ansi_term.h:76:9`!, "\"%s\" %s leaves\n", speaker, |
| 2101 | mflags_get_strcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/mflags_get_str(81a3ae90da26a711).(bn_int_get(rpacket->ucxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#u..server_messagecxx . . $ pvpgn/$anonymous_type_a1640d8ff791e3e5_2#$anonymous_type_3#server_message..flagscxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_98#flags.))); |
| 2102 | break; |
| 2103 | case SERVER_MESSAGE_TYPE_WHISPERcxx . . $ `src/common/bnet_protocol.h:2489:9`!: |
| 2104 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2105 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_bluecxx . . $ `src/client/ansi_term.h:78:9`!, "<From: %s>", speaker); |
| 2106 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" "); |
| 2107 | str_print_termcxx . . $ pvpgn/str_print_term(977aada8a81832c9).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!, message, 0, 0); |
| 2108 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 2109 | break; |
| 2110 | case SERVER_MESSAGE_TYPE_WHISPERACKcxx . . $ `src/common/bnet_protocol.h:2495:9`!: |
| 2111 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2112 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_bluecxx . . $ `src/client/ansi_term.h:78:9`!, "<To: %s>", speaker); |
| 2113 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" "); |
| 2114 | str_print_termcxx . . $ pvpgn/str_print_term(977aada8a81832c9).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!, message, 0, 0); |
| 2115 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 2116 | break; |
| 2117 | case SERVER_MESSAGE_TYPE_BROADCASTcxx . . $ `src/common/bnet_protocol.h:2491:9`!: |
| 2118 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2119 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_yellowcxx . . $ `src/client/ansi_term.h:77:9`!, "<Broadcast %s> %s\n", speaker, message); |
| 2120 | break; |
| 2121 | case SERVER_MESSAGE_TYPE_ERRORcxx . . $ `src/common/bnet_protocol.h:2504:9`!: |
| 2122 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2123 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_redcxx . . $ `src/client/ansi_term.h:75:9`!, "<Error> %s\n", message); |
| 2124 | break; |
| 2125 | case SERVER_MESSAGE_TYPE_INFOcxx . . $ `src/common/bnet_protocol.h:2503:9`!: |
| 2126 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2127 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_yellowcxx . . $ `src/client/ansi_term.h:77:9`!, "<Info> %s\n", message); |
| 2128 | break; |
| 2129 | case SERVER_MESSAGE_TYPE_EMOTEcxx . . $ `src/common/bnet_protocol.h:2508:9`!: |
| 2130 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2131 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_yellowcxx . . $ `src/client/ansi_term.h:77:9`!, "<%s %s>\n", speaker, message); |
| 2132 | break; |
| 2133 | default: |
| 2134 | case SERVER_MESSAGE_TYPE_TALKcxx . . $ `src/common/bnet_protocol.h:2490:9`!: |
| 2135 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2136 | ansi_printfcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/ansi_printf(110da012d474887e).(&client, ansi_text_color_yellowcxx . . $ `src/client/ansi_term.h:77:9`!, "<%s>", speaker); |
| 2137 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).(" "); |
| 2138 | str_print_termcxx . . $ pvpgn/str_print_term(977aada8a81832c9).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!, message, 0, 0); |
| 2139 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 2140 | } |
| 2141 | } |
| 2142 | break; |
| 2143 | |
| 2144 | default: |
| 2145 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2146 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("Unsupported server packet type 0x%04x\n", packet_get_typecxx . . $ pvpgn/packet_get_type(e4ac9e2b4744cb4b).(rpacket)); |
| 2147 | hexdumpcxx . . $ pvpgn/hexdump(23ce3b3157473ba).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!, packet_get_data_constcxx . . $ pvpgn/packet_get_data_const(9664b14508d475e9).(rpacket, 0, packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket)), packet_get_sizecxx . . $ pvpgn/packet_get_size(e4ac9e2b4744cb4b).(rpacket)); |
| 2148 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("\n"); |
| 2149 | } |
| 2150 | |
| 2151 | client.currsizecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#currsize. = 0; |
| 2152 | break; |
| 2153 | |
| 2154 | case -1: /* error (probably connection closed) */ |
| 2155 | default: |
| 2156 | mungecxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/munge(ab1be4effc89a947).(&client); |
| 2157 | stdcxx . . $ std/::printfcxx . . $ std/printf(581fddd72a8db8fc).("----\nConnection closed by server.\n"); |
| 2158 | psock_closecxx . . $ `src/compat/psock.h:300:9`!(client.sd); |
| 2159 | if (client.changed_incxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#changed_in.) |
| 2160 | tcsetattr(client.fd_stdincxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#fd_stdin., TCSAFLUSHcxx . . $ `<external>/7740429199341890421/termios-tcflow.h:26:9`!, &client.in_attr_oldcxx . . $ `$anonymous_namespace_src/client/bnchat.cpp`/_client_state#in_attr_old.); |
| 2161 | return EXIT_SUCCESScxx . . $ `<external>/10696550936717951914/stdlib.h:93:9`!; |
| 2162 | } |
| 2163 | } |
| 2164 | } |
| 2165 | } |
| 2166 | |
| 2167 | /* not reached */ |
| 2168 | } |