Quake3 Server Commander v0.2

Miscellaneous programs and scripts, opensource or not, and sometimes, random mathematical stuff.
Gamall
Hic sunt dracones
Posts: 4174
Joined: Fri May 26, 2006 11:09 pm
Contact:

Quake3 Server Commander v0.2

Post by Gamall »

QCmd_02a.zip
Last version
(799.74 KiB) Downloaded 1657 times
(note: more up-to-date versions of the binaries are available in the topic. Latest is -> 0.2d)

(note2: the source code is available here -> 0.2d + 0.3)

-> Also on Filefront

Code: Select all

*****************************************************************
**             JEDI KNIGHT: Jedi Academy & Outcast             **
*****************************************************************
 
  #-----------------------------------------------------------#  
  #              TITLE : Quake3 Server Commander              #  
  #                      VERSION : 0.2a                       #  
  #                                                           #  
  #               AUTHOR : Gamall Wednesday Ida               #  
  #               E-MAIL : gamall.ida@gmail.com               #  
  #              WEBSITE : http://gamall-ida.com              #  
  #                RELEASE DATE : January 2008                #  
  #                 OS : Windows && GNU/Linux                 #  
  #-----------------------------------------------------------#  
 
 
 
+   READ ME! (CONTACT)                                           
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-o          +
 
 Should  you want to contact me, please do NOT jump on my email, 
 you won't get an answer. Read the "CONTACT"  section  near  the 
 end of that file instead ;-).                                   
 
 NOTE:  I  usually write extensive documentation for my programs 
 in their readmes. I don't have time to  do  that  anymore.  The 
 documentation  here  is  minimalist, you'll have to figure most 
 things for yourself. If you run into trouble, then  contact  me 
 and I'll help. (again, see "CONTACT" section).                  
 
 
