Ignore:
Timestamp:
01/27/16 23:34:04 (7 years ago)
Author:
obi
Message:

update tithek

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/tithek/tithek.h

    r36961 r36966  
    445445
    446446//      if(cmpfilenameext(filename, ".sh") == 0)
    447         if(ostrstr(filename, ".sh ") != NULL && ostrstr(filename, ".sh init") == NULL && ostrstr(filename, ".sh video") == NULL)
     447        if(ostrstr(filename, ".sh ") != NULL && ostrstr(filename, ".sh init") == NULL)
    448448        {
    449449                printf("[tithek] cmd: %s\n", filename);
     
    454454                debug(10, "file: %s", file);
    455455        }
    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         }
    465456        else
    466457                file = ostrcat(filename, NULL, 0, 0);   
     
    483474                        continue;
    484475
    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                 }
     476                len = strlen(fileline) - 1;
     477                if(fileline[len] == '\n')
     478                        fileline[len] = '\0';
     479                if(fileline[len - 1] == '\r')
     480                        fileline[len - 1] = '\0';
     481
    505482                linecount++;
    506483
    507484                if(last == NULL) last = tmplast;
    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);
     485                last = addtithek(fileline, len + 2, linecount, last, pay);
    512486                if(last != NULL) tmplast = last;
    513487                free(tmpstr), tmpstr = NULL;
     
    13811355        tmpstr = ostrcat(((struct tithek*)listbox->select->handle)->link, NULL, 0, 0);
    13821356        tmpstr2 = ostrcat(((struct tithek*)listbox->select->handle)->title, NULL, 0, 0);
    1383                
     1357
    13841358        if(((struct tithek*)listbox->select->handle)->flag == 2)
    13851359        {
    13861360                if(tmpstr != NULL) tmpstr1 = ostrcat(tmpstr, NULL, 0, 0);
    1387         }                                               
     1361        }
    13881362        else if(((struct tithek*)listbox->select->handle)->flag == 3)
    13891363        {
     
    14741448        {
    14751449                if(tmpstr != NULL) tmpstr1 = nbaondemand(tmpstr);
     1450        }
     1451        else if(((struct tithek*)listbox->select->handle)->flag == 111)
     1452        {
     1453                if(tmpstr != NULL) tmpstr1 = localparser_hoster(tmpstr);
    14761454        }
    14771455
     
    20762054                                clearscreen(grid);
    20772055
    2078                                 if(((struct tithek*)listbox->select->handle)->flag == 2 || ((struct tithek*)listbox->select->handle)->flag == 3 || ((struct tithek*)listbox->select->handle)->flag == 4 || ((struct tithek*)listbox->select->handle)->flag == 5 || ((struct tithek*)listbox->select->handle)->flag == 6 || ((struct tithek*)listbox->select->handle)->flag == 12 || ((struct tithek*)listbox->select->handle)->flag == 14 || ((struct tithek*)listbox->select->handle)->flag == 15 || ((struct tithek*)listbox->select->handle)->flag == 20 || ((struct tithek*)listbox->select->handle)->flag == 38 || ((struct tithek*)listbox->select->handle)->flag == 42 || ((struct tithek*)listbox->select->handle)->flag == 45 || ((struct tithek*)listbox->select->handle)->flag == 46 || ((struct tithek*)listbox->select->handle)->flag == 64 || ((struct tithek*)listbox->select->handle)->flag == 50 || ((struct tithek*)listbox->select->handle)->flag == 41 || ((struct tithek*)listbox->select->handle)->flag == 43 || ((struct tithek*)listbox->select->handle)->flag == 75 || ((struct tithek*)listbox->select->handle)->flag == 91 || ((struct tithek*)listbox->select->handle)->flag == 92 || ((struct tithek*)listbox->select->handle)->flag == 93 || ((struct tithek*)listbox->select->handle)->flag == 94 || ((struct tithek*)listbox->select->handle)->flag == 98)
     2056                                if(((struct tithek*)listbox->select->handle)->flag == 2 || ((struct tithek*)listbox->select->handle)->flag == 3 || ((struct tithek*)listbox->select->handle)->flag == 4 || ((struct tithek*)listbox->select->handle)->flag == 5 || ((struct tithek*)listbox->select->handle)->flag == 6 || ((struct tithek*)listbox->select->handle)->flag == 12 || ((struct tithek*)listbox->select->handle)->flag == 14 || ((struct tithek*)listbox->select->handle)->flag == 15 || ((struct tithek*)listbox->select->handle)->flag == 20 || ((struct tithek*)listbox->select->handle)->flag == 38 || ((struct tithek*)listbox->select->handle)->flag == 42 || ((struct tithek*)listbox->select->handle)->flag == 45 || ((struct tithek*)listbox->select->handle)->flag == 46 || ((struct tithek*)listbox->select->handle)->flag == 64 || ((struct tithek*)listbox->select->handle)->flag == 50 || ((struct tithek*)listbox->select->handle)->flag == 41 || ((struct tithek*)listbox->select->handle)->flag == 43 || ((struct tithek*)listbox->select->handle)->flag == 75 || ((struct tithek*)listbox->select->handle)->flag == 91 || ((struct tithek*)listbox->select->handle)->flag == 92 || ((struct tithek*)listbox->select->handle)->flag == 93 || ((struct tithek*)listbox->select->handle)->flag == 94 || ((struct tithek*)listbox->select->handle)->flag == 98 || ((struct tithek*)listbox->select->handle)->flag == 111)
    20792057                                {
    20802058                                        submenu(listbox, load, title);
     
    23462324                                        continue;
    23472325                                }       
     2326                                else if((((struct tithek*)listbox->select->handle)->flag == 112))
     2327                                {
     2328//                                      if(localparser_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title) == 0)
     2329//                                              if(screenlistbox(grid, listbox, countlabel, title, titheklink, &pagecount, &tithekexit, &oaktpage, &oaktline, &ogridcol, 0, 0) == 0) break;
     2330                                        if(localparser_search(grid, listbox, countlabel, load, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->title, NULL, 0) == 0)
     2331                                                if(screenlistbox(grid, listbox, countlabel, title, titheklink, &pagecount, &tithekexit, &oaktpage, &oaktline, &ogridcol, 0, 0) == 0) break;
     2332                                }
    23482333                                else if((((struct tithek*)listbox->select->handle)->flag == 3))
    23492334                                {
Note: See TracChangeset for help on using the changeset viewer.