Old 04-05-2007   #1 (permalink)
GotGames Ninja Admin
 
Twelve-60's Avatar
 
Join Date: May 2006
Location: NSW, Australia
Age: 20
Posts: 2,282
Rep Power: 5
Send a message via MSN to Twelve-60
Default WarMod

Well for those who don't know, 'WarMod' is currently a script I'm developing in PHP to help refs and the like, administer CSS matches and tournaments much easier. Including automatic lo3, sourcetv recording and IRC scorebots.

However ! Although PHP fine, it didn't have any type of input, without having an IRC bot pickup commands, which requires internet, which some LAN events will not have. I'd like to develop this into a standalone application:



Basically this is type of application I'm wanting to build, kinda like a miniHLSW. However I need some help, The above was created in Borland Delphi, but I am rather amateur with application programming, and can't figure out how to write an rcon class for this. It is probably better written in another language, but I'm not sure what.

Any help or ideas on this would be great, thanks

- Twelve-60
__________________
Twelve-60 is online now   Reply With Quote
Old 04-05-2007   #2 (permalink)
Contributing Member
 
Join Date: Jun 2006
Location: Melbourne
Posts: 655
Rep Power: 3
Default

Somethign like PAM for CoD?
raptor is offline   Reply With Quote
Old 04-05-2007   #3 (permalink)
UnderGround GM
 
Join Date: May 2006
Posts: 886
Rep Power: 3
Default

Talk to me on IRC Brendan you dud. Already a step ahead of you
Racs is offline   Reply With Quote
Old 04-05-2007   #4 (permalink)
Pro Member
 
chemicalNova's Avatar
 
Join Date: Jun 2006
Age: 19
Posts: 5,593
Rep Power: 8
Default

Borland.. nuff said

Theres heaps of socket libraries out there Brendan.. Racs probably used one of them.. like I suggested to you in the first place

chem
__________________
There are no stupid questions... but there are alot of inquisitive idiots.
-
chemicalNova is offline   Reply With Quote
Old 04-05-2007   #5 (permalink)
GotGames Ninja Admin
 
Twelve-60's Avatar
 
Join Date: May 2006
Location: NSW, Australia
Age: 20
Posts: 2,282
Rep Power: 5
Send a message via MSN to Twelve-60
Default

I have a UDP and TCP socket components for delphi

I can receive logs via UDP, but I can't construct a rcon class