+   WHAT IS THIS ? (in a few words)                              
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-o          +
 
 This  command-line program is a small set of server tools, here 
 called "modes".                                                 
 
 
   -   THE MESSENGER MODE                                        
   -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~o          -
 
 You can broadcast messages in a server, even without having the 
 game installed. This is done by connecting and renaming a  fake 
 player  generated  by the program. Useful to alert your friends 
 if you can't enter a server because of a bug, or  just  to  say 
 "hi".                                                           
 
 My  initial  intent  was  to have "real" fake players enter the 
 game and chat using /say, but I didn't find enough info on  the 
 protocol to do that yet.                                        
 
 Admins can protect a given number N of slots on their server by 
 adding the following line in the server's configuration file. I 
 advise N = 3.                                                   
 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
       sets qcmd_perms 3
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
 
 Here is an example session in messenger mode: (use !q to quit). 
 
 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
       > qcmd +msg host.conseiljedi.com 29070
       
       ** Quake3 Commander v0.2
       ** by Gamall Wednesday Ida
       ** email: gamall.ida@gmail.com
       ** web  : gamall-ida.com
       
           infoResponse
       
            -> fdisable: 163837
            -> wdisable: 524279
            -> truejedi: 0
            -> needpass: 0
            -> gametype: 0
            -> sv_maxclients: 24
            -> clients: 0
            -> mapname: mp/ffa3
            -> hostname: ^1Dragon's Lair ^3Base
            -> protocol: 26
       
       PERMISSIONS = ''
       + There is no restriction on this server +
       [Sending identification message...]
           connectResponse
       ________________________________
       signature# Gamall
       [Sending signature...]
           connectResponse
       _______________________________
       # This is a message...
           connectResponse
       _______________________________
       # and this another one
           connectResponse
       _______________________________
       # !status
           statusResponse
       
            -> version: JAmp: v1.0.1.1 linux-i386 Nov 10 2003
            -> dmflags: 0
               [...]
            -> ga_allowBlackInNames: 1
            -> ga_closeServer: 0
            -> ga_doNotAllowDualKataSpin: 0
            -> ga_nameLengthLimit: -1
            -> g_noSpecMove: 0
            -> gamename: basejka: Gamall's Fix v1.1a
            -> g_maxGameClients: 0
            -> g_siegeRespawn: 20
            -> g_saberWallDamageScale: 0.4
            -> bg_fighterAltControl: 0
            -> g_siegeTeam1: none
            -> g_siegeTeam2: none
            -> g_showDuelHealths: 0
       0 999 "MS# ^5and this another one"
       
       _______________________________
       # !info
           infoResponse
       
            -> fdisable: 163837
            -> wdisable: 524279
            -> truejedi: 0
            -> needpass: 0
            -> gametype: 0
            -> sv_maxclients: 24
            -> clients: 1
            -> mapname: mp/ffa3
            -> hostname: ^1Dragon's Lair ^3Base
            -> protocol: 26
       
       _______________________________
       # !sig
       ________________________________
       signature# Gamall
       [Sending signature...]
           connectResponse
       _______________________________
       # !q
       [Sending identification message...]
           connectResponse
       Goodbye !
       
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
 
 
   -   THE MONITOR MODE                                          
   -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~o          -
 
 You  can  generate  a graph of the number of players in a given 
 server.                                                         
 
 The following example session generated the graph of the number 
 of  players  every  10  minutes  in  the  file   serv_logs.txt, 
 displaying  the  current  time  every  6 requests (= one hour). 
 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
       > qcmd -wait 600 -timetag 6 +monitor 66.29.77.35 29071 >> serv_logs.txt
       
       ** Quake3 Commander v0.2 
       ** by Gamall Wednesday Ida 
       ** email: gamall.ida@gmail.com 
       ** web  : gamall-ida.com
       
       Monitoring server 66.29.77.35:29071 every 600 seconds...
           infoResponse
       
            -> game: japlus
            -> fdisable: 0
            -> wdisable: 0
            -> truejedi: 0
            -> needpass: 0
            -> gametype: 8
            -> sv_maxclients: 24
            -> clients: 12
            -> mapname: mp/ctf3
            -> hostname: €€€€€€€€€^5JA+ Official n°1 CTF ^7Get JA+ Plugin & Maps at www.japlus.net, ^5USA
            -> protocol: 26
       
       #============                    # 12          mp/ctf3  Sun Dec 30 16:13:04 2007
       #============                    # 12          mp/ctf3  
       #============                    # 12          mp/ctf4  
       #============                    # 12          mp/ctf4  
       #=============                   # 13          mp/ctf1  
       #============                    # 12          mp/ctf1  
       #==============                  # 14          mp/ctf2  Sun Dec 30 17:13:05 2007
       #===========                     # 11          mp/ctf2  
       #==============                  # 14          mp/ctf3  
       #============                    # 12          mp/ctf3  
       #==========                      # 10          mp/ctf3  
       
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
 
 
   -   THE GET_CVAR MODE                                         
   -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~o          -
 
 Gets the value of a public cvar on a server.  Useful  with  the 
 direct  query mode for embedding into BASH or PERL scripts, for 
 instance. See documentation of QCmd 0.1.                        
 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
       > qcmd +get_cvar host.conseiljedi.com 29080 s sv_hostname
       sv_hostname = '^4R^7D^1H^3/^5SF ^2S^7erver'
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
 
 The third parameter,  with  value  Status  or  Info,  specifies 
 whether   the   cvar   is   found   in  getStatus  or  getInfo. 
 
 
   -   THE DIRECT QUERY MODE                                     
   -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~o          -
 
 Send a quake3 query directly. Useful for controling the  server 
 through  a  PERL  script or cronjob or or or... Again, read the 
 documentation of QCmd 0.1.                                      
 
 This  example  session  sends  the   order   to   change   map: 
 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
       > qcmd +q host.conseiljedi.com 29070 rcon mypassismine map mp/ffa5
           print
       ShutdownGame:
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
 
 
   -   THE RCON MODE                                             
   -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~o          -
 
 This  is  a  classic  RCon  console.  (use  !q to quit) Session 
 example:                                                        
 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
       >qcmd +rcon host.conseiljedi.com 29070 mypassisnotyours
       
       ** Quake3 Commander v0.2
       ** by Gamall Wednesday Ida
       ** email: gamall.ida@gmail.com
       ** web  : gamall-ida.com
       
           infoResponse
       
            -> fdisable: 163837
            -> wdisable: 524279
            -> truejedi: 0
            -> needpass: 0
            -> gametype: 0
            -> sv_maxclients: 24
            -> clients: 0
            -> mapname: mp/ffa5
            -> hostname: ^1Dragon's Lair ^3Base
            -> protocol: 26
       
           print
       "version" is:"JAmp: v1.0.1.1 linux-i386 Nov 10 2003^7" default:"JAmp: v1.0.1.1 l
       inux-i386 Nov 10 2003^7"
           print
       "gamename" is:"basejka: Gamall's Fix v1.1a^7" default:"basejka: Gamall's Fix v1.
       1a^7"
       ________________________________________________________________________________
       
       # !status
           statusResponse
       
            -> version: JAmp: v1.0.1.1 linux-i386 Nov 10 2003
            -> dmflags: 0
              [...]
            -> g_showDuelHealths: 0
       
       ________________________________________________________________________________
       
       # map mp/duel1
           print
       ShutdownGame:
       ________________________________________________________________________________
       
       # map mp/duel1337
           print
       Can't find map maps/mp/duel1337.bsp
       ________________________________________________________________________________
       
       # Blah blah
           print
       broadcast: print "^1[^7SERVER^1]^7: Blah blah\n"
       ________________________________________________________________________________
       
       # status
           print
       map: mp/duel1
       ________________________________________________________________________________
       
       # status is buggy, will be fixed in later versions, I hope.
           print
       map: mp/duel1
       ________________________________________________________________________________
       
       # clientkick 10
           print
       Client 10 is not active
       ________________________________________________________________________________
       
       # !ad
       [Sending identification message...]
           connectResponse
       ________________________________________________________________________________
       
       # !status
           statusResponse
       
            -> version: JAmp: v1.0.1.1 linux-i386 Nov 10 2003
               [...]
            -> g_siegeTeam2: none
            -> g_showDuelHealths: 0
       0 999 "^6# ^1QCmd MSG - Gamall-Ida.com"
       
       ________________________________________________________________________________
       
       # clientkick 0
           print
       broadcast: print "^6# ^1QCmd MSG - Gamall-Ida.com^7 @@@WAS_KICKED\n"
       ________________________________________________________________________________
       
       # !q
       Goodbye !
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
 
 
+   GENERAL USE                                                  
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-o          +
 
 Launching the program without any  argument  will  display  the 
 help page and exit:                                             
 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
       ** Quake3 Commander v0.2
       ** by Gamall Wednesday Ida
       ** email: gamall.ida@gmail.com
       ** web  : gamall-ida.com
       
       
       Usage: qcmd <-option 1>...<-option N>   <+mode>
       
       Modes:
       ===============================================================================
         +get_cvar <host> <port> <(i/s)> <cvar>
         +monitor  <host> <port>
         +msg      <host> <port>
         +q        <host> <port> <query>
         +rcon     <host> <port> <password>
       
       Options (general):
       ===============================================================================
         -timeout <seconds>   : socket timeout (def 2.5 sec)
       
       Options +get_cvar:
       ===============================================================================
         -se                  : silent extraction. Display result only
       
       Options +monitor:
       ===============================================================================
         -nobar               : do not display players number progress bar
         -nomap               : do not display current map in graph
         -nonum               : do not display number of players explicitely
         -timetag <int>       : display current time every <int> request (def   24)
         -wait    <seconds>   : wait for <seconds> between each request  (def 3600)
       
       Options +msg:
       ===============================================================================
         -color <int 1-7>     : force message color    (def    5)
         -len   <int>         : maximum message length (def   29)
         -pass  <password>    : server password        (def none)
         -nick  <name>        : automatic signature
         -rc                  : random color for messages
       
       Options +q:
       ===============================================================================
         -format              : pretty print for getinfo and getstatus
         -repeat <int>        : repeat command <int> times (def 1)
         -wait   <seconds>    : repeat every <seconds>     (def 0)
       
       Options +rcon:
       ===============================================================================
         All out of options ;-P
       
       Toplevel commands (modes +rcon and +msg)
       ===============================================================================
         !ad                  : send a QCmd identification message
         !info                : display limited  server info   (from getInfo query)
         !sig (+msg only)     : send another signature manually
         !status              : display detailed server status (from getStatus query)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
 
 It  is  up  to  the  user to play with the different options to 
 figure out what they do exactly.  If  you  have  questions  you 
 can't  answer  by  yourself,  ask  me  on the program's support 
 topic. (see next section)                                       
 
 
