summary refs log tree commit diff stats
path: root/src/common/outbound.c
AgeCommit message (Collapse)Author
2012-11-10Eliminate some more warnings and hide less warnings in VSBerke Viktor
2012-11-05Remove spacing, it wouldn't work anywayBerke Viktor
2012-11-03Add export config stubBerke Viktor
2012-10-30Nah, even more rebrandingBerke Viktor
2012-10-28More polishing for the About dialogBerke Viktor
2012-10-24A lot more rebrandingBerke Viktor
2012-10-22Variable cleanup for the restBerke Viktor
2012-10-22Variable cleanup for irc_*Berke Viktor
2012-10-22Variable cleanup for input_*Berke Viktor
2012-10-22Variable cleanup for dcc_*Berke Viktor
2012-10-22Variable cleanup for completion_*Berke Viktor
2012-10-22Variable cleanup for away_*Berke Viktor
2012-10-18Get rid of saveconf remnants, we save automaticallyBerke Viktor
2012-10-13Get rid of some hardcodingBerke Viktor
2012-10-13Implement /ADDSERVERBerke Viktor
2012-08-28Enhance LASTLOG to use gtk_xtext_search_textentry()RichardHitt
2012-07-31Use 6697 for SSL connections by defaultBerke Viktor
http://blog.freenode.net/2011/02/port-6697-irc-via-tlsssl/
2012-07-25Initial support for lastlog -r on win32 (Richard)Richard Hitt
2012-07-22Now, really fix grep on WindowsBerke Viktor
2012-07-22Make GREP work on Windows, regexp support isn't implemented in fe_lastlog yetBerke Viktor
2012-07-21Some aid for compiler warningsBerke Viktor
2012-07-13Update XChat to r1515Berke Viktor
2012-06-16Fix string handling for Turkish localeBerke Viktor
2012-05-13Merge branch 'master' into wdkBerke Viktor
2012-05-13Update XChat to r1507Berke Viktor
2012-01-08Merge branch 'master' into wdkBerke Viktor
2012-01-08update xchat to r1499Berke Viktor
2011-12-11initial patches for linux compatibilityBerke Viktor
2011-11-23no manual saving, auto-save changes during /setBerke Viktor
2011-11-23the same for outbound /saveconfBerke Viktor
2011-11-23Revert "add option to auto-open a new tab when sending /msg (openSUSE)", ↵Berke Viktor
/query msg is already there for that This reverts commit 1e74680172e4ff43fb109557bea87d090d8376c2.
2011-11-23report back when saving preferences via commandBerke Viktor
2011-09-07add command for saving the preferencesBerke Viktor
2011-08-09add option to auto-open a new tab when sending /msg (openSUSE)berkeviktor@aol.com
2011-02-28add wdk changes to named branchberkeviktor@aol.com
2011-02-24add xchat r1489berkeviktor@aol.com
*word[], char *word_eol[], void *userdata){ printThemes(); return XCHAT_EAT_ALL; } static int mpc_themeReload(char *word[], char *word_eol[], void *userdata){ themeInit(); loadThemes(); return XCHAT_EAT_ALL; } static int mpc_tell(char *word[], char *word_eol[], void *userdata){ char *tTitle, *zero, *oggLine, *line; struct tagInfo info; HWND hwnd = FindWindow("MediaPlayerClassicW",NULL); if (hwnd==0) {xchat_command(ph, randomLine(notRunTheme));return XCHAT_EAT_ALL;} tTitle=(char*)malloc(sizeof(char)*1024); GetWindowText(hwnd, tTitle, 1024); zero=strstr(tTitle," - Media Player Classic"); if (zero!=NULL) zero[0]=0; else xchat_print(ph,"pattern not found"); if ((tTitle[1]==':')&&(tTitle[2]=='\\')){ //xchat_print(ph,"seams to be full path"); if (endsWith(tTitle,".mp3")==1){ //xchat_print(ph,"seams to be a mp3 file"); info = readHeader(tTitle); if ((info.artist!=NULL)&&(strcmp(info.artist,"")!=0)){ char *mode=MODES[info.mode]; //xchat_printf(ph,"mode: %s\n",mode); char *mp3Line=randomLine(mp3Theme); mp3Line=replace(mp3Line,"%art",info.artist); mp3Line=replace(mp3Line,"%tit",info.title); mp3Line=replace(mp3Line,"%alb",info.album); mp3Line=replace(mp3Line,"%com",info.comment); mp3Line=replace(mp3Line,"%gen",info.genre); //mp3Line=replace(mp3Line,"%time",pos); //mp3Line=replace(mp3Line,"%length",len); //mp3Line=replace(mp3Line,"%ver",waVers); //mp3Line=intReplace(mp3Line,"%br",br); //mp3Line=intReplace(mp3Line,"%frq",frq); mp3Line=intReplace(mp3Line,"%br",info.bitrate); mp3Line=intReplace(mp3Line,"%frq",info.freq); mp3Line=replace(mp3Line,"%mode",mode); //mp3Line=replace(mp3Line,"%size",size); //mp3Line=intReplace(mp3Line,"%perc",perc); //mp3Line=replace(mp3Line,"%plTitle",title); mp3Line=replace(mp3Line,"%file",tTitle); xchat_command(ph, mp3Line); return XCHAT_EAT_ALL; } } if (endsWith(tTitle,".ogg")==1){ xchat_printf(ph,"Ogg detected\n"); info = getOggHeader(tTitle); if (info.artist!=NULL){ char *cbr; if (info.cbr==1) cbr="CBR"; else cbr="VBR"; oggLine=randomLine(oggTheme); //if (cue==1) oggLine=cueLine; //xchat_printf(ph,"ogg-line: %s\n",oggLine); oggLine=replace(oggLine,"%art",info.artist); oggLine=replace(oggLine,"%tit",info.title); oggLine=replace(oggLine,"%alb",info.album); oggLine=replace(oggLine,"%com",info.comment); oggLine=replace(oggLine,"%gen",info.genre); //oggLine=replace(oggLine,"%time",pos); //oggLine=replace(oggLine,"%length",len); //oggLine=replace(oggLine,"%ver",waVers); oggLine=intReplace(oggLine,"%chan",info.mode); oggLine=replace(oggLine,"%cbr",cbr); oggLine=intReplace(oggLine,"%br",info.bitrate/1000);//br); oggLine=intReplace(oggLine,"%frq",info.freq); //oggLine=replace(oggLine,"%size",size); //oggLine=intReplace(oggLine,"%perc",perc); //oggLine=replace(oggLine,"%plTitle",title); oggLine=replace(oggLine,"%file",tTitle); xchat_command(ph, oggLine); return XCHAT_EAT_ALL; } } } line=randomLine(titleTheme); line=replace(line,"%title", tTitle); xchat_command(ph,line); return XCHAT_EAT_ALL; } int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg){ ph = plugin_handle; *plugin_name = "mpcInfo"; *plugin_desc = "Information-Script for Media Player Classic"; *plugin_version=VERSION; xchat_hook_command(ph, "mpc", XCHAT_PRI_NORM, mpc_tell,"no help text", 0); xchat_hook_command(ph, "mpc_themes", XCHAT_PRI_NORM, print_themes,"no help text", 0); xchat_hook_command(ph, "mpc_reloadthemes", XCHAT_PRI_NORM, mpc_themeReload,"no help text", 0); xchat_command (ph, "MENU -ietc\\music.png ADD \"Window/Display Current Song (MPC)\" \"MPC\""); themeInit(); loadThemes(); xchat_printf(ph, "%s %s plugin loaded\n",*plugin_name, VERSION); return 1; } int xchat_plugin_deinit (void) { xchat_command (ph, "MENU DEL \"Window/Display Current Song (MPC)\""); xchat_print (ph, "mpcInfo plugin unloaded\n"); return 1; }