Not sure how this pack() function works (took a look at Khaless's php rcon class).

Someone make a rcon class for delphi

Edit: Racs you are not on IRC

- Twelve-60
__________________
Twelve-60 is online now   Reply With Quote
Old 04-05-2007   #6 (permalink)
chX
GotGames Moderator
 
chX's Avatar
 
Join Date: Jan 2007
Location: Adelaide
Age: 17
Posts: 3,760
Rep Power: 5
Send a message via MSN to chX
Default

Mmm if only I knew more about other stuff instead of just knowing a fair bit about PHP. I probably should learn C++ too, but I'd most likely end up getting all the syntax mixed up and shiz.
chX is offline   Reply With Quote
Old 04-05-2007   #7 (permalink)
Monster Member
 
shirasE_'s Avatar
 
Join Date: Jan 2007
Location: Melbourne, Australia.
Age: 18
Posts: 3,555
Rep Power: 5
Send a message via ICQ to shirasE_ Send a message via AIM to shirasE_ Send a message via MSN to shirasE_ Send a message via Yahoo to shirasE_ Send a message via Skype™ to shirasE_
Default

http://developer.valvesoftware.com/w..._RCON_Protocol
__________________
AMD 5000+BE@3.21GHZ//2GB OCZREAPER//ATI HD3870@850/1301
ANTEC 900//RAZER TARANTULA//TT TAI-CHI M2//SS 5HV2 XFI
#GotGames #MelbCSS #s2.au #Reality.Gaming
#TRAiNWRECK melb.lan.net.invite - kto_-[1b]
shirasE_ is offline   Reply With Quote
Old 04-05-2007   #8 (permalink)
GotGames Ninja Admin
 
Twelve-60's Avatar
 
Join Date: May 2006
Location: NSW, Australia
Age: 20
Posts: 2,282
Rep Power: 5
Send a message via MSN to Twelve-60
Default

I know the protocol, I just don't know how to use it in delphi.

- Twelve-60
__________________
Twelve-60 is online now   Reply With Quote
Old 04-05-2007   #9 (permalink)
Monster Member
 
shirasE_'s Avatar
 
Join Date: Jan 2007
Location: Melbourne, Australia.
Age: 18
Posts: 3,555
Rep Power: 5
Send a message via ICQ to shirasE_ Send a message via AIM to shirasE_ Send a message via MSN to shirasE_ Send a message via Yahoo to shirasE_ Send a message via Skype™ to shirasE_
Default

Quote:
Originally Posted by Twelve-60 View Post
I know the protocol, I just don't know how to use it in delphi.

- Twelve-60
Ok sorry, I could help out if it was in Visual Basic. >_>;. I made a radiobot with the mIRC protocol. Thats about as far as my skills go. XD
__________________
AMD 5000+BE@3.21GHZ//2GB OCZREAPER//ATI HD3870@850/1301
ANTEC 900//RAZER TARANTULA//TT TAI-CHI M2//SS 5HV2 XFI
#GotGames #MelbCSS #s2.au #Reality.Gaming
#TRAiNWRECK melb.lan.net.invite - kto_-[1b]
shirasE_ is offline   Reply With Quote
Old 04-05-2007   #10 (permalink)
Pro Member
 
empske's Avatar
 
Join Date: Jan 2007
Location: ZULU
Age: 17
Posts: 6,719
Rep Power: 0
Default

Visual Basic is becoming easier for me to use. Even though i pay no attention in class and check GotGames for 80 minutes, my teacher loves me!
__________________

odin : atleast i didnt join gotgames in 2009

C:\Documents and Settings\Admin\Desktop\DdudFACE.png
empske is offline   Reply With Quote
Old 04-05-2007   #11 (permalink)
Monster Member
 
shirasE_'s Avatar
 
Join Date: Jan 2007
Location: Melbourne, Australia.
Age: 18
Posts: 3,555
Rep Power: 5
Send a message via ICQ to shirasE_ Send a message via AIM to shirasE_ Send a message via MSN to shirasE_ Send a message via Yahoo to shirasE_ Send a message via Skype™ to shirasE_
Default

Quote:
Originally Posted by empske View Post
Visual Basic is becoming easier for me to use. Even though i pay no attention in class and check GotGames for 80 minutes, my teacher loves me!
Visual Basic so far at my school is pathetic. Nearly everything I know is self taught or I've nagged people for a bit of help and they've taught me something. My class is learning how to position a ****ing picture box and all ths other lame crap.
__________________
AMD 5000+BE@3.21GHZ//2GB OCZREAPER//ATI HD3870@850/1301
ANTEC 900//RAZER TARANTULA//TT TAI-CHI M2//SS 5HV2 XFI
#GotGames #MelbCSS #s2.au #Reality.Gaming
#TRAiNWRECK melb.lan.net.invite - kto_-[1b]
shirasE_ is offline   Reply With Quote
Old 04-05-2007   #12 (permalink)
Participating Member
 
KeyDecoder's Avatar
 
Join Date: Jan 2007
Location: Brisbane
Age: 26
Posts: 346
Rep Power: 3
Default

Quote:
Originally Posted by chemicalNova View Post
Borland.. nuff said

Theres heaps of socket libraries out there Brendan.. Racs probably used one of them.. like I suggested to you in the first place

chem
Don't be so quick to hate Borland (unless your talking about Borland Builder 6 which is a nasty piece of work), Delphi is a very good IDE for developing Windows Apps, even if the language leaves a bit to be desired (like all the old crappy Pascal stuff).

Quote:
Originally Posted by Twelve-60 View Post
I have a UDP and TCP socket components for delphi

I can receive logs via UDP, but I can't construct a rcon class

Not sure how this pack() function works (took a look at Khaless's php rcon class).

Someone make a rcon class for delphi
- Twelve-60
I'll take a quick look at it and see if I can whip something up.
__________________
KeyDecoder
This is where I say something witty and original, like this.
KeyDecoder is offline   Reply With Quote
Old 04-05-2007   #13 (permalink)
GotGames Ninja Admin
 
Twelve-60's Avatar
 
Join Date: May 2006
Location: NSW, Australia
Age: 20
Posts: 2,282
Rep Power: 5
Send a message via MSN to Twelve-60
Default

Quote:
Originally Posted by KeyDecoder View Post
I'll take a quick look at it and see if I can whip something up.
I love you.



- Twelve-60
__________________
Twelve-60 is online now   Reply With Quote
Old 05-05-2007   #14 (permalink)
Participating Member
 
Kryptix's Avatar
 
Join Date: Feb 2007
Location: Queensland
Posts: 409
Rep Power: 2
Send a message via MSN to Kryptix
Default

gimme a torrent or something to an english version and ill finish it
__________________
My sig is made of words. it pr4wns j00r pics, k n00b?
Kryptix is offline   Reply With Quote
Old 05-05-2007   #15 (permalink)
Participating Member
 
KeyDecoder's Avatar
 
Join Date: Jan 2007
Location: Brisbane
Age: 26
Posts: 346
Rep Power: 3
Default

Quote:
Originally Posted by Twelve-60 View Post
I love you.



- Twelve-60
If I wasn't so tired, I'd be deeply disturbed by that

WinSock2 for Delphi. Very handy.

ftp://ftp.delphi-jedi.org/api/Winsock2.zip

<-Deleted very embrassing code->
__________________
KeyDecoder
This is where I say something witty and original, like this.

Last edited by KeyDecoder; 05-05-2007 at 12:16 PM.. Reason: Removed crap code (Useful tip: never code half-asleep)
KeyDecoder is offline   Reply With Quote
Old 05-05-2007   #16 (permalink)
GotGames Ninja Admin
 
Twelve-60's Avatar
 
Join Date: May 2006
Location: NSW, Australia
Age: 20
Posts: 2,282
Rep Power: 5
Send a message via MSN to Twelve-60
Default

I'm currently using EASY_TCP and EASY_UDP

Which I currently have working fine for logs (as mentioned above), so I'd like to stick with that as its already a class and shall be easy to create an array full of TCP objects for multiple servers

I came up with a combined function with the following:

Code:
  Packet.String1 := Password + #0;
  Packet.String2 := '';
  Packet.RequestID := 0;
  Packet.CommandOrResponse := SERVERDATA_AUTH;
  Packet.PacketSize := SizeOf (Packet);

  TCPClient.SendData(Packet,Packet.PacketSize);
and then after its connected/authed (I haven't written a function to check for SERVERDATA_AUTH_RESPONSE yet though..)

Code:
  Packet.String1 := 'sv_password " "' + #0;
  Packet.String2 := '';
  Packet.RequestID := 0;

  Packet.CommandOrResponse := SERVERDATA_EXECCOMMAND;
  Packet.PacketSize := SizeOf (Packet);

  TCPClient.SendData(Packet,Packet.PacketSize);
Just to see if commands were getting through, well they do, but I get IP banned

But thanks, hopefully I can get it working

Feel free to post more ideas

- Twelve-60
__________________

Last edited by Twelve-60; 05-05-2007 at 05:52 AM..
Twelve-60 is online now   Reply With Quote
Old 05-05-2007   #17 (permalink)
Participating Member
 
KeyDecoder's Avatar
 
Join Date: Jan 2007
Location: Brisbane
Age: 26
Posts: 346
Rep Power: 3
Default

Quote:
Originally Posted by Twelve-60 View Post
I'm currently using EASY_TCP and EASY_UDP

Which I currently have working fine for logs (as mentioned above), so I'd like to stick with that as its already a class and shall be easy to create an array full of TCP objects for multiple servers
Never used the Easy TCP stuff before. I prefer to stick to the lower level WinSock2 stuff. I have classes at work which wraps around the lower level stuff anyway, but obviously can't use it for this sort of thing. Makes it kinda hard having to rewrite stuff from scratch again, used to having all my support classes at work to handle all the trivial things

Quote:
Originally Posted by Twelve-60 View Post
I came up with a combined function with the following:

Code:
  Packet.String1 := Password + #0;
  Packet.String2 := '';
  Packet.RequestID := 0;
  Packet.CommandOrResponse := SERVERDATA_AUTH;
  Packet.PacketSize := SizeOf (Packet);

  TCPClient.SendData(Packet,Packet.PacketSize);
and then after its connected/authed (I haven't written a function to check for SERVERDATA_AUTH_RESPONSE yet though..)
I suggest you download Ethereal so you can see what packets are being sent and recieved. Note that with TCP you will see a number of packets being sent and received, but only one will contain data (the other are the various TCP/IP request and acknowledge packets which have no data).

Quote:
Originally Posted by Twelve-60 View Post
Code:
  Packet.String1 := 'sv_password " "' + #0;
  Packet.String2 := '';
  Packet.RequestID := 0;

  Packet.CommandOrResponse := SERVERDATA_EXECCOMMAND;
  Packet.PacketSize := SizeOf (Packet);

  TCPClient.SendData(Packet,Packet.PacketSize);
Just to see if commands were getting through, well they do, but I get IP banned
So you are actually able to send RCON messages, but the server is banning you. Interesting. You probably need a local test server running to test with rather than an actual server and work with that.

Apologies for a crap code last night, was half-asleep, I really should know better. I'm taking another look today, but won't post anything until I've got something working with my local test server.

Thanks,

-KeyDecoder.
__________________
KeyDecoder
This is where I say something witty and original, like this.
KeyDecoder is offline   Reply With Quote