Changeset 627 for trollforge/lastmeasure/server
- Timestamp:
- 01/19/12 02:02:16 (16 months ago)
- Location:
- trollforge/lastmeasure/server
- Files:
-
- 2 added
- 3 edited
-
lmkeywords.h (modified) (2 diffs)
-
lmresource.h (modified) (3 diffs)
-
lmutil.h (modified) (2 diffs)
-
md5.c (added)
-
md5.h (added)
Legend:
- Unmodified
- Added
- Removed
-
trollforge/lastmeasure/server/lmkeywords.h
r626 r627 1 char const *titles[] = 2 { 3 "GNAA Last Measure Live!" 4 }; 1 5 2 6 char const *keywords[] = … … 271 275 "ice warriors", "ice warriors club", "ice warriors of cp", "sieg heil", 272 276 "nokenny", "caribbean islands", "caribbean airlines", "weretiger", 273 "not4chan", "no kenny", "jillian and ed till together", 277 "not4chan", "no kenny", "jillian and ed till together", "wingerdinger", 274 278 /* {{{ Nude Celebs */ 275 279 "shakira nue", "rihanna nue", "vanessa demouy nue", "clara morgane nue", -
trollforge/lastmeasure/server/lmresource.h
r626 r627 138 138 139 139 " <head>\r\n" 140 " <title> GNAA Last Measure Live!</title>\r\n"140 " <title>" << Title() << "</title>\r\n" 141 141 " <meta name=\"keywords\" content=\"" << Keywords(128) << "\" />\r\n" 142 142 " <meta name=\"description\" content=\"" << Keywords(20) << "\" />\r\n" … … 268 268 } 269 269 270 static std::string Title() 271 { 272 std::stringstream ret(""); 273 274 ret << titles[rand() % (sizeof(titles) / sizeof(*titles))]; 275 276 return ret.str(); 277 } 278 270 279 static std::string Keywords(size_t count) 271 280 { … … 322 331 " credits = \"LAST MEASURE UNIFIED X-2, by LiteralKa and sam.\\n\";\r\n" 323 332 " credits += \"Starring:\\n\";\r\n" 324 " credits += \"Balloon Boy, Huge_Midget's \\"Pain Series\\", Kevin Klerck (spin.gif), Kirk Johnson,\\n\";\r\n"333 " credits += \"Balloon Boy, Huge_Midget's 'Pain Series', Kevin Klerck (spin.gif), Kirk Johnson,\\n\";\r\n" 325 334 " credits += \"Lemonparty, Loopback, Penisbird, Pillowfight, Rusty's Wife, The Harlequin Fetus,\\n\";\r\n" 326 335 " credits += \"The Shitfaced Lady, Tubgirl, and much, much more!\\n\";\r\n" 327 336 " credits += \"\\n\\n\";\r\n" 328 " credits += \"Multiple \\"HEY EVERYBODY...\\"clips by abez, blackman, eska, fury, JesuitX, JiZZy,\\n\";\r\n"329 " credits += \"kirk, lolichan, \\"original\\", popeye, rkz, Rucas, sam, and trogg.\\n\";\r\n"337 " credits += \"Multiple 'HEY EVERYBODY...' clips by abez, blackman, eska, fury, JesuitX, JiZZy,\\n\";\r\n" 338 " credits += \"kirk, lolichan, 'original', popeye, rkz, Rucas, sam, and trogg.\\n\";\r\n" 330 339 " credits += \"\\n\\n\";\r\n" 331 340 " credits += \"Pop-up blocker evasion technology by Armorfist, goat-see, and LiteralKa.\\n\";\r\n" -
trollforge/lastmeasure/server/lmutil.h
r566 r627 10 10 #include <signal.h> /* raise() */ 11 11 #include <time.h> /* localtime_r() */ 12 13 #include "md5.h" 12 14 13 15 class Random … … 64 66 raise(SIGTERM); 65 67 } 68 69 /** 70 * Generate a unique key from the current time and an IP address. It starts 71 * with -time() so that newest hits are stored first in alphabetical order. 72 */ 73 static std::string GenKey(char const *host) 74 { 75 time_t t = time(NULL); 76 srand(t); 77 78 char buffer[16]; 79 char hosthash[37]; 80 char hash[37]; 81 82 sprintf(hosthash,"%s%d",host,rand()%32767); 83 84 md5((unsigned char*)hosthash,8,(unsigned char*)hash); 85 86 sprintf(buffer, "%08lx", (0xffffffff - t)); 87 strcat(buffer,hash); 88 89 return buffer; 90 } 91 92 /* Get back the date value from a key */ 93 static std::string KeyToDate(char const $key) 94 { 95 std::stringstream ret(""); 96 // return 0xffffffff - hexdec(substr($key, 0, 8)); 97 return ret.str(); 98 } 99 66 100 }; 67 101
Note: See TracChangeset
for help on using the changeset viewer.
