diff --git a/TODO b/TODO index dc7d1df..2cd6624 100644 --- a/TODO +++ b/TODO @@ -13,3 +13,4 @@ X move from *preqcc to cpp o add more variety to tinkering o add a way to edit the respawn ammo entities o add localinfo string for bottom half of the MOTD +o add a define to disable abusive admin commands (eg stuffcmd) diff --git a/menu.qc b/menu.qc index fc091c7..6770759 100644 --- a/menu.qc +++ b/menu.qc @@ -37,6 +37,7 @@ void() lvl2_sentry_stand; void() lvl3_sentry_stand; float (float tno) TeamFortress_TeamGetNoPlayers; float(float myteam) HasFlag; +void() PrintMOTD; /* WK void(float menu_no) DisplayMenu; */ // Assorted menus @@ -786,7 +787,7 @@ void(float inp) Menu_Input = void() Menu_Intro = { - CenterPrint2(self, MSG_INTRO, MSG_INTRO2); + PrintMOTD (); }; void() Menu_ClassHelp = diff --git a/messages.qh b/messages.qh index 1001634..0a09cdc 100644 --- a/messages.qh +++ b/messages.qh @@ -1,6 +1,8 @@ // This file contains defines for some of the messages -#define MSG_INTRO "\nWelcome to Custom\na Quake MOD by ShakaUVM\nwwwtelefraggedcomshaka\n\n\n\n" -#define MSG_INTRO2 "Based on the aussie ver by SB-1\nModified version by Clan Prozac\n\n\n\nGet any files needed at:\n\nhttp:quakeprozacnet" +#define MSG_INTRO1 "Welcome to Custom\na Quake MOD by ShakaUVM\nwwwtelefraggedcomshaka" +#define MSG_INTRO2 "Based on the aussie ver by SB-1\nModified version by Clan Prozac" +//#define MSG_INTRO3 "Get any files needed at:\n\nhttp:\^/\^/quake\^.prozac\^.net\^/" +#define MSG_INTROBAR "\n\n\n\n" //, aka C //#define MSG_CUTFVERSION "Custom version 32OfN" #define MSG_CUTFVERSION " Custom 32OfN4" diff --git a/tforthlp.qc b/tforthlp.qc index 970e15c..2b00f94 100644 --- a/tforthlp.qc +++ b/tforthlp.qc @@ -37,9 +37,7 @@ void() TeamFortress_MOTD = if (self.motd <= MOTD_FINISHED - 2) { if (self.show_hostile < time) { - //local string CP_MOTD; - //CP_MOTD = GetProzacMOTD(self.motd); - CenterPrint2(self,MSG_INTRO,MSG_INTRO2);//,CP_MOTD); + PrintMOTD (); self.show_hostile = time + MOTD_REFRESHRATE; //was 1 //.5? } self.menu_count = MENU_REFRESH_RATE; @@ -117,6 +115,45 @@ void() TeamFortress_MOTD = } }; +#ifndef MSG_INTRO1 +# define MSG_INTRO1 "" +#endif +#ifndef MSG_INTRO2 +# define MSG_INTRO2 "" +#endif +#ifndef MSG_INTRO3 +# define MSG_INTRO3 "" +#endif + +void() PrintMOTD = +{ + local string intro = ""; + local string infostring; + + if (MSG_INTRO1 != "") + intro = intro + MSG_INTRO1; + if (MSG_INTRO2 != "") { + if (intro != "") + intro = intro + MSG_INTROBAR; + intro = intro + MSG_INTRO2; + } + if (MSG_INTRO3 != "") { + if (intro != "") + intro = intro + MSG_INTROBAR; + intro = intro + MSG_INTRO3; + } + infostring = infokey (world, "motd"); + if (infostring != "") { + if (intro != "") + intro = intro + MSG_INTROBAR; + intro = intro + infostring; + } + + intro = "\n\n" + intro; // prepend a newline, to make it center better :/ + + CenterPrint(self, intro); +}; + //========================================================================= // Help displayed when someone types the alias "maphelp" void() TeamFortress_HelpMap =