• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

ServerAdsKF - Updated for KF Servers

DeeZNutZ

Grizzled Veteran
May 26, 2009
90
4
Pacific Beach, CA USA
I finally got off my lazy butt and updated ServerAds specifically for Killing Floor Servers.
Awhile back I received permission from El Muerte to update his ServerAdsSE (which was written for UT2003) for UT2004 servers. The last version I released of ServerAds2K4 was version 103.

I have compiled this under Killing Floor and updated a few minor things including the WebAdmin panels with KF WebAdmin colors.

It's not yet white listed, so installing it will break perk levelling on your server.
[~] ServerAdsKF WebAdmin loaded
[~] Starting ServerAdsKF version: 101
[~] DeeZNutZ - [email protected]
[~] BadStreak - [URL="http://www.badstreak.com"][URL]http://www.badstreak.com[/URL][/URL]
[~] There are 5 lines in the listSTEAMAUTH : Connected to Steam Servers
STEAMAUTH : VAC Security Enabled
STEAMSTATS: SECURITY CHECK FAILED - ../System/ServerAdsKF.u

I've fully tested it (as shown above) on one of my servers, and it works perfectly.

Download link:
[URL="http://www.badstreak.com/UTFiles/KF/ServerAdsKF.zip"][URL]http://www.badstreak.com/UTFiles/KF/ServerAdsKF.zip[/URL][/URL]

Alternate Links:
[URL="http://12.22.203.26/UTFiles/KF/ServerAdsKF.zip"][URL]http://12.22.203.26/UTFiles/KF/ServerAdsKF.zip[/URL][/URL]
[URL="http://12.22.203.28/UTFiles/KF/ServerAdsKF.zip"][URL]http://12.22.203.28/UTFiles/KF/ServerAdsKF.zip[/URL][/URL]

The download includes the source (.uc) files as well as full installation and configuration instructions.

Now all I have to do is figure out where to submit this for whitelisting.

DeeZNutZ
 

Attachments

  • ServerAdsKF-SS.jpg
    ServerAdsKF-SS.jpg
    61 KB · Views: 7
Last edited:
good job, now we have an option for banner messages, that was a feature not included in serverext/rss feed. so the odd character limit with the web input is fixed with this build? that was the only thing that really made the last version unusable.

The only limitation is that it needs to receive a plain text file from the webserver, and the maximum number of lines (25 lines) isn't exceeded.
// check for correct content type
if (InStr(Caps(header), "CONTENT-TYPE: TEXT/PLAIN") == -1)
{
log("[E] ServerAdsKF: webserver didn't return a plain text file");
return;
}
log("[~] ServerAdsKF updating lines from web");
for (i = 0; i < lines.length; i++ )
{
// cut off CR
if (InStr(lines, Chr(13)) > -1)
{
lines = Left(lines, InStr(lines, Chr(13)));
}
if (lines != "")
{
if (DEBUG) log("[D] ServerAdsKF line["$i$"]: "$lines);
sase.sLines = lines;
sase.nLines = i+1;
}
if (i > sase.MAXLINES) {
if (DEBUG) log("[D] ServerAdsKF received more the max lines");
break;
}
}

Make sense?
 
Upvote 0
The only limitation is that it needs to receive a plain text file from the webserver, and the maximum number of lines (25 lines) isn't exceeded.

I don't think it was a problem with the mod itself, because doing it from the ini would work fine, but then edits in the web admin page would cut off anything past ~7-8 lines or somewhere around there, I just knew it was much less than 25. could have been something with the post method in the text box, no idea.
 
Upvote 0
So the web download feature works with this version?
It's working fine for me on my test server (Linux X86) and reading from an Apache webserver.


I don't think it was a problem with the mod itself, because doing it from the ini would work fine, but then edits in the web admin page would cut off anything past ~7-8 lines or somewhere around there, I just knew it was much less than 25. could have been something with the post method in the text box, no idea.

