Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   Sending server console commands from script (http://forum.fulqrumpublishing.com/showthread.php?t=27009)

Ataros 10-12-2011 11:56 AM

Sending server console commands from script
 
According to naryv this should work:

Code:

System.Console.WriteLine("bla-bla-bla");
Thus you can control server from the script. Server-commander any one ? :)

E.g it is possible to autokick users based on ping now. Or include them into ban list for vulching or attacking admins :D

FG28_Kodiak 10-12-2011 12:05 PM

Hm via MissionMenu with special user privileges, you could kick and ban players or reload a mission. Seems possible, will make some tests.

Ataros 10-12-2011 12:11 PM

BTW you can get user Steam ID by "host" console command IIRC.

Do you think it will be possible to give admin privileges based on steam ID?

Also it can be useful for squad statistics: players will be registered as squad members and then when they join a server all their statistics will go to squad statistics.

If server can ID players by Steam ID we would not need to ask entering a password which is not possible now iirc. (Script can not read player messsages from chat yet.)

Do you think we can get Steam ID into script via a console command? Maybe log parsing will be required but it is not very reliable in real time. Sometimes log is written with a big delay.

SNAFU 10-12-2011 12:27 PM

That is interesting.

Opens many new options for controling, including battle stop and starting, based on if player connected.

FG28_Kodiak 10-12-2011 01:03 PM

At the moment i get the command to the console but not executed. :(

Ataros 10-12-2011 01:23 PM

Copy log and code here I will send it to naryv please.

FG28_Kodiak 10-12-2011 01:32 PM

Nothing special, just for testing i tried (Tester was 30sec delay Trigger) :

public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);

if ("Tester".Equals(shortName) && active)
{

System.Console.WriteLine("kick Kodiak");
}
}
I also tried "\r\n" and "\n". I get the message kick Kodiak in console, thats all
So the simply way doesn't exist :rolleyes:

Ataros 10-12-2011 01:45 PM

Thank you. I asked naryv.

41Sqn_Banks 10-12-2011 02:14 PM

Quote:

Originally Posted by Ataros (Post 348201)
According to naryv this should work:

Code:

System.Console.WriteLine("bla-bla-bla");
Thus you can control server from the script. Server-commander any one ? :)

E.g it is possible to autokick users based on ping now. Or include them into ban list for vulching or attacking admins :D

Is it possible to read from console? Code would be:

Code:

string line = System.Console.ReadLine();

Ataros 10-12-2011 04:11 PM

Sorry, I have no idea. Someone has to try it. And better someone who understands what it means :)


All times are GMT. The time now is 09:29 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.