summary refs log tree commit diff stats
path: root/plugins/wmpa
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-10-30 08:42:48 +0100
committerBerke Viktor <bviktor@hexchat.org>2012-10-30 08:42:48 +0100
commite681eafa78262d0c177832d67900687f2c938081 (patch)
tree5668476e046c505b9f3fcc8c53b6e0971c146978 /plugins/wmpa
parent97dc13fde70810abf07985f45ac459560eae6e96 (diff)
Rebranding for the rest of plugin*
Diffstat (limited to 'plugins/wmpa')
-rw-r--r--plugins/wmpa/hexchat-plugin.cpp128
-rw-r--r--plugins/wmpa/hexchat-plugin.h236
-rw-r--r--plugins/wmpa/wmpa.def6
-rw-r--r--plugins/wmpa/wmpadialog.cpp12
4 files changed, 191 insertions, 191 deletions
diff --git a/plugins/wmpa/hexchat-plugin.cpp b/plugins/wmpa/hexchat-plugin.cpp
index 38f6456c..956218d2 100644
--- a/plugins/wmpa/hexchat-plugin.cpp
+++ b/plugins/wmpa/hexchat-plugin.cpp
@@ -18,14 +18,14 @@
 /******************************************************************
 * Globalss
 ******************************************************************/
-xchat_plugin *ph = NULL;
+hexchat_plugin *ph = NULL;
 CWMPPlayer4 *wmp;
 static const char subKey[] = "Software\\FlowerSoft\\WMPA";
 
 /******************************************************************
-* xchat_plugin_init
+* hexchat_plugin_init
 ******************************************************************/
