Raised This Month: $32 Target: $400
 8% 

How do you replace the default MOTD w/one displayed by a plugin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 01-23-2007 , 04:31   How do you replace the default MOTD w/one displayed by a plugin?
Reply With Quote #1

As the title states...

I don't need code, was just wondering what the logic behind it is. I know how to display MOTDs and such.

TY!
Josh
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 01-23-2007 , 11:58   Re: How do you replace the default MOTD w/one displayed by a plugin?
Reply With Quote #2

The easiest way would probably be to just change the "motd" string in the InfoPanel string table.

I assume you want to change the client command that is sent also though. I've had a number of requests for changing the default MOTD and adding a "connect x.x.x.x:27016" client command for redirect. Someone has done it, but not released it publicly. I assume if this becomes a common usage that Valve will block it like they did the cl_restrict_server_commands cvar in an MOTD client command.

I'm not sure how it was done. It's possible you could hook CCSPlayer::ShowViewPortPanel(char const*, bool, KeyValues*) and determine if it was the MOTD or not (if there is a "type" key set to TYPE_INDEX then it would be a MOTD window from either the game or a plugin).

Another method might be to hook the engine's UserMessageBegin and MessageEnd and parse the bf_write for any ""VGUIMenu" messages to see if it is an MOTD or not, and if so if the stringtable it is showing is "motd" but this is a little more complicated.
L. Duke is offline
opi123
Junior Member
Join Date: Apr 2005
Old 01-24-2007 , 00:13   Re: How do you replace the default MOTD w/one displayed by a plugin?
Reply With Quote #3

Duke... lol
opi123 is offline
opi123
Junior Member
Join Date: Apr 2005
Old 01-24-2007 , 00:15   Re: How do you replace the default MOTD w/one displayed by a plugin?
Reply With Quote #4

Quote:
I assume you want to change the client command that is sent also though. I've had a number of requests for changing the default MOTD and adding a "connect x.x.x.x:27016" client command for redirect. Someone has done it, but not released it publicly. I assume if this becomes a common usage that Valve will block it like they did the cl_restrict_server_commands cvar in an MOTD client command.
that's interesting
opi123 is offline
xXxcon
Junior Member
Join Date: Sep 2005
Old 01-29-2007 , 13:14   Re: How do you replace the default MOTD w/one displayed by a plugin?
Reply With Quote #5

so duke are you saying your cl_restrict_server program is not working?

i have found a redirector that is working at

72.91.27.75:28028 RN: Memorial Hospital
and it appears to use your motd cl_restrict prograsm, but i cannot seem to get it to work
__________________
xXxcon is offline
Send a message via AIM to xXxcon
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 01-29-2007 , 13:23   Re: How do you replace the default MOTD w/one displayed by a plugin?
Reply With Quote #6

They probably used the same method, maybe even my source code, and changed the part that used to reset the cl_restrict cvar to a "connect x.x.x.x" command.

I wouldn't get too excited about being able to redirect in this fashion. Valve is aware that this is being done, and I would bet money that they will be blocking it in a future update.
L. Duke is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode