Simple fix for "blank" MOTD

Post Reply
FlyingMongoose
This is my homepage
This is my homepage
Posts: 353
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Fri Sep 17, 2004 7:50 pm
Contact:

Simple fix for "blank" MOTD

Post by FlyingMongoose »

This may have been posted before

Okay, the main reason this does this is that the coding system for the MOTD is a little shotty and doesn't allow a lot of HTML codes. So here's what you put in your MOTD to fix it.

Code: Select all

<html>
<head>
<title>Cstrike MOTD</title>
</head>
<body bgcolor="#000000" scroll="no">
<meta http-equiv="Refresh" content="0;url=INSERTYOURMOTDURLHERE">
</body>
</html>
Make where it says "INSERTYOURMOTDURLHERE" put in a website address to a MOTD that you may have. Mine links to http://eba.flyingmongoose.net/motd.html

What this will do is automatically redirect your MOTD to another web page to allow it to "decode" the file properly. Since it's pointing to a .html file instead of a .txt file.

Basically valve didn't have the common sense when they decided to make the motd HTML compliant to at least give it a .html or .htm extension.

Note: This may not work with EVERY type of file extension/format (I haven't tested php, asp, phtml, php3, shtml, or shtm)
FlyingMongoose
This is my homepage
This is my homepage
Posts: 353
Joined: Fri Sep 17, 2004 7:50 pm
Contact:

Post by FlyingMongoose »

Adding to the list of "untested formats"

pl, and cgi.
FlyingMongoose
This is my homepage
This is my homepage
Posts: 353
Joined: Fri Sep 17, 2004 7:50 pm
Contact:

Post by FlyingMongoose »

I thought it would be useful to people :)
User avatar
Nick|NFo
Former staff
Former staff
Posts: 2252
Joined: Sun Mar 30, 2003 1:56 pm
Location: 127.0.0.1

Post by Nick|NFo »

Good post, just thought I would add a little something.

If you just put the url to the website as the first line of the motd.txt and nothing else, it will display the website just like your code does.

Just like http://rentals.nuclearfallout.net will show the NFo Rentals site.
-Nick
FlyingMongoose
This is my homepage
This is my homepage
Posts: 353
Joined: Fri Sep 17, 2004 7:50 pm
Contact:

Post by FlyingMongoose »

I honestly did not know that.

Though the basic idea is that the motd.txt can't show certain HTML so it'll make it blank. So you tell it to redirect.
FlyingMongoose
This is my homepage
This is my homepage
Posts: 353
Joined: Fri Sep 17, 2004 7:50 pm
Contact:

Post by FlyingMongoose »

Anyway, this actually probably doesn't come up a lot, but a sticky for those who care might be nice. lol.
User avatar
Wolverine
A semi-regular
A semi-regular
Posts: 21
Joined: Sat Sep 17, 2005 2:30 pm
Location: Guelph, Ontario Canada
Contact:

Post by Wolverine »

heres my motd and it works flawlessly

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Cstrike MOTD</title>
<style type="text/css">
pre 	{
		font-family:Verdana,Tahoma;
		color:#FFB000;
    	}
body	{
		background:#000000;
		margin-left:8px;
		margin-top:0px;
		}
a	{
    	text-decoration:    underline;
	}
a:link  {
    color:  #FFFFFF;
    }
a:visited   {
    color:  #FFFFFF;
    }
a:active    {
    color:  #FFFFFF;
    }
a:hover {
    color:  #FFFFFF;
    text-decoration:    underline;
    }
</style>
</head>
<body scroll="no">
<pre>
</pre>
<center>
<img src="http://location.of.picture.net/name.jpg" width="755" height="375"</img>
</center>

</body>
</html>
User avatar
Wolverine
A semi-regular
A semi-regular
Posts: 21
Joined: Sat Sep 17, 2005 2:30 pm
Location: Guelph, Ontario Canada
Contact:

Post by Wolverine »

well who's the idiot now. Cant edit posts here and I've out my url. What a dumbass I am :)
User avatar
Wolverine
A semi-regular
A semi-regular
Posts: 21
Joined: Sat Sep 17, 2005 2:30 pm
Location: Guelph, Ontario Canada
Contact:

Post by Wolverine »

any site moderator feel free to delete my url inthe code lol
User avatar
Nick|NFo
Former staff
Former staff
Posts: 2252
Joined: Sun Mar 30, 2003 1:56 pm
Location: 127.0.0.1

Post by Nick|NFo »

Wolverine wrote:any site moderator feel free to delete my url inthe code lol
Done and thanks for sharing :)
-Nick
User avatar
Wolverine
A semi-regular
A semi-regular
Posts: 21
Joined: Sat Sep 17, 2005 2:30 pm
Location: Guelph, Ontario Canada
Contact:

Post by Wolverine »

thx :)
FlyingMongoose
This is my homepage
This is my homepage
Posts: 353
Joined: Fri Sep 17, 2004 7:50 pm
Contact:

Post by FlyingMongoose »

That's fine because it's just an image, however I wish to use more code than motd usually supports. So I do the above posted ;)
Post Reply