Changeset 36961 for titan/plugins/tithek/tithek.h
- Timestamp:
- 01/26/16 04:07:55 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/tithek/tithek.h
r36938 r36961 445 445 446 446 // if(cmpfilenameext(filename, ".sh") == 0) 447 if(ostrstr(filename, ".sh ") != NULL && ostrstr(filename, ".sh init") == NULL )447 if(ostrstr(filename, ".sh ") != NULL && ostrstr(filename, ".sh init") == NULL && ostrstr(filename, ".sh video") == NULL) 448 448 { 449 449 printf("[tithek] cmd: %s\n", filename); … … 454 454 debug(10, "file: %s", file); 455 455 } 456 else if(ostrstr(filename, ".sh video") != NULL) 457 { 458 printf("[tithek] video..... cmd: %s\n", filename); 459 debug(10, "cmd: %s", filename); 460 file = command(filename); 461 file = string_newline(file); 462 printf("[tithek] file: %s\n", file); 463 debug(10, "file: %s", file); 464 } 456 465 else 457 466 file = ostrcat(filename, NULL, 0, 0); … … 467 476 pay = getconfigint("tithek_pay", NULL); 468 477 478 char* tmpstr = NULL; 479 469 480 while(fgets(fileline, MINMALLOC, fd) != NULL) 470 481 { 471 482 if(fileline[0] == '\n') 472 483 continue; 473 len = strlen(fileline) - 1; 474 if(fileline[len] == '\n') 475 fileline[len] = '\0'; 476 if(fileline[len - 1] == '\r') 477 fileline[len - 1] = '\0'; 478 484 485 if(ostrstr(filename, ".sh hoster") != NULL) 486 { 487 printf("[tithek] hoster fileline: %s\n", fileline); 488 tmpstr = command(fileline); 489 printf("[tithek] hoster tmpstr: %s\n", tmpstr); 490 491 len = strlen(tmpstr) - 1; 492 if(tmpstr[len] == '\n') 493 tmpstr[len] = '\0'; 494 if(tmpstr[len - 1] == '\r') 495 tmpstr[len - 1] = '\0'; 496 } 497 else 498 { 499 len = strlen(fileline) - 1; 500 if(fileline[len] == '\n') 501 fileline[len] = '\0'; 502 if(fileline[len - 1] == '\r') 503 fileline[len - 1] = '\0'; 504 } 479 505 linecount++; 480 506 481 507 if(last == NULL) last = tmplast; 482 last = addtithek(fileline, len + 2, linecount, last, pay); 508 if(ostrstr(filename, ".sh hoster") != NULL) 509 last = addtithek(tmpstr, len + 2, linecount, last, pay); 510 else 511 last = addtithek(fileline, len + 2, linecount, last, pay); 483 512 if(last != NULL) tmplast = last; 513 free(tmpstr), tmpstr = NULL; 484 514 } 485 515
Note: See TracChangeset
for help on using the changeset viewer.