[1.1] zfc9000 - text based RCON utility

Maps, modifications, add-ons, projects, and other releases for Zandronum. Also includes announcers.
Post Reply
User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

[1.1] zfc9000 - text based RCON utility

#1

Post by Dusk » Tue Dec 16, 2014 2:27 am

Image

ZFC9000 is a text-based RCON utility. It is fully textual, and as such may be used over SSH connections for instance. It supports in-game colorcodes, input history + a subset of readline shortcuts. It also features a nicklist on the right side of the screen, as well as tab auto-completion.

To use, either:
  • use the command line: zfc9000 <address> <password>
  • use Ctrl-N within the application to create a new connection
Source code here: https://bitbucket.org/crimsondusk/zfc9000
Downloads here: https://bitbucket.org/crimsondusk/zfc9000/downloads

Let this prove useful for server admins.
Thanks to TerminusEst13 for helping name this.
Last edited by Dusk on Mon Jan 11, 2016 1:20 am, edited 1 time in total.

User avatar
Monsterovich
Forum Regular
Posts: 343
Joined: Sun Jun 17, 2012 5:46 pm

RE: [1.0] zfc9000 - text based RCON utility

#2

Post by Monsterovich » Tue Dec 16, 2014 7:35 pm

Hm... How Can I fix this?
[spoiler]

Code: Select all

[  6%] Building CXX object CMakeFiles/zfc9000.dir/sources/coloredline.o
In file included from /disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/main.h:37:0,
                 from /disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/coloredline.h:32,
                 from /disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/coloredline.cpp:31:
/disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/format.h: In function ‘String make_format_argument(size_t)’:
/disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/format.h:46:57: error: call of overloaded ‘from_number(size_t&)’ is ambiguous
 FORMAT_OVERLOAD (size_t) { return String::from_number (a); }
                                                         ^
/disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/format.h:46:57: note: candidates are:
In file included from /disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/main.h:34:0,
                 from /disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/coloredline.h:32,
                 from /disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/coloredline.cpp:31:
/disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/mystring.h:108:16: note: static String String::from_number(int)
  static METHOD from_number (int a) -> String;
                ^
/disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/mystring.h:109:16: note: static String String::from_number(long int)
  static METHOD from_number (long a) -> String;
                ^
/disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/mystring.h:110:16: note: static String String::from_number(long unsigned int)
  static METHOD from_number (unsigned long a) -> String;
                ^
/disk/Distfiles/crimsondusk-zfc9000-8f47c682e248/sources/mystring.h:111:16: note: static String String::from_number(double)
  static METHOD from_number (double a) -> String;
[/spoiler]
Dusk wrote:Downloads (i.e. a simple binary I compiled) here:
I couldn't run the binary, because it's for x86_64. D:
Last edited by Monsterovich on Tue Dec 16, 2014 9:21 pm, edited 1 time in total.

User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

RE: [1.0] zfc9000 - text based RCON utility

#3

Post by Dusk » Tue Dec 16, 2014 9:26 pm

Can you check if applying this fixes the issue?
Last edited by Dusk on Tue Dec 16, 2014 9:26 pm, edited 1 time in total.

User avatar
Monsterovich
Forum Regular
Posts: 343
Joined: Sun Jun 17, 2012 5:46 pm

RE: [1.0] zfc9000 - text based RCON utility

#4

Post by Monsterovich » Tue Dec 16, 2014 9:37 pm

Dusk wrote: Can you check if applying this fixes the issue?
Yeah your patch works. Thank you!
Last edited by Monsterovich on Tue Dec 16, 2014 9:40 pm, edited 1 time in total.

User avatar
DevilHunter
Zandronum Tester
Posts: 635
Joined: Sun Jun 17, 2012 12:58 am
Location: Alaska, USA
Contact:

RE: [1.0] zfc9000 - text based RCON utility

#5

Post by DevilHunter » Thu Dec 18, 2014 7:52 pm

This is awesome, and Yes I know its new still but very basic. Have yet to test this out fully however...

User avatar
DevilHunter
Zandronum Tester
Posts: 635
Joined: Sun Jun 17, 2012 12:58 am
Location: Alaska, USA
Contact:

RE: [1.0] zfc9000 - text based RCON utility

#6

Post by DevilHunter » Tue Dec 23, 2014 9:54 am

