Skip to content

Commit

Permalink
xchat azure patches
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Jun 4, 2013
1 parent 57608c7 commit c89af8e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/common/cfgfiles.c
Expand Up @@ -318,6 +318,10 @@ get_xdir_fs (void)
return xdir_fs;
}

#elif FE_AQUA || FE_IOS

extern char *get_xdir_fs(void);

#else

char *
Expand Down Expand Up @@ -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},
};

Expand Down Expand Up @@ -686,6 +693,9 @@ load_config (void)
prefs.url_grabber_limit = 0; /* 0 means unlimited for backcompat */
#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 ");
Expand Down
5 changes: 5 additions & 0 deletions src/common/ctcp.c
Expand Up @@ -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);
}

Expand Down
4 changes: 4 additions & 0 deletions src/common/plugin.c
Expand Up @@ -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);
Expand Down
9 changes: 8 additions & 1 deletion src/common/server.c
Expand Up @@ -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)
Expand Down Expand Up @@ -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. */
Expand Down
4 changes: 4 additions & 0 deletions src/common/text.c
Expand Up @@ -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;
Expand Down Expand Up @@ -2228,6 +2231,7 @@ sound_play (const char *file, gboolean quiet)
}

g_free (file_fs);
#endif /* FE_AQUA */
}

void
Expand Down
2 changes: 2 additions & 0 deletions src/common/xchat.c
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions src/common/xchat.h
Expand Up @@ -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 */
Expand Down

0 comments on commit c89af8e

Please sign in to comment.