+   CONTACT / SUPPORT                                            
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-o          +
 
 If you need help or have suggestions, comments, insults, praise 
 or in general, anything to say  about  this  program  that  you 
 expect  me  to read and answer to, please post on the program's 
 topic on my website:                                            
 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
       	http://gamall-ida.com/f/viewtopic.php?f=3&t=359
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
 
 The only circumstance in which my personal email is the  proper 
 way  to  contact  me is when my website is down for maintenance 
 for a long time, which is very infrequent.                      
 
 
+   TECHNICAL INFO                                               
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-o          +
 
 This program is written in Objective Caml, with a small part in 
 C (because I need to use the exact same  Huffman  encoding  the 
 Quake3  protocol  does,  and  the  code  was  available  in  C) 
 
 Two files are shipped for each  OS:  qcmd  is  the  executable, 
 qcmd_bc  is  an OCaml bytecode executable. If the first doesn't 
 work on your system, intall the OCaml runtime and  perhaps  the 
 second will...                                                  
 
 
+   CREDITS                                                      
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-o          +
 
 I  got  the  "messenger"  idea  a  long  time  ago  from  Luigi 
 Auriemma's q3fill program, and learned quite a bit about socket 
 programming and the Quake3 protocol by reading his code. Thanks 
 to him :)                                                       
 
 
