Author Topic: Using the dedicated server console via STDin  (Read 4417 times)

oh and another thing, edit your /etc/hosts file to include auth.blockland.us or whatever. that might work.
Legendary programmers talking to each other, I guess.
if you say so

The only concern I have for releasing a script that allows people to automatically generate key.dat files is that once I release this it'd take moments to create a script that allows people to steal keys coughhammereditorcough. Badspot should either make an official exe to do this, because I'd feel uncomfortable doing so myself.
First of all, just because HamHost ended in a scandal does not mean I would do anything malicious with my clients' key.dat files. That would be the most fraudulent and unjust thing possible.

Second, the VPS plan expired months ago, and I have permanently deleted all of my clients' files.

And third, the only reason I would want something like this program is to automatically create key.dat files from Blockland keys. If I can create those without manual intervention, I could make the HammerHost registration process automatic.
 (This is for BL key users of course. If the client wants to use a Steam account to authenticate, it'll already be automatic. HammerHost users will be able to choose either Steam or BL).
« Last Edit: February 25, 2014, 02:51:49 PM by Hammereditor5 »

Run this command instead:
Code: [Select]
WINEDEBUG="+winsock" wineconsole server0/Blockland.exe ptlaaxobimwroe -dedicated
It spits out a lot of this error:
Code: [Select]
trace:winsock:WS2_recv_base socket 00b0, wsabuf 0x33f630, nbufs 1, flags 0, from 0x33f680, fromlen 16, ovl (nil), func (nil)
trace:winsock:WS2_recv_base fd=20, options=0
warn:winsock:WS2_recv_base  -> ERROR 10035
(the fact that it does this a ridiculous amount of times per second probably explains why CPU usage was higher than it should be)

From MSDN:
Quote
WSAEWOULDBLOCK
10035

Resource temporarily unavailable.

    This error is returned from operations on nonblocking sockets that cannot be completed immediately, for example recv when no data is queued to be read from the socket. It is a nonfatal error, and the operation should be retried later. It is normal for WSAEWOULDBLOCK to be reported as the result from calling connect on a nonblocking SOCK_STREAM socket, since some time must elapse for the connection to be established.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms740668%28v=vs.85%29.aspx

Now apparently that's supposed to be a non-fatal error, but it seems to indicate that sockets aren't being opened properly.

First of all, just because HamHost ended in a scandal does not mean I would do anything malicious with my clients' key.dat files. That would be the most fraudulent and unjust thing possible.

Second, the VPS plan expired months ago, and I have permanently deleted all of my clients' files.

And third, the only reason I would want something like this program is to automatically create key.dat files from Blockland keys. If I can create those without manual intervention, I could make the HammerHost registration process automatic.
 (This is for BL key users of course. If the client wants to use a Steam account to authenticate, it'll already be automatic. HammerHost users will be able to choose either Steam or BL).

I have absolutely no intention of helping out a rival of my friend's wonky business

I have absolutely no intention of helping out a rival of my friend's wonky business
rivals wonky business or friend's wonky business?
and am i the friend
Run this command instead:
Code: [Select]
WINEDEBUG="+winsock" wineconsole server0/Blockland.exe ptlaaxobimwroe -dedicated
It spits out a lot of this error:
Code: [Select]
trace:winsock:WS2_recv_base socket 00b0, wsabuf 0x33f630, nbufs 1, flags 0, from 0x33f680, fromlen 16, ovl (nil), func (nil)
trace:winsock:WS2_recv_base fd=20, options=0
warn:winsock:WS2_recv_base  -> ERROR 10035
(the fact that it does this a ridiculous amount of times per second probably explains why CPU usage was higher than it should be)

From MSDN:http://msdn.microsoft.com/en-us/library/windows/desktop/ms740668%28v=vs.85%29.aspx

Now apparently that's supposed to be a non-fatal error, but it seems to indicate that sockets aren't being opened properly.
get on steam and we can coop fix this problem


Yeah I think you're the friend, not me.
logically speaking there's only two people he could be referring to there and it's almost certainly not you
well that's sweet brian :)

logically speaking there's only two people he could be referring to there and it's almost certainly not you
well that's sweet brian :)
All of you advanced scripters.
But I agree with Brian; your hosting service is pretty wonky right now.


EDIT3: After further testing you don't need to use the hacky replace-default-file-to-set-key thing. Just type setKey("yourkey"); into the console. Somehow I must have had a typo the first time I tried it.
* may only work sometimes

This is where I'm at right now:

Quote
* Request for auth.blockland.us sent to DNS server.
 * DNS server responds with proper IP addresses.
 * Nothing happens.
   * Note: When the IP addresses are placed in hosts file, DNS is not queried, but again, nothing happens.

I also disabled AppArmor and IPv6. Didn't work.
« Last Edit: March 02, 2014, 03:43:43 PM by Greek2me »

I recall having problems with authentication in older versions of wine (1.4.x is quite old), but at the moment it no longer seems to be a problem.  I would get the WSACancelAsyncRequest stub error in the terminal which would prevent DNS lookups from working.  That function call appears to still be a stub in the latest git snapshot of wine, so it seems that either something else changed in wine that no longer requires that function to be called or something in blockland changed that made that no longer necessary.

Anyway, I'd try current stable (1.6.2) and if not that, latest unstable (1.7.13).  I use 1.7.12 and have no issues hosting a dedicated server related to wine.

However, I too cannot seem to control the console through stdin, so that sucks.
« Last Edit: March 02, 2014, 09:05:05 PM by paulguy »

Read this about making input work: http://forum.blockland.us/index.php?topic=252569.msg7315520#msg7315520

Can you let me know if it works using that?

Uhh.. install a VNC server, run blockland on the VNC screen, have it generate the key.dat file. Really? I've been doing this for ages.

http://pastebin.com/9G2GKhFi This is the code for console processing. It reads from stdIn.
« Last Edit: March 03, 2014, 12:04:19 AM by $trinick »

No, I don't need to do that. You didn't read the topic: http://forum.blockland.us/index.php?topic=252569.msg7315520#msg7315520

That code creates a server that has working input and output without any kind of wrapper. You can simply type setKey("key"); into the console.

The problem is just that I can't get networking to work properly in Wine:
Quote
* Request for auth.blockland.us sent to DNS server.
 * DNS server responds with proper IP addresses.
 * Nothing happens.
   * Note: When the IP addresses are placed in hosts file, DNS is not queried, but again, nothing happens.
This prevents anyone from joining the server because it cannot auth.

So you're able to send a valid connection to the DNS server and receive a response, but your connection to Blockland's auth server fails? Have you tried packet sniffing to see if the outbound packet is even sent to auth.blockland.us?