File migrate-configuration-from-xchat.patch of Package hexchat

diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index 4bf2f47..b2a4525 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -913,6 +913,24 @@ load_default_config(void)
 	g_free (langs);
 }
 
+void migrate_from_xchat(void)
+{
+	int pid;
+	
+	pid = fork();
+	switch (pid)
+	{
+	    case -1:
+		g_warning("fork failed ");
+		return;
+	    case 0:
+		execl("/bin/sh","sh", "-c", "/usr/lib64/hexchat/hexchat-migrate-sh",NULL);
+		_exit(0);
+	    default:
+		return;
+	}
+}
+
 int
 make_config_dirs (void)
 {
diff --git a/src/common/cfgfiles.h b/src/common/cfgfiles.h
index b421884..a183a1c 100644
--- a/src/common/cfgfiles.h
+++ b/src/common/cfgfiles.h
@@ -41,6 +41,7 @@ int check_config_dir (void);
 void load_default_config (void);
 int make_config_dirs (void);
 int make_dcc_dirs (void);
+void migrate_from_xchat(void);
 int load_config (void);
 int save_config (void);
 void list_free (GSList ** list);
diff --git a/src/common/hexchat.c b/src/common/hexchat.c
index caa20eb..4b22f73 100644
--- a/src/common/hexchat.c
+++ b/src/common/hexchat.c
@@ -1088,6 +1088,7 @@ main (int argc, char *argv[])
 		load_default_config ();
 		make_config_dirs ();
 		make_dcc_dirs ();
+		migrate_from_xchat();
 	}
 
 	/* we MUST do this after load_config () AND before fe_init (thus gtk_init) otherwise it will fail */