1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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

Community App THD Admin - KAG GUI Rcon Admin Tool

Discussion in 'Community Dev Corner' started by jrgp, Dec 12, 2014.

Mods: Downburst, Mazey
  1. jrgp

    jrgp THD Team THD Team Administrator Global Moderator

    Messages:
    75
    In case you're missing the point of the exercise, as Furai said, the goal here is for the admin client to "just work" on all KAGdedis without needing to add scripts to them or modify them in any way.
     
  2. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    Then I think you can do print(getPlayerByUsername("AsuMagic").getTeamNumber()); and gather it from the logs just after (I'm not sure about the method names)
     
    Pizza likes this.
  3. jrgp

    jrgp THD Team THD Team Administrator Global Moderator

    Messages:
    75
    If that will work out of the box then that's perfect, as I currently glean the usernames (as well as IDs and some other stuff the app reports) from the native rcon command that lists players. I could then just run that command you pasted on each username returned.

    I imagine the syntax over the native rcon socket is something like: /exec print(getPlayerByUsername("AsuMagic").getTeamNumber()); ?
     
    Pizza likes this.
  4. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    I don't know if the KAG client changes it somewhere, but to launch a command, I simply do /rcon print("hello world");
     
  5. jrgp

    jrgp THD Team THD Team Administrator Global Moderator

    Messages:
    75
    Yeah this was not useful in the slightest:

    /rcon print(getPlayerByUsername("KatanaWolff").getTeamNumber());
    [22:19:52] RCON command from [::1]:39625: /rcon print(getPlayerByUsername("KatanaWolff").getTeamNumber());
    [22:19:52] /rcon print(getPlayerByUsername("KatanaWolff").getTeamNumber());
    [22:19:52]

    If that did anything at all it probably posted that guy's team to the chat window ingame. What needs to happen is for it to print it out to tcp rcon so my app (or other apps) can read it.

    Apparently we'll just need to extend the already present /players command in the native tcp rcon command. Furai, it's time we had a chat about this....
     
  6. master4523

    master4523 Masterful KAG Guard Global Moderator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    378
    Code:
    /rcon print("Team=" + getPlayerByUsername("playername").getTeamNum());
    worked for me
     
  7. jrgp

    jrgp THD Team THD Team Administrator Global Moderator

    Messages:
    75
    I'm running it from telnet, from which there does not appear to be a response. Are you running it from ingame or telnet?
     
  8. jrgp

    jrgp THD Team THD Team Administrator Global Moderator

    Messages:
    75
    Nothing happens:

    Code:
    /rcon print("Team=" + getPlayerByUsername("jrgp").getTeamNum());
    [04:30:53] RCON command from 67.188.114.9:63558: /rcon print("Team=" + getPlayerByUsername("jrgp").getTeamNum());
    [04:30:53] /rcon print("Team=" + getPlayerByUsername("jrgp").getTeamNum());
    [04:30:53]
    What I want to happen is something similar to this:

    Code:
    /players
    [04:31:46] RCON command from 67.188.114.9:63558: /players
    [04:31:46] /players
    [04:31:46] List of Players ------ use RCON to get IP and hwid info
    [04:31:46]  [jrgp] (id 3763) (ip 67.188.114.9) (hwid 2413833211)
    You see how data is printed back out to the telnet socket console? That's what I need.
     
  9. jrgp

    jrgp THD Team THD Team Administrator Global Moderator

    Messages:
    75

    Disregard that I suck cocks:

    Code:
    [04:34:20] RCON command from 67.188.114.9:63558: print("Team=" + getPlayerByUsername("jrgp").getTeamNum());
    [04:34:20] print("Team=" + getPlayerByUsername("jrgp").getTeamNum());
    [04:34:20] Team=0
    
    The /rcon preceding it breaks it.

    Thanks for your help! Now that I know I can run scripting via telnet I'll be able to add shit tons to my app. Stay tuned....
     
    norill and Noburu like this.
  10. heX_

    heX_ Bison Rider

    Messages:
    193
    Is this still being worked on? It won't work for me (I input server IP+port, and the rcon password, click connect, and it shows as "Disconnected" with no other info given)
    Alternatively, if somebody knows of a handy quick admin tool/way, preferably via in-game chat like rconnet ("/ban medi" to ban Medieval for example, that's be great).
     
  11. jrgp

    jrgp THD Team THD Team Administrator Global Moderator

    Messages:
    75
    Are you sure you're using the proper IP and port? Maybe there's a firewall on your computer preventing my app from connecting.

    And this app does let you right click a player and click ban for that funcionality.
     
  12. heX_

    heX_ Bison Rider

    Messages:
    193
    I'm quite sure it's correct, in the format "XX.XX.XX.XX:YY" I tried it with "kag://" in front of it but then it just said "port doesn't look like a number". I could PM you the rcon password and you could give it a go? I have it whitelisted in my firewall and it gives me no blocked events in the log. My firewall doesn't actually list the program as having an outbound connection.
     
  13. jrgp

    jrgp THD Team THD Team Administrator Global Moderator

    Messages:
    75
    Sure
     
  14. Dialmen

    Dialmen Bison Rider

    Messages:
    27
    It works with KAGC? Or only with KAGB?
     
  15. Furai

    Furai THD Team THD Team Administrator

    Messages:
    3,124
    (There is only KAG and KAG Classic. No other naming is appropriate.) I think this app is for KAG. Also you have to enable tcp_rcon in your config for it to work.
     
  16. makmoud98

    makmoud98 You are already DEAD Forum Moderator Staff Alumni Tester

    Messages:
    586
    actually, i think its sv_tcpr
     
    Asu likes this.
  17. Leo

    Leo Haxor

    Messages:
    503
    @jrgp the program is kinda of useless if I can't save the tabs. You don't expect me to insert info for all my servers every time I open the app, do you ? ::):
     
Mods: Downburst, Mazey