+   VERSIONS HISTORY                                             
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-o          +
 
 0.1: Sep 07. Written in C++. Was equivalent to the direct query 
 mode of version 0.2.                                            
 
 0.2: Jan 08. Entirely rewritten in OCaml, with a small part  in 
 C. Introduced all the other modes.                              
 
 0.2a: Jan 08. Bugfix release.                                   
 Fixed  a  bug  in  the  Messenger  mode which made the password 
 option ineffective. This  prevented  the  messenger  mode  from 
 working  on passworded servers. | Added forgotten !q command to 
 the help text.                                                  
 
 THIS MODIFICATION IS NOT MADE,  DISTRIBUTED,  OR  SUPPORTED  BY 
 ACTIVISION,  RAVEN,  OR  LUCASARTS  ENTERTAINMENT  COMPANY LLC. 
 ELEMENTS TM & © LUCASARTS ENTERTAINMENT COMPANY LLC AND/OR ITS 
 LICENSORS.                                                      
 




























  +-----------------------------+
  | File generated with 'GaTeX',|
  | an ASCII typesetting system |
  | by  Gamall  Wednesday  Ida. |
  |   http://gamall-ida.com     |
  +-----------------------------+
  Build: Sun Jan 20 17:49:19 2008
  File : F:readme.GaTeX.source
Screenshots:
QCmd Messenger Mode (the color schemes are random)
QCmd Messenger Mode (the color schemes are random)
Attachments
QCmd_02.zip
OBSOLETE VERSION! USE NEWER ONE
(797.74 KiB) Downloaded 1488 times
{<§ Gamall Wednesday Ida §>}
{ Mods and Programs - Mods TES-IV Oblivion }
Gamall
Hic sunt dracones
Posts: 4174
Joined: Fri May 26, 2006 11:09 pm
Contact:

Re: Quake3 Server Commander v0.2

Post by Gamall »

I've given up writing an extensive documentation. Nobody reads readmes anyway...