Hmm.. Upon further testing this.. I come to figure out, that if you open another screen like, screen -dmS Rconzfc , then screen -raAd Rconzfc.. and then cd into its directory then do the ./zfc9000 IP:Port RconPass , then the CTRL + Q cmd does not work. CTRL + N works, but that's it.

No clue as to why this happens.

User avatar
Leonard
Developer
Posts: 166
Joined: Sat Mar 30, 2013 8:09 pm

RE: [1.0] zfc9000 - text based RCON utility

#7

Post by Leonard » Wed Jul 22, 2015 6:37 pm

I managed to get a fully functional build for windows.

Image

I however encountered a few little problems:
  • The console would immediately close at startup. I had to remove the "FreeConsole" call in the _WIN32 def. Not sure why you added this, it works fine on the default console.
  • Pressing enter wouldn't work.
    Simple fix, this is because windows linebreaks are different from linux (0x0D + 0x0A instead of just 0x0A) so I just had to add case '\r': on top of case '\n':.
  • The colors didn't work at all.
    The fix was very simple again, I simply needed to use the proper type (chtype instead of int) when using Interface::color_pair.
  • After fixing the colors, they were mixed up. I don't know why, but blue was swapped with red and yellow was swapped with cyan so I just changed the color enums.
I made a patch if you wish to include it and make zfc a bit more compatible with windows with all those changes except for the color enums reordering as that would probably break on linux instead, I hope maybe there's a define in curses.h that could fix this.
Here's a link to the compiled exe if anyone want it.
[spoiler]

Code: Select all

<@WaTaKiD> punish me
* Seanphone gets his belt out
<+Seanphone> all right WaTaKiD bend over

Code: Select all

<Kokiri> capo whos your fav pony?
<capo> i like them all

Code: Select all

cobalt changes topic to 'ZDoom 2.6.1 progress: at r3771, 23 revisions left (98% complete)'
<edward-san> omg
<edward-san> almost finished!!!
<Sean> !!!!!!!!!!!!!!
<Sean> Plot twist: This is the status of Half-Life 3.
<Dusk> plot twist: the percentage count suddenly begins to decline instead
<Sean> Torr makes a forum post "We're going back to 2.5.0"
<Dusk> and we do so incrementally
[/spoiler]

User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

RE: [1.0] zfc9000 - text based RCON utility

#8

Post by Dusk » Wed Jul 22, 2015 8:21 pm

Ah, interesting.

The FreeConsole() call exists because pdcurses-win32a uses its own window for the application. So there will be both a console window and a pdcurses window if the console window isn't removed. I guess that needs to be ifdef'd.

What curses library did you use?
Last edited by Dusk on Wed Jul 22, 2015 8:25 pm, edited 1 time in total.

User avatar
DevilHunter
Zandronum Tester
Posts: 635
Joined: Sun Jun 17, 2012 12:58 am
Location: Alaska, USA
Contact:

RE: [1.0] zfc9000 - text based RCON utility

#9

Post by DevilHunter » Wed Jul 22, 2015 8:42 pm

Code: Select all

C:\home\skulltag\zfc9000-1.0>ldd zfc9000
        linux-vdso.so.1 =>  (0x00007fff6b9fc000)
        libncurses.so.5 => /lib/x86_64-linux-gnu/libncurses.so.5 (0x00007f690b292000)
        libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f690b069000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f690ad64000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f690ab4e000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f690a788000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f690a583000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f690a27d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f690b4d0000)