-int xchat_plugin_init(xchat_plugin *plugin_handle,
+int hexchat_plugin_init(hexchat_plugin *plugin_handle,
                       char **plugin_name,
                       char **plugin_desc,
                       char **plugin_version,
@@ -42,75 +42,75 @@ int xchat_plugin_init(xchat_plugin *plugin_handle,
    // Show the song browser
    success = StartWindowsMediaPlayer();
    if (!success) {
-      xchat_printf(ph, "WMPA: Failed to show the song browser.");
-      xchat_printf(ph, "WMPA: Could not load plug-in version %s.", VER_STRING);
+      hexchat_printf(ph, "WMPA: Failed to show the song browser.");
+      hexchat_printf(ph, "WMPA: Could not load plug-in version %s.", VER_STRING);
       return(E_FAIL);
    }
 
    // Get a pointer to the Windows Media Player control
    wmp = GetWindowsMediaPlayer();
    if (wmp == NULL) {
-      xchat_printf(ph, "WMPA: Failed to get a pointer to the Windows Media Player interface.");
-      xchat_printf(ph, "WMPA: Could not load plug-in version %s.", VER_STRING);
+      hexchat_printf(ph, "WMPA: Failed to get a pointer to the Windows Media Player interface.");
+      hexchat_printf(ph, "WMPA: Could not load plug-in version %s.", VER_STRING);
       return(E_POINTER);
    }
 
    // Restore the settings (need wmp first)
    success = wmpaRestoreSettings();
    if (!success) {
-      xchat_printf(ph, "WMPA: Failed to restore the settings.");
+      hexchat_printf(ph, "WMPA: Failed to restore the settings.");
    }
 
-   xchat_hook_command(ph, "auto", HEXCHAT_PRI_NORM, wmpaAuto, 0, 0);
-   xchat_hook_command(ph, "curr", HEXCHAT_PRI_NORM, wmpaCurr, 0, 0);
-   xchat_hook_command(ph, "find", HEXCHAT_PRI_NORM, wmpaFind, 0, 0);
-   xchat_hook_command(ph, "slist", HEXCHAT_PRI_NORM, wmpaList, 0, 0);
-   xchat_hook_command(ph, "next", HEXCHAT_PRI_NORM, wmpaNext, 0, 0);
-   xchat_hook_command(ph, "play", HEXCHAT_PRI_NORM, wmpaPlay, 0, 0);
-   xchat_hook_command(ph, "pause", HEXCHAT_PRI_NORM, wmpaPause, 0, 0);
-   xchat_hook_command(ph, "prev", HEXCHAT_PRI_NORM, wmpaPrev, 0, 0);
-   xchat_hook_command(ph, "song", HEXCHAT_PRI_NORM, wmpaSong, 0, 0);
-   xchat_hook_command(ph, "stop", HEXCHAT_PRI_NORM, wmpaStop, 0, 0);
-   xchat_hook_command(ph, "volume", HEXCHAT_PRI_NORM, wmpaVolume, 0, 0);
-   xchat_hook_command(ph, "wmpahelp", HEXCHAT_PRI_NORM, wmpaHelp, 0, 0);
-
-   xchat_printf(ph, "WMPA %s successfully loaded.", VER_STRING);
+   hexchat_hook_command(ph, "auto", HEXCHAT_PRI_NORM, wmpaAuto, 0, 0);
+   hexchat_hook_command(ph, "curr", HEXCHAT_PRI_NORM, wmpaCurr, 0, 0);
+   hexchat_hook_command(ph, "find", HEXCHAT_PRI_NORM, wmpaFind, 0, 0);
+   hexchat_hook_command(ph, "slist", HEXCHAT_PRI_NORM, wmpaList, 0, 0);
+   hexchat_hook_command(ph, "next", HEXCHAT_PRI_NORM, wmpaNext, 0, 0);
+   hexchat_hook_command(ph, "play", HEXCHAT_PRI_NORM, wmpaPlay, 0, 0);
+   hexchat_hook_command(ph, "pause", HEXCHAT_PRI_NORM, wmpaPause, 0, 0);
+   hexchat_hook_command(ph, "prev", HEXCHAT_PRI_NORM, wmpaPrev, 0, 0);
+   hexchat_hook_command(ph, "song", HEXCHAT_PRI_NORM, wmpaSong, 0, 0);
+   hexchat_hook_command(ph, "stop", HEXCHAT_PRI_NORM, wmpaStop, 0, 0);
+   hexchat_hook_command(ph, "volume", HEXCHAT_PRI_NORM, wmpaVolume, 0, 0);
+   hexchat_hook_command(ph, "wmpahelp", HEXCHAT_PRI_NORM, wmpaHelp, 0, 0);
+
+   hexchat_printf(ph, "WMPA %s successfully loaded.", VER_STRING);
    wmpaCommands();
-   xchat_printf(ph, "WMPA: e-mail me if you find any bugs: dcullen@intergate.com");
+   hexchat_printf(ph, "WMPA: e-mail me if you find any bugs: dcullen@intergate.com");
 
    return 1;
 }
 
 /******************************************************************
-* xchat_plugin_deinit
+* hexchat_plugin_deinit
 ******************************************************************/
-int xchat_plugin_deinit(void)
+int hexchat_plugin_deinit(void)
 {
    BOOL success;
 
-   xchat_printf(ph, "WMPA %s is unloading.", VER_STRING);
+   hexchat_printf(ph, "WMPA %s is unloading.", VER_STRING);
 
    // Save the settings
    success = wmpaSaveSettings();
    if (!success) {
-      xchat_printf(ph, "WMPA: Failed to save the settings.");
+      hexchat_printf(ph, "WMPA: Failed to save the settings.");
    }
 
    wmp = NULL;
 
    BOOL result = StopWindowsMediaPlayer();
    if (!result) {
-      xchat_printf(ph, "WMPA could not shut down Windows Media Player.");
+      hexchat_printf(ph, "WMPA could not shut down Windows Media Player.");
    }
 
-   xchat_printf(ph, "WMPA %s has unloaded.", VER_STRING);
+   hexchat_printf(ph, "WMPA %s has unloaded.", VER_STRING);
    return 1;
 }
 
 /******************************************************************
-* xchat_plugin_get_info
+* hexchat_plugin_get_info
 ******************************************************************/
-void xchat_plugin_get_info(char **name, char **desc, char **version, void **reserved)
+void hexchat_plugin_get_info(char **name, char **desc, char **version, void **reserved)
 {
    *name = "WMPA";
    *desc = "Announce the current song from Windows Media Player.";
@@ -123,18 +123,18 @@ void xchat_plugin_get_info(char **name, char **desc, char **version, void **rese
 ******************************************************************/
 void wmpaCommands(void)
 {
-   xchat_printf(ph, "WMPA: /auto [on/off]   : Turn on/off auto announce of the current song or display the current setting");
-   xchat_printf(ph, "WMPA: /curr            : Tell what song is currently playing");
-   xchat_printf(ph, "WMPA: /find [word]     : Find songs with \"word\" in their title, create a new playlist, and play it");
-   xchat_printf(ph, "WMPA: /slist [word]    : List songs with \"word\" in their title");
-   xchat_printf(ph, "WMPA: /next            : Play the next song");
-   xchat_printf(ph, "WMPA: /play            : Play the current song");
-   xchat_printf(ph, "WMPA: /pause           : Pause the current song");
-   xchat_printf(ph, "WMPA: /prev            : Play the previous song");
-   xchat_printf(ph, "WMPA: /song            : Announce the current song from Windows Media Player in HexChat");
-   xchat_printf(ph, "WMPA: /stop            : Stop the current song");
-   xchat_printf(ph, "WMPA: /volume [volume] : Set the volume (0 to 100) or display the current volume");
-   xchat_printf(ph, "WMPA: /wmpahelp        : Display this help.");
+   hexchat_printf(ph, "WMPA: /auto [on/off]   : Turn on/off auto announce of the current song or display the current setting");
+   hexchat_printf(ph, "WMPA: /curr            : Tell what song is currently playing");
+   hexchat_printf(ph, "WMPA: /find [word]     : Find songs with \"word\" in their title, create a new playlist, and play it");
+   hexchat_printf(ph, "WMPA: /slist [word]    : List songs with \"word\" in their title");
+   hexchat_printf(ph, "WMPA: /next            : Play the next song");
+   hexchat_printf(ph, "WMPA: /play            : Play the current song");
+   hexchat_printf(ph, "WMPA: /pause           : Pause the current song");
+   hexchat_printf(ph, "WMPA: /prev            : Play the previous song");
+   hexchat_printf(ph, "WMPA: /song            : Announce the current song from Windows Media Player in HexChat");
+   hexchat_printf(ph, "WMPA: /stop            : Stop the current song");
+   hexchat_printf(ph, "WMPA: /volume [volume] : Set the volume (0 to 100) or display the current volume");
+   hexchat_printf(ph, "WMPA: /wmpahelp        : Display this help.");
 }
 
 /******************************************************************
@@ -167,7 +167,7 @@ int wmpaAuto(char *word[], char *word_eol[], void *user_data)
       wmpaSaveSettings();
    }
 
-   xchat_printf(ph, "WMPA: auto is %s", state);
+   hexchat_printf(ph, "WMPA: auto is %s", state);
 
    return(HEXCHAT_EAT_ALL);
 }
@@ -177,7 +177,7 @@ int wmpaAuto(char *word[], char *word_eol[], void *user_data)
 ******************************************************************/
 int wmpaCurr(char *word[], char *word_eol[], void *user_data)
 {
-   xchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
+   hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
 
    return(HEXCHAT_EAT_ALL);
 }
@@ -224,10 +224,10 @@ int wmpaFind(char *word[], char *word_eol[], void *user_data)
       }
 
       if (found > 0) {
-         xchat_printf(ph, "WMPA: Found %d songs with \"%s\" in them", found, word_eol[2]);
+         hexchat_printf(ph, "WMPA: Found %d songs with \"%s\" in them", found, word_eol[2]);
          wmp->SetCurrentPlaylist(playlist);
          wmp->GetControls().play();
-         xchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
+         hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
 
          CWMPADialog *dialog = GetWMPADialog();
          if (dialog != NULL) {
@@ -238,7 +238,7 @@ int wmpaFind(char *word[], char *word_eol[], void *user_data)
 
       }
       else {
-         xchat_printf(ph, "WMPA: Could not find %s", word_eol[2]);
+         hexchat_printf(ph, "WMPA: Could not find %s", word_eol[2]);
       }
 
    }
@@ -256,7 +256,7 @@ int wmpaList(char *word[], char *word_eol[], void *user_data)
    long found;
 
    if (wmp != NULL) {
-      xchat_printf(ph, "WMPA: Listing songs with \"%s\" in them", word_eol[2]);
+      hexchat_printf(ph, "WMPA: Listing songs with \"%s\" in them", word_eol[2]);
 
       CWMPMediaCollection mc = wmp->GetMediaCollection();
       CWMPPlaylist all = mc.getAll();
@@ -272,19 +272,19 @@ int wmpaList(char *word[], char *word_eol[], void *user_data)
          if ( (artist.Find(word_eol[2]) != -1) ||
               (title.Find(word_eol[2])  != -1) ||
               (album.Find(word_eol[2])  != -1) ) {
-            xchat_printf(ph, "WMPA: Found \"%s - %s (%s)\"", artist, title, album);
+            hexchat_printf(ph, "WMPA: Found \"%s - %s (%s)\"", artist, title, album);
             found++;
          }
       }
 
       if (found > 0) {
          if (found == 1)
-            xchat_printf(ph, "WMPA: Found %d song with \"%s\" in it", found, word_eol[2]);
+            hexchat_printf(ph, "WMPA: Found %d song with \"%s\" in it", found, word_eol[2]);
          else
-            xchat_printf(ph, "WMPA: Found %d songs with \"%s\" in them", found, word_eol[2]);
+            hexchat_printf(ph, "WMPA: Found %d songs with \"%s\" in them", found, word_eol[2]);
       }
       else {
-         xchat_printf(ph, "WMPA: Could not find any songs with \"%s\" in them", word_eol[2]);
+         hexchat_printf(ph, "WMPA: Could not find any songs with \"%s\" in them", word_eol[2]);
       }
 
    }
@@ -299,7 +299,7 @@ int wmpaNext(char *word[], char *word_eol[], void *user_data)
 {
    if (wmp != NULL) {
       wmp->GetControls().next();
-      xchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
+      hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
    }
    return(HEXCHAT_EAT_ALL);
 }
@@ -311,7 +311,7 @@ int wmpaPlay(char *word[], char *word_eol[], void *user_data)
 {
    if (wmp != NULL) {
       wmp->GetControls().play();
-      xchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
+      hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
    }
    return(HEXCHAT_EAT_ALL);
 }
@@ -323,7 +323,7 @@ int wmpaPause(char *word[], char *word_eol[], void *user_data)
 {
    if (wmp != NULL) {
       wmp->GetControls().pause();
-      xchat_printf(ph, "WMPA: Pausing %s", (LPCTSTR) wmpaGetSongTitle());
+      hexchat_printf(ph, "WMPA: Pausing %s", (LPCTSTR) wmpaGetSongTitle());
    }
    return(HEXCHAT_EAT_ALL);
 }
@@ -335,7 +335,7 @@ int wmpaPrev(char *word[], char *word_eol[], void *user_data)
 {
    if (wmp != NULL) {
       wmp->GetControls().previous();
-      xchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
+      hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());
    }
    return(HEXCHAT_EAT_ALL);
 }
@@ -347,7 +347,7 @@ int wmpaSong(char *word[], char *word_eol[], void *user_data)
 {
    CString songTitle = wmpaGetSongTitle();
 
-   xchat_commandf(ph, "me is playing %s", (LPCTSTR) songTitle);
+   hexchat_commandf(ph, "me is playing %s", (LPCTSTR) songTitle);
 
    return(HEXCHAT_EAT_ALL);
 }
@@ -359,7 +359,7 @@ int wmpaStop(char *word[], char *word_eol[], void *user_data)
 {
    if (wmp != NULL) {
       wmp->GetControls().stop();
-      xchat_printf(ph, "WMPA: Stopping %s", (LPCTSTR) wmpaGetSongTitle());
+      hexchat_printf(ph, "WMPA: Stopping %s", (LPCTSTR) wmpaGetSongTitle());
    }
    return(HEXCHAT_EAT_ALL);
 }
@@ -369,10 +369,10 @@ int wmpaStop(char *word[], char *word_eol[], void *user_data)
 ******************************************************************/
 int wmpaHelp(char *word[], char *word_eol[], void *user_data)
 {
-   xchat_printf(ph, "\n");
-   xchat_printf(ph, "WMPA %s Help", VER_STRING);
+   hexchat_printf(ph, "\n");
+   hexchat_printf(ph, "WMPA %s Help", VER_STRING);
    wmpaCommands();
-   xchat_printf(ph, "\n");
+   hexchat_printf(ph, "\n");
 
    return(HEXCHAT_EAT_ALL);
 }
@@ -397,7 +397,7 @@ int wmpaVolume(char *word[], char *word_eol[], void *user_data)
       }
    }
 
