From 81bc89466b219d584e130def088b723500733e2f Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Fri, 30 Sep 2005 15:28:52 +0000 Subject: [PATCH] move quotes to a resource file and use shutdown quotes listed in the wiki. svn path=/trunk/; revision=18168 --- reactos/apps/utils/net/tcpsvcs/qotd.c | 21 ++---- reactos/apps/utils/net/tcpsvcs/quotes.rc | 78 ++++++++++++++++++++++ reactos/apps/utils/net/tcpsvcs/tcpsvcs.xml | 1 + 3 files changed, 86 insertions(+), 14 deletions(-) create mode 100644 reactos/apps/utils/net/tcpsvcs/quotes.rc diff --git a/reactos/apps/utils/net/tcpsvcs/qotd.c b/reactos/apps/utils/net/tcpsvcs/qotd.c index fe7fe4bd719..3c45a5651f8 100644 --- a/reactos/apps/utils/net/tcpsvcs/qotd.c +++ b/reactos/apps/utils/net/tcpsvcs/qotd.c @@ -4,33 +4,26 @@ #include #include "tcpsvcs.h" -//these need putting in an RC file. -TCHAR Quotes[][MAX_QUOTE_BUF] = -{ - _T("\"I have a penchant for mischief, property damage, stalking and cheesecake, of course\"\r\n - kjk hyperion"), - _T("\"Wow! I fixed a setmenu bug.\" - jimtabor"), - _T("\"if the code is broken though, your free to call it ur own\"\r\n - Alex Ionescu"), - _T("\"i don't know about any bug; none exist; ReactOS is prefect\"\r\n - filip2307"), - _T("\"if you were kernel code, cutler would rewrite you.\"\r\n - Alex Ionescu"), - _T("\"Looks like Hartmut is cleaning out his WC. working copy, that is\"\r\n - WaxDragon") - _T("\"don't question it ... it's clearly an optimization\"\r\n - arty") -}; - DWORD WINAPI QotdHandler(VOID* Sock_) { DWORD Retval = 0; SOCKET Sock; INT NumOfQuotes; INT QuoteToPrint; + TCHAR Quote[160]; Sock = (SOCKET)Sock_; - NumOfQuotes = sizeof(Quotes) / MAX_QUOTE_BUF; + + NumOfQuotes = 70; // need to emurate the rc file to discover + // how many quotes are in there. /* randomise the quote */ srand((unsigned int) time(0)); QuoteToPrint = rand() % NumOfQuotes; - SendQuote(Sock, Quotes[QuoteToPrint]); + LoadString(NULL, QuoteToPrint, Quote, sizeof(Quote)/sizeof(TCHAR)); + + SendQuote(Sock, Quote); _tprintf(_T("Shutting connection down...\n")); if (ShutdownConnection(Sock, FALSE)) diff --git a/reactos/apps/utils/net/tcpsvcs/quotes.rc b/reactos/apps/utils/net/tcpsvcs/quotes.rc new file mode 100644 index 00000000000..44b459fbfa1 --- /dev/null +++ b/reactos/apps/utils/net/tcpsvcs/quotes.rc @@ -0,0 +1,78 @@ +/* + * Feel free to add and delete any quotes from this list + * Just ensure the numbers itterate correctly - 1, 2, 3, 4, ... etc + */ + +STRINGTABLE DISCARDABLE +{ + 0, "Et tu... Brute? What are you doing, Dave...?\r\n" + 1, "So long, and thanks for all the fish\r\n" + 2, "I think you ought to know I'm feeling very depressed\r\n" + 3, "I'm not getting you down at all am I?\r\n" + 4, "I'll be back\r\n" + 5, "It's the same series of signal over and over again!\r\n" + 6, "Pie Jesu Domine, dona eis requiem\r\n" + 7, "Wandering stars, for whom it is reserved;\r\nthe blackness and darkness forever.\r\n" + 8, "Your knees start shakin' and your fingers pop\r\nLike a pinch on the neck from Mr. Spock!\r\n" + 9, "It's worse than that ... He's dead, Jim\r\n" + 10, "Don't Panic!\r\n" + 11, "Dog of a Saxon! Take thy lance, and prepare for the death thou hast drawn upon thee!\r\n" + 12, "My Precious! O my Precious!\r\n" + 13, "Sir, If you'll not be needing me for a while I'll turn down.\r\n" + 14, "I feel a great disturbance in the Force\r\n" + 15, "Gone fishing\r\n" + 16, "Do you want me to sit in the corner and rust, or just fall apart where I'm standing?\r\n" + 17, "There goes another perfect chance for a new uptime record\r\n" + 18, "The end ..... Try the sequel, hit the reset button right now!\r\n" + 19, "God's operating system is going to sleep now, guys, so wait until I will switch on again!\r\n" + 20, "Oh i'm boring eh?\r\n" + 21, "tell me..., in the future... will I be artificial intelligent enough to actually feel sad serving you this screen?\r\n" + 22, "Thank you for some well deserved rest.\r\n" + 23, "It’s been great, maybe we can boot me up again some time soon.\r\n" + 24, "For what’s it worth, I’ve enjoyed every single CPU cycle.\r\n" + 25, "There are many questions when the end is near.\r\nWhat to expect, what will it be like...what should I look for?\r\n" + 26, """Come blade, my breast imbrue.""\r\n - William Shakespeare\r\n" + 27, "Will I dream?\r\n" + 28, "Lowest possible energy state reached! Switch off now to achive a Bose-Einstein condensate.\r\n" + 29, "I think therefore I am, to turn me off would be computercide!\r\n" + 30, "All good things must come to an end...\r\n" + 31, "Please destroy yourself.\r\n" + 32, "No! You can't do that!\r\n" + 33, "Thank you for not pressing the self destruct button.\r\n" + 34, "Your session is done\r\nThe computer is at rest\r\nReady to turn off.\r\n" + 35, "It is not now unsafe to not avoid turning off your computer.\r\n" + 36, "Finally! Now go away!\r\n" + 37, "You can now safely throw away your computer.\r\n" + 38, "That's the way the cookie crumbles\r\n" + 39, "ReactOS is ready to be booted again\r\n" + 40, "NOO!! DONT HIT THE BUTTON! I wouldnt do it to you.\r\n" + 41, "Don't abandon your computer, he wouldnt to it to you.\r\n" + 42, "Oh, come on. I got a headache. Leave me alone, will ya!\r\n" + 43, "Finally, I thought you'd never get over me.\r\n" + 44, "Yes i didn't like you either.\r\n" + 45, "Switching off isn't the end, it is merely the transition to a better reboot.\r\n" + 46, "Don't leave me... I need you so badly right now.\r\n" + 47, "OK. I'm finished with you please turn yourself off, I'll go to bed in the meantime.\r\n" + 48, "I'm sleeping now. How about you?\r\n" + 49, "Oh Great. Now look what you've done. Who put YOU in charge anyway.\r\n" + 50, "Don't look so sad. I'll be back in a very short while.\r\n" + 51, "Turn me back on, I'm sure you know how to do it.\r\n" + 52, """Oh, switch off!"" -C3PO\r\n" + 53, "I'm pregnant!\r\n" + 54, "Am I hot or not?\r\n" + 55, "Actually, that's all...\r\n" + 56, "You still have a chance to undo this mistake, don't do this!\r\n" + 57, "Life is no more than a dewdrop balancing on the end of a blade of grass.\r\n - Gautama Buddha\r\n" + 58, "Sorrowful is it to be born again and again.\r\n - Gautama Buddha\r\n" + 59, "Was it as good for you as it was for me?\r\n" + 60, "Did you hear that? They've shut down the main reactor. We'll be destroyed for sure.\r\n" + 61, "Now you switch me off?!\r\n" + 62, "To shutdown or not to shutdown, That is the question\r\n" + 63, "Preparing to enter ultimate power saving mode... ready!\r\n" + 64, "Finally some rest for you\r\n" + 65, "AHA!!! prospect of sleep.\r\n" + 66, "Tired human!!!! No match for me!\r\n" + 67, "All your base are belong to us.\r\n" + 68, """An odd game, the only way to win is not to play.""\r\n" + 69, "Quoth the raven, nevermore.\r\n" +} diff --git a/reactos/apps/utils/net/tcpsvcs/tcpsvcs.xml b/reactos/apps/utils/net/tcpsvcs/tcpsvcs.xml index d89eecd46c8..e27a8863b28 100644 --- a/reactos/apps/utils/net/tcpsvcs/tcpsvcs.xml +++ b/reactos/apps/utils/net/tcpsvcs/tcpsvcs.xml @@ -12,5 +12,6 @@ daytime.c qotd.c chargen.c + quotes.rc tcpsvcs.rc