summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/cfgfiles.c6
-rw-r--r--src/common/cfgfiles.h4
-rw-r--r--src/common/chanopt.c4
-rw-r--r--src/common/dbus/dbus-client.c2
-rw-r--r--src/common/dbus/dbus-client.h2
-rw-r--r--src/common/dbus/dbus-plugin.h4
-rw-r--r--src/common/dbus/example.py24
-rw-r--r--src/common/dcc.c6
-rw-r--r--src/common/fe.h4
-rw-r--r--src/common/hexchat-plugin.h4
-rw-r--r--src/common/hexchat.c44
-rw-r--r--src/common/hexchat.h20
-rw-r--r--src/common/hexchatc.h8
-rw-r--r--src/common/identd.c2
-rw-r--r--src/common/ignore.c4
-rw-r--r--src/common/notify.c8
-rw-r--r--src/common/outbound.c12
-rw-r--r--src/common/plugin-timer.c2
-rw-r--r--src/common/plugin.c32
-rw-r--r--src/common/plugin.h10
-rw-r--r--src/common/proto-irc.c2
-rw-r--r--src/common/servlist.c4
-rw-r--r--src/common/text.c20
-rw-r--r--src/common/url.c8
-rw-r--r--src/common/util.c36
25 files changed, 136 insertions, 136 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index 79205ece..a8865cf9 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -346,7 +346,7 @@ char *
 get_xdir_utf8 (void)
 {
 	if (!xdir_utf)	/* never free this, keep it for program life time */
-		xdir_utf = xchat_filename_to_utf8 (get_xdir_fs (), -1, 0, 0, 0);
+		xdir_utf = hexchat_filename_to_utf8 (get_xdir_fs (), -1, 0, 0, 0);
 
 	return xdir_utf;
 }
@@ -1172,7 +1172,7 @@ cmd_set (struct session *sess, char *tbuf, char *word[], char *word_eol[])
 }
 
 int
-xchat_open_file (char *file, int flags, int mode, int xof_flags)
+hexchat_open_file (char *file, int flags, int mode, int xof_flags)
 {
 	char buf[1024];
 
@@ -1192,7 +1192,7 @@ xchat_open_file (char *file, int flags, int mode, int xof_flags)
 }
 
 FILE *