-   xchat_printf(ph, "WMPA: volume is %d", volume);
+   hexchat_printf(ph, "WMPA: volume is %d", volume);
 
    return(HEXCHAT_EAT_ALL);
 }
@@ -471,7 +471,7 @@ CString wmpaGetSongTitle(void)
 
    CWMPMedia media      = wmp->GetCurrentMedia();
    if (media == NULL) {
-      xchat_printf(ph, "WMPA: Could not get current media");
+      hexchat_printf(ph, "WMPA: Could not get current media");
       return(HEXCHAT_EAT_ALL);
    }
 
diff --git a/plugins/wmpa/hexchat-plugin.h b/plugins/wmpa/hexchat-plugin.h
index 2046a379..934c070e 100644
--- a/plugins/wmpa/hexchat-plugin.h
+++ b/plugins/wmpa/hexchat-plugin.h
@@ -30,230 +30,230 @@ extern "C" {
 #endif
 
 
-   typedef struct _xchat_plugin xchat_plugin;
-   typedef struct _xchat_list xchat_list;
-   typedef struct _xchat_hook xchat_hook;
+   typedef struct _hexchat_plugin hexchat_plugin;
+   typedef struct _hexchat_list hexchat_list;
+   typedef struct _hexchat_hook hexchat_hook;
 #ifndef PLUGIN_C
-   typedef struct _xchat_context xchat_context;
+   typedef struct _hexchat_context hexchat_context;
 #endif
 
 #ifndef PLUGIN_C
-   struct _xchat_plugin {
+   struct _hexchat_plugin {
       /* these are only used on win32 */
-      xchat_hook *(*xchat_hook_command) (xchat_plugin *ph,
+      hexchat_hook *(*hexchat_hook_command) (hexchat_plugin *ph,
                                          const char *name,
                                          int pri,
                                          int (*callback) (char *word[], char *word_eol[], void *user_data),
                                          const char *help_text,
                                          void *userdata);
-      xchat_hook *(*xchat_hook_server) (xchat_plugin *ph,
+      hexchat_hook *(*hexchat_hook_server) (hexchat_plugin *ph,
                                         const char *name,
                                         int pri,
                                         int (*callback) (char *word[], char *word_eol[], void *user_data),
                                         void *userdata);
-      xchat_hook *(*xchat_hook_print) (xchat_plugin *ph,
+      hexchat_hook *(*hexchat_hook_print) (hexchat_plugin *ph,
                                        const char *name,
                                        int pri,
                                        int (*callback) (char *word[], void *user_data),
                                        void *userdata);
-      xchat_hook *(*xchat_hook_timer) (xchat_plugin *ph,
+      hexchat_hook *(*hexchat_hook_timer) (hexchat_plugin *ph,
                                        int timeout,
                                        int (*callback) (void *user_data),
                                        void *userdata);
-      xchat_hook *(*xchat_hook_fd) (xchat_plugin *ph,
+      hexchat_hook *(*hexchat_hook_fd) (hexchat_plugin *ph,
                                     int fd,
                                     int flags,
                                     int (*callback) (int fd, int flags, void *user_data),
                                     void *userdata);
-      void *(*xchat_unhook) (xchat_plugin *ph,
-                             xchat_hook *hook);
-      void (*xchat_print) (xchat_plugin *ph,
+      void *(*hexchat_unhook) (hexchat_plugin *ph,
+                             hexchat_hook *hook);
+      void (*hexchat_print) (hexchat_plugin *ph,
                            const char *text);
-      void (*xchat_printf) (xchat_plugin *ph,
+      void (*hexchat_printf) (hexchat_plugin *ph,
                             const char *format, ...);
-      void (*xchat_command) (xchat_plugin *ph,
+      void (*hexchat_command) (hexchat_plugin *ph,
                              const char *command);
-      void (*xchat_commandf) (xchat_plugin *ph,
+      void (*hexchat_commandf) (hexchat_plugin *ph,
                               const char *format, ...);
-      int (*xchat_nickcmp) (xchat_plugin *ph,
+      int (*hexchat_nickcmp) (hexchat_plugin *ph,
                             const char *s1,
                             const char *s2);
-      int (*xchat_set_context) (xchat_plugin *ph,
-                                xchat_context *ctx);
-      xchat_context *(*xchat_find_context) (xchat_plugin *ph,
+      int (*hexchat_set_context) (hexchat_plugin *ph,
+                                hexchat_context *ctx);
+      hexchat_context *(*hexchat_find_context) (hexchat_plugin *ph,
                                             const char *servname,
                                             const char *channel);
-      xchat_context *(*xchat_get_context) (xchat_plugin *ph);
-      const char *(*xchat_get_info) (xchat_plugin *ph,
+      hexchat_context *(*hexchat_get_context) (hexchat_plugin *ph);
+      const char *(*hexchat_get_info) (hexchat_plugin *ph,
                                      const char *id);
-      int (*xchat_get_prefs) (xchat_plugin *ph,
+      int (*xchat_get_prefs) (hexchat_plugin *ph,
                               const char *name,
                               const char **string,
                               int *integer);
-      xchat_list * (*xchat_list_get) (xchat_plugin *ph,
+      hexchat_list * (*hexchat_list_get) (hexchat_plugin *ph,
                                       const char *name);
-      void (*xchat_list_free) (xchat_plugin *ph,
-                               xchat_list *xlist);
-      const char * const * (*xchat_list_fields) (xchat_plugin *ph,
+      void (*hexchat_list_free) (hexchat_plugin *ph,
+                               hexchat_list *xlist);
+      const char * const * (*hexchat_list_fields) (hexchat_plugin *ph,
                                                  const char *name);
-      int (*xchat_list_next) (xchat_plugin *ph,
-                              xchat_list *xlist);
-      const char * (*xchat_list_str) (xchat_plugin *ph,
-                                      xchat_list *xlist,
+      int (*hexchat_list_next) (hexchat_plugin *ph,
+                              hexchat_list *xlist);
+      const char * (*hexchat_list_str) (hexchat_plugin *ph,
+                                      hexchat_list *xlist,
                                       const char *name);
-      int (*xchat_list_int) (xchat_plugin *ph,
-                             xchat_list *xlist,
+      int (*hexchat_list_int) (hexchat_plugin *ph,
+                             hexchat_list *xlist,
                              const char *name);
-      void * (*xchat_plugingui_add) (xchat_plugin *ph,
+      void * (*hexchat_plugingui_add) (hexchat_plugin *ph,
                                      const char *filename,
                                      const char *name,
                                      const char *desc,
                                      const char *version,
                                      char *reserved);
-      void (*xchat_plugingui_remove) (xchat_plugin *ph,
+      void (*hexchat_plugingui_remove) (hexchat_plugin *ph,
                                       void *handle);
-      int (*xchat_emit_print) (xchat_plugin *ph,
+      int (*hexchat_emit_print) (hexchat_plugin *ph,
                                const char *event_name, ...);
-      int (*xchat_read_fd) (xchat_plugin *ph,
+      int (*xchat_read_fd) (hexchat_plugin *ph,
                             void *src,
                             char *buf,
                             int *len);
-      time_t (*xchat_list_time) (xchat_plugin *ph,
-                                 xchat_list *xlist,
+      time_t (*hexchat_list_time) (hexchat_plugin *ph,
+                                 hexchat_list *xlist,
                                  const char *name);
-      char *(*xchat_gettext) (xchat_plugin *ph,
+      char *(*hexchat_gettext) (hexchat_plugin *ph,
                               const char *msgid);
-      void (*xchat_send_modes) (xchat_plugin *ph,
+      void (*hexchat_send_modes) (hexchat_plugin *ph,
                                 const char **targets,
                                 int ntargets,
                                 int modes_per_line,
                                 char sign,
                                 char mode);
-      char *(*xchat_strip) (xchat_plugin *ph,
+      char *(*hexchat_strip) (hexchat_plugin *ph,
                             const char *str,
                             int len,
                             int flags);
-      void (*xchat_free) (xchat_plugin *ph,
+      void (*hexchat_free) (hexchat_plugin *ph,
                           void *ptr);
    };
 #endif
 
 
-   xchat_hook *
-   xchat_hook_command (xchat_plugin *ph,
+   hexchat_hook *
+   hexchat_hook_command (hexchat_plugin *ph,
                        const char *name,
                        int pri,
                        int (*callback) (char *word[], char *word_eol[], void *user_data),
                        const char *help_text,
                        void *userdata);
 
-   xchat_hook *
-   xchat_hook_server (xchat_plugin *ph,
+   hexchat_hook *
+   hexchat_hook_server (hexchat_plugin *ph,
                       const char *name,
                       int pri,
                       int (*callback) (char *word[], char *word_eol[], void *user_data),
                       void *userdata);
 
-   xchat_hook *
-   xchat_hook_print (xchat_plugin *ph,
+   hexchat_hook *
+   hexchat_hook_print (hexchat_plugin *ph,
                      const char *name,
                      int pri,
                      int (*callback) (char *word[], void *user_data),
                      void *userdata);
 
-   xchat_hook *
-   xchat_hook_timer (xchat_plugin *ph,
+   hexchat_hook *
+   hexchat_hook_timer (hexchat_plugin *ph,
                      int timeout,
                      int (*callback) (void *user_data),
                      void *userdata);
 
-   xchat_hook *
-   xchat_hook_fd (xchat_plugin *ph,
+   hexchat_hook *
+   hexchat_hook_fd (hexchat_plugin *ph,
                   int fd,
                   int flags,
                   int (*callback) (int fd, int flags, void *user_data),
                   void *userdata);
 
    void *
-   xchat_unhook (xchat_plugin *ph,
-                 xchat_hook *hook);
+   hexchat_unhook (hexchat_plugin *ph,
+                 hexchat_hook *hook);
 
    void
-   xchat_print (xchat_plugin *ph,
+   hexchat_print (hexchat_plugin *ph,
                 const char *text);
 
    void
-   xchat_printf (xchat_plugin *ph,
+   hexchat_printf (hexchat_plugin *ph,
                  const char *format, ...);
 
    void
-   xchat_command (xchat_plugin *ph,
+   hexchat_command (hexchat_plugin *ph,
                   const char *command);
 
    void
-   xchat_commandf (xchat_plugin *ph,
+   hexchat_commandf (hexchat_plugin *ph,
                    const char *format, ...);
 
    int
-   xchat_nickcmp (xchat_plugin *ph,
+   hexchat_nickcmp (hexchat_plugin *ph,
                   const char *s1,
                   const char *s2);
 
    int
-   xchat_set_context (xchat_plugin *ph,
-                      xchat_context *ctx);
+   hexchat_set_context (hexchat_plugin *ph,
+                      hexchat_context *ctx);
 
-   xchat_context *
-   xchat_find_context (xchat_plugin *ph,
+   hexchat_context *
+   hexchat_find_context (hexchat_plugin *ph,
                        const char *servname,
                        const char *channel);
 
-   xchat_context *
-   xchat_get_context (xchat_plugin *ph);
+   hexchat_context *
+   hexchat_get_context (hexchat_plugin *ph);
 
    const char *
-   xchat_get_info (xchat_plugin *ph,
+   hexchat_get_info (hexchat_plugin *ph,
                    const char *id);
 
    int
-   xchat_get_prefs (xchat_plugin *ph,
+   xchat_get_prefs (hexchat_plugin *ph,
                     const char *name,
                     const char **string,
                     int *integer);
 
-   xchat_list *
-   xchat_list_get (xchat_plugin *ph,
+   hexchat_list *
+   hexchat_list_get (hexchat_plugin *ph,
                    const char *name);
 
    void
-   xchat_list_free (xchat_plugin *ph,
-                    xchat_list *xlist);
+   hexchat_list_free (hexchat_plugin *ph,
+                    hexchat_list *xlist);
 
    const char * const *
-   xchat_list_fields (xchat_plugin *ph,
+   hexchat_list_fields (hexchat_plugin *ph,
                       const char *name);
 
    int
-   xchat_list_next (xchat_plugin *ph,
-                    xchat_list *xlist);
+   hexchat_list_next (hexchat_plugin *ph,
+                    hexchat_list *xlist);
 
    const char *
-   xchat_list_str (xchat_plugin *ph,
-                   xchat_list *xlist,
+   hexchat_list_str (hexchat_plugin *ph,
+                   hexchat_list *xlist,
                    const char *name);
 
    int
-   xchat_list_int (xchat_plugin *ph,
-                   xchat_list *xlist,
+   hexchat_list_int (hexchat_plugin *ph,
+                   hexchat_list *xlist,
                    const char *name);
 
    time_t
-   xchat_list_time (xchat_plugin *ph,
-                    xchat_list *xlist,
+   hexchat_list_time (hexchat_plugin *ph,
+                    hexchat_list *xlist,
                     const char *name);
 
    void *
-   xchat_plugingui_add (xchat_plugin *ph,
+   hexchat_plugingui_add (hexchat_plugin *ph,
                         const char *filename,
                         const char *name,
                         const char *desc,
@@ -261,19 +261,19 @@ extern "C" {
                         char *reserved);
 
    void
-   xchat_plugingui_remove (xchat_plugin *ph,
+   hexchat_plugingui_remove (hexchat_plugin *ph,
                            void *handle);
 
    int
-   xchat_emit_print (xchat_plugin *ph,
+   hexchat_emit_print (hexchat_plugin *ph,
                      const char *event_name, ...);
 
    char *
-   xchat_gettext (xchat_plugin *ph,
+   hexchat_gettext (hexchat_plugin *ph,
                   const char *msgid);
 
    void
-   xchat_send_modes (xchat_plugin *ph,
+   hexchat_send_modes (hexchat_plugin *ph,
                      const char **targets,
                      int ntargets,
                      int modes_per_line,
@@ -281,49 +281,49 @@ extern "C" {
                      char mode);
 
    char *
-   xchat_strip (xchat_plugin *ph,
+   hexchat_strip (hexchat_plugin *ph,
                 const char *str,
                 int len,
                 int flags);
 
    void
-   xchat_free (xchat_plugin *ph,
+   hexchat_free (hexchat_plugin *ph,
                void *ptr);
 
 #if !defined(PLUGIN_C) && defined(WIN32)
 #ifndef HEXCHAT_PLUGIN_HANDLE
 #define HEXCHAT_PLUGIN_HANDLE (ph)
 #endif
-#define xchat_hook_command ((HEXCHAT_PLUGIN_HANDLE)->xchat_hook_command)
-#define xchat_hook_server ((HEXCHAT_PLUGIN_HANDLE)->xchat_hook_server)
-#define xchat_hook_print ((HEXCHAT_PLUGIN_HANDLE)->xchat_hook_print)
-#define xchat_hook_timer ((HEXCHAT_PLUGIN_HANDLE)->xchat_hook_timer)
-#define xchat_hook_fd ((HEXCHAT_PLUGIN_HANDLE)->xchat_hook_fd)
-#define xchat_unhook ((HEXCHAT_PLUGIN_HANDLE)->xchat_unhook)
-#define xchat_print ((HEXCHAT_PLUGIN_HANDLE)->xchat_print)
-#define xchat_printf ((HEXCHAT_PLUGIN_HANDLE)->xchat_printf)
-#define xchat_command ((HEXCHAT_PLUGIN_HANDLE)->xchat_command)
-#define xchat_commandf ((HEXCHAT_PLUGIN_HANDLE)->xchat_commandf)
-#define xchat_nickcmp ((HEXCHAT_PLUGIN_HANDLE)->xchat_nickcmp)
-#define xchat_set_context ((HEXCHAT_PLUGIN_HANDLE)->xchat_set_context)
-#define xchat_find_context ((HEXCHAT_PLUGIN_HANDLE)->xchat_find_context)
-#define xchat_get_context ((HEXCHAT_PLUGIN_HANDLE)->xchat_get_context)
-#define xchat_get_info ((HEXCHAT_PLUGIN_HANDLE)->xchat_get_info)
+#define hexchat_hook_command ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_command)
+#define hexchat_hook_server ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_server)
+#define hexchat_hook_print ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_print)
+#define hexchat_hook_timer ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_timer)
+#define hexchat_hook_fd ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_fd)
+#define hexchat_unhook ((HEXCHAT_PLUGIN_HANDLE)->hexchat_unhook)
+#define hexchat_print ((HEXCHAT_PLUGIN_HANDLE)->hexchat_print)
+#define hexchat_printf ((HEXCHAT_PLUGIN_HANDLE)->hexchat_printf)
+#define hexchat_command ((HEXCHAT_PLUGIN_HANDLE)->hexchat_command)
+#define hexchat_commandf ((HEXCHAT_PLUGIN_HANDLE)->hexchat_commandf)
+#define hexchat_nickcmp ((HEXCHAT_PLUGIN_HANDLE)->hexchat_nickcmp)
+#define hexchat_set_context ((HEXCHAT_PLUGIN_HANDLE)->hexchat_set_context)
+#define hexchat_find_context ((HEXCHAT_PLUGIN_HANDLE)->hexchat_find_context)
+#define hexchat_get_context ((HEXCHAT_PLUGIN_HANDLE)->hexchat_get_context)
+#define hexchat_get_info ((HEXCHAT_PLUGIN_HANDLE)->hexchat_get_info)
 #define xchat_get_prefs ((HEXCHAT_PLUGIN_HANDLE)->xchat_get_prefs)
-#define xchat_list_get ((HEXCHAT_PLUGIN_HANDLE)->xchat_list_get)
-#define xchat_list_free ((HEXCHAT_PLUGIN_HANDLE)->xchat_list_free)
-#define xchat_list_fields ((HEXCHAT_PLUGIN_HANDLE)->xchat_list_fields)
-#define xchat_list_str ((HEXCHAT_PLUGIN_HANDLE)->xchat_list_str)
-#define xchat_list_int ((HEXCHAT_PLUGIN_HANDLE)->xchat_list_int)
-#define xchat_list_time ((HEXCHAT_PLUGIN_HANDLE)->xchat_list_time)
-#define xchat_list_next ((HEXCHAT_PLUGIN_HANDLE)->xchat_list_next)
-#define xchat_plugingui_add ((HEXCHAT_PLUGIN_HANDLE)->xchat_plugingui_add)
-#define xchat_plugingui_remove ((HEXCHAT_PLUGIN_HANDLE)->xchat_plugingui_remove)
-#define xchat_emit_print ((HEXCHAT_PLUGIN_HANDLE)->xchat_emit_print)
-#define xchat_gettext ((HEXCHAT_PLUGIN_HANDLE)->xchat_gettext)
-#define xchat_send_modes ((HEXCHAT_PLUGIN_HANDLE)->xchat_send_modes)
-#define xchat_strip ((HEXCHAT_PLUGIN_HANDLE)->xchat_strip)
-#define xchat_free ((HEXCHAT_PLUGIN_HANDLE)->xchat_free)
+#define hexchat_list_get ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_get)
+#define hexchat_list_free ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_free)
+#define hexchat_list_fields ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_fields)
+#define hexchat_list_str ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_str)
+#define hexchat_list_int ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_int)
+#define hexchat_list_time ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_time)
+#define hexchat_list_next ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_next)
+#define hexchat_plugingui_add ((HEXCHAT_PLUGIN_HANDLE)->hexchat_plugingui_add)
+#define hexchat_plugingui_remove ((HEXCHAT_PLUGIN_HANDLE)->hexchat_plugingui_remove)
+#define hexchat_emit_print ((HEXCHAT_PLUGIN_HANDLE)->hexchat_emit_print)
+#define hexchat_gettext ((HEXCHAT_PLUGIN_HANDLE)->hexchat_gettext)
+#define hexchat_send_modes ((HEXCHAT_PLUGIN_HANDLE)->hexchat_send_modes)
+#define hexchat_strip ((HEXCHAT_PLUGIN_HANDLE)->hexchat_strip)
+#define hexchat_free ((HEXCHAT_PLUGIN_HANDLE)->hexchat_free)
 #endif
 
 #ifdef __cplusplus
@@ -333,7 +333,7 @@ extern "C" {
 /******************************************************************
 * Globals
 ******************************************************************/
-extern xchat_plugin *ph;
+extern hexchat_plugin *ph;
 
 /******************************************************************
 * Prototypes
diff --git a/plugins/wmpa/wmpa.def b/plugins/wmpa/wmpa.def
index d0a3b042..97f5e475 100644
--- a/plugins/wmpa/wmpa.def
+++ b/plugins/wmpa/wmpa.def
@@ -7,9 +7,9 @@ EXPORTS
     DllCanUnloadNow PRIVATE

     DllGetClassObject PRIVATE

     DllRegisterServer PRIVATE

-    xchat_plugin_init

-    xchat_plugin_deinit

-    xchat_plugin_get_info

+    hexchat_plugin_init

+    hexchat_plugin_deinit

+    hexchat_plugin_get_info

     StartWindowsMediaPlayer

     GetWindowsMediaPlayer

     GetWMPADialog

diff --git a/plugins/wmpa/wmpadialog.cpp b/plugins/wmpa/wmpadialog.cpp
index 90bae309..28d33c93 100644
--- a/plugins/wmpa/wmpadialog.cpp
+++ b/plugins/wmpa/wmpadialog.cpp
@@ -108,10 +108,10 @@ void CWMPADialog::OnDblclkPlaylist()
 

    m_WMP.GetControls().play();

    if (autoAnnounce) {

-      xchat_commandf(ph, "me is playing %s", (LPCTSTR) wmpaGetSongTitle());

+      hexchat_commandf(ph, "me is playing %s", (LPCTSTR) wmpaGetSongTitle());

    }

    else {

-      xchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());

+      hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());

    }

 }

 

@@ -195,10 +195,10 @@ void CWMPADialog::OnDblclkSonglist()
    int index = m_SongListBox.GetCurSel();

    m_WMP.GetControls().playItem(m_WMP.GetCurrentPlaylist().GetItem(index));

    if (autoAnnounce) {

-      xchat_commandf(ph, "me is playing %s", (LPCTSTR) wmpaGetSongTitle());

+      hexchat_commandf(ph, "me is playing %s", (LPCTSTR) wmpaGetSongTitle());

    }

    else {

-      xchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());

+      hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());

    }

 }

 

@@ -216,10 +216,10 @@ void CWMPADialog::OnCurrentItemChangeWmp(LPDISPATCH pdispMedia)
    int state = m_WMP.GetPlayState();

    if (state == 3) { // Playing

       if (autoAnnounce) {

-         xchat_commandf(ph, "me is playing %s", (LPCTSTR) wmpaGetSongTitle());

+         hexchat_commandf(ph, "me is playing %s", (LPCTSTR) wmpaGetSongTitle());

       }

       else {

-         xchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());

+         hexchat_printf(ph, "WMPA: Playing %s", (LPCTSTR) wmpaGetSongTitle());

       }

    }