mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
new name after fork
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
shared_module('winamp', 'winamp.c',
|
||||
dependencies: [libgio_dep, hexchat_plugin_dep],
|
||||
dependencies: [libgio_dep, zoitechat_plugin_dep],
|
||||
install: true,
|
||||
install_dir: plugindir,
|
||||
name_prefix: '',
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "hexchat-plugin.h"
|
||||
#include "zoitechat-plugin.h"
|
||||
|
||||
#define PLAYING 1
|
||||
#define PAUSED 3
|
||||
|
||||
static hexchat_plugin *ph; /* plugin handle */
|
||||
static zoitechat_plugin *ph; /* plugin handle */
|
||||
|
||||
static int
|
||||
winamp(char *word[], char *word_eol[], void *userdata)
|
||||
@@ -36,35 +36,35 @@ winamp(char *word[], char *word_eol[], void *userdata)
|
||||
SendMessage(hwndWinamp, WM_COMMAND, 40046, 0);
|
||||
|
||||
if (SendMessage(hwndWinamp, WM_USER, 0, 104) == PLAYING)
|
||||
hexchat_printf(ph, "Winamp: playing");
|
||||
zoitechat_printf(ph, "Winamp: playing");
|
||||
else
|
||||
hexchat_printf(ph, "Winamp: paused");
|
||||
zoitechat_printf(ph, "Winamp: paused");
|
||||
}
|
||||
}
|
||||
else if (!stricmp("STOP", word[2]))
|
||||
{
|
||||
SendMessage(hwndWinamp, WM_COMMAND, 40047, 0);
|
||||
hexchat_printf(ph, "Winamp: stopped");
|
||||
zoitechat_printf(ph, "Winamp: stopped");
|
||||
}
|
||||
else if (!stricmp("PLAY", word[2]))
|
||||
{
|
||||
SendMessage(hwndWinamp, WM_COMMAND, 40045, 0);
|
||||
hexchat_printf(ph, "Winamp: playing");
|
||||
zoitechat_printf(ph, "Winamp: playing");
|
||||
}
|
||||
else if (!stricmp("NEXT", word[2]))
|
||||
{
|
||||
SendMessage(hwndWinamp, WM_COMMAND, 40048, 0);
|
||||
hexchat_printf(ph, "Winamp: next playlist entry");
|
||||
zoitechat_printf(ph, "Winamp: next playlist entry");
|
||||
}
|
||||
else if (!stricmp("PREV", word[2]))
|
||||
{
|
||||
SendMessage(hwndWinamp, WM_COMMAND, 40044, 0);
|
||||
hexchat_printf(ph, "Winamp: previous playlist entry");
|
||||
zoitechat_printf(ph, "Winamp: previous playlist entry");
|
||||
}
|
||||
else if (!stricmp("START", word[2]))
|
||||
{
|
||||
SendMessage(hwndWinamp, WM_COMMAND, 40154, 0);
|
||||
hexchat_printf(ph, "Winamp: playlist start");
|
||||
zoitechat_printf(ph, "Winamp: playlist start");
|
||||
}
|
||||
else if (!word_eol[2][0])
|
||||
{
|
||||
@@ -75,7 +75,7 @@ winamp(char *word[], char *word_eol[], void *userdata)
|
||||
current_play = g_utf16_to_utf8 (wcurrent_play, len, NULL, NULL, NULL);
|
||||
if (!current_play)
|
||||
{
|
||||
hexchat_print (ph, "Winamp: Error getting song information.");
|
||||
zoitechat_print (ph, "Winamp: Error getting song information.");
|
||||
return HEXCHAT_EAT_ALL;
|
||||
}
|
||||
|
||||
@@ -105,50 +105,50 @@ winamp(char *word[], char *word_eol[], void *userdata)
|
||||
p = current_play;
|
||||
|
||||
if (*p != '\0')
|
||||
hexchat_commandf (ph, "me is now playing: %s", p);
|
||||
zoitechat_commandf (ph, "me is now playing: %s", p);
|
||||
else
|
||||
hexchat_print (ph, "Winamp: No song information found.");
|
||||
zoitechat_print (ph, "Winamp: No song information found.");
|
||||
g_free (current_play);
|
||||
}
|
||||
else
|
||||
hexchat_print(ph, "Winamp: Nothing being played.");
|
||||
zoitechat_print(ph, "Winamp: Nothing being played.");
|
||||
}
|
||||
else
|
||||
hexchat_printf(ph, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START]\n");
|
||||
zoitechat_printf(ph, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START]\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
hexchat_print(ph, "Winamp not found.\n");
|
||||
zoitechat_print(ph, "Winamp not found.\n");
|
||||
}
|
||||
return HEXCHAT_EAT_ALL;
|
||||
}
|
||||
|
||||
int
|
||||
hexchat_plugin_init(hexchat_plugin *plugin_handle,
|
||||
zoitechat_plugin_init(zoitechat_plugin *plugin_handle,
|
||||
char **plugin_name,
|
||||
char **plugin_desc,
|
||||
char **plugin_version,
|
||||
char *arg)
|
||||
{
|
||||
/* we need to save this for use with any hexchat_* functions */
|
||||
/* we need to save this for use with any zoitechat_* functions */
|
||||
ph = plugin_handle;
|
||||
|
||||
*plugin_name = "Winamp";
|
||||
*plugin_desc = "Winamp plugin for HexChat";
|
||||
*plugin_desc = "Winamp plugin for ZoiteChat";
|
||||
*plugin_version = "0.6";
|
||||
|
||||
hexchat_hook_command (ph, "WINAMP", HEXCHAT_PRI_NORM, winamp, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START] - control Winamp or show what's currently playing", 0);
|
||||
hexchat_command (ph, "MENU -ishare\\music.png ADD \"Window/Display Current Song (Winamp)\" \"WINAMP\"");
|
||||
zoitechat_hook_command (ph, "WINAMP", HEXCHAT_PRI_NORM, winamp, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START] - control Winamp or show what's currently playing", 0);
|
||||
zoitechat_command (ph, "MENU -ishare\\music.png ADD \"Window/Display Current Song (Winamp)\" \"WINAMP\"");
|
||||
|
||||
hexchat_print (ph, "Winamp plugin loaded\n");
|
||||
zoitechat_print (ph, "Winamp plugin loaded\n");
|
||||
|
||||
return 1; /* return 1 for success */
|
||||
}
|
||||
|
||||
int
|
||||
hexchat_plugin_deinit(void)
|
||||
zoitechat_plugin_deinit(void)
|
||||
{
|
||||
hexchat_command (ph, "MENU DEL \"Window/Display Current Song (Winamp)\"");
|
||||
hexchat_print (ph, "Winamp plugin unloaded\n");
|
||||
zoitechat_command (ph, "MENU DEL \"Window/Display Current Song (Winamp)\"");
|
||||
zoitechat_print (ph, "Winamp plugin unloaded\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
EXPORTS
|
||||
hexchat_plugin_init
|
||||
hexchat_plugin_deinit
|
||||
zoitechat_plugin_init
|
||||
zoitechat_plugin_deinit
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\win32\hexchat.props" />
|
||||
<Import Project="..\..\win32\zoitechat.props" />
|
||||
<PropertyGroup>
|
||||
<TargetName>hcwinamp</TargetName>
|
||||
<OutDir>$(HexChatRel)plugins\</OutDir>
|
||||
<OutDir>$(ZoiteChatRel)plugins\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
|
||||
Reference in New Issue
Block a user