Now I understand what you were getting at.
I was never that verbose, so I never found that limitation until today.
It appears to truncate after X number of characters through the WebAdmin interface.
I changed the text and got different results based on numbers of characters input, but did get all the way up to 16 lines.
It's a limitation of something outside of ServerAdsKF though.

Thanks for the heads up on this.
 
Last edited:
Upvote 0
can u increase the "time" messages stay onscreen 4?

plz lol

If you would like to use a longer length message display, simply use the admin broadcast message (#message) and set the duration of the message in the "Admin Message Duration" box (in seconds).
The standard message display utilizes the built in type chat function in the game itself, and not something I want to mess with.
 
Upvote 0
^^ NO ^^ that puts a VERY annoying message in the MIDDLE of the screen and thats not acceptable at all lol

theres got to be a way.. AS the trader messages stay onscreen longer than ANY serverAds do :(

I have found a way to set this variable to a greater length.
I will rework this and the ServerAdsKF web interface so you can set this to your liking with a default of 5 seconds duration for each message display.
It will also be a configurable variable in the additions the server admin makes to their KillingFloor.ini file.

This and any other bug fixes will be available in Version 102.
(The current being V101)

DeeZ
 
Upvote 0
I am apparently quite horrible at installing mutators, because I simply can't get this to show anything on screen. I can't really imagine what I might be doing wrong though.

Did you follow the directions in the "ServerAdsKF-ReadMe" file I included?
Let me paraphrase that for you.
1) Unzip the files into the appropriate directories.
ServerAdsKF.u - \killingfloor\system directory
The web files - \killingfloor\web directory (nothing will get overwritten)

2) Edit your KillingFloor.ini file in the \killingfloor\system directory and add the following:
Find [Engine.GameEngine]
Add
ServerActors=ServerAdsKF.ServerAdsKF

Find [UWeb.WebServer]
Add
Applications[2]=ServerAdsKF.WebAdmin
ApplicationPaths[2]=/ServerAdsKF

3) Start the server.
You should see the following on startup:

[~] ServerAdsKF WebAdmin loaded
[~] Starting ServerAdsKF version: 101
[~] DeeZNutZ - [email protected]
[~] BadStreak - [URL="http://www.badstreak.com"][url]http://www.badstreak.com[/URL][/URL]
[~] There are X lines in the list

4) Shut it down and check to ensure the following was added to the end of your killingfloor\system\KillingFloor.ini file:
[ServerAdsKF.ServerAdsKF]
bEnabled=True
fDelay=30.000000
sLines[0]=
sLines[1]=
sLines[2]=
sLines[3]=
sLines[4]=
sLines[5]=
.....
sLines[24]=
iGroupSize=1
iAdType=0
bWrapAround=True
iAdminMsgDuration=4
cAdminMsgColor=(B=0,G=255,R=255,A=127)
bUseURL=False
sURLHost=localhost
iURLPort=80
sURLRequest=/serverads.txt

5) Start the server back up, then to access it from the web:
Use your regular method of accessing your KF server via the web but append /ServerAdsKF/ at the end:
[URL="http://xx.xx.xx.xx:8075/ServerAdsKF/"][url]http://xx.xx.xx.xx:8075/ServerAdsKF/[/URL][/URL]

Your normal login/password credentials will then be required, just like logging into your ServerAdmin console.

DeeZNutZ
 
Upvote 0

I have found a way to set this variable to greater length
.

I will rework this and the ServerAdsKF web interface so you can set this to your liking with a default of 5 seconds duration for each message display.
It will also be a configurable variable in the additions the server admin makes to their KillingFloor.ini file.

This and any other bug fixes will be available in Version 102.
(The current being V101)

DeeZ

bump
is the version 102 out yet?
 
Upvote 0
I have found a way to set this variable to a greater length.
I will rework this and the ServerAdsKF web interface so you can set this to your liking with a default of 5 seconds duration for each message display.
It will also be a configurable variable in the additions the server admin makes to their KillingFloor.ini file.

This and any other bug fixes will be available in Version 102.
(The current being V101)

DeeZ

hey man.... did u put this into this version yet? i dont see the option for "message duration" other than admin messages ...
 
Upvote 0