1. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Server Config CLI Contest! Closed get your CLI tools here!

Discussion in 'Announcements' started by Geti, Nov 12, 2011.

  1. HardPenguin

    HardPenguin Horde Gibber

    Messages:
    310
    In fact... C is for everything :P
     
  2. Labla

    Labla Shopkeep Stealer

    Messages:
    36
    In god we trust, in C we code!

    OK, now back to the topic. I still don't see any point in writing CLI configuration tool for KAG. Who will be the target? Person who can deal wit CLI only interface, probably know how to lunch vi or other editor and change file directly... That's like giving help to people, who need help in a last place.

    Maybe I'm on wrong feet today, but I'm guessing that after writing CLI tool we'll end up writing few pages long documentation and FAQ for less advanced users (Windows users?). That's why I think that web based tool is much better - people are used to filling forms, selecting check boxes and so on. Lower the bar for people, who really have problems with launching/configuring server.
     
    Snow, Shadlington, illu and 3 others like this.
  3. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    labla: the point of writing a CLI tool is that many a dedicated server is available only via ssh and doesn't run a web server unless you tell it to -> you'd have to install apache and php to run a KAG server for a web-based config tool. If someone wants to make a web frontend for their tool then they're welcome to.

    As a side-note - we've had our first mostly working entry! Assuming the user in question can iron out the bugs in their code soon, they'll be getting the prize for speed. I was quite impressed with the ability to modify all of the game-mode options as they appear in the files in order, though specifying a maplist could do with outputting all of Base/Maps' contents (similar to ls on unix)
     
  4. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    To clarify, none of the utilities will be available until the contest is over to prevent derivative works. Once the contest is over you'll be able to hack at the source of each program to make things taller better faster stronger though, for the good of the game. If you're against this happening to your program, please don't send anything in! As a reminder it's a condition of entry that THD is allowed to distribute the program and provided source code.

    I can announce Maqq as the cheerful winner of the first in first gold award, with a neat entry written in python. Use the gift code well!
    Ilaks was working on something as well, last I heard.
    The guys working on the Web tools have got me fascinated at the moment too.
     
    illu, Noburu and Wonkyth like this.
  5. Labla

    Labla Shopkeep Stealer

    Messages:
    36
    That's true, unless person using SSH isn't aware of SCP or SFTP, and can't copy files over SSH using those tools (Hint: You will appreciate those tools, when connection with remote machine is very laggy or remote machine is under heavy load, so even editing files with vi is unresponsive)
     
  6. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    If the remote machine is unable to run vi responsively it's barely suitable for running a game server. Lag is another issue, but honestly running wget to fetch a script, making it executable and then executing it is just as simple as sftping the files to the location, making the script executable and then executing it.
     
  7. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    Going to close this this week if I don't get more entries. Was still expecting something from ilaks but apparently that never happened.
     
  8. ilaks

    ilaks Bison Rider Donator

    Messages:
    253
    Sorry, totally forgot about this one, therefore I don't have anything to present.
     
  9. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    No worries. I'll close this when I've got some free time this week.
     
  10. Snow

    Snow KAG Guard Tester

    Messages:
    94
    I may still do a web based launcher. Wasn't in it for the contest anyway, since I'm gold, but more for community contribution. I just haven't had time to touch it. :(
     
    Noburu likes this.
  11. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
    Noburu likes this.
  12. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    Snow that'd be swet. I'll keep it around until I hear from you then, the premium was just an incentive to get people working on it - you'd be free to give the code to a friend if you liked. If I don't hear from you within a week I'll close this and be sending an extra code to Maqq - it'd be nice to have someone else to give stuff to though :)

    Downburst: maybe ;)
     
  13. Snow

    Snow KAG Guard Tester

    Messages:
    94
    Geti, go ahead and close. I might have some time in the next couple of weeks to do a bit. I don't need anything for it, like I said. It's just going to be a tool contribution pretty much. Thanks though. :)
     
    Noburu likes this.
  14. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    Done and done. Files ready to download, though if some people feel like mirroring them that'd also be good, I'm not sure how long I trust those dropbox links to last ;)

    In accordance with the contest rules, the python code is herein open sourced and under the Creative Commons Attribution-NonCommercial-ShareAlike licence. You may edit and share the work as long as credit is given to maqq for the code and THD for KAG, and you use the same licencing. You may not charge for derivative work.

    Note that you are still prohibited from distributing the KAG binaries without permission.

    Hope to see something from you soon, Snow, and it'd be nice to see something from you too, ilaks.
     
  15. trelawney

    trelawney KAG Guard Tester

    Messages:
    771
    file needs conversion from DOS to unix (some CR/LF thing..) - otherwise spits a dreadful /usr/bin/python^M: bad interpreter.
    Converted with dos2unix: http://213.152.176.254/mirror/serverconfig.py - good linux practice, don't start filenames with a capital letter, saves keystrokes :D

    Even after conversion though, it doesn't work for me (Debian 5, Python 2.5.2):
    Code:
    $ ./serverconfig.py
      File "./serverconfig.py", line 127
        except Exception as exp:
                          ^
    SyntaxError: invalid syntax
    In Debian 6 and Python 2.6.6:
    Code:
    $ ./serverconfig.py
    Traceback (most recent call last):
      File "./serverconfig.py", line 176, in <module>
        if not 'KAG.exe' in os.listdir('') and os.name == 'nt':
    OSError: [Errno 2] No such file or directory: ''
    Looking at the code now, and not in relation to the previous errors, it seems that it's not calling the right binary (KAGdedi) but the old one (KAG) instead:

    [edit - python 2.6 fix, thanks to incarnum]
    Line 127 should read os.listdir('.')

    [edit 2]
    Updated version @ http://213.152.176.254/mirror/sconfig.py
    1. Uses KAGdedi instead of KAG
    2. I added alternate port selection which was originally left out.
    Download and copy to your root kag directory, chmod +x sconfig.py and ./sconfig.py to run it.
     
  16. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    Actually, that's a good point. Can anyone test it on a windows box to make sure it works with the most recent updates, I recieved the file a good while ago and re-testing it didn't occur to me (There's a lot of things on my mind, sorry all).

    Dropping that edited file into the original post for those who're going to run it from a unix box.
     
  17. Eric

    Eric Shark Slayer

    Messages:
    290
    I just dl and tested it, it woulds not let me in, but it may be because of my choice in game modes or something, so I will test a bit more, to see, but for now, no.
    *edit
    maybe turning on gold only and turning off global mods did it...
    *edit, nah it just doesn't work
     
  18. trelawney

    trelawney KAG Guard Tester

    Messages:
    771
    Please post comments and request help @ the appropriate post : http://kagforum.com/index.php?threads/maqqs-cli-server-configuration-tool.3121/
     
  19. Geti

    Geti Please avoid PMing me (poke a mod instead) THD Team Administrator Global Moderator

    Messages:
    3,730
    Connecting to a server hosted off your own computer is unreliable at best. See if you can connect directly to localhost from the multiplayer screen.