-xchat_fopen_file (const char *file, const char *mode, int xof_flags)
+hexchat_fopen_file (const char *file, const char *mode, int xof_flags)
 {
 	char buf[1024];
 
diff --git a/src/common/cfgfiles.h b/src/common/cfgfiles.h
index 2677562f..d0062304 100644
--- a/src/common/cfgfiles.h
+++ b/src/common/cfgfiles.h
@@ -24,8 +24,8 @@ void list_loadconf (char *file, GSList ** list, char *defaultconf);
 int list_delentry (GSList ** list, char *name);
 void list_addentry (GSList ** list, char *cmd, char *name);
 int cmd_set (session *sess, char *tbuf, char *word[], char *word_eol[]);
-int xchat_open_file (char *file, int flags, int mode, int xof_flags);
-FILE *xchat_fopen_file (const char *file, const char *mode, int xof_flags);
+int hexchat_open_file (char *file, int flags, int mode, int xof_flags);
+FILE *hexchat_fopen_file (const char *file, const char *mode, int xof_flags);
 #define XOF_DOMODE 1
 #define XOF_FULLPATH 2
 
diff --git a/src/common/chanopt.c b/src/common/chanopt.c
index d6d47fb2..c0382000 100644
--- a/src/common/chanopt.c
+++ b/src/common/chanopt.c
@@ -244,7 +244,7 @@ chanopt_load_all (void)
 	chanopt_in_memory *current = NULL;
 
 	/* 1. load the old file into our GSList */
-	fh = xchat_open_file ("chanopt.conf", O_RDONLY, 0, 0);
+	fh = hexchat_open_file ("chanopt.conf", O_RDONLY, 0, 0);
 	if (fh != -1)
 	{
 		while (waitline (fh, buf, sizeof buf, FALSE) != -1)
@@ -391,7 +391,7 @@ chanopt_save_all (void)
 		return;
 	}
 
-	fh = xchat_open_file ("chanopt.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
+	fh = hexchat_open_file ("chanopt.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
 	if (fh == -1)
 	{
 		return;
diff --git a/src/common/dbus/dbus-client.c b/src/common/dbus/dbus-client.c
index 70b94b50..6ea8e45a 100644
--- a/src/common/dbus/dbus-client.c
+++ b/src/common/dbus/dbus-client.c
@@ -1,4 +1,4 @@
-/* dbus-client.c - XChat command-line options for D-Bus
+/* dbus-client.c - HexChat command-line options for D-Bus
  * Copyright (C) 2006 Claessens Xavier
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/src/common/dbus/dbus-client.h b/src/common/dbus/dbus-client.h
index a689e978..0cd4336c 100644
--- a/src/common/dbus/dbus-client.h
+++ b/src/common/dbus/dbus-client.h
@@ -1,4 +1,4 @@
-/* dbus-client.h - XChat command-line options for D-Bus
+/* dbus-client.h - HexChat command-line options for D-Bus
  * Copyright (C) 2006 Claessens Xavier
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/src/common/dbus/dbus-plugin.h b/src/common/dbus/dbus-plugin.h
index 49dded9c..05619d40 100644
--- a/src/common/dbus/dbus-plugin.h
+++ b/src/common/dbus/dbus-plugin.h
@@ -19,8 +19,8 @@
  * xclaesse@gmail.com
  */
 
-#ifndef XCHAT_DBUS_PLUGIN_H
-#define XCHAT_DBUS_PLUGIN_H
+#ifndef HEXCHAT_DBUS_PLUGIN_H
+#define HEXCHAT_DBUS_PLUGIN_H
 
 int	dbus_plugin_init	(hexchat_plugin *plugin_handle,
 				 char **plugin_name,
diff --git a/src/common/dbus/example.py b/src/common/dbus/example.py
index 01156806..49855784 100644
--- a/src/common/dbus/example.py
+++ b/src/common/dbus/example.py
@@ -10,19 +10,19 @@ path = remote.Connect ("example.py",
 		       "Example of a D-Bus client written in python",
 		       "1.0")
 proxy = bus.get_object('org.hexchat.service', path)
-xchat = dbus.Interface(proxy, 'org.hexchat.plugin')
+hexchat = dbus.Interface(proxy, 'org.hexchat.plugin')
 
-channels = xchat.ListGet ("channels")
-while xchat.ListNext (channels):
-	name = xchat.ListStr (channels, "channel")
+channels = hexchat.ListGet ("channels")
+while hexchat.ListNext (channels):
+	name = hexchat.ListStr (channels, "channel")
 	print "------- " + name + " -------"
-	xchat.SetContext (xchat.ListInt (channels, "context"))
-	xchat.EmitPrint ("Channel Message", ["John", "Hi there", "@"])
-	users = xchat.ListGet ("users")
-	while xchat.ListNext (users):
-		print "Nick: " + xchat.ListStr (users, "nick")
-	xchat.ListFree (users)
-xchat.ListFree (channels)
+	hexchat.SetContext (hexchat.ListInt (channels, "context"))
+	hexchat.EmitPrint ("Channel Message", ["John", "Hi there", "@"])
+	users = hexchat.ListGet ("users")
+	while hexchat.ListNext (users):
+		print "Nick: " + hexchat.ListStr (users, "nick")
+	hexchat.ListFree (users)
+hexchat.ListFree (channels)
 
-print xchat.Strip ("\00312Blue\003 \002Bold!\002", -1, 1|2)
+print hexchat.Strip ("\00312Blue\003 \002Bold!\002", -1, 1|2)
 
diff --git a/src/common/dcc.c b/src/common/dcc.c
index d9b1b855..4386e0a8 100644
--- a/src/common/dcc.c
+++ b/src/common/dcc.c
@@ -239,7 +239,7 @@ is_dcc (struct DCC *dcc)
 	return FALSE;
 }
 
-/* this is called from xchat.c:xchat_misc_checks() every 1 second. */
+/* this is called from hexchat.c:hexchat_misc_checks() every 1 second. */
 
 void
 dcc_check_timeouts (void)
@@ -1798,7 +1798,7 @@ dcc_send (struct session *sess, char *to, char *file, int maxcps, int passive)
 		free (file);
 
 		/* for_files() will use opendir, so we need local FS encoding */
-		path_fs = xchat_filename_from_utf8 (path, -1, 0, 0, 0);
+		path_fs = hexchat_filename_from_utf8 (path, -1, 0, 0, 0);
 		if (path_fs)
 		{
 			recursive = TRUE;
@@ -1817,7 +1817,7 @@ dcc_send (struct session *sess, char *to, char *file, int maxcps, int passive)
 	dcc->maxcps = maxcps;
 
 	/* get the local filesystem encoding */
-	file_fs = xchat_filename_from_utf8 (file, -1, 0, 0, 0);
+	file_fs = hexchat_filename_from_utf8 (file, -1, 0, 0, 0);
 
 	if (stat (file_fs, &st) != -1)
 	{
diff --git a/src/common/fe.h b/src/common/fe.h
index e8cc6f8f..f1f3b484 100644
--- a/src/common/fe.h
+++ b/src/common/fe.h
@@ -144,9 +144,9 @@ void fe_menu_update (menu_entry *);
 #define FE_SE_RECONDELAY 3
 #define FE_SE_CONNECTING 4
 void fe_server_event (server *serv, int type, int arg);
-/* pass NULL filename2 for default xchat icon */
+/* pass NULL filename2 for default HexChat icon */
 void fe_tray_set_flash (const char *filename1, const char *filename2, int timeout);
-/* pass NULL filename for default xchat icon */
+/* pass NULL filename for default HexChat icon */
 void fe_tray_set_file (const char *filename);
 typedef enum
 {
diff --git a/src/common/hexchat-plugin.h b/src/common/hexchat-plugin.h
index 5b8c83bc..f6e9a659 100644
--- a/src/common/hexchat-plugin.h
+++ b/src/common/hexchat-plugin.h
@@ -16,7 +16,7 @@
 #define HEXCHAT_FD_NOTSOCKET	8
 
 #define HEXCHAT_EAT_NONE		0	/* pass it on through! */
-#define HEXCHAT_EAT_HEXCHAT		1	/* don't let xchat see this event */
+#define HEXCHAT_EAT_HEXCHAT		1	/* don't let HexChat see this event */
 #define HEXCHAT_EAT_PLUGIN	2	/* don't let other plugins see this event */
 #define HEXCHAT_EAT_ALL		(HEXCHAT_EAT_HEXCHAT|HEXCHAT_EAT_PLUGIN)	/* don't let anything see this event */
 
@@ -109,7 +109,7 @@ struct _hexchat_plugin
 			void *handle);
 	int (*hexchat_emit_print) (hexchat_plugin *ph,
 			const char *event_name, ...);
-	int (*xchat_read_fd) (hexchat_plugin *ph,
+	int (*hexchat_read_fd) (hexchat_plugin *ph,
 			void *src,
 			char *buf,
 			int *len);
diff --git a/src/common/hexchat.c b/src/common/hexchat.c
index 6bd3c4cc..739ae0c3 100644
--- a/src/common/hexchat.c
+++ b/src/common/hexchat.c
@@ -77,8 +77,8 @@ GSList *usermenu_list = 0;
 GSList *urlhandler_list = 0;
 GSList *tabmenu_list = 0;
 
-static int in_xchat_exit = FALSE;
-int xchat_is_quitting = FALSE;
+static int in_hexchat_exit = FALSE;
+int hexchat_is_quitting = FALSE;
 /* command-line args */
 int arg_dont_autoconnect = FALSE;
 int arg_skip_plugins = FALSE;
@@ -264,7 +264,7 @@ doover:
 }
 
 static int
-xchat_misc_checks (void)		/* this gets called every 1/2 second */
+hexchat_misc_checks (void)		/* this gets called every 1/2 second */
 {
 	static int count = 0;
 #ifdef USE_MSPROXY
@@ -326,7 +326,7 @@ irc_init (session *sess)
 											  notify_checklist, 0);
 
 	fe_timeout_add (prefs.hex_away_timeout * 1000, away_check, 0);
-	fe_timeout_add (500, xchat_misc_checks, 0);
+	fe_timeout_add (500, hexchat_misc_checks, 0);
 
 	if (arg_url != NULL)
 	{
@@ -457,7 +457,7 @@ send_quit_or_part (session * killsess)
 			list = list->next;
 	}
 
-	if (xchat_is_quitting)
+	if (hexchat_is_quitting)
 		willquit = TRUE;
 
 	if (killserv->connected)
@@ -548,8 +548,8 @@ session_free (session *killsess)
 
 	free (killsess);
 
-	if (!sess_list && !in_xchat_exit)
-		xchat_exit ();						/* sess_list is empty, quit! */
+	if (!sess_list && !in_hexchat_exit)
+		hexchat_exit ();						/* sess_list is empty, quit! */
 
 	list = sess_list;
 	while (list)
@@ -607,7 +607,7 @@ static char defaultconf_commands[] =
 	"NAME SPING\n"			"CMD ping\n\n"\
 	"NAME SQUERY\n"		"CMD quote SQUERY %2 :&3\n\n"\
 	"NAME SSLSERVER\n"	"CMD server -ssl &2\n\n"\
-	"NAME SV\n"				"CMD echo xchat %v %m\n\n"\
+	"NAME SV\n"				"CMD echo HexChat %v %m\n\n"\
 	"NAME UMODE\n"			"CMD mode %n &2\n\n"\
 	"NAME UPTIME\n"		"CMD quote STATS u\n\n"\
 	"NAME VER\n"			"CMD ctcp %2 VERSION\n\n"\
@@ -843,10 +843,10 @@ xchat_init (void)
 }
 
 void
-xchat_exit (void)
+hexchat_exit (void)
 {
-	xchat_is_quitting = TRUE;
-	in_xchat_exit = TRUE;
+	hexchat_is_quitting = TRUE;
+	in_hexchat_exit = TRUE;
 	plugin_kill_all ();
 	fe_cleanup ();
 
@@ -880,7 +880,7 @@ child_handler (gpointer userdata)
 #endif
 
 void
-xchat_exec (const char *cmd)
+hexchat_exec (const char *cmd)
 {
 #ifdef WIN32
 	util_exec (cmd);
@@ -894,7 +894,7 @@ xchat_exec (const char *cmd)
 }
 
 void
-xchat_execv (char * const argv[])
+hexchat_execv (char * const argv[])
 {
 #ifdef WIN32
 	util_execv (argv);
@@ -909,11 +909,11 @@ xchat_execv (char * const argv[])
 
 #ifdef WIN32
 static void
-xchat_restore_window (HWND xchat_window)
+xchat_restore_window (HWND hexchat_window)
 {
-	/* ShowWindow (xchat_window, SW_RESTORE); another way, but works worse */
-	SendMessage (xchat_window, WM_SYSCOMMAND, SC_RESTORE, 0);
-	SetForegroundWindow (xchat_window);
+	/* ShowWindow (hexchat_window, SW_RESTORE); another way, but works worse */
+	SendMessage (hexchat_window, WM_SYSCOMMAND, SC_RESTORE, 0);
+	SetForegroundWindow (hexchat_window);
 }
 
 BOOL CALLBACK
@@ -1140,10 +1140,10 @@ main (int argc, char *argv[])
 
 		if (error == ERROR_ALREADY_EXISTS || mutex == NULL)
 		{
-			/* restoring the XChat window from the tray via the taskbar icon
-			 * only works correctly when X-Tray is used, but it's not a big deal
-			 * since you can only minimize XChat to tray via the taskbar if you
-			 * use X-Tray*/
+			/* restoring the HexChat window from the tray via the taskbar icon
+			 * only works correctly when HexTray is used, but it's not a big deal
+			 * since you can only minimize HexChat to tray via the taskbar if you
+			 * use HexTray*/
 			if (hextray_mode ())
 			{
 				/* FindWindow() doesn't support wildcards so we check all the open windows */
@@ -1190,7 +1190,7 @@ main (int argc, char *argv[])
 #endif
 
 #ifdef USE_DEBUG
-	xchat_mem_list ();
+	hexchat_mem_list ();
 #endif
 
 #ifdef WIN32
diff --git a/src/common/hexchat.h b/src/common/hexchat.h
index a2cab40e..673309bd 100644
--- a/src/common/hexchat.h
+++ b/src/common/hexchat.h
@@ -21,14 +21,14 @@
 #endif
 
 #ifdef USE_DEBUG
-#define malloc(n) xchat_malloc(n, __FILE__, __LINE__)
-#define realloc(n, m) xchat_realloc(n, m, __FILE__, __LINE__)
-#define free(n) xchat_dfree(n, __FILE__, __LINE__)
-#define strdup(n) xchat_strdup(n, __FILE__, __LINE__)
-void *xchat_malloc (int size, char *file, int line);
-void *xchat_strdup (char *str, char *file, int line);
-void xchat_dfree (void *buf, char *file, int line);
-void *xchat_realloc (char *old, int len, char *file, int line);
+#define malloc(n) hexchat_malloc(n, __FILE__, __LINE__)
+#define realloc(n, m) hexchat_realloc(n, m, __FILE__, __LINE__)
+#define free(n) hexchat_dfree(n, __FILE__, __LINE__)
+#define strdup(n) hexchat_strdup(n, __FILE__, __LINE__)
+void *hexchat_malloc (int size, char *file, int line);
+void *hexchat_strdup (char *str, char *file, int line);
+void hexchat_dfree (void *buf, char *file, int line);
+void *hexchat_realloc (char *old, int len, char *file, int line);
 #endif
 
 #ifdef SOCKS
@@ -597,7 +597,7 @@ struct popup
 /* CL: get a random int in the range [0..n-1]. DON'T use rand() % n, it gives terrible results. */
 #define RAND_INT(n) ((int)(rand() / (RAND_MAX + 1.0) * (n)))
 
-#define xchat_filename_from_utf8 g_filename_from_utf8
-#define xchat_filename_to_utf8 g_filename_to_utf8
+#define hexchat_filename_from_utf8 g_filename_from_utf8
+#define hexchat_filename_to_utf8 g_filename_to_utf8
 
 #endif
diff --git a/src/common/hexchatc.h b/src/common/hexchatc.h
index 1e8eb85e..207a97cd 100644
--- a/src/common/hexchatc.h
+++ b/src/common/hexchatc.h
@@ -3,7 +3,7 @@
 
 extern struct hexchatprefs prefs;
 
-extern int xchat_is_quitting;
+extern int hexchat_is_quitting;
 extern gint arg_skip_plugins;	/* command-line args */
 extern gint arg_dont_autoconnect;
 extern char *arg_url;
@@ -32,8 +32,8 @@ session * new_ircwindow (server *serv, char *name, int type, int focus);
 int is_session (session * sess);
 void session_free (session *killsess);
 void lag_check (void);
-void xchat_exit (void);
-void xchat_exec (const char *cmd);
-void xchat_execv (char * const argv[]);
+void hexchat_exit (void);
+void hexchat_exec (const char *cmd);
+void hexchat_execv (char * const argv[]);
 
 #endif
diff --git a/src/common/identd.c b/src/common/identd.c
index db08ff90..e3ea9e95 100644
--- a/src/common/identd.c
+++ b/src/common/identd.c
@@ -1,4 +1,4 @@
-/* simple identd server for xchat under win32 */
+/* simple identd server for HexChat under Win32 */
 
 #include "inet.h"
 #include "hexchat.h"
diff --git a/src/common/ignore.c b/src/common/ignore.c
index b6eae41a..caeae06e 100644
--- a/src/common/ignore.c
+++ b/src/common/ignore.c
@@ -278,7 +278,7 @@ ignore_load ()
 	char *cfg, *my_cfg;
 	int fh, i;
 
-	fh = xchat_open_file ("ignore.conf", O_RDONLY, 0, 0);
+	fh = hexchat_open_file ("ignore.conf", O_RDONLY, 0, 0);
 	if (fh != -1)
 	{
 		fstat (fh, &st);
@@ -313,7 +313,7 @@ ignore_save ()
 	GSList *temp = ignore_list;
 	struct ignore *ig;
 
-	fh = xchat_open_file ("ignore.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
+	fh = hexchat_open_file ("ignore.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
 	if (fh != -1)
 	{
 		while (temp)
diff --git a/src/common/notify.c b/src/common/notify.c
index 1dff8ec7..5646fda7 100644
--- a/src/common/notify.c
+++ b/src/common/notify.c
@@ -129,7 +129,7 @@ notify_save (void)
 	struct notify *notify;
 	GSList *list = notify_list;
 
-	fh = xchat_open_file ("notify.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
+	fh = hexchat_open_file ("notify.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
 	if (fh != -1)
 	{
 		while (list)
@@ -155,7 +155,7 @@ notify_load (void)
 	char buf[256];
 	char *sep;
 
-	fh = xchat_open_file ("notify.conf", O_RDONLY, 0, 0);
+	fh = hexchat_open_file ("notify.conf", O_RDONLY, 0, 0);
 	if (fh != -1)
 	{
 		while (waitline (fh, buf, sizeof buf, FALSE) != -1)
@@ -393,7 +393,7 @@ notify_markonline (server *serv, char *word[])
 			   about 27 people */
 			if (i > PDIWORDS - 5)
 			{
-				/*fprintf (stderr, _("*** XCHAT WARNING: notify list too large.\n"));*/
+				/*fprintf (stderr, _("*** HEXCHAT WARNING: notify list too large.\n"));*/
 				break;
 			}
 		}
@@ -430,7 +430,7 @@ notify_checklist_for_server (server *serv)
 				/* LAME: we can't send more than 512 bytes to the server, but     *
 				 * if we split it in two packets, our offline detection wouldn't  *
 				 work                                                           */
-				/*fprintf (stderr, _("*** XCHAT WARNING: notify list too large.\n"));*/
+				/*fprintf (stderr, _("*** HEXCHAT WARNING: notify list too large.\n"));*/
 				break;
 			}
 		}
diff --git a/src/common/outbound.c b/src/common/outbound.c
index a587d499..2c4d46a1 100644
--- a/src/common/outbound.c
+++ b/src/common/outbound.c
@@ -43,7 +43,7 @@
 #include "ignore.h"
 #include "util.h"
 #include "fe.h"
-#include "cfgfiles.h"			  /* xchat_fopen_file() */
+#include "cfgfiles.h"			  /* hexchat_fopen_file() */
 #include "network.h"				/* net_ip() */
 #include "modes.h"
 #include "notify.h"
@@ -88,7 +88,7 @@ random_line (char *file_name)
 	if (!file_name[0])
 		goto nofile;
 
-	fh = xchat_fopen_file (file_name, "r", 0);
+	fh = hexchat_fopen_file (file_name, "r", 0);
 	if (!fh)
 	{
 	 nofile:
@@ -2385,7 +2385,7 @@ cmd_kickban (struct session *sess, char *tbuf, char *word[], char *word_eol[])
 static int
 cmd_killall (struct session *sess, char *tbuf, char *word[], char *word_eol[])
 {
-	xchat_exit();
+	hexchat_exit();
 	return 2;
 }
 
@@ -2470,7 +2470,7 @@ load_perform_file (session *sess, char *file)
 	char *nl;
 	FILE *fp;
 
-	fp = xchat_fopen_file (file, "r", XOF_FULLPATH);
+	fp = hexchat_fopen_file (file, "r", XOF_FULLPATH);
 	if (!fp)
 		return FALSE;
 
@@ -3223,7 +3223,7 @@ cmd_tray (struct session *sess, char *tbuf, char *word[], char *word_eol[])
 
 	if (!word[3][0])
 	{
-		fe_tray_set_file (NULL);	/* default xchat icon */
+		fe_tray_set_file (NULL);	/* default HexChat icon */
 		return TRUE;
 	}
 
@@ -3695,7 +3695,7 @@ const struct commands xc_cmds[] = {
 	{"RECONNECT", cmd_reconnect, 0, 0, 1,
 	 N_("RECONNECT [<host>] [<port>] [<password>], Can be called just as /RECONNECT to reconnect to the current server or with /RECONNECT ALL to reconnect to all the open servers")},
 #endif
-	{"RECV", cmd_recv, 1, 0, 1, N_("RECV <text>, send raw data to xchat, as if it was received from the irc server")},
+	{"RECV", cmd_recv, 1, 0, 1, N_("RECV <text>, send raw data to HexChat, as if it was received from the IRC server")},
 
 	{"SAY", cmd_say, 0, 0, 1,
 	 N_("SAY <text>, sends the text to the object in the current window")},
diff --git a/src/common/plugin-timer.c b/src/common/plugin-timer.c
index 8b2ef5f8..7c87cc41 100644
--- a/src/common/plugin-timer.c
+++ b/src/common/plugin-timer.c
@@ -195,7 +195,7 @@ hexchat_plugin_init
 				(hexchat_plugin *plugin_handle, char **plugin_name,
 				char **plugin_desc, char **plugin_version, char *arg)
 {
-	/* we need to save this for use with any xchat_* functions */
+	/* we need to save this for use with any hexchat_* functions */
 	ph = plugin_handle;
 
 	*plugin_name = "Timer";
diff --git a/src/common/plugin.c b/src/common/plugin.c
index f10e29b1..b918ff05 100644
--- a/src/common/plugin.c
+++ b/src/common/plugin.c
@@ -203,14 +203,14 @@ plugin_list_add (hexchat_context *ctx, char *filename, const char *name,
 }
 
 static void *
-xchat_dummy (hexchat_plugin *ph)
+hexchat_dummy (hexchat_plugin *ph)
 {
 	return NULL;
 }
 
 #ifdef WIN32
 static int
-xchat_read_fd (hexchat_plugin *ph, GIOChannel *source, char *buf, int *len)
+hexchat_read_fd (hexchat_plugin *ph, GIOChannel *source, char *buf, int *len)
 {
 	GError *error = NULL;
 
@@ -273,9 +273,9 @@ plugin_add (session *sess, char *filename, void *handle, void *init_func,
 		pl->hexchat_plugingui_remove = hexchat_plugingui_remove;
 		pl->hexchat_emit_print = hexchat_emit_print;
 #ifdef WIN32
-		pl->xchat_read_fd = (void *) xchat_read_fd;
+		pl->hexchat_read_fd = (void *) hexchat_read_fd;
 #else
-		pl->xchat_read_fd = xchat_dummy;
+		pl->hexchat_read_fd = hexchat_dummy;
 #endif
 		pl->hexchat_list_time = hexchat_list_time;
 		pl->hexchat_gettext = hexchat_gettext;
@@ -289,11 +289,11 @@ plugin_add (session *sess, char *filename, void *handle, void *init_func,
 		pl->hexchat_pluginpref_delete = hexchat_pluginpref_delete;
 		pl->hexchat_pluginpref_list = hexchat_pluginpref_list;
 
-		/* incase new plugins are loaded on older xchat */
-		pl->xchat_dummy4 = xchat_dummy;
-		pl->xchat_dummy3 = xchat_dummy;
-		pl->xchat_dummy2 = xchat_dummy;
-		pl->xchat_dummy1 = xchat_dummy;
+		/* incase new plugins are loaded on older HexChat */
+		pl->hexchat_dummy4 = hexchat_dummy;
+		pl->hexchat_dummy3 = hexchat_dummy;
+		pl->hexchat_dummy2 = hexchat_dummy;
+		pl->hexchat_dummy1 = hexchat_dummy;
 
 		/* run hexchat_plugin_init, if it returns 0, close the plugin */
 		if (((hexchat_init_func *)init_func) (pl, &pl->name, &pl->desc, &pl->version, arg) == 0)
@@ -379,7 +379,7 @@ plugin_load (session *sess, char *filename, char *arg)
 	if (!g_module_symbol (handle, "hexchat_plugin_init", (gpointer *)&init_func))
 	{
 		g_module_close (handle);
-		return _("No hexchat_plugin_init symbol; is this really an xchat plugin?");
+		return _("No hexchat_plugin_init symbol; is this really a HexChat plugin?");
 	}
 
 	/* find the plugin's deinit routine, if any */
@@ -420,7 +420,7 @@ plugin_load (session *sess, char *filename, char *arg)
 	if (error != NULL)
 	{
 		dlclose (handle);
-		return _("No hexchat_plugin_init symbol; is this really an xchat plugin?");
+		return _("No hexchat_plugin_init symbol; is this really a HexChat plugin?");
 	}
 
 	/* find the plugin's deinit routine, if any */
@@ -1600,7 +1600,7 @@ hexchat_emit_print (hexchat_plugin *ph, const char *event_name, ...)
 char *
 hexchat_gettext (hexchat_plugin *ph, const char *msgid)
 {
-	/* so that plugins can use xchat's internal gettext strings. */
+	/* so that plugins can use HexChat's internal gettext strings. */
 	/* e.g. The EXEC plugin uses this on Windows. */
 	return _(msgid);
 }
@@ -1643,8 +1643,8 @@ hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char
 	g_free (canon);
 	sprintf (confname_tmp, "%s.new", confname);
 
-	fhOut = xchat_open_file (confname_tmp, O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
-	fpIn = xchat_fopen_file (confname, "r", 0);
+	fhOut = hexchat_open_file (confname_tmp, O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
+	fpIn = hexchat_fopen_file (confname, "r", 0);
 
 	if (fhOut == -1)		/* unable to save, abort */
 	{
@@ -1760,7 +1760,7 @@ hexchat_pluginpref_get_str (hexchat_plugin *pl, const char *var, char *dest)
 	g_free (canon);
 
 	/* partly borrowed from palette.c */
-	fh = xchat_open_file (confname, O_RDONLY, 0, 0);
+	fh = hexchat_open_file (confname, O_RDONLY, 0, 0);
 
 	if (fh == -1)
 	{
@@ -1839,7 +1839,7 @@ hexchat_pluginpref_list (hexchat_plugin *pl, char* dest)
 	sprintf (confname, "addon_%s.conf", token);
 	g_free (token);
 
-	fpIn = xchat_fopen_file (confname, "r", 0);
+	fpIn = hexchat_fopen_file (confname, "r", 0);
 
 	if (fpIn == NULL)										/* no existing config file, no parsing */
 	{
diff --git a/src/common/plugin.h b/src/common/plugin.h
index 52d82587..0aa43f0b 100644
--- a/src/common/plugin.h
+++ b/src/common/plugin.h
@@ -80,7 +80,7 @@ struct _hexchat_plugin
 			void *handle);
 	int (*hexchat_emit_print) (hexchat_plugin *ph,
 			const char *event_name, ...);
-	void *(*xchat_read_fd) (hexchat_plugin *ph);
+	void *(*hexchat_read_fd) (hexchat_plugin *ph);
 	time_t (*hexchat_list_time) (hexchat_plugin *ph,
 		hexchat_list *xlist,
 		const char *name);
@@ -113,10 +113,10 @@ struct _hexchat_plugin
 		const char *var);
 	int (*hexchat_pluginpref_list) (hexchat_plugin *ph,
 		char *dest);
-	void *(*xchat_dummy4) (hexchat_plugin *ph);
-	void *(*xchat_dummy3) (hexchat_plugin *ph);
-	void *(*xchat_dummy2) (hexchat_plugin *ph);
-	void *(*xchat_dummy1) (hexchat_plugin *ph);
+	void *(*hexchat_dummy4) (hexchat_plugin *ph);
+	void *(*hexchat_dummy3) (hexchat_plugin *ph);
+	void *(*hexchat_dummy2) (hexchat_plugin *ph);
+	void *(*hexchat_dummy1) (hexchat_plugin *ph);
 	/* PRIVATE FIELDS! */
 	void *handle;		/* from dlopen */
 	char *filename;	/* loaded from */
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index b8899855..6a3ee30e 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -1264,7 +1264,7 @@ irc_inline (server *serv, char *buf, int len)
 		if (plugin_emit_server (sess, type, word, word_eol))
 			goto xit;
 		word[1]++;
-		word_eol[1] = buf + 1;	/* but not for xchat internally */
+		word_eol[1] = buf + 1;	/* but not for HexChat internally */
 
 	} else
 	{
diff --git a/src/common/servlist.c b/src/common/servlist.c
index 1a262a54..f3697c2c 100644
--- a/src/common/servlist.c
+++ b/src/common/servlist.c
@@ -1036,7 +1036,7 @@ servlist_load (void)
 	char *tmp;
 	ircnet *net = NULL;
 
-	fp = xchat_fopen_file ("servlist_.conf", "r", 0);
+	fp = hexchat_fopen_file ("servlist_.conf", "r", 0);
 	if (!fp)
 		return FALSE;
 
@@ -1172,7 +1172,7 @@ servlist_save (void)
 		first = TRUE;
 #endif
 
-	fp = xchat_fopen_file ("servlist_.conf", "w", 0);
+	fp = hexchat_fopen_file ("servlist_.conf", "w", 0);
 	if (!fp)
 		return FALSE;
 
diff --git a/src/common/text.c b/src/common/text.c
index 39dd92c2..7e8da018 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -646,7 +646,7 @@ log_create_pathname (char *servname, char *channame, char *netname)
 	}
 
 	/* now we need it in FileSystem encoding */
-	fs = xchat_filename_from_utf8 (fname, -1, 0, 0, 0);
+	fs = hexchat_filename_from_utf8 (fname, -1, 0, 0, 0);
 
 	/* create all the subdirectories */
 	if (fs)
@@ -1746,9 +1746,9 @@ pevent_load (char *filename)
 	char *ofs;
 
 	if (filename == NULL)
-		fd = xchat_open_file ("pevents.conf", O_RDONLY, 0, 0);
+		fd = hexchat_open_file ("pevents.conf", O_RDONLY, 0, 0);
 	else
-		fd = xchat_open_file (filename, O_RDONLY, 0, XOF_FULLPATH);
+		fd = hexchat_open_file (filename, O_RDONLY, 0, XOF_FULLPATH);
 
 	if (fd == -1)
 		return 1;
@@ -1841,7 +1841,7 @@ pevent_check_all_loaded ()
 		if (pntevts_text[i] == NULL)
 		{
 			/*printf ("%s\n", te[i].name);
-			snprintf(out, sizeof(out), "The data for event %s failed to load. Reverting to defaults.\nThis may be because a new version of XChat is loading an old config file.\n\nCheck all print event texts are correct", evtnames[i]);
+			snprintf(out, sizeof(out), "The data for event %s failed to load. Reverting to defaults.\nThis may be because a new version of HexChat is loading an old config file.\n\nCheck all print event texts are correct", evtnames[i]);
 			   gtkutil_simpledialog(out); */
 			/* make-te.c sets this 128 flag (DON'T call gettext() flag) */
 			if (te[i].num_args & 128)
@@ -2273,10 +2273,10 @@ pevent_save (char *fn)
 	char buf[1024];
 
 	if (!fn)
-		fd = xchat_open_file ("pevents.conf", O_CREAT | O_TRUNC | O_WRONLY,
+		fd = hexchat_open_file ("pevents.conf", O_CREAT | O_TRUNC | O_WRONLY,
 									 0x180, XOF_DOMODE);
 	else
-		fd = xchat_open_file (fn, O_CREAT | O_TRUNC | O_WRONLY, 0x180,
+		fd = hexchat_open_file (fn, O_CREAT | O_TRUNC | O_WRONLY, 0x180,
 									 XOF_FULLPATH | XOF_DOMODE);
 	if (fd == -1)
 	{
@@ -2373,7 +2373,7 @@ sound_play (const char *file, gboolean quiet)
 	}
 	wavfile[sizeof (wavfile) - 1] = 0;	/* ensure termination */
 
-	file_fs = xchat_filename_from_utf8 (wavfile, -1, 0, 0, 0);
+	file_fs = hexchat_filename_from_utf8 (wavfile, -1, 0, 0, 0);
 	if (!file_fs)
 		return;
 
@@ -2416,7 +2416,7 @@ sound_play (const char *file, gboolean quiet)
 				else
 					snprintf (buf, sizeof (buf), "%s %s", cmd, file_fs);
 				buf[sizeof (buf) - 1] = '\0';
-				xchat_exec (buf);
+				hexchat_exec (buf);
 			}
 		}
 
@@ -2464,7 +2464,7 @@ sound_load ()
 
 	memset (&sound_files, 0, sizeof (char *) * (NUM_XP));
 
-	fd = xchat_open_file ("sound.conf", O_RDONLY, 0, 0);
+	fd = hexchat_open_file ("sound.conf", O_RDONLY, 0, 0);
 	if (fd == -1)
 		return;
 
@@ -2494,7 +2494,7 @@ sound_save ()
 	int fd, i;
 	char buf[512];
 
-	fd = xchat_open_file ("sound.conf", O_CREAT | O_TRUNC | O_WRONLY, 0x180,
+	fd = hexchat_open_file ("sound.conf", O_CREAT | O_TRUNC | O_WRONLY, 0x180,
 								 XOF_DOMODE);
 	if (fd == -1)
 		return;
diff --git a/src/common/url.c b/src/common/url.c
index f722ca34..618a4a71 100644
--- a/src/common/url.c
+++ b/src/common/url.c
@@ -64,9 +64,9 @@ url_save_tree (const char *fname, const char *mode, gboolean fullpath)
 	FILE *fd;
 
 	if (fullpath)
-		fd = xchat_fopen_file (fname, mode, XOF_FULLPATH);
+		fd = hexchat_fopen_file (fname, mode, XOF_FULLPATH);
 	else
-		fd = xchat_fopen_file (fname, mode, 0);
+		fd = hexchat_fopen_file (fname, mode, 0);
 	if (fd == NULL)
 		return;
 
@@ -80,7 +80,7 @@ url_save_node (char* url)
 	FILE *fd;
 
 	/* open <config>/url.log in append mode */
-	fd = xchat_fopen_file ("url.log", "a", 0);
+	fd = hexchat_fopen_file ("url.log", "a", 0);
 	if (fd == NULL)
 	{
 		return;
@@ -156,7 +156,7 @@ url_add (char *urltext, int len)
 	if (prefs.hex_url_grabber_limit > 0 && size >= prefs.hex_url_grabber_limit)
 	{
 		/* the loop is necessary to handle having the limit lowered while
-		   xchat is running */
+		   HexChat is running */
 		size -= prefs.hex_url_grabber_limit;
 		for(; size > 0; size--)
 		{
diff --git a/src/common/util.c b/src/common/util.c
index 535c00b2..e81486b4 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -85,7 +85,7 @@ struct mem_block
 struct mem_block *mroot = NULL;
 
 void *
-xchat_malloc (int size, char *file, int line)
+hexchat_malloc (int size, char *file, int line)
 {
 	void *ret;
 	struct mem_block *new;
@@ -113,21 +113,21 @@ xchat_malloc (int size, char *file, int line)
 }
 
 void *
-xchat_realloc (char *old, int len, char *file, int line)
+hexchat_realloc (char *old, int len, char *file, int line)
 {
 	char *ret;
 
-	ret = xchat_malloc (len, file, line);
+	ret = hexchat_malloc (len, file, line);
 	if (ret)
 	{
 		strcpy (ret, old);
-		xchat_dfree (old, file, line);
+		hexchat_dfree (old, file, line);
 	}
 	return ret;
 }
 
 void *
-xchat_strdup (char *str, char *file, int line)
+hexchat_strdup (char *str, char *file, int line)
 {
 	void *ret;
 	struct mem_block *new;
@@ -158,7 +158,7 @@ xchat_strdup (char *str, char *file, int line)
 }
 
 void
-xchat_mem_list (void)
+hexchat_mem_list (void)
 {
 	struct mem_block *cur, *p;
 	GSList *totals = 0;
@@ -199,7 +199,7 @@ xchat_mem_list (void)
 }
 
 void
-xchat_dfree (void *buf, char *file, int line)
+hexchat_dfree (void *buf, char *file, int line)
 {
 	struct mem_block *cur, *last;
 
@@ -237,10 +237,10 @@ xchat_dfree (void *buf, char *file, int line)
 	free (cur);
 }
 
-#define malloc(n) xchat_malloc(n, __FILE__, __LINE__)
-#define realloc(n, m) xchat_realloc(n, m, __FILE__, __LINE__)
-#define free(n) xchat_dfree(n, __FILE__, __LINE__)
-#define strdup(n) xchat_strdup(n, __FILE__, __LINE__)
+#define malloc(n) hexchat_malloc(n, __FILE__, __LINE__)
+#define realloc(n, m) hexchat_realloc(n, m, __FILE__, __LINE__)
+#define free(n) hexchat_dfree(n, __FILE__, __LINE__)
+#define strdup(n) hexchat_strdup(n, __FILE__, __LINE__)
 
 #endif /* MEMORY_DEBUG */
 
@@ -1567,10 +1567,10 @@ rename_utf8 (char *oldname, char *newname)
 	int sav, res;
 	char *fso, *fsn;
 
-	fso = xchat_filename_from_utf8 (oldname, -1, 0, 0, 0);
+	fso = hexchat_filename_from_utf8 (oldname, -1, 0, 0, 0);
 	if (!fso)
 		return FALSE;
-	fsn = xchat_filename_from_utf8 (newname, -1, 0, 0, 0);
+	fsn = hexchat_filename_from_utf8 (newname, -1, 0, 0, 0);
 	if (!fsn)
 	{
 		g_free (fso);
@@ -1591,7 +1591,7 @@ unlink_utf8 (char *fname)
 	int res;
 	char *fs;
 
-	fs = xchat_filename_from_utf8 (fname, -1, 0, 0, 0);
+	fs = hexchat_filename_from_utf8 (fname, -1, 0, 0, 0);
 	if (!fs)
 		return FALSE;
 
@@ -1606,7 +1606,7 @@ file_exists_utf8 (char *fname)
 	int res;
 	char *fs;
 
-	fs = xchat_filename_from_utf8 (fname, -1, 0, 0, 0);
+	fs = hexchat_filename_from_utf8 (fname, -1, 0, 0, 0);
 	if (!fs)
 		return FALSE;
 
@@ -1711,10 +1711,10 @@ move_file_utf8 (char *src_dir, char *dst_dir, char *fname, int dccpermissions)
 	}
 
 	/* convert UTF-8 to filesystem encoding */
-	src_fs = xchat_filename_from_utf8 (src, -1, 0, 0, 0);
+	src_fs = hexchat_filename_from_utf8 (src, -1, 0, 0, 0);
 	if (!src_fs)
 		return;
-	dst_fs = xchat_filename_from_utf8 (dst, -1, 0, 0, 0);
+	dst_fs = hexchat_filename_from_utf8 (dst, -1, 0, 0, 0);
 	if (!dst_fs)
 	{
 		g_free (src_fs);
@@ -1742,7 +1742,7 @@ mkdir_utf8 (char *dir)
 {
 	int ret;
 
-	dir = xchat_filename_from_utf8 (dir, -1, 0, 0, 0);
+	dir = hexchat_filename_from_utf8 (dir, -1, 0, 0, 0);
 	if (!dir)
 		return -1;