Program released :)


edit: seems there is an issue in messenger mode with passworded (private) servers. I'll look into it when I've time.
{<§ Gamall Wednesday Ida §>}
{ Mods and Programs - Mods TES-IV Oblivion }
User avatar
evan1715
Posts: 95
Joined: Fri Nov 09, 2007 11:51 pm
Location: Florida
Contact:

Re: Quake3 Server Commander v0.2

Post by evan1715 »

Gamall wrote:I've given up writing an extensive documentation. Nobody reads readmes anyway...
i read readmes o_o i read this 1, force crash one and ur longgggggggggggggg JA mod 1 :)) :green

also where do u get that gatex readme writer thingy thing i want 1 lol
Gamall wrote: My initial intent was to have "real" fake players enter the
game and chat using /say, but I didn't find enough info on the
protocol to do that yet.
hax... that's some hard core coding you'll have to do o_o


BY THE WAY
what is the difference between qcmd_bc and the qcmd (i didn't see it in readme :langue )
Gamall
Hic sunt dracones
Posts: 4174
Joined: Fri May 26, 2006 11:09 pm
Contact:

Re: Quake3 Server Commander v0.2

Post by Gamall »

evan1715 wrote:i read readmes o_o i read this 1, force crash one and ur longgggggggggggggg JA mod 1
Okay, that was an overstatement. Let me rephrase : "not as many people read readmes as I'd like". :huhu (as evidenced by the number of mails I get, despite explicit clauses in the readmes saying to post on the forum)
evan1715 wrote:also where do u get that gatex readme writer thingy thing i want 1 lol
Right here in this forum: -> viewtopic.php?f=3&t=167
evan1715 wrote:hax... that's some hard core coding you'll have to do o_o
Yep :huhu Just connecting the fake player and making the C Huffman algorithm cohabit with the OCaml core on both Windows and Linux was hardcore enough already. Spent four days rewriting the prog which worked under Linux so that it would also support Windows :haha (that was my fault, I did something wrong...)
evan1715 wrote:BY THE WAYwhat is the difference between qcmd_bc and the qcmd (i didn't see it in readme )

Bad boy, no cookie ! It is in the readme:

Code: Select all

Two files are shipped for each  OS:  qcmd  is  the  executable, 
qcmd_bc  is  an OCaml bytecode executable. If the first doesn't 
work on your system, intall the OCaml runtime and  perhaps  the 
second will...  
{<§ Gamall Wednesday Ida §>}
{ Mods and Programs - Mods TES-IV Oblivion }
User avatar
evan1715
Posts: 95
Joined: Fri Nov 09, 2007 11:51 pm
Location: Florida
Contact:

Re: Quake3 Server Commander v0.2

Post by evan1715 »

Gamall wrote:Okay, that was an overstatement. Let me rephrase : "not as many people read readmes as I'd like". :huhu (as evidenced by the number of mails I get, despite explicit clauses in the readmes saying to post on the forum)
ah ok much more understandable now :D
Gamall wrote:Right here in this forum: -> viewtopic.php?f=3&t=167
awesomeness.
Gamall wrote:Bad boy, no cookie ! It is in the readme:

Code: Select all

Two files are shipped for each  OS:  qcmd  is  the  executable, 
qcmd_bc  is  an OCaml bytecode executable. If the first doesn't 
work on your system, intall the OCaml runtime and  perhaps  the 
second will...  
OK i read the readme didnt see it then i did ctrl f to find it and it didnt appear in the readme, now when i do it, it appears... hax :D
cookie?! :super :quoi :rhaaaa
Gamall
Hic sunt dracones
Posts: 4174
Joined: Fri May 26, 2006 11:09 pm
Contact:

Re: Quake3 Server Commander v0.2

Post by Gamall »

There is a silly bug with passworded servers. I simply forgot to replace a placeholder by the actual password in the connection string. I'll fix that when I get time.
{<§ Gamall Wednesday Ida §>}
{ Mods and Programs - Mods TES-IV Oblivion }
Gamall
Hic sunt dracones
Posts: 4174
Joined: Fri May 26, 2006 11:09 pm
Contact:

Re: Quake3 Server Commander v0.2

Post by Gamall »

Released version 2.0a, which fixes the password bug.
{<§ Gamall Wednesday Ida §>}
{ Mods and Programs - Mods TES-IV Oblivion }
User avatar
slaughter
Posts: 4
Joined: Fri Jan 25, 2008 12:44 am

Re: Quake3 Server Commander v0.2

Post by slaughter »

Hi, I got a problem using your program and I'm currently building a system ladder/tournament. This is the log :
./qcmd +rcon 63.211.110.185 27960 mypassword

** Quake3 Commander v0.2a
** by Gamall Wednesday Ida
** email: gamall.ida@gmail.com
** web : gamall-ida.com

Fatal error: exception Unix.Unix_error(30, "sendto", "")

cat /proc/version
Linux version 2.6.9-55.0.12.ELsmp (mockbuild@builder6.centos.org) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-8)) #1 SMP Fri Nov 2 11:19:08 EDT 2007


