This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG), Euroboros (EB), and Down Under Doomers (DUD).
Révision | 5fe883d4ca3c02d9d0b21a85cfd45b1fcf97b9a2 (tree) |
---|---|
l'heure | 2015-08-21 01:50:12 |
Auteur | Teemu Piippo <crimsondusk64@gmai...> |
Commiter | Teemu Piippo |
Remove the legacy interface. Updated RCON utility for what it's worth.
@@ -339,35 +339,6 @@ | ||
339 | 339 | |
340 | 340 | //***************************************************************************** |
341 | 341 | // |
342 | -char *NETWORK_AddressToString( NETADDRESS_s Address ) | |
343 | -{ | |
344 | - static char s_szAddress[64]; | |
345 | - | |
346 | - sprintf( s_szAddress, "%i.%i.%i.%i:%i", Address.abIP[0], Address.abIP[1], Address.abIP[2], Address.abIP[3], ntohs( Address.usPort )); | |
347 | - | |
348 | - return ( s_szAddress ); | |
349 | -} | |
350 | - | |
351 | -//***************************************************************************** | |
352 | -// | |
353 | -char *NETWORK_AddressToStringIgnorePort( NETADDRESS_s Address ) | |
354 | -{ | |
355 | - static char s_szAddress[64]; | |
356 | - | |
357 | - sprintf( s_szAddress, "%i.%i.%i.%i", Address.abIP[0], Address.abIP[1], Address.abIP[2], Address.abIP[3] ); | |
358 | - | |
359 | - return ( s_szAddress ); | |
360 | -} | |
361 | - | |
362 | -//***************************************************************************** | |
363 | -// | |
364 | -void NETWORK_SetAddressPort( NETADDRESS_s &Address, USHORT usPort ) | |
365 | -{ | |
366 | - Address.usPort = htons( usPort ); | |
367 | -} | |
368 | - | |
369 | -//***************************************************************************** | |
370 | -// | |
371 | 342 | NETADDRESS_s NETWORK_GetLocalAddress( void ) |
372 | 343 | { |
373 | 344 | char szBuffer[512]; |
@@ -73,9 +73,6 @@ | ||
73 | 73 | int NETWORK_GetLANPackets( void ); |
74 | 74 | NETADDRESS_s NETWORK_GetFromAddress( void ); |
75 | 75 | void NETWORK_LaunchPacket( NETBUFFER_s *pBuffer, NETADDRESS_s Address ); |
76 | -char *NETWORK_AddressToString( NETADDRESS_s Address ); | |
77 | -char *NETWORK_AddressToStringIgnorePort( NETADDRESS_s Address ); | |
78 | -void NETWORK_SetAddressPort( NETADDRESS_s &Address, USHORT usPort ); | |
79 | 76 | //AActor *NETWORK_FindThingByNetID( LONG lID ); |
80 | 77 | NETADDRESS_s NETWORK_GetLocalAddress( void ); |
81 | 78 | NETBUFFER_s *NETWORK_GetNetworkMessageBuffer( void ); |
@@ -467,7 +467,7 @@ | ||
467 | 467 | |
468 | 468 | // Read in what the user gave us. |
469 | 469 | GetDlgItemText( hDlg, IDC_SERVERIP, szBuffer, 128 ); |
470 | - NETADDRESS_s::FromString( szBuffer, g_ServerAddress ); | |
470 | + g_ServerAddress = NETADDRESS_s::FromString( szBuffer ); | |
471 | 471 | GetDlgItemText( hDlg, IDC_PASSWORD, g_szPassword, 128 ); |
472 | 472 | |
473 | 473 | // If the user didn't specify a port, use the default one. |
@@ -582,7 +582,7 @@ | ||
582 | 582 | SetDlgItemText( g_hDlg, IDC_PASSWORD, g_Favorites[iIndex].szPassword ); |
583 | 583 | |
584 | 584 | // Connect. |
585 | - NETADDRESS_s::FromString( g_Favorites[iIndex].szAddress, g_ServerAddress ); | |
585 | + g_ServerAddress = NETADDRESS_s::FromString( g_Favorites[iIndex].szAddress ); | |
586 | 586 | strncpy( g_szPassword, g_Favorites[iIndex].szPassword, 127 ); |
587 | 587 | main_AttemptConnection( ); |
588 | 588 | } |
@@ -773,27 +773,6 @@ | ||
773 | 773 | |
774 | 774 | //***************************************************************************** |
775 | 775 | // |
776 | -const char *NETWORK_AddressToString( NETADDRESS_s Address ) | |
777 | -{ | |
778 | - return Address.ToString(); | |
779 | -} | |
780 | - | |
781 | -//***************************************************************************** | |
782 | -// | |
783 | -const char *NETWORK_AddressToStringIgnorePort( NETADDRESS_s Address ) | |
784 | -{ | |
785 | - return Address.ToStringNoPort(); | |
786 | -} | |
787 | - | |
788 | -//***************************************************************************** | |
789 | -// | |
790 | -void NETWORK_SetAddressPort( NETADDRESS_s &Address, USHORT usPort ) | |
791 | -{ | |
792 | - Address.SetPort( usPort ); | |
793 | -} | |
794 | - | |
795 | -//***************************************************************************** | |
796 | -// | |
797 | 776 | NETADDRESS_s NETWORK_GetLocalAddress( void ) |
798 | 777 | { |
799 | 778 | char szBuffer[512]; |
@@ -344,9 +344,6 @@ | ||
344 | 344 | int NETWORK_GetLANPackets( void ); |
345 | 345 | NETADDRESS_s NETWORK_GetFromAddress( void ); |
346 | 346 | void NETWORK_LaunchPacket( NETBUFFER_s *pBuffer, NETADDRESS_s Address ); |
347 | -const char *NETWORK_AddressToString( NETADDRESS_s Address ); | |
348 | -const char *NETWORK_AddressToStringIgnorePort( NETADDRESS_s Address ); | |
349 | -void NETWORK_SetAddressPort( NETADDRESS_s &Address, USHORT usPort ); | |
350 | 347 | NETADDRESS_s NETWORK_GetLocalAddress( void ); |
351 | 348 | NETADDRESS_s NETWORK_GetCachedLocalAddress( void ); |
352 | 349 | NETBUFFER_s *NETWORK_GetNetworkMessageBuffer( void ); |
@@ -511,34 +511,6 @@ | ||
511 | 511 | |
512 | 512 | //***************************************************************************** |
513 | 513 | // |
514 | -bool NETWORK_CompareAddress( NETADDRESS_s Address1, NETADDRESS_s Address2, bool bIgnorePort ) | |
515 | -{ | |
516 | - return Address1.Compare( Address2, bIgnorePort ); | |
517 | -} | |
518 | - | |
519 | -//***************************************************************************** | |
520 | -// | |
521 | -bool NETWORK_StringToAddress( const char *s, NETADDRESS_s *a ) | |
522 | -{ | |
523 | - return a->LoadFromString( s ); | |
524 | -} | |
525 | - | |
526 | -//***************************************************************************** | |
527 | -// | |
528 | -void NETWORK_SocketAddressToNetAddress( struct sockaddr_in *s, NETADDRESS_s *a ) | |
529 | -{ | |
530 | - *a = NETADDRESS_s::FromSocketAddress( *s ); | |
531 | -} | |
532 | - | |
533 | -//***************************************************************************** | |
534 | -// | |
535 | -void NETWORK_NetAddressToSocketAddress( NETADDRESS_s &Address, struct sockaddr_in &SocketAddress ) | |
536 | -{ | |
537 | - SocketAddress = Address.ToSocketAddress(); | |
538 | -} | |
539 | - | |
540 | -//***************************************************************************** | |
541 | -// | |
542 | 514 | bool NETWORK_StringToIP( const char *pszAddress, char *pszIP0, char *pszIP1, char *pszIP2, char *pszIP3 ) |
543 | 515 | { |
544 | 516 | char szCopy[16]; |
@@ -630,20 +602,6 @@ | ||
630 | 602 | return ( true ); |
631 | 603 | } |
632 | 604 | |
633 | -//***************************************************************************** | |
634 | -// | |
635 | -void NETWORK_AddressToIPStringArray( const NETADDRESS_s &Address, IPStringArray &szAddress ) | |
636 | -{ | |
637 | - Address.ToIPStringArray( szAddress ); | |
638 | -} | |
639 | - | |
640 | -//***************************************************************************** | |
641 | -// | |
642 | -const char *NETWORK_GetHostByIPAddress( NETADDRESS_s Address ) | |
643 | -{ | |
644 | - return Address.ToHostName(); | |
645 | -} | |
646 | - | |
647 | 605 | //-------------------------------------------------------------------------------------------------------------------------------------------------- |
648 | 606 | //-- CLASSES --------------------------------------------------------------------------------------------------------------------------------------- |
649 | 607 | //-------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -295,13 +295,7 @@ | ||
295 | 295 | void NETWORK_WriteString( BYTESTREAM_s *pByteStream, const char *pszString ); |
296 | 296 | |
297 | 297 | void NETWORK_WriteHeader( BYTESTREAM_s *pByteStream, int Byte ); |
298 | -bool NETWORK_CompareAddress( NETADDRESS_s Address1, NETADDRESS_s Address2, bool bIgnorePort ); | |
299 | -bool NETWORK_StringToAddress( const char *pszString, NETADDRESS_s *pAddress ); | |
300 | -void NETWORK_SocketAddressToNetAddress( struct sockaddr_in *s, NETADDRESS_s *a ); | |
301 | -void NETWORK_NetAddressToSocketAddress( NETADDRESS_s &Address, struct sockaddr_in &SocketAddress ); | |
302 | 298 | bool NETWORK_StringToIP( const char *pszAddress, char *pszIP0, char *pszIP1, char *pszIP2, char *pszIP3 ); |
303 | -void NETWORK_AddressToIPStringArray( const NETADDRESS_s &Address, IPStringArray &szAddress ); | |
304 | -const char *NETWORK_GetHostByIPAddress( NETADDRESS_s Address ); | |
305 | 299 | |
306 | 300 | //-------------------------------------------------------------------------------------------------------------------------------------------------- |
307 | 301 | //-- CLASSES --------------------------------------------------------------------------------------------------------------------------------------- |