dded D2 realm logon support.
To use, add the following setting(s) in your accounts.xml inside the <account> tag for the correct account:
To enable: <setting name='use_d2realm' type='bool'>1</setting>
To choose a character: <setting name='d2realm_char' type='string'>character name</setting>
If not supplied and you have exactly one character, that one will be used.
To choose a realm: <setting name='d2realm_name' type='string'>realm name</setting>
If not supplied and there is exactly one realm on this server, that one will be used.
To choose a realm password: <setting name='d2realm_pass' type='string'>realm password</setting>
This is "password" for all official Battle.net realm servers. You don't need to set this.
At least the checkbox for use_d2realm will be implemented.
Please note that if there are multiple choices for the realm name (Asia) or your character name (you have multiple characters) or you entered a non-existant realm or character name, the connection will hang, because I have not implemented the choosing dialogs or error handlers.
Warcraft III crashes on Windows during account logon have been fixed.
Warcraft III users in clans will now request SID_CLANMEMBERINFO on themselves during logon so that our clan name is known.
Warcraft III "Get User Info" requests should now always get the user's clan tag and be able to query their clan member information and clan game stats, even when they aren't in the same channel or clan as you.
Warcraft III "Get User Info" requests no longer show the raw profile icon.
Warcraft III "Get User Info" requests will always say when no game statistics are stored in the user's or clan's record.
MOTD's have been moved from their protocol-specific locations so that I can display them in the "Show News and MOTD" dialog. Possible things that can show up in the dialog now: Battle.net MOTD, BNLS Messages, D2 Realm MOTD, Clan MOTD, Warcraft III tournament announcements (not implemented), and WCG tournament announcements (not implemented).
News, MOTDs, and profile contents ending with a new line (I'm looking at you Battle.net MOTD) are stripped.
Renamed "UDP value" to "session cookie" throughout the code, as this name reflects its use better: it is used by the Battle.net server to identify the current connection when doing out-of-band connections, such as UDP handshaking or D2 realm logon.
Added support for BNLS_IPBAN. Since it's not exactly official anyway, and BNLS servers are free to use it as a message. If you successfully connect even after BNLS has sent you one of these, then any messages sent by BNLS through this packet will be stored in the "Show News and MOTD" dialog. Note that I named it BNLS_MESSAGE because of this.