Thanks
Gamall
Hic sunt dracones
Posts: 4174
Joined: Fri May 26, 2006 11:09 pm
Contact:

Re: Quake3 Server Commander v0.2

Post by Gamall »

Hello,
slaughter wrote:Fatal error: exception Unix.Unix_error(30, "sendto", "")
that normally would mean you didn't have an internet connection... which would be really silly so I'll assume you did.

It is more likely your problem comes from your version of Linux. Not a big surprise seeing that:
slaughter wrote:gcc version 3.4.6 20060404 (Red Hat 3.4.6-8)
This is a tad old to be your home computer, so I suppose you were running it on your game server ?

I have an old (7.2) Redhat running on my servers, I'll see if I can compile qcmd0.2 on it, and it will stand better chances of working for you.

Meanwhile,
slaughter wrote: I'm currently building a system ladder/tournament.
If what you want is automation through a shell script or something, then the +rcon mode is not what you want anyway. There are many other tools to do that, and it is generally used from your home computer, not directly on the gameserver.

Correct me if I am wrong, but what you want is more likely the direct query mode. Good news is that older 0.1 version of Qcmd does the direct query mode and has RedHat-compiled executables available here.

Hope that helps :)
{<§ Gamall Wednesday Ida §>}
{ Mods and Programs - Mods TES-IV Oblivion }
User avatar
slaughter
Posts: 4
Joined: Fri Jan 25, 2008 12:44 am

Re: Quake3 Server Commander v0.2

Post by slaughter »

Bonjour,

Je suis désolé de ne pas avoir donné plus d'explications, mais j'étais à la job alors je ne pouvais pas trop trop être sur un forum. Anyway, j'ai essayé la version 0.1 avant de trouver la version 0.2, voici ce que j'obtient :

./qcmd-static-redhat -ip 63.211.110.185 -p 27960 -c rcon [removed]
Time 'Thu Jan 24 19:41:23 2008'
To server '63.211.110.185:27960'
Command 'rcon mypass'
Answer [
ERROR: Socket timeout, no reply received.
]

Je suis désolé d'avoir posté un qcmd +rcon, moi ce que j'utilise est qcmd +q et ça fonctionne super bien avec mon pc sur windows et mon pc sur Ubuntu. Le problème est que mon système de ladder est sur un site web. Donc c'est un webserver et non mon game server. Oui c'est à partir d'un script que je vais utiliser ça, alors la version 1 me suffirait bien, mais j'ai cette erreur et je ne comprend pas pourqoi. Avec la version 0.1 pour linux, j'obtient une erreur de librarie. Je ne peux rien changer sur le webserver puisque je paye pour celui-ci. Je sais que c'est une ancienne version. Je peux peut-être les faire changer de version de gcc, mais pas de Red Hat. Donne moi des nouvelles sur quoi je devrais faire tourner ce programme, par exemple les specs de red hat que je devrais avoir et je vais les contacter pour voir si un de leur serveur a ces specs. Cependant, j'aimerais mieux rester sur ce serveur et pouvoir faire fonctionner ce programme. Sinon est-ce que tu provide les sources, je pourrais toujours le compiler moi-même. Je comprendrais si tu ne provide pas les sources et c'est tout à fait normal.

