AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Source Servers (SRCDS) (https://forums.alliedmods.net/forumdisplay.php?f=130)
-   -   Rcon tool for srcds. (https://forums.alliedmods.net/showthread.php?t=82754)

Lis 12-29-2008 10:59

Rcon tool for srcds.
 
3 Attachment(s)
The main sourcecode is from:
http://developer.valvesoftware.com/wiki/Source_RCON_Protocol
exactly the
http://www.asyserver.com/~cstrike/rcon.c

Hello everyone.
I think the hlsw tool got a little overgrown to suite my needs.
1. I do not want to create an account just to enter "sm plugins refresh" some time.
2. I do not like programms who send unnecessary data over the net.
3. I hate programms who can only be configured after reading 20 pages of manuals.

So here is the alternative:

qry_rcon.bat:
Quote:

rem ------ Syntax ------
rem clircon -P"rcon_password" -a127.0.0.1 -p27015 command
rem ------ Notes ------
rem %* is a 'placeholder for every command' that is given to the batch file itselve.
rem It should not be removed. Therefore you can use the "run..." command from the starmenu.
rem ------ Usage ------
rem edit the qry_rcon.bat file and drag the batch file into the "run..." box which
rem can be found in the startmenu.
rem use qry_rcon.bat status to get the the status of your srcds server
clircon.exe -P"passwordhere" -aiphere -p27015 %*
pause

BAILOPAN 12-29-2008 12:26

Re: Rcon tool for srcds.
 
Nice idea -- indeed HLSW is bloated and ugly.

abelp 12-29-2008 13:16

Re: Rcon tool for srcds.
 
I wish something like this existed for my iphone.
Very Awesome..

Lis 12-29-2008 18:05

Re: Rcon tool for srcds.
 
Thanks. A windows GUI version will follow soon. Right now I have some problems using MinGW with the new Windows SDK.

@abelp: Well I try to release a multios version. I never made any programms for the iphone but maybe i could release one.

Jamster 12-29-2008 19:00

Re: Rcon tool for srcds.
 
Oh damn, this RULES. Thank you so much, what a great idea. Dumped this baby in my windows folder for global command line goodness.

dcx2 07-29-2012 12:54

Re: Rcon tool for srcds.
 
I know this is an *old* post but I really want a tool like this to work for me. I tried to download and use it, but it doesn't seem to work for me. I modified the source a little bit so it would call WSAGetLastError() so I can see what the error was, instead of "connect() failed. no error". I am getting error code 10061, WSAECONNREFUSED. It didn't matter what IP I tried; WAN, LAN, or 127.0.0.1 all do not work.

I sometimes run two servers on the same laptop, and I noticed that it did in fact work with my second server, but only with the LAN IP. The major difference is that the working server does set sv_lan and does not set ip via the command line, while the server that I can't connect to does not set sv_lan and does set the ip to my WAN.

I even disabled my firewall to make sure it wasn't that.

One thing that I found odd was that the non-working server only has one UDP port open, while the working server has two UDP ports and a TCP port. Seeing that it was UDP I tried to switch the source over to UDP-based connectionless datagrams but that did not seem to help, recvfrom times out.

Does anyone by chance have any insight into what's causing the problem?

EDIT: removing the +ip command from the command-line parameters makes it so other ports show up for the srcds process. I think that's what was stopping me from connecting. But I'm not sure if I need that +ip for non-LAN people to connect to my server. And I can still only connect with the LAN address, not 127.0.0.1, and I'd prefer to use localhost in case my LAN IP changes.

tonihenkel 01-04-2016 08:11

connect () failed .: Result too large
 
Hello there,
works for me the script for a long time. I use it for my Ark Survival Server for synchronization with the time, because he REALTIME runs (10h night, 14h day).
But since short I get this error message:

Quote:

C: \ Users \ Administrator \ Desktop \ sync Ark-Time> echo off
Run Script: 14:04
connect () failed .: Result too large
My script:

Quote:

echo off


set wartezeit=300
set kommando=SetTimeOfDay

:anfang:
set hour=%time:~0,2%
set min=%time:~3,2%
echo Ausfuehren Skript: %hour%:%min%
clircon -P"HIDDENHERE" -a194.97.164.176 -p27020 %kommando% %hour%:%min%
ping /n %wartezeit% localhost >nul
goto anfang

butaford 07-15-2017 10:22

Re: Rcon tool for srcds.
 
3 Attachment(s)
For Linux and FreeBSD
Take here: https://goo.gl/fzvSJr
Code:

#!/bin/sh
rconbin="/full/path/rcon/bin"
rcon="rconpassword"
ip="ip address"
port="port server"
##################################################################
scriptname="`basename "$0"`"
if [ ! -f $rconbin ]; then
        echo "Rcon bin file not found" 1>&2
        echo "Please check file path" 1>&2
        exit 1
fi
#if [ $# -eq 0 ]; then
if [ "x$*" = "x" ]; then
        echo "Usage: $scriptname  <command server>" 1>&2
        echo "Example: $scriptname status" 1>&2
    else
        $rconbin -P"$rcon" -a$ip -p$port "$*"
fi

Attachment 164187Attachment 164201

raiden_it 03-12-2020 08:42

Re: Rcon tool for srcds.
 
@butaford
Did not worl on linux x64, CSS v5394425, SourceMod v1.10.0.6478, Metamod:Source v1.10.7-dev
Quote:

Illegal size -559038737
or
Quote:

connect() failed.: Connection refused
- then server self restarting


All times are GMT -4. The time now is 22:11.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.