From 740352ceabf20e948984df918ed3c5e81f7c9b47 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Fri, 9 Mar 2018 19:08:17 +0000 Subject: Remove mpcinfo plugin The code quality of it is terrible, the user experience of using it is terrible, and it should have been removed years ago --- plugins/mpcinfo/theme.c | 148 ------------------------------------------------ 1 file changed, 148 deletions(-) delete mode 100644 plugins/mpcinfo/theme.c (limited to 'plugins/mpcinfo/theme.c') diff --git a/plugins/mpcinfo/theme.c b/plugins/mpcinfo/theme.c deleted file mode 100644 index 7b92ec08..00000000 --- a/plugins/mpcinfo/theme.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -struct theme{ - int size; - char **line; -}; - -static struct theme notRunTheme; -static struct theme titleTheme; -static struct theme mp3Theme; -static struct theme oggTheme; - - -void themeInit(){ - //if (DEBUG==1) putlog("init theme"); - /*mp3Theme.size=0;oggTheme.size=0;cueTheme.size=0;streamTheme.size=0;etcTheme.size=0; - stopTheme.size=0;pauseTheme.size=0;*/ - - notRunTheme.size=0;titleTheme.size=0; - srand((unsigned int)time((time_t *)NULL)); - //if (DEBUG==1) putlog("theme init done"); -} - -void printTheme(struct theme data){ - int i; - for (i=0;i 0) - { - line=" "; - } else - { - line="\0"; - } - - while (line[0]!=0) - { - line=readLine(f); - val=split(line,'='); - printf("line: %s\n",line); - printf("val: %s\n",val); - lineCap=toUpper(line); - if (strcmp(lineCap,"OFF_LINE")==0) notRunTheme=themeAdd(notRunTheme,val); - if (strcmp(lineCap,"TITLE_LINE")==0) titleTheme=themeAdd(titleTheme,val); - if (strcmp(lineCap,"MP3_LINE")==0) mp3Theme=themeAdd(mp3Theme,val); - if (strcmp(lineCap,"OGG_LINE")==0) mp3Theme=themeAdd(oggTheme,val); - free(lineCap); - } - fclose(f); - hexchat_print(ph, "theme loaded successfull\n"); - } - if (notRunTheme.size==0) notRunTheme=themeAdd(notRunTheme,"Media Player Classic not running"); - if (titleTheme.size==0) titleTheme=themeAdd(titleTheme,"say Playing %title in Media Player Classic"); - if (mp3Theme.size==0) mp3Theme=themeAdd(mp3Theme,"me listens to %art with %tit from %alb [%gen|%br kbps|%frq kHz|%mode] in Media Player Classic "); - if (oggTheme.size==0) oggTheme=themeAdd(oggTheme,"me listens to %art with %tit from %alb [%gen|%br kbps|%frq kHz|%chan channels] in Media Player Classic "); - //mp3Theme=themeAdd(mp3Theme,"me listens to %art with %tit from %alb [%time|%length|%perc%|%br kbps|%frq kHz|%mode] in Media Player Classic "); -} - -int rnd(int max){ - return rand()%max; -} - -char *randomLine(struct theme data){ - return data.line[rnd(data.size)]; -} -- cgit 1.4.1