10 #include "../clib/clib_endian.h" 11 #include "../clib/rawtypes.h" 24 size_t textlen = strlen( tipname );
25 if ( textlen > 0 &&
unsigned( textlen ) <= 9999 )
28 msg->WriteFlipped<
u16>( textlen + 11 );
31 msg->WriteFlipped<
u16>( tipnum );
32 msg->WriteFlipped<
u16>( textlen + 1 );
33 msg->Write( tipname, static_cast<u16>( textlen + 1 ) );
45 size_t textlen = tiptext.size();
46 if ( textlen >= 10000 )
50 msg->WriteFlipped<
u16>( textlen + 11 );
54 msg->WriteFlipped<
u16>( textlen + 1 );
55 msg->Write( tiptext.c_str(),
static_cast<u16>( textlen + 1 ) );
#define PKTOUT_A6_TYPE_TIP
void handle_get_tip(Network::Client *client, PKTIN_A7 *msg)
std::vector< std::string > tipfilenames
void Send(Client *client, int len=-1) const
void send_tip(Network::Client *client, const std::string &tiptext)