diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-09-30 19:54:06 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-09-30 19:54:06 -0600 |
commit | d4f32a38fd498c180d562ced38a9129e0abf2252 (patch) | |
tree | e655b59ff686ad5fe2bdd11d6e072f5c3a4493b7 /src/net/serverinfo.h | |
parent | 6707d108790ab1fe1d4a3ef52d717966990fdf0a (diff) | |
download | mana-d4f32a38fd498c180d562ced38a9129e0abf2252.tar.gz mana-d4f32a38fd498c180d562ced38a9129e0abf2252.tar.bz2 mana-d4f32a38fd498c180d562ced38a9129e0abf2252.tar.xz mana-d4f32a38fd498c180d562ced38a9129e0abf2252.zip |
Merge login state machines for both clients
Also do some cleanup and refactoring of related code.
Diffstat (limited to 'src/net/serverinfo.h')
-rw-r--r-- | src/net/serverinfo.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h index c38d13c7..ac2e803d 100644 --- a/src/net/serverinfo.h +++ b/src/net/serverinfo.h @@ -1,6 +1,6 @@ /* * The Mana World - * Copyright (C) 2004 The Mana World Development Team + * Copyright (C) 2009 The Mana World Development Team * * This file is part of The Mana World. * @@ -19,18 +19,25 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef SERVERINFO_ -#define SERVERINFO_ +#ifndef SERVERINFO_H +#define SERVERINFO_H #include <string> -struct SERVER_INFO -{ - int address; - short port; - std::string name; - short online_users; - std::string updateHost; -}; +typedef struct SERVER_INFO { + std::string hostname; + unsigned short port; -#endif + void clear() + { + hostname.clear(); + port = 0; + } + + bool operator==(struct SERVER_INFO other) + { + return (hostname == other.hostname && port == other.port); + } +} ServerInfo; + +#endif // SERVERINFO_H |