Merci d'avoir pris le temps de me répondre !
Last edited by Gamall on Fri Jan 25, 2008 8:39 am, edited 1 time in total.
Reason: removed your real RCon, which you forgot. You should change it ASAP :P
Gamall
Hic sunt dracones
Posts: 4174
Joined: Fri May 26, 2006 11:09 pm
Contact:

Re: Quake3 Server Commander v0.2

Post by Gamall »

slaughter wrote:ERROR: Socket timeout, no reply received.
Hum. This is the exact same error than with the other version. Which, again, indicates a connection failure, and not a "kernel too old, can't run" or anything :?

On second thought I was probably wrong, I don't think your version of Linux is to blame at all. Not with this same error message from two completely different programs.

Webservers are generally heavily protected, most ports are blocked by default. I think that's what is happening here: your webserver simply prevents QCmd from sending messages. (edit: I've tested on my shared webhosting, and the same problem happens there, while it works on my dedicated game servers, which use roughly the same OS as the webservs)

So the good news is that the programs work, so you won't need to jump through hoops, change your OS/GCC or anything.

Bad news is that you'll need to find out how to allow QCmd to communicate on your webserver. I'm not a Linux guru. On the top of my head, I'd suggest you try adding your gameserver to /etc/hosts.allow. But that's advice given at 6am after a night of sickness and insomnia, so take it for what it's worth... If you are not root on that server, you won't be able to do it anyway...

Your best bet is to contact the tech support of your webserver's provider with that question, hoping for the best. If it's a shared web hosting plan, it is possible that they deliberately block everything but Apache, SSH etc, so as to prevent users to run heaps of fancy services on their CPU time and bandwidth...

If there is really no way to open your server up, I'll make (when I get time, work comes first and I don't know much PHP) and release a small PHP script wrapping QCmd0.2 +q, which I'll host on one of my servers. That way you or anyone else can use QCmd in direct query mode without having to directly host it: you'll just have to call a PHP page.

That's a tad convoluted, but I can't think of any other way which would always work.
slaughter wrote:Sinon est-ce que tu provide les sources, je pourrais toujours le compiler moi-même. Je comprendrais si tu ne provide pas les sources et c'est tout à fait normal.
Since, in spite of what I first thought, this problem does not seem to come from your OS, recompiling won't solve anything.

FWIW, I'll provide clean and commented sources for equivalents of QCmd 0.1 in both OCaml and C when I get time to do so. The C++ source of QCmd 0.1 is way too fugly to be released as is imho. [And I'll keep QCmd 0.2 for now, mainly to avoid clones bypassing qcmd_perms settings]

PS: Your French is really quite good, but I prefer English on the support topics, so as to keep them useful for as many people as possible ;) Unless French is your native language, of course.
{<§ Gamall Wednesday Ida §>}
{ Mods and Programs - Mods TES-IV Oblivion }
User avatar
slaughter
Posts: 4
Joined: Fri Jan 25, 2008 12:44 am

Re: Quake3 Server Commander v0.2

Post by slaughter »

Ok, sorry for the French, yes it's my native language and I saw that you was speaking French on other topic/post so I conclude to speak French here. However I didn't think about other people. You are completely correct to only do support in English because there is nothing else that frustrate me more then a post written in German and I have no way to know what it says.

For PHP, I'm not a pro, but I know my base and my ladder system is coded in PHP, so if you need any help with that, it will be a pleasure for me to help you out with that.

With the release of the code in C, I'll probably be able to make it run in PHP.

I can't say that I'm a pro with PHP but I can say that I'm a lot better with Perl and Python.

