Page 3 of 3

Posted: Sun Jul 05, 2009 11:57 am
by registrymechanic22
infratec wrote:Hi, my last favour for you:
thanks, cool

Posted: Tue Jul 07, 2009 12:27 pm
by registrymechanic22
Hi all
Please Give:
how to send Russian text of the server, and then on to the server come scribble ... ((
???

Posted: Tue Jul 07, 2009 3:11 pm
by cas
registrymechanic22 wrote:Hi all
Please Give:
how to send Russian text of the server, and then on to the server come scribble ... ((
???
Maybe unicode switch (and possibly some tweaks in code) should help.

Posted: Tue Jul 07, 2009 3:56 pm
by registrymechanic22
cas wrote:
registrymechanic22 wrote:Hi all
Please Give:
how to send Russian text of the server, and then on to the server come scribble ... ((
???
Maybe unicode switch (and possibly some tweaks in code) should help.
thanks, found the solution:
PrintN(SendText$) 'bad text'
CharToOem_(SendText$,SendText$)
PrintN(SendText$) 'good text'

Re: RCON Protocol on PB

Posted: Wed Dec 23, 2015 8:11 am
by roleg
I try to implement this code to my communication with server program, but it's work wrong. After it connected, server print in stdout: "Disconnected: Invalid Password" but passwords is OK and after that my program crashed with that error: "[08:51:30] [ERROR] rcon.pb (Line: 45) [08:51:30] [ERROR] Invalid memory access. (read error at address 20)".

Program crashes in:

Code: Select all

Procedure RConReceive(Con, *ID, *CommandResponse, *Str1, *Str2, MaxWait)

 Result = -1
 
 *Buffer = AllocateMemory(8192)                         ;<<<--------

ProtocolExamples: https://developer.valvesoftware.com/wik ... _Libraries

P.S. after i disable unicode executable, Authorization for now WORK FINE, but commands don't execute and reached "Receive timeout!"

P.S.S. after debug in sniffer I found that SERVERDATA_AUTH_RESPONSE dont sended to Client, so we dont need to check that.... ALL WORKED !!!

Re: RCON Protocol on PB

Posted: Wed Dec 23, 2015 3:41 pm
by infratec
Hi,

I changed all my code to send and receive ASCII.
It should work now independent from the compiler settings.

According to your link:
When the server receives an auth request, it will respond with an empty SERVERDATA_RESPONSE_VALUE, followed immediately by a SERVERDATA_AUTH_RESPONSE indicating whether authentication succeeded or failed
Bernd

Re: RCON Protocol on PB

Posted: Mon Jan 04, 2016 9:50 am
by roleg
Thanks Bernd for your code!
I use this constants:

Code: Select all

#SERVERDATA_AUTH = 3
#SERVERDATA_AUTH_RESPONSE = 0
#SERVERDATA_EXECCOMMAND = 2
#SERVERDATA_RESPONSE_VALUE = 4
work fine for me (RUST dedicated server)