Catalyst Gaming

General => General Discussion => Topic started by: Somone77 on August 16, 2011, 02:34:53 AM

Title: Server Status in Posts
Post by: Somone77 on August 16, 2011, 02:34:53 AM
Allllrighty then,

Out of boredom and wanting a short break from working on the server administration page, I whipped up this:

The Status BBC code!

Using this is very simple;
To just get the basic status of a server dynamically embedded into your post, simple use
Code: [Select]
[status]>Server<[/status]
Where >Server< is located, the server name is required. You can see any of the server's names on the status bar on top. THESE ARE CASE SENSITIVE!

You can also get more information than just the status!
Use any of the following parameters in this fashion:
Code: [Select]
[status=>parameter<]>Server<[/status]Parameters are:
status - The status of the server (Online, Offline, Frozen and is colored)
ip - The current IP address in this format: 255.255.255.255:27015
players - The player count in this format: 0/10
player - The current player count as a number
max_player- The current max player count as a number
map - The current map
passworded - If the server is passworded (returns Yes/No)
connecturl - Prints a click able link that will cause steam to connect to the server.

Here are a few examples:

HRP:

Offline
Code: [Select]
[status]HRP[/status] OR [status=status]HRP[/status]192.99.244.56:27015
Code: [Select]
[status=ip]HRP[/status]0/45
Code: [Select]
[status=players]HRP[/status]0
Code: [Select]
[status=player]HRP[/status]45
Code: [Select]
[status=max_player]HRP[/status]rp_twinharbor
Code: [Select]
[status=map]HRP[/status]No
Code: [Select]
[status=passworded]HRP[/status]Connect!
Code: [Select]
[status=connecturl]HRP[/status]
Hope you guys find this useful!
Title: Re: Server Status in Posts
Post by: Exclusive1 on August 16, 2011, 02:40:31 AM
Looks like a nice thing you have added here. Looks neat. Well done.
Title: Re: Server Status in Posts
Post by: Nicknero on August 16, 2011, 06:40:04 AM
HL2RP
Offline
192.169.82.14:27015
0/70
rp_city45_2013
Passworded: No

Yep, very useful! :D
Title: Re: Server Status in Posts
Post by: Pielolz on August 16, 2011, 11:34:25 PM
Offline
Title: Re: Server Status in Posts
Post by: Exclusive1 on August 17, 2011, 01:46:22 AM
Offline

Shows that you have read the forum rules.
Title: Re: Server Status in Posts
Post by: Somone77 on August 17, 2011, 02:49:57 AM
He didn't do anything wrong, his comment was him testing this new function and he put in an invalid server. The function returns "Unknown" if you don't enter the server right.

By the way, Renegade, your problem was that you left the < and > in. Those are just to show where to put the server name, you don't leave them in, I fixed your post for you.
Title: Re: Server Status in Posts
Post by: Exclusive1 on August 17, 2011, 03:37:58 AM
Ahh crap, my bad. Didn't realise. I though it was just a random, one word, answer. I'm going to have to get used to this function
Title: Re: Server Status in Posts
Post by: Somone77 on August 17, 2011, 03:59:22 AM
While it may not commonly be used, it's main intention is for when Administrators/Developers make front page posts concerning server status. They love to put it in the post, even though it's at the top of the page, this will make the info live, and avoid confusion.
Title: Re: Server Status in Posts
Post by: Pielolz on August 18, 2011, 12:04:36 AM
Thanks Somone. I figured it out now! :D
Title: Re: Server Status in Posts
Post by: Somone77 on October 26, 2011, 04:53:55 PM
Stickied for future reference.
Title: Re: Server Status in Posts
Post by: Crap-Head on October 27, 2011, 09:27:12 AM
Do you mind making a list of all the servers avaible?

Like the "shortcut" to add into the >Server< tag.
Title: Re: Server Status in Posts
Post by: Somone77 on October 27, 2011, 10:00:17 PM
They're all named as they are on the status bar at the top.
Title: Re: Server Status in Posts
Post by: aeiou on October 29, 2011, 03:22:03 AM
Why case sensitive? Not that hard to make it not, you know, case sensitive.
Title: Re: Server Status in Posts
Post by: Somone77 on October 29, 2011, 02:31:11 PM
Why case sensitive? Not that hard to make it not, you know, case sensitive.
Otherwise known as 'case insensitive'

I do it for consistency. Sure I could let everyone just put in 'sandbox' instead of 'SandBox' but then if something happens one day that causes 'sandbox' to no longer be a viable entry, it will break that page. So it's better, for the future, to keep everything exactly how it is.
SimplePortal 2.3.7 © 2008-2024, SimplePortal