For unblocking all of that, I'll contact my host as fast as possible and it's approximatively sure that they will unblock me because I'm a very old client and a member of their support team. I would just need some better explanations on the problem because I have to problem to create a client/server socket in Java. I run a lot of deamons on that web server so I know that there should be no problem for them to unblock me those stuff. So I'm asking if there is a way to run the program as debug, like to enable the asserts (if you use that).

Thanks for your support!

PS : I'm at university in computer's engineering and I know about all the coding language and server stuff. I work for IBM in the team of network administrator so I'm used to scripts and other stuff like that. I never took the time to look at how I should connect with q3 and now that I need it, I've found your program and I don't want to re-code that if it's already done. So if you need help with anything, just let me know and it's sure that I'll answer asap. You can contact me on jotdion (at) gmail (dot) com.
Gamall
Hic sunt dracones
Posts: 4174
Joined: Fri May 26, 2006 11:09 pm
Contact:

Re: Quake3 Server Commander v0.2

Post by Gamall »

slaughter wrote: So I'm asking if there is a way to run the program as debug, like to enable the asserts (if you use that).
Nope, neither is there any need to, since the architecture of the direct query mode is really trivial. I don't really see what kind of information you might need, except perhaps the local port, but you can't choose it anyway, the OS chooses it (an oversight I intend to rectify in version 0.2b :slurp )

But your host should be able to unblock it anyway, if they are willing to. That's by far the simplest/quickest way to get your ladder system up and running. :huhu
slaughter wrote:With the release of the code in C, I'll probably be able to make it run in PHP.
[...]
I never took the time to look at how I should connect with q3 and now that I need it, I've found your program and I don't want to re-code that if it's already done.
The idea behind releasing QCmd was precisely to avoid re-coding the socket layer for that kind of simple task :D

But yes, with a sample code and basic understanding of sockets and UDP, you can recode it fairly easily in any half-decent programming/scripting language under the sun.

Again, I'll release didactic opensource implementations when I get time (ie. before the end of the Universe... if we are lucky :peur )

If you are curious and/or don't want to wait, here is how the direct query mode works in a nutshell:
  • Open Datagram (UDP) Socket on target server
  • add four xFF-valued bytes in front of your query (ASCII, beware of languages using Unicode)
  • send query and retrieve answer.
  • That's it :haha
With that, you can handle any uncompressed part of the Quake3 protocol.
slaughter wrote: I would just need some better explanations on the problem because I have to problem to create a client/server socket in Java
Er... I don't see the connection with the matter at hand :? If it's a general question it needs a brand-new topic ;)
{<§ Gamall Wednesday Ida §>}
{ Mods and Programs - Mods TES-IV Oblivion }
Gamall
Hic sunt dracones
Posts: 4174
Joined: Fri May 26, 2006 11:09 pm
Contact:

Re: Quake3 Server Commander v0.2

Post by Gamall »

Update:

I've been working separately on the networking part of QCmd, preparing it for opensource release.

While I was at it, I changed the architecture a bit in order to solve QCmd's RCon Status bug (which is as much a bug in QCmd as an enormous WTF in the q3 protocol)

So, the next step is to integrate the changes in QCmd (edit: done), release the new version, and then release the opensource part.

I also have in mind to add a new mode, replacing my old port scanner. But this one will be aggressively multithreaded and lightning-fast... I hope :slurp

And perhaps another concerning the master-servers, but later.
{<§ Gamall Wednesday Ida §>}
{ Mods and Programs - Mods TES-IV Oblivion }
Dakin Quelia
Posts: 206
Joined: Mon May 14, 2007 10:36 pm
Location: Belgique
Contact:

Re: Quake3 Server Commander v0.2

Post by Dakin Quelia »

Peut-on l'utiliser même si le HUD est désactivé et donc le texte y compris? Parce que je voudrais voir le texte quand on parle mais pas le HUD. :huhu
Un Jedi devrait considérer chaque possibilité ainsi que ses possibles conséquences avant de s'impliquer personnellement dans une situation quelconque.

Mon blogue | Mon hébergeur
Post Reply

Who is online

Users browsing this forum: No registered users and 180 guests