Roleplay
HRP: Offline
Services
Teamspeak: Frozen
Totals
November 3, 2015, 10:28 pm Total players online: 0 Total server slots: 0

Author Topic: Server Status in Posts  (Read 3516 times)

Offline Somone77

  • Developer
  • *
  • Posts: 653
    • View Profile
    • Awards
Server Status in Posts
« 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!
« Last Edit: August 01, 2013, 09:13:58 PM by Somone77 »

Exclusive1

  • Guest
Re: Server Status in Posts
« Reply #1 on: August 16, 2011, 02:40:31 AM »
Looks like a nice thing you have added here. Looks neat. Well done.

Offline Nicknero

  • Hatsune Miku
  • Gold Member
  • *
  • Posts: 5,034
  • Awards [OCRP Award] Millionaire [OCRP Award] Evo City Marathon [OCRP Award] Social Player [GMR2 Award] 100 MPH
    • View Profile
    • Awards
Re: Server Status in Posts
« Reply #2 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
Check out my Youtube channel with all kinds of cool videos including LP's which I'm currently working at. Don't forget to give feedback as well. ;)


Offline Pielolz

  • Gold Member
  • *
  • Posts: 1,051
  • Awards [OCRP Award] Secret Phrase [OCRP Award] Comrades [OCRP Award] Full Economy
    • View Profile
    • Awards
Re: Server Status in Posts
« Reply #3 on: August 16, 2011, 11:34:25 PM »
Offline
« Last Edit: August 17, 2011, 02:47:52 AM by Somone77 »

Exclusive1

  • Guest
Re: Server Status in Posts
« Reply #4 on: August 17, 2011, 01:46:22 AM »

Offline Somone77

  • Developer
  • *
  • Posts: 653
    • View Profile
    • Awards
Re: Server Status in Posts
« Reply #5 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.

Exclusive1

  • Guest
Re: Server Status in Posts
« Reply #6 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

Offline Somone77

  • Developer
  • *
  • Posts: 653
    • View Profile
    • Awards
Re: Server Status in Posts
« Reply #7 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.

Offline Pielolz

  • Gold Member
  • *
  • Posts: 1,051
  • Awards [OCRP Award] Secret Phrase [OCRP Award] Comrades [OCRP Award] Full Economy
    • View Profile
    • Awards
Re: Server Status in Posts
« Reply #8 on: August 18, 2011, 12:04:36 AM »
Thanks Somone. I figured it out now! :D

Offline Somone77

  • Developer
  • *
  • Posts: 653
    • View Profile
    • Awards
Re: Server Status in Posts
« Reply #9 on: October 26, 2011, 04:53:55 PM »
Stickied for future reference.

Offline Crap-Head

  • #OCRP2
  • Gold Member
  • *
  • Posts: 4,031
  • Awards [OCRP Award] Millionaire [OCRP Award] Secret Phrase [OCRP Award] Comrades [OCRP Award] Junkie
    • View Profile
    • Awards
Re: Server Status in Posts
« Reply #10 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.
Please do not add me on Steam because you have in-game problems. Make a thread in the correct board on the forum and i will respond to that whenever i have time.

Offline Somone77

  • Developer
  • *
  • Posts: 653
    • View Profile
    • Awards
Re: Server Status in Posts
« Reply #11 on: October 27, 2011, 10:00:17 PM »
They're all named as they are on the status bar at the top.

Offline akoch

  • Gold Member
  • *
  • Posts: 506
  • Awards [OCRP Award] Secret Phrase [OCRP Award] Social Player
    • View Profile
    • Awards
Re: Server Status in Posts
« Reply #12 on: October 29, 2011, 03:22:03 AM »
Why case sensitive? Not that hard to make it not, you know, case sensitive.

Offline Somone77

  • Developer
  • *
  • Posts: 653
    • View Profile
    • Awards
Re: Server Status in Posts
« Reply #13 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.