summary refs log tree commit diff stats
path: root/src/common/plugin.c
diff options
context:
space:
mode:
authorBerke Viktor <berkeviktor@aol.com>2011-12-01 21:24:58 +0100
committerBerke Viktor <berkeviktor@aol.com>2011-12-01 21:24:58 +0100
commit455032938a9d5336e55684692113fbca8a156810 (patch)
tree6b2e663cc9ff35092a673f4cb3f28bac9c852ef1 /src/common/plugin.c
parentb692172aa907243c7543015468da0fb077a9ac99 (diff)
plugin api conformance
Diffstat (limited to 'src/common/plugin.c')
-rw-r--r--src/common/plugin.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/plugin.c b/src/common/plugin.c
index b5b10a0e..b443b586 100644
--- a/src/common/plugin.c
+++ b/src/common/plugin.c
@@ -1584,7 +1584,7 @@ xchat_free (xchat_plugin *ph, void *ptr)
 }
 
 int
-xchat_set_pluginpref_str (xchat_plugin *pl, char *var, char *value)
+xchat_set_pluginpref_str (xchat_plugin *pl, const char *var, const char *value)
 {
 	FILE *fpIn;
 	int fhOut;
@@ -1653,7 +1653,7 @@ xchat_set_pluginpref_str (xchat_plugin *pl, char *var, char *value)
 
 		fclose (fpIn);
 
-		if (!prevConfig)
+		if (!prevConfig)	/* var doesn't exist currently, append */
 		{
 			sprintf (buffer, "%s = %s\n", var, value);
 			write (fhOut, buffer, strlen (buffer));
@@ -1680,7 +1680,7 @@ xchat_set_pluginpref_str (xchat_plugin *pl, char *var, char *value)
 }
 
 int
-xchat_get_pluginpref_str (xchat_plugin *pl, char *var, char *dest)
+xchat_get_pluginpref_str (xchat_plugin *pl, const char *var, char *dest)
 {
 	int fh;
 	int l;
@@ -1732,7 +1732,7 @@ xchat_get_pluginpref_str (xchat_plugin *pl, char *var, char *dest)
 }
 
 int
-xchat_set_pluginpref_int (xchat_plugin *pl, char *var, int value)
+xchat_set_pluginpref_int (xchat_plugin *pl, const char *var, int value)
 {
 	char buffer[12];
 
@@ -1741,7 +1741,7 @@ xchat_set_pluginpref_int (xchat_plugin *pl, char *var, int value)
 }
 
 int
-xchat_get_pluginpref_int (xchat_plugin *pl, char *var)
+xchat_get_pluginpref_int (xchat_plugin *pl, const char *var)
 {
 	char buffer[12];