(yes I'm aware it says C:\home\skulltag\zfc9000 MiFU made it to where it looked like a dos shell. And that its still "skulltag" Dunno, ask MiFU on that one, guess hes not used to naming the folder Zandronum)

Appealingly, this still happens on Linux. In Windows, it works just fine. Also when I fire it up on linux, it will say "Unable to initialize color pair 81 (-1, -1)" I'm using zfc9000 1.1-3c02a72 (4361621) built from source.

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: [1.0] zfc9000 - text based RCON utility

#10

Post by Ænima » Wed Jul 22, 2015 8:51 pm

Cool! Now to compile it for Android ...
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

User avatar
Leonard
Developer
Posts: 166
Joined: Sat Mar 30, 2013 8:09 pm

RE: [1.0] zfc9000 - text based RCON utility

#11

Post by Leonard » Wed Jul 22, 2015 9:49 pm

Dusk wrote:What curses library did you use?
I just used the standard (?) PDCurses distribution.
[spoiler]

Code: Select all

<@WaTaKiD> punish me
* Seanphone gets his belt out
<+Seanphone> all right WaTaKiD bend over

Code: Select all

<Kokiri> capo whos your fav pony?
<capo> i like them all

Code: Select all

cobalt changes topic to 'ZDoom 2.6.1 progress: at r3771, 23 revisions left (98% complete)'
<edward-san> omg
<edward-san> almost finished!!!
<Sean> !!!!!!!!!!!!!!
<Sean> Plot twist: This is the status of Half-Life 3.
<Dusk> plot twist: the percentage count suddenly begins to decline instead
<Sean> Torr makes a forum post "We're going back to 2.5.0"
<Dusk> and we do so incrementally
[/spoiler]

User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

RE: [1.0] zfc9000 - text based RCON utility

#12

Post by Dusk » Wed Jul 22, 2015 11:17 pm

I've taken and addressed these issues now. I've also added support for MSVC 2010 and greater. I'm thinking about tagging 1.1 now if nothing bad arises.
Ænima wrote: Cool! Now to compile it for Android ...
If you have a shell account somewhere, you can use e.g. ConnectBot to ssh in and use zfc9000 from that. Administering servers from your phone, anyone? :P
DevilHunter wrote: linux-vdso.so.1 => (0x00007fff6b9fc000)
I don't know what linux-vdso.so.1 is but googling it yields some stack overflow links, e.g. http://unix.stackexchange.com/questions/45277
Unable to initialize color pair 81 (-1, -1)
Hrm, let's see about that.
Last edited by Dusk on Wed Jul 22, 2015 11:42 pm, edited 1 time in total.

User avatar
Combinebobnt
Retired Staff / Community Team Member
Posts: 1905
Joined: Mon Jun 04, 2012 3:37 am
Location: Earth
Contact:

RE: [1.0] zfc9000 - text based RCON utility

#13

Post by Combinebobnt » Wed Jul 22, 2015 11:53 pm

Nice black text on a black background

User avatar
Monsterovich
Forum Regular
Posts: 343
Joined: Sun Jun 17, 2012 5:46 pm

RE: [1.0] zfc9000 - text based RCON utility

#14

Post by Monsterovich » Thu Jul 23, 2015 11:09 am

Combinebobnt wrote: Nice black text on a black background
Background translucency ftw, but not in Windows console.

P.S.

Replace "max" with "zfc::max" to fix this error.

Code: Select all

/disk/Distfiles/zfc9000/sources/main.cpp: In function ‘int main(int, char**)’:
/disk/Distfiles/zfc9000/sources/main.cpp:90:30: error: ‘max’ was not declared in this scope
    highest = max (highest, fd);
Last edited by Monsterovich on Thu Jul 23, 2015 6:04 pm, edited 1 time in total.

User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

RE: [1.0] zfc9000 - text based RCON utility

#15

Post by Dusk » Mon Jan 11, 2016 1:14 am

Alright, version 1.1 has finally been released. Features:
  • Now works on Windows, a prebuilt binary is provided. Should work on XP upwards.
  • Supports tab-autocompletion, a feature provided by Zandronum 2.0 and newer servers (unfortunately 1.x support was lost in this because of short-sightedness in the RCON protocol. Oh well, who uses that anyway?)
  • Added some basic IRC-like commands: /connect <address> <password>, /disconnect and /quit. It should be obvious what these do.
  • ZFC's own messages are now printed in blue so that they can be distinguished from the remote server's messages
  • Alt+backspace now removes the word before the text cursor.
  • Pressing Ctrl+Q now disconnects from the server. Pressing it again while disconnected quits ZFC.
Download
Last edited by Dusk on Mon Jan 11, 2016 1:16 am, edited 1 time in total.

User avatar
Tiger
Retired Staff / Community Team Member
Posts: 381
Joined: Thu May 31, 2012 6:21 am
Location: United States
Contact:

RE: [1.1] zfc9000 - text based RCON utility

#16

Post by Tiger » Mon Jan 11, 2016 1:36 am

This is rather cool, no joke. Now we have the GUI methods and now - the CUI for those that prefer it. Good luck with this project

User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

RE: [1.1] zfc9000 - text based RCON utility

#17

Post by Dusk » Mon Jan 11, 2016 1:44 am

I guess it works as a preference but the reason it exists is accessibility. If you can ssh, you can admin servers, and a lot of things can ssh nowadays. With a shell account you can admin servers from e.g. your phone.

EDIT: Went and did exactly that:
Image
Last edited by Dusk on Mon Jan 11, 2016 2:02 am, edited 1 time in total.

Post Reply