Browse files

xchat azure patches

  • Loading branch information...
1 parent 57608c7 commit c89af8e8a7a5f4f8be160e80a9311360eee65e89 @youknowone youknowone committed Apr 27, 2012
Showing with 37 additions and 1 deletion.
  1. +10 −0 src/common/cfgfiles.c
  2. +5 −0 src/common/ctcp.c
  3. +4 −0 src/common/plugin.c
  4. +8 −1 src/common/server.c
  5. +4 −0 src/common/text.c
  6. +2 −0 src/common/xchat.c
  7. +4 −0 src/common/xchat.h
View
10 src/common/cfgfiles.c
@@ -318,6 +318,10 @@ get_xdir_fs (void)
return xdir_fs;
}
+#elif FE_AQUA || FE_IOS
+
+extern char *get_xdir_fs(void);
+
#else
char *
@@ -566,6 +570,9 @@ const struct prefs vars[] = {
{"url_grabber", P_OFFINT (url_grabber), TYPE_BOOL},
{"url_grabber_limit", P_OFFINT (url_grabber_limit), TYPE_INT},
+#ifdef FE_AQUA
+# include "Sources/XAVars.h"
+#endif
{0, 0, 0},
};
@@ -687,6 +694,9 @@ load_config (void)
#ifdef WIN32
prefs.identd = 1;
#endif
+#ifdef FE_AQUA
+# include "Sources/XADefaults.h"
+#endif
strcpy (prefs.stamp_format, "[%H:%M] ");
strcpy (prefs.timestamp_log_format, "%b %d %H:%M:%S ");
strcpy (prefs.logmask, "%n-%c.log");
View
5 src/common/ctcp.c
@@ -134,8 +134,13 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip,
if (!strcasecmp (msg, "VERSION") && !prefs.hidever)
{
+#ifdef FE_AQUA || FE_IOS
+ snprintf (outbuf, sizeof (outbuf), "VERSION X-Chat Aqua %s (xchat "PACKAGE_VERSION") %s",
+ MYVERSION, get_cpu_str ());
+#else
snprintf (outbuf, sizeof (outbuf), "VERSION xchat "PACKAGE_VERSION" %s",
get_cpu_str ());
+#endif
serv->p_nctcp (serv, nick, outbuf);
}
View
4 src/common/plugin.c
@@ -439,6 +439,10 @@ plugin_auto_load (session *sess)
#if defined(__hpux)
for_files (XCHATLIBDIR"/plugins", "*.sl", plugin_auto_load_cb);
for_files (get_xdir_fs (), "*.sl", plugin_auto_load_cb);
+#elif defined(FE_AQUA) || defined(FE_IOS)
+ //TODO: hide plugins into app bundle
+ for_files ("./plugins", "*.so", plugin_auto_load_cb); // X-Chat Aqua
+ for_files (get_xdir_fs (), "*.so", plugin_auto_load_cb);
#else
for_files (XCHATLIBDIR"/plugins", "*.so", plugin_auto_load_cb);
for_files (get_xdir_fs (), "*.so", plugin_auto_load_cb);
View
9 src/common/server.c
@@ -1680,6 +1680,9 @@ server_connect (server *serv, char *hostname, int port, int no_login)
{
int pid, read_des[2];
session *sess = serv->server_session;
+#ifdef FORK_DISABLED
+ pthread_t *t;
+#endif
#ifdef USE_OPENSSL
if (!ctx && serv->use_ssl)
@@ -1774,10 +1777,14 @@ server_connect (server *serv, char *hostname, int port, int no_login)
serv->proxy_sok6 = -1;
}
-#ifdef WIN32
+#if defined(WIN32)
CloseHandle (CreateThread (NULL, 0,
(LPTHREAD_START_ROUTINE)server_child,
serv, 0, (DWORD *)&pid));
+#elif defined (FORK_DISABLED)
+ t = malloc(sizeof(pthread_t));
+ pthread_create(t, NULL, &server_child, serv);
+ pid = t;
#else
#ifdef LOOKUPD
rand(); /* CL: net_resolve calls rand() when LOOKUPD is set, so prepare a different seed for each child. This method giver a bigger variation in seed values than calling srand(time(0)) in the child itself. */
View
4 src/common/text.c
@@ -2163,6 +2163,9 @@ sound_find_command (void)
void
sound_play (const char *file, gboolean quiet)
{
+#ifdef FE_AQUA || FE_IOS
+ fe_play_wave (file);
+#else
char buf[512];
char wavfile[512];
char *file_fs;
@@ -2228,6 +2231,7 @@ sound_play (const char *file, gboolean quiet)
}
g_free (file_fs);
+#endif /* FE_AQUA */
}
void
View
2 src/common/xchat.c
@@ -808,9 +808,11 @@ xchat_init (void)
servlist_init (); /* load server list */
+ #ifndef FE_IOS
/* if we got a URL, don't open the server list GUI */
if (!prefs.slist_skip && !arg_url)
fe_serverlist_open (NULL);
+ #endif
/* turned OFF via -a arg */
if (!arg_dont_autoconnect)
View
4 src/common/xchat.h
@@ -306,6 +306,10 @@ struct xchatprefs
This is so that we continue using internal defaults (which can
change in the next release) until the user edits them. */
unsigned int save_pevents:1;
+ /* XCA specific preferences: */
+#ifdef FE_AQUA
+# include "Sources/XAPrefs.h"
+#endif
};
/* Session types */

0 comments on commit c89af8e

Please sign in to comment.