summary refs log tree commit diff stats
path: root/src/common/plugin-timer.c
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 /src/common/plugin-timer.c
parent97dc13fde70810abf07985f45ac459560eae6e96 (diff)
Rebranding for the rest of plugin*
Diffstat (limited to 'src/common/plugin-timer.c')
-rw-r--r--src/common/plugin-timer.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/common/plugin-timer.c b/src/common/plugin-timer.c
index b294c005..5540b364 100644
--- a/src/common/plugin-timer.c
+++ b/src/common/plugin-timer.c
@@ -7,7 +7,7 @@
 #define g_ascii_strcasecmp stricmp
 #endif
 
-static xchat_plugin *ph;	/* plugin handle */
+static hexchat_plugin *ph;	/* plugin handle */
 static GSList *timer_list = NULL;
 
 #define STATIC
@@ -17,8 +17,8 @@ static GSList *timer_list = NULL;
 
 typedef struct
 {
-	xchat_hook *hook;
-	xchat_context *context;
+	hexchat_hook *hook;
+	hexchat_context *context;
 	char *command;
 	int ref;
 	int repeat;
@@ -31,7 +31,7 @@ timer_del (timer *tim)
 {
 	timer_list = g_slist_remove (timer_list, tim);
 	free (tim->command);
-	xchat_unhook (ph, tim->hook);
+	hexchat_unhook (ph, tim->hook);
 	free (tim);
 }
 
@@ -49,21 +49,21 @@ timer_del_ref (int ref, int quiet)
 		{
 			timer_del (tim);
 			if (!quiet)
-				xchat_printf (ph, "Timer %d deleted.\n", ref);
+				hexchat_printf (ph, "Timer %d deleted.\n", ref);
 			return;
 		}
 		list = list->next;
 	}
 	if (!quiet)
-		xchat_print (ph, "No such ref number found.\n");
+		hexchat_print (ph, "No such ref number found.\n");
 }
 
 static int
 timeout_cb (timer *tim)
 {
-	if (xchat_set_context (ph, tim->context))
+	if (hexchat_set_context (ph, tim->context))
 	{
-		xchat_command (ph, tim->command);
+		hexchat_command (ph, tim->command);
 
 		if (tim->forever)
 			return 1;
@@ -101,13 +101,13 @@ timer_add (int ref, float timeout, int repeat, char *command)
 	tim->repeat = repeat;
 	tim->timeout = timeout;
 	tim->command = strdup (command);
-	tim->context = xchat_get_context (ph);
+	tim->context = hexchat_get_context (ph);
 	tim->forever = FALSE;
 
 	if (repeat == 0)
 		tim->forever = TRUE;
 
-	tim->hook = xchat_hook_timer (ph, timeout * 1000.0, (void *)timeout_cb, tim);
+	tim->hook = hexchat_hook_timer (ph, timeout * 1000.0, (void *)timeout_cb, tim);
 	timer_list = g_slist_append (timer_list, tim);
 }
 
@@ -119,17 +119,17 @@ timer_showlist (void)
 
 	if (timer_list == NULL)
 	{
-		xchat_print (ph, "No timers installed.\n");
-		xchat_print (ph, HELP);
+		hexchat_print (ph, "No timers installed.\n");
+		hexchat_print (ph, HELP);
 		return;
 	}
 							 /*  00000 00000000 0000000 abc */
-	xchat_print (ph, "\026 Ref#  Seconds  Repeat  Command \026\n");
+	hexchat_print (ph, "\026 Ref#  Seconds  Repeat  Command \026\n");
 	list = timer_list;
 	while (list)
 	{
 		tim = list->data;
-		xchat_printf (ph, "%5d %8.1f %7d  %s\n", tim->ref, tim->timeout,
+		hexchat_printf (ph, "%5d %8.1f %7d  %s\n", tim->ref, tim->timeout,
 						  tim->repeat, tim->command);
 		list = list->next;
 	}
@@ -179,7 +179,7 @@ timer_cb (char *word[], char *word_eol[], void *userdata)
 	command = word_eol[3 + offset];
 
 	if (timeout < 0.1 || !command[0])
-		xchat_print (ph, HELP);
+		hexchat_print (ph, HELP);
 	else
 		timer_add (ref, timeout, repeat, command);
 
@@ -190,9 +190,9 @@ int
 #ifdef STATIC
 timer_plugin_init
 #else
-xchat_plugin_init
+hexchat_plugin_init
 #endif
-				(xchat_plugin *plugin_handle, char **plugin_name,
+				(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 */
@@ -202,7 +202,7 @@ xchat_plugin_init
 	*plugin_desc = "IrcII style /TIMER command";
 	*plugin_version = "";
 
-	xchat_hook_command (ph, "TIMER", HEXCHAT_PRI_NORM, timer_cb, HELP, 0);
+	hexchat_hook_command (ph, "TIMER", HEXCHAT_PRI_NORM, timer_cb, HELP, 0);
 
 	return 1;       /* return 1 for success */
 }