mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
HEXCHAT -> ZOITECHAT
This commit is contained in:
@@ -54,7 +54,7 @@ config_h.set('GLIB_VERSION_MIN_REQUIRED', 'GLIB_VERSION_2_36')
|
|||||||
config_h.set('HAVE_MEMRCHR', cc.has_function('memrchr'))
|
config_h.set('HAVE_MEMRCHR', cc.has_function('memrchr'))
|
||||||
config_h.set('HAVE_STRINGS_H', cc.has_header('strings.h'))
|
config_h.set('HAVE_STRINGS_H', cc.has_header('strings.h'))
|
||||||
|
|
||||||
config_h.set_quoted('HEXCHATLIBDIR',
|
config_h.set_quoted('ZOITECHATLIBDIR',
|
||||||
join_paths(get_option('prefix'), get_option('libdir'), 'zoitechat/plugins')
|
join_paths(get_option('prefix'), get_option('libdir'), 'zoitechat/plugins')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export PANGO_SYSCONFDIR="$bundle_etc"
|
|||||||
|
|
||||||
export OPENSSL_CONF="/System/Library/OpenSSL/openssl.cnf"
|
export OPENSSL_CONF="/System/Library/OpenSSL/openssl.cnf"
|
||||||
|
|
||||||
export HEXCHAT_LIBDIR="$bundle_lib/zoitechat/plugins"
|
export ZOITECHAT_LIBDIR="$bundle_lib/zoitechat/plugins"
|
||||||
|
|
||||||
APP=name
|
APP=name
|
||||||
I18NDIR="$bundle_data/locale"
|
I18NDIR="$bundle_data/locale"
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ dccrecv_cb (char *word[], void *userdata)
|
|||||||
if (!filename_fs) {
|
if (!filename_fs) {
|
||||||
zoitechat_printf (ph, "Checksum: Invalid filename (%s)\n", filename);
|
zoitechat_printf (ph, "Checksum: Invalid filename (%s)\n", filename);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ChecksumCallbackInfo *callback_data = g_new (ChecksumCallbackInfo, 1);
|
ChecksumCallbackInfo *callback_data = g_new (ChecksumCallbackInfo, 1);
|
||||||
@@ -153,7 +153,7 @@ dccrecv_cb (char *word[], void *userdata)
|
|||||||
g_object_unref (file);
|
g_object_unref (file);
|
||||||
g_object_unref (task);
|
g_object_unref (task);
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -177,7 +177,7 @@ dccoffer_cb (char *word[], void *userdata)
|
|||||||
g_object_unref (file);
|
g_object_unref (file);
|
||||||
g_object_unref (task);
|
g_object_unref (task);
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -189,8 +189,8 @@ zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char
|
|||||||
*plugin_desc = desc;
|
*plugin_desc = desc;
|
||||||
*plugin_version = version;
|
*plugin_version = version;
|
||||||
|
|
||||||
zoitechat_hook_print (ph, "DCC RECV Complete", HEXCHAT_PRI_NORM, dccrecv_cb, NULL);
|
zoitechat_hook_print (ph, "DCC RECV Complete", ZOITECHAT_PRI_NORM, dccrecv_cb, NULL);
|
||||||
zoitechat_hook_print (ph, "DCC Offer", HEXCHAT_PRI_NORM, dccoffer_cb, NULL);
|
zoitechat_hook_print (ph, "DCC Offer", ZOITECHAT_PRI_NORM, dccoffer_cb, NULL);
|
||||||
|
|
||||||
zoitechat_printf (ph, "%s plugin loaded\n", name);
|
zoitechat_printf (ph, "%s plugin loaded\n", name);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ run_command (char *word[], char *word_eol[], void *userdata)
|
|||||||
zoitechat_command (ph, "help exec");
|
zoitechat_command (ph, "help exec");
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -146,7 +146,7 @@ zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char
|
|||||||
*plugin_desc = desc;
|
*plugin_desc = desc;
|
||||||
*plugin_version = version;
|
*plugin_version = version;
|
||||||
|
|
||||||
zoitechat_hook_command (ph, "EXEC", HEXCHAT_PRI_NORM, run_command, "Usage: /EXEC [-O] - execute commands inside ZoiteChat", 0);
|
zoitechat_hook_command (ph, "EXEC", ZOITECHAT_PRI_NORM, run_command, "Usage: /EXEC [-O] - execute commands inside ZoiteChat", 0);
|
||||||
zoitechat_printf (ph, "%s plugin loaded\n", name);
|
zoitechat_printf (ph, "%s plugin loaded\n", name);
|
||||||
|
|
||||||
return 1; /* return 1 for success */
|
return 1; /* return 1 for success */
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ char *decrypt_raw_message(const char *message, const char *key) {
|
|||||||
zoitechat_printf(ph, ">%s< ", word[i]);
|
zoitechat_printf(ph, ">%s< ", word[i]);
|
||||||
}
|
}
|
||||||
zoitechat_printf(ph, "\n");
|
zoitechat_printf(ph, "\n");
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -299,7 +299,7 @@ static int handle_outgoing(char *word[], char *word_eol[], void *userdata) {
|
|||||||
const char *channel = zoitechat_get_info(ph, "channel");
|
const char *channel = zoitechat_get_info(ph, "channel");
|
||||||
|
|
||||||
/* Check if we can encrypt */
|
/* Check if we can encrypt */
|
||||||
if (!fish_nick_has_key(channel)) return HEXCHAT_EAT_NONE;
|
if (!fish_nick_has_key(channel)) return ZOITECHAT_EAT_NONE;
|
||||||
|
|
||||||
command = g_string_new("");
|
command = g_string_new("");
|
||||||
g_string_printf(command, "PRIVMSG %s :+OK ", channel);
|
g_string_printf(command, "PRIVMSG %s :+OK ", channel);
|
||||||
@@ -307,7 +307,7 @@ static int handle_outgoing(char *word[], char *word_eol[], void *userdata) {
|
|||||||
encrypted_list = fish_encrypt_for_nick(channel, word_eol[1], &mode, get_prefix_length() + command->len);
|
encrypted_list = fish_encrypt_for_nick(channel, word_eol[1], &mode, get_prefix_length() + command->len);
|
||||||
if (!encrypted_list) {
|
if (!encrypted_list) {
|
||||||
g_string_free(command, TRUE);
|
g_string_free(command, TRUE);
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get prefix for own nick if any */
|
/* Get prefix for own nick if any */
|
||||||
@@ -333,7 +333,7 @@ static int handle_outgoing(char *word[], char *word_eol[], void *userdata) {
|
|||||||
g_string_free(command, TRUE);
|
g_string_free(command, TRUE);
|
||||||
g_slist_free_full(encrypted_list, g_free);
|
g_slist_free_full(encrypted_list, g_free);
|
||||||
|
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -350,7 +350,7 @@ static int handle_incoming(char *word[], char *word_eol[], zoitechat_event_attrs
|
|||||||
GString *message;
|
GString *message;
|
||||||
|
|
||||||
if (!irc_parse_message((const char **)word, &prefix, &command, ¶meters_offset))
|
if (!irc_parse_message((const char **)word, &prefix, &command, ¶meters_offset))
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
|
|
||||||
/* Topic (command 332) has an extra parameter */
|
/* Topic (command 332) has an extra parameter */
|
||||||
if (!strcmp(command, "332"))
|
if (!strcmp(command, "332"))
|
||||||
@@ -367,7 +367,7 @@ static int handle_incoming(char *word[], char *word_eol[], zoitechat_event_attrs
|
|||||||
|
|
||||||
/* Nothing to decrypt */
|
/* Nothing to decrypt */
|
||||||
if (decrypted == NULL)
|
if (decrypted == NULL)
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
|
|
||||||
/* Build decrypted message */
|
/* Build decrypted message */
|
||||||
|
|
||||||
@@ -395,7 +395,7 @@ static int handle_incoming(char *word[], char *word_eol[], zoitechat_event_attrs
|
|||||||
zoitechat_command(ph, message->str);
|
zoitechat_command(ph, message->str);
|
||||||
g_string_free (message, TRUE);
|
g_string_free (message, TRUE);
|
||||||
|
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
|
static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
|
||||||
@@ -407,10 +407,10 @@ static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
|
|||||||
enum fish_mode mode = FISH_ECB_MODE;
|
enum fish_mode mode = FISH_ECB_MODE;
|
||||||
|
|
||||||
if (!*dh_message || !*dh_pubkey || strlen(dh_pubkey) != 181)
|
if (!*dh_message || !*dh_pubkey || strlen(dh_pubkey) != 181)
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
|
|
||||||
if (!irc_parse_message((const char**)word, &prefix, NULL, NULL) || !prefix)
|
if (!irc_parse_message((const char**)word, &prefix, NULL, NULL) || !prefix)
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
|
|
||||||
sender = irc_prefix_get_nick(prefix);
|
sender = irc_prefix_get_nick(prefix);
|
||||||
query_ctx = find_context_on_network(sender);
|
query_ctx = find_context_on_network(sender);
|
||||||
@@ -447,7 +447,7 @@ static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
|
|||||||
} else {
|
} else {
|
||||||
/* Regular notice */
|
/* Regular notice */
|
||||||
g_free(sender);
|
g_free(sender);
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dh1080_compute_key(priv_key, dh_pubkey, &secret_key)) {
|
if (dh1080_compute_key(priv_key, dh_pubkey, &secret_key)) {
|
||||||
@@ -461,7 +461,7 @@ static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
|
|||||||
cleanup:
|
cleanup:
|
||||||
g_free(sender);
|
g_free(sender);
|
||||||
g_free(priv_key);
|
g_free(priv_key);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -475,7 +475,7 @@ static int handle_setkey(char *word[], char *word_eol[], void *userdata) {
|
|||||||
/* Check syntax */
|
/* Check syntax */
|
||||||
if (*word[2] == '\0') {
|
if (*word[2] == '\0') {
|
||||||
zoitechat_printf(ph, "%s\n", usage_setkey);
|
zoitechat_printf(ph, "%s\n", usage_setkey);
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*word[3] == '\0') {
|
if (*word[3] == '\0') {
|
||||||
@@ -503,7 +503,7 @@ static int handle_setkey(char *word[], char *word_eol[], void *userdata) {
|
|||||||
zoitechat_printf(ph, "\00305Failed to store key in addon_fishlim.conf\n");
|
zoitechat_printf(ph, "\00305Failed to store key in addon_fishlim.conf\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -523,7 +523,7 @@ static int handle_delkey(char *word[], char *word_eol[], void *userdata) {
|
|||||||
/* Only allow channel or dialog */
|
/* Only allow channel or dialog */
|
||||||
if (ctx_type < 2 || ctx_type > 3) {
|
if (ctx_type < 2 || ctx_type > 3) {
|
||||||
zoitechat_printf(ph, "%s\n", usage_delkey);
|
zoitechat_printf(ph, "%s\n", usage_delkey);
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -535,7 +535,7 @@ static int handle_delkey(char *word[], char *word_eol[], void *userdata) {
|
|||||||
}
|
}
|
||||||
g_free(nick);
|
g_free(nick);
|
||||||
|
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int handle_keyx(char *word[], char *word_eol[], void *userdata) {
|
static int handle_keyx(char *word[], char *word_eol[], void *userdata) {
|
||||||
@@ -558,7 +558,7 @@ static int handle_keyx(char *word[], char *word_eol[], void *userdata) {
|
|||||||
|
|
||||||
if ((query_ctx && ctx_type != 3) || (!query_ctx && !irc_is_query(target))) {
|
if ((query_ctx && ctx_type != 3) || (!query_ctx && !irc_is_query(target))) {
|
||||||
zoitechat_print(ph, "You can only exchange keys with individuals");
|
zoitechat_print(ph, "You can only exchange keys with individuals");
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dh1080_generate_key(&priv_key, &pub_key)) {
|
if (dh1080_generate_key(&priv_key, &pub_key)) {
|
||||||
@@ -572,7 +572,7 @@ static int handle_keyx(char *word[], char *word_eol[], void *userdata) {
|
|||||||
zoitechat_print(ph, "Failed to generate keys");
|
zoitechat_print(ph, "Failed to generate keys");
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -587,12 +587,12 @@ static int handle_crypt_topic(char *word[], char *word_eol[], void *userdata) {
|
|||||||
|
|
||||||
if (!*topic) {
|
if (!*topic) {
|
||||||
zoitechat_print(ph, usage_topic);
|
zoitechat_print(ph, usage_topic);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zoitechat_list_int(ph, NULL, "type") != 2) {
|
if (zoitechat_list_int(ph, NULL, "type") != 2) {
|
||||||
zoitechat_printf(ph, "Please change to the channel window where you want to set the topic!");
|
zoitechat_printf(ph, "Please change to the channel window where you want to set the topic!");
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
target = zoitechat_get_info(ph, "channel");
|
target = zoitechat_get_info(ph, "channel");
|
||||||
@@ -600,7 +600,7 @@ static int handle_crypt_topic(char *word[], char *word_eol[], void *userdata) {
|
|||||||
/* Check if we can encrypt */
|
/* Check if we can encrypt */
|
||||||
if (!fish_nick_has_key(target)) {
|
if (!fish_nick_has_key(target)) {
|
||||||
zoitechat_printf(ph, "/topic+ error, no key found for %s", target);
|
zoitechat_printf(ph, "/topic+ error, no key found for %s", target);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
command = g_string_new("");
|
command = g_string_new("");
|
||||||
@@ -610,7 +610,7 @@ static int handle_crypt_topic(char *word[], char *word_eol[], void *userdata) {
|
|||||||
if (!encrypted_list) {
|
if (!encrypted_list) {
|
||||||
g_string_free(command, TRUE);
|
g_string_free(command, TRUE);
|
||||||
zoitechat_printf(ph, "/topic+ error, can't encrypt %s", target);
|
zoitechat_printf(ph, "/topic+ error, can't encrypt %s", target);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
zoitechat_commandf(ph, "%s%s", command->str, (char *) encrypted_list->data);
|
zoitechat_commandf(ph, "%s%s", command->str, (char *) encrypted_list->data);
|
||||||
@@ -618,7 +618,7 @@ static int handle_crypt_topic(char *word[], char *word_eol[], void *userdata) {
|
|||||||
g_string_free(command, TRUE);
|
g_string_free(command, TRUE);
|
||||||
g_slist_free_full(encrypted_list, g_free);
|
g_slist_free_full(encrypted_list, g_free);
|
||||||
|
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -634,13 +634,13 @@ static int handle_crypt_notice(char *word[], char *word_eol[], void *userdata) {
|
|||||||
|
|
||||||
if (!*target || !*notice) {
|
if (!*target || !*notice) {
|
||||||
zoitechat_print(ph, usage_notice);
|
zoitechat_print(ph, usage_notice);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if we can encrypt */
|
/* Check if we can encrypt */
|
||||||
if (!fish_nick_has_key(target)) {
|
if (!fish_nick_has_key(target)) {
|
||||||
zoitechat_printf(ph, "/notice+ error, no key found for %s.", target);
|
zoitechat_printf(ph, "/notice+ error, no key found for %s.", target);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
command = g_string_new("");
|
command = g_string_new("");
|
||||||
@@ -650,7 +650,7 @@ static int handle_crypt_notice(char *word[], char *word_eol[], void *userdata) {
|
|||||||
if (!encrypted_list) {
|
if (!encrypted_list) {
|
||||||
g_string_free(command, TRUE);
|
g_string_free(command, TRUE);
|
||||||
zoitechat_printf(ph, "/notice+ error, can't encrypt %s", target);
|
zoitechat_printf(ph, "/notice+ error, can't encrypt %s", target);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
notice_flag = g_strconcat("[", fish_modes[mode], "] ", notice, NULL);
|
notice_flag = g_strconcat("[", fish_modes[mode], "] ", notice, NULL);
|
||||||
@@ -668,7 +668,7 @@ static int handle_crypt_notice(char *word[], char *word_eol[], void *userdata) {
|
|||||||
g_string_free(command, TRUE);
|
g_string_free(command, TRUE);
|
||||||
g_slist_free_full(encrypted_list, g_free);
|
g_slist_free_full(encrypted_list, g_free);
|
||||||
|
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -686,13 +686,13 @@ static int handle_crypt_msg(char *word[], char *word_eol[], void *userdata) {
|
|||||||
|
|
||||||
if (!*target || !*message) {
|
if (!*target || !*message) {
|
||||||
zoitechat_print(ph, usage_msg);
|
zoitechat_print(ph, usage_msg);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if we can encrypt */
|
/* Check if we can encrypt */
|
||||||
if (!fish_nick_has_key(target)) {
|
if (!fish_nick_has_key(target)) {
|
||||||
zoitechat_printf(ph, "/msg+ error, no key found for %s", target);
|
zoitechat_printf(ph, "/msg+ error, no key found for %s", target);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
command = g_string_new("");
|
command = g_string_new("");
|
||||||
@@ -702,7 +702,7 @@ static int handle_crypt_msg(char *word[], char *word_eol[], void *userdata) {
|
|||||||
if (!encrypted_list) {
|
if (!encrypted_list) {
|
||||||
g_string_free(command, TRUE);
|
g_string_free(command, TRUE);
|
||||||
zoitechat_printf(ph, "/msg+ error, can't encrypt %s", target);
|
zoitechat_printf(ph, "/msg+ error, can't encrypt %s", target);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send encrypted messages */
|
/* Send encrypted messages */
|
||||||
@@ -731,7 +731,7 @@ static int handle_crypt_msg(char *word[], char *word_eol[], void *userdata) {
|
|||||||
zoitechat_emit_print(ph, "Message Send", target, message);
|
zoitechat_emit_print(ph, "Message Send", target, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int handle_crypt_me(char *word[], char *word_eol[], void *userdata) {
|
static int handle_crypt_me(char *word[], char *word_eol[], void *userdata) {
|
||||||
@@ -742,7 +742,7 @@ static int handle_crypt_me(char *word[], char *word_eol[], void *userdata) {
|
|||||||
|
|
||||||
/* Check if we can encrypt */
|
/* Check if we can encrypt */
|
||||||
if (!fish_nick_has_key(channel)) {
|
if (!fish_nick_has_key(channel)) {
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
command = g_string_new("");
|
command = g_string_new("");
|
||||||
@@ -753,7 +753,7 @@ static int handle_crypt_me(char *word[], char *word_eol[], void *userdata) {
|
|||||||
if (!encrypted_list) {
|
if (!encrypted_list) {
|
||||||
g_string_free(command, TRUE);
|
g_string_free(command, TRUE);
|
||||||
zoitechat_printf(ph, "/me error, can't encrypt %s", channel);
|
zoitechat_printf(ph, "/me error, can't encrypt %s", channel);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
zoitechat_emit_print(ph, "Your Action", zoitechat_get_info(ph, "nick"), word_eol[2], NULL);
|
zoitechat_emit_print(ph, "Your Action", zoitechat_get_info(ph, "nick"), word_eol[2], NULL);
|
||||||
@@ -769,7 +769,7 @@ static int handle_crypt_me(char *word[], char *word_eol[], void *userdata) {
|
|||||||
g_string_free(command, TRUE);
|
g_string_free(command, TRUE);
|
||||||
g_slist_free_full(encrypted_list, g_free);
|
g_slist_free_full(encrypted_list, g_free);
|
||||||
|
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -798,22 +798,22 @@ int zoitechat_plugin_init(zoitechat_plugin *plugin_handle,
|
|||||||
*version = plugin_version;
|
*version = plugin_version;
|
||||||
|
|
||||||
/* Register commands */
|
/* Register commands */
|
||||||
zoitechat_hook_command(ph, "SETKEY", HEXCHAT_PRI_NORM, handle_setkey, usage_setkey, NULL);
|
zoitechat_hook_command(ph, "SETKEY", ZOITECHAT_PRI_NORM, handle_setkey, usage_setkey, NULL);
|
||||||
zoitechat_hook_command(ph, "DELKEY", HEXCHAT_PRI_NORM, handle_delkey, usage_delkey, NULL);
|
zoitechat_hook_command(ph, "DELKEY", ZOITECHAT_PRI_NORM, handle_delkey, usage_delkey, NULL);
|
||||||
zoitechat_hook_command(ph, "KEYX", HEXCHAT_PRI_NORM, handle_keyx, usage_keyx, NULL);
|
zoitechat_hook_command(ph, "KEYX", ZOITECHAT_PRI_NORM, handle_keyx, usage_keyx, NULL);
|
||||||
zoitechat_hook_command(ph, "TOPIC+", HEXCHAT_PRI_NORM, handle_crypt_topic, usage_topic, NULL);
|
zoitechat_hook_command(ph, "TOPIC+", ZOITECHAT_PRI_NORM, handle_crypt_topic, usage_topic, NULL);
|
||||||
zoitechat_hook_command(ph, "NOTICE+", HEXCHAT_PRI_NORM, handle_crypt_notice, usage_notice, NULL);
|
zoitechat_hook_command(ph, "NOTICE+", ZOITECHAT_PRI_NORM, handle_crypt_notice, usage_notice, NULL);
|
||||||
zoitechat_hook_command(ph, "MSG+", HEXCHAT_PRI_NORM, handle_crypt_msg, usage_msg, NULL);
|
zoitechat_hook_command(ph, "MSG+", ZOITECHAT_PRI_NORM, handle_crypt_msg, usage_msg, NULL);
|
||||||
zoitechat_hook_command(ph, "ME", HEXCHAT_PRI_NORM, handle_crypt_me, NULL, NULL);
|
zoitechat_hook_command(ph, "ME", ZOITECHAT_PRI_NORM, handle_crypt_me, NULL, NULL);
|
||||||
|
|
||||||
/* Add handlers */
|
/* Add handlers */
|
||||||
zoitechat_hook_command(ph, "", HEXCHAT_PRI_NORM, handle_outgoing, NULL, NULL);
|
zoitechat_hook_command(ph, "", ZOITECHAT_PRI_NORM, handle_outgoing, NULL, NULL);
|
||||||
zoitechat_hook_server(ph, "NOTICE", HEXCHAT_PRI_HIGHEST, handle_keyx_notice, NULL);
|
zoitechat_hook_server(ph, "NOTICE", ZOITECHAT_PRI_HIGHEST, handle_keyx_notice, NULL);
|
||||||
zoitechat_hook_server_attrs(ph, "NOTICE", HEXCHAT_PRI_NORM, handle_incoming, NULL);
|
zoitechat_hook_server_attrs(ph, "NOTICE", ZOITECHAT_PRI_NORM, handle_incoming, NULL);
|
||||||
zoitechat_hook_server_attrs(ph, "PRIVMSG", HEXCHAT_PRI_NORM, handle_incoming, NULL);
|
zoitechat_hook_server_attrs(ph, "PRIVMSG", ZOITECHAT_PRI_NORM, handle_incoming, NULL);
|
||||||
/* zoitechat_hook_server(ph, "RAW LINE", HEXCHAT_PRI_NORM, handle_debug, NULL); */
|
/* zoitechat_hook_server(ph, "RAW LINE", ZOITECHAT_PRI_NORM, handle_debug, NULL); */
|
||||||
zoitechat_hook_server_attrs(ph, "TOPIC", HEXCHAT_PRI_NORM, handle_incoming, NULL);
|
zoitechat_hook_server_attrs(ph, "TOPIC", ZOITECHAT_PRI_NORM, handle_incoming, NULL);
|
||||||
zoitechat_hook_server_attrs(ph, "332", HEXCHAT_PRI_NORM, handle_incoming, NULL);
|
zoitechat_hook_server_attrs(ph, "332", ZOITECHAT_PRI_NORM, handle_incoming, NULL);
|
||||||
|
|
||||||
if (!fish_init())
|
if (!fish_init())
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PLUGIN_HEXCHAT_H
|
#ifndef PLUGIN_ZOITECHAT_H
|
||||||
#define PLUGIN_HEXCHAT_H
|
#define PLUGIN_ZOITECHAT_H
|
||||||
|
|
||||||
gchar *get_config_filename(void);
|
gchar *get_config_filename(void);
|
||||||
int irc_nick_cmp (const char *, const char *);
|
int irc_nick_cmp (const char *, const char *);
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PLUGIN_HEXCHAT_FISHLIM_UTILS_H
|
#ifndef PLUGIN_ZOITECHAT_FISHLIM_UTILS_H
|
||||||
#define PLUGIN_HEXCHAT_FISHLIM_UTILS_H
|
#define PLUGIN_ZOITECHAT_FISHLIM_UTILS_H
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "fish.h"
|
#include "fish.h"
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ static int api_command_closure(char *word[], char *word_eol[], void *udata)
|
|||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
zoitechat_printf(ph, "Lua error in command hook: %s", error ? error : "(non-string error)");
|
zoitechat_printf(ph, "Lua error in command hook: %s", error ? error : "(non-string error)");
|
||||||
check_deferred(script);
|
check_deferred(script);
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
ret = lua_tointeger(L, -1);
|
ret = lua_tointeger(L, -1);
|
||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
@@ -313,7 +313,7 @@ static int api_zoitechat_hook_command(lua_State *L)
|
|||||||
lua_pushvalue(L, 2);
|
lua_pushvalue(L, 2);
|
||||||
ref = luaL_ref(L, LUA_REGISTRYINDEX);
|
ref = luaL_ref(L, LUA_REGISTRYINDEX);
|
||||||
help = luaL_optstring(L, 3, NULL);
|
help = luaL_optstring(L, 3, NULL);
|
||||||
pri = luaL_optinteger(L, 4, HEXCHAT_PRI_NORM);
|
pri = luaL_optinteger(L, 4, ZOITECHAT_PRI_NORM);
|
||||||
info = g_new(hook_info, 1);
|
info = g_new(hook_info, 1);
|
||||||
info->state = L;
|
info->state = L;
|
||||||
info->ref = ref;
|
info->ref = ref;
|
||||||
@@ -355,7 +355,7 @@ static int api_print_closure(char *word[], void *udata)
|
|||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
zoitechat_printf(ph, "Lua error in print hook: %s", error ? error : "(non-string error)");
|
zoitechat_printf(ph, "Lua error in print hook: %s", error ? error : "(non-string error)");
|
||||||
check_deferred(script);
|
check_deferred(script);
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
ret = lua_tointeger(L, -1);
|
ret = lua_tointeger(L, -1);
|
||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
@@ -371,7 +371,7 @@ static int api_zoitechat_hook_print(lua_State *L)
|
|||||||
|
|
||||||
lua_pushvalue(L, 2);
|
lua_pushvalue(L, 2);
|
||||||
ref = luaL_ref(L, LUA_REGISTRYINDEX);
|
ref = luaL_ref(L, LUA_REGISTRYINDEX);
|
||||||
pri = luaL_optinteger(L, 3, HEXCHAT_PRI_NORM);
|
pri = luaL_optinteger(L, 3, ZOITECHAT_PRI_NORM);
|
||||||
info = g_new(hook_info, 1);
|
info = g_new(hook_info, 1);
|
||||||
info->state = L;
|
info->state = L;
|
||||||
info->ref = ref;
|
info->ref = ref;
|
||||||
@@ -424,7 +424,7 @@ static int api_print_attrs_closure(char *word[], zoitechat_event_attrs *attrs, v
|
|||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
zoitechat_printf(ph, "Lua error in print_attrs hook: %s", error ? error : "(non-string error)");
|
zoitechat_printf(ph, "Lua error in print_attrs hook: %s", error ? error : "(non-string error)");
|
||||||
check_deferred(script);
|
check_deferred(script);
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
ret = lua_tointeger(L, -1);
|
ret = lua_tointeger(L, -1);
|
||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
@@ -440,7 +440,7 @@ static int api_zoitechat_hook_print_attrs(lua_State *L)
|
|||||||
|
|
||||||
lua_pushvalue(L, 2);
|
lua_pushvalue(L, 2);
|
||||||
ref = luaL_ref(L, LUA_REGISTRYINDEX);
|
ref = luaL_ref(L, LUA_REGISTRYINDEX);
|
||||||
pri = luaL_optinteger(L, 3, HEXCHAT_PRI_NORM);
|
pri = luaL_optinteger(L, 3, ZOITECHAT_PRI_NORM);
|
||||||
info = g_new(hook_info, 1);
|
info = g_new(hook_info, 1);
|
||||||
info->state = L;
|
info->state = L;
|
||||||
info->ref = ref;
|
info->ref = ref;
|
||||||
@@ -482,7 +482,7 @@ static int api_server_closure(char *word[], char *word_eol[], void *udata)
|
|||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
zoitechat_printf(ph, "Lua error in server hook: %s", error ? error : "(non-string error)");
|
zoitechat_printf(ph, "Lua error in server hook: %s", error ? error : "(non-string error)");
|
||||||
check_deferred(script);
|
check_deferred(script);
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
ret = lua_tointeger(L, -1);
|
ret = lua_tointeger(L, -1);
|
||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
@@ -498,7 +498,7 @@ static int api_zoitechat_hook_server(lua_State *L)
|
|||||||
|
|
||||||
lua_pushvalue(L, 2);
|
lua_pushvalue(L, 2);
|
||||||
ref = luaL_ref(L, LUA_REGISTRYINDEX);
|
ref = luaL_ref(L, LUA_REGISTRYINDEX);
|
||||||
pri = luaL_optinteger(L, 3, HEXCHAT_PRI_NORM);
|
pri = luaL_optinteger(L, 3, ZOITECHAT_PRI_NORM);
|
||||||
info = g_new(hook_info, 1);
|
info = g_new(hook_info, 1);
|
||||||
info->state = L;
|
info->state = L;
|
||||||
info->ref = ref;
|
info->ref = ref;
|
||||||
@@ -546,7 +546,7 @@ static int api_server_attrs_closure(char *word[], char *word_eol[], zoitechat_ev
|
|||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
zoitechat_printf(ph, "Lua error in server_attrs hook: %s", error ? error : "(non-string error)");
|
zoitechat_printf(ph, "Lua error in server_attrs hook: %s", error ? error : "(non-string error)");
|
||||||
check_deferred(script);
|
check_deferred(script);
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
ret = lua_tointeger(L, -1);
|
ret = lua_tointeger(L, -1);
|
||||||
lua_pop(L, 2);
|
lua_pop(L, 2);
|
||||||
@@ -562,7 +562,7 @@ static int api_zoitechat_hook_server_attrs(lua_State *L)
|
|||||||
|
|
||||||
lua_pushvalue(L, 2);
|
lua_pushvalue(L, 2);
|
||||||
ref = luaL_ref(L, LUA_REGISTRYINDEX);
|
ref = luaL_ref(L, LUA_REGISTRYINDEX);
|
||||||
pri = luaL_optinteger(L, 3, HEXCHAT_PRI_NORM);
|
pri = luaL_optinteger(L, 3, ZOITECHAT_PRI_NORM);
|
||||||
info = g_new(hook_info, 1);
|
info = g_new(hook_info, 1);
|
||||||
info->state = L;
|
info->state = L;
|
||||||
info->ref = ref;
|
info->ref = ref;
|
||||||
@@ -1098,15 +1098,15 @@ static int luaopen_zoitechat(lua_State *L)
|
|||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
luaL_setfuncs(L, api_zoitechat, 0);
|
luaL_setfuncs(L, api_zoitechat, 0);
|
||||||
|
|
||||||
lua_pushinteger(L, HEXCHAT_PRI_HIGHEST); lua_setfield(L, -2, "PRI_HIGHEST");
|
lua_pushinteger(L, ZOITECHAT_PRI_HIGHEST); lua_setfield(L, -2, "PRI_HIGHEST");
|
||||||
lua_pushinteger(L, HEXCHAT_PRI_HIGH); lua_setfield(L, -2, "PRI_HIGH");
|
lua_pushinteger(L, ZOITECHAT_PRI_HIGH); lua_setfield(L, -2, "PRI_HIGH");
|
||||||
lua_pushinteger(L, HEXCHAT_PRI_NORM); lua_setfield(L, -2, "PRI_NORM");
|
lua_pushinteger(L, ZOITECHAT_PRI_NORM); lua_setfield(L, -2, "PRI_NORM");
|
||||||
lua_pushinteger(L, HEXCHAT_PRI_LOW); lua_setfield(L, -2, "PRI_LOW");
|
lua_pushinteger(L, ZOITECHAT_PRI_LOW); lua_setfield(L, -2, "PRI_LOW");
|
||||||
lua_pushinteger(L, HEXCHAT_PRI_LOWEST); lua_setfield(L, -2, "PRI_LOWEST");
|
lua_pushinteger(L, ZOITECHAT_PRI_LOWEST); lua_setfield(L, -2, "PRI_LOWEST");
|
||||||
lua_pushinteger(L, HEXCHAT_EAT_NONE); lua_setfield(L, -2, "EAT_NONE");
|
lua_pushinteger(L, ZOITECHAT_EAT_NONE); lua_setfield(L, -2, "EAT_NONE");
|
||||||
lua_pushinteger(L, HEXCHAT_EAT_HEXCHAT); lua_setfield(L, -2, "EAT_HEXCHAT");
|
lua_pushinteger(L, ZOITECHAT_EAT_ZOITECHAT); lua_setfield(L, -2, "EAT_ZOITECHAT");
|
||||||
lua_pushinteger(L, HEXCHAT_EAT_PLUGIN); lua_setfield(L, -2, "EAT_PLUGIN");
|
lua_pushinteger(L, ZOITECHAT_EAT_PLUGIN); lua_setfield(L, -2, "EAT_PLUGIN");
|
||||||
lua_pushinteger(L, HEXCHAT_EAT_ALL); lua_setfield(L, -2, "EAT_ALL");
|
lua_pushinteger(L, ZOITECHAT_EAT_ALL); lua_setfield(L, -2, "EAT_ALL");
|
||||||
|
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
@@ -1576,26 +1576,26 @@ static int command_load(char *word[], char *word_eol[], void *userdata)
|
|||||||
if(is_lua_file(word[2]))
|
if(is_lua_file(word[2]))
|
||||||
{
|
{
|
||||||
load_script(word[2]);
|
load_script(word[2]);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int command_unload(char *word[], char *word_eol[], void *userdata)
|
static int command_unload(char *word[], char *word_eol[], void *userdata)
|
||||||
{
|
{
|
||||||
if(unload_script(word[2]))
|
if(unload_script(word[2]))
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
else
|
else
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int command_reload(char *word[], char *word_eol[], void *userdata)
|
static int command_reload(char *word[], char *word_eol[], void *userdata)
|
||||||
{
|
{
|
||||||
if(reload_script(word[2]))
|
if(reload_script(word[2]))
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
else
|
else
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int command_console_exec(char *word[], char *word_eol[], void *userdata)
|
static int command_console_exec(char *word[], char *word_eol[], void *userdata)
|
||||||
@@ -1608,9 +1608,9 @@ static int command_console_exec(char *word[], char *word_eol[], void *userdata)
|
|||||||
zoitechat_printf(ph, "> %s", word_eol[1]);
|
zoitechat_printf(ph, "> %s", word_eol[1]);
|
||||||
inject_string(interp, word_eol[1]);
|
inject_string(interp, word_eol[1]);
|
||||||
}
|
}
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void check_deferred(script_info *info)
|
static void check_deferred(script_info *info)
|
||||||
@@ -1727,7 +1727,7 @@ static int command_lua(char *word[], char *word_eol[], void *userdata)
|
|||||||
{
|
{
|
||||||
zoitechat_command(ph, "help lua");
|
zoitechat_command(ph, "help lua");
|
||||||
}
|
}
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reinitialization safegaurd */
|
/* Reinitialization safegaurd */
|
||||||
@@ -1754,11 +1754,11 @@ G_MODULE_EXPORT int zoitechat_plugin_init(zoitechat_plugin *plugin_handle, char
|
|||||||
ph = plugin_handle;
|
ph = plugin_handle;
|
||||||
initialized = 1;
|
initialized = 1;
|
||||||
|
|
||||||
zoitechat_hook_command(ph, "", HEXCHAT_PRI_NORM, command_console_exec, NULL, NULL);
|
zoitechat_hook_command(ph, "", ZOITECHAT_PRI_NORM, command_console_exec, NULL, NULL);
|
||||||
zoitechat_hook_command(ph, "LOAD", HEXCHAT_PRI_NORM, command_load, NULL, NULL);
|
zoitechat_hook_command(ph, "LOAD", ZOITECHAT_PRI_NORM, command_load, NULL, NULL);
|
||||||
zoitechat_hook_command(ph, "UNLOAD", HEXCHAT_PRI_NORM, command_unload, NULL, NULL);
|
zoitechat_hook_command(ph, "UNLOAD", ZOITECHAT_PRI_NORM, command_unload, NULL, NULL);
|
||||||
zoitechat_hook_command(ph, "RELOAD", HEXCHAT_PRI_NORM, command_reload, NULL, NULL);
|
zoitechat_hook_command(ph, "RELOAD", ZOITECHAT_PRI_NORM, command_reload, NULL, NULL);
|
||||||
zoitechat_hook_command(ph, "lua", HEXCHAT_PRI_NORM, command_lua, command_help, NULL);
|
zoitechat_hook_command(ph, "lua", ZOITECHAT_PRI_NORM, command_lua, command_help, NULL);
|
||||||
|
|
||||||
zoitechat_printf(ph, "%s version %s loaded.\n", plugin_name, plugin_version);
|
zoitechat_printf(ph, "%s version %s loaded.\n", plugin_name, plugin_version);
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ sub PRI_LOW ();
|
|||||||
sub PRI_LOWEST ();
|
sub PRI_LOWEST ();
|
||||||
|
|
||||||
sub EAT_NONE ();
|
sub EAT_NONE ();
|
||||||
sub EAT_HEXCHAT ();
|
sub EAT_ZOITECHAT ();
|
||||||
sub EAT_PLUGIN ();
|
sub EAT_PLUGIN ();
|
||||||
sub EAT_ALL ();
|
sub EAT_ALL ();
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ BEGIN {
|
|||||||
our %EXPORT_TAGS = (
|
our %EXPORT_TAGS = (
|
||||||
constants => [
|
constants => [
|
||||||
qw(PRI_HIGHEST PRI_HIGH PRI_NORM PRI_LOW PRI_LOWEST), # priorities
|
qw(PRI_HIGHEST PRI_HIGH PRI_NORM PRI_LOW PRI_LOWEST), # priorities
|
||||||
qw(EAT_NONE EAT_HEXCHAT EAT_XCHAT EAT_PLUGIN EAT_ALL), # callback return values
|
qw(EAT_NONE EAT_ZOITECHAT EAT_XCHAT EAT_PLUGIN EAT_ALL), # callback return values
|
||||||
qw(FD_READ FD_WRITE FD_EXCEPTION FD_NOTSOCKET), # fd flags
|
qw(FD_READ FD_WRITE FD_EXCEPTION FD_NOTSOCKET), # fd flags
|
||||||
qw(KEEP REMOVE), # timers
|
qw(KEEP REMOVE), # timers
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ sub evaluate {
|
|||||||
ZoiteChat::print $results[0];
|
ZoiteChat::print $results[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
return ZoiteChat::EAT_HEXCHAT;
|
return ZoiteChat::EAT_ZOITECHAT;
|
||||||
};
|
};
|
||||||
|
|
||||||
sub expand_homedir {
|
sub expand_homedir {
|
||||||
|
|||||||
@@ -337,11 +337,11 @@ fd_cb (int fd, int flags, void *userdata)
|
|||||||
if (SvTRUE (ERRSV)) {
|
if (SvTRUE (ERRSV)) {
|
||||||
zoitechat_printf (ph, "Error in fd callback %s", SvPV_nolen (ERRSV));
|
zoitechat_printf (ph, "Error in fd callback %s", SvPV_nolen (ERRSV));
|
||||||
if (!SvOK (POPs)) {} /* remove undef from the top of the stack */
|
if (!SvOK (POPs)) {} /* remove undef from the top of the stack */
|
||||||
retVal = HEXCHAT_EAT_ALL;
|
retVal = ZOITECHAT_EAT_ALL;
|
||||||
} else {
|
} else {
|
||||||
if (count != 1) {
|
if (count != 1) {
|
||||||
zoitechat_print (ph, "Fd handler should only return 1 value.");
|
zoitechat_print (ph, "Fd handler should only return 1 value.");
|
||||||
retVal = HEXCHAT_EAT_NONE;
|
retVal = ZOITECHAT_EAT_NONE;
|
||||||
} else {
|
} else {
|
||||||
retVal = POPi;
|
retVal = POPi;
|
||||||
if (retVal == 0) {
|
if (retVal == 0) {
|
||||||
@@ -398,11 +398,11 @@ timer_cb (void *userdata)
|
|||||||
if (SvTRUE (ERRSV)) {
|
if (SvTRUE (ERRSV)) {
|
||||||
zoitechat_printf (ph, "Error in timer callback %s", SvPV_nolen (ERRSV));
|
zoitechat_printf (ph, "Error in timer callback %s", SvPV_nolen (ERRSV));
|
||||||
if (!SvOK (POPs)) {} /* remove undef from the top of the stack */
|
if (!SvOK (POPs)) {} /* remove undef from the top of the stack */
|
||||||
retVal = HEXCHAT_EAT_ALL;
|
retVal = ZOITECHAT_EAT_ALL;
|
||||||
} else {
|
} else {
|
||||||
if (count != 1) {
|
if (count != 1) {
|
||||||
zoitechat_print (ph, "Timer handler should only return 1 value.");
|
zoitechat_print (ph, "Timer handler should only return 1 value.");
|
||||||
retVal = HEXCHAT_EAT_NONE;
|
retVal = ZOITECHAT_EAT_NONE;
|
||||||
} else {
|
} else {
|
||||||
retVal = POPi;
|
retVal = POPi;
|
||||||
if (retVal == 0) {
|
if (retVal == 0) {
|
||||||
@@ -438,7 +438,7 @@ server_cb (char *word[], char *word_eol[], void *userdata)
|
|||||||
SAVETMPS;
|
SAVETMPS;
|
||||||
|
|
||||||
if (data->depth)
|
if (data->depth)
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
|
|
||||||
/* zoitechat_printf (ph, */
|
/* zoitechat_printf (ph, */
|
||||||
/* "Received %d words in server callback", av_len (wd)); */
|
/* "Received %d words in server callback", av_len (wd)); */
|
||||||
@@ -457,11 +457,11 @@ server_cb (char *word[], char *word_eol[], void *userdata)
|
|||||||
if (SvTRUE (ERRSV)) {
|
if (SvTRUE (ERRSV)) {
|
||||||
zoitechat_printf (ph, "Error in server callback %s", SvPV_nolen (ERRSV));
|
zoitechat_printf (ph, "Error in server callback %s", SvPV_nolen (ERRSV));
|
||||||
if (!SvOK (POPs)) {} /* remove undef from the top of the stack */
|
if (!SvOK (POPs)) {} /* remove undef from the top of the stack */
|
||||||
retVal = HEXCHAT_EAT_NONE;
|
retVal = ZOITECHAT_EAT_NONE;
|
||||||
} else {
|
} else {
|
||||||
if (count != 1) {
|
if (count != 1) {
|
||||||
zoitechat_print (ph, "Server handler should only return 1 value.");
|
zoitechat_print (ph, "Server handler should only return 1 value.");
|
||||||
retVal = HEXCHAT_EAT_NONE;
|
retVal = ZOITECHAT_EAT_NONE;
|
||||||
} else {
|
} else {
|
||||||
retVal = POPi;
|
retVal = POPi;
|
||||||
}
|
}
|
||||||
@@ -487,7 +487,7 @@ command_cb (char *word[], char *word_eol[], void *userdata)
|
|||||||
SAVETMPS;
|
SAVETMPS;
|
||||||
|
|
||||||
if (data->depth)
|
if (data->depth)
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
|
|
||||||
/* zoitechat_printf (ph, "Received %d words in command callback", */
|
/* zoitechat_printf (ph, "Received %d words in command callback", */
|
||||||
/* av_len (wd)); */
|
/* av_len (wd)); */
|
||||||
@@ -506,11 +506,11 @@ command_cb (char *word[], char *word_eol[], void *userdata)
|
|||||||
if (SvTRUE (ERRSV)) {
|
if (SvTRUE (ERRSV)) {
|
||||||
zoitechat_printf (ph, "Error in command callback %s", SvPV_nolen (ERRSV));
|
zoitechat_printf (ph, "Error in command callback %s", SvPV_nolen (ERRSV));
|
||||||
if (!SvOK (POPs)) {} /* remove undef from the top of the stack */
|
if (!SvOK (POPs)) {} /* remove undef from the top of the stack */
|
||||||
retVal = HEXCHAT_EAT_HEXCHAT;
|
retVal = ZOITECHAT_EAT_ZOITECHAT;
|
||||||
} else {
|
} else {
|
||||||
if (count != 1) {
|
if (count != 1) {
|
||||||
zoitechat_print (ph, "Command handler should only return 1 value.");
|
zoitechat_print (ph, "Command handler should only return 1 value.");
|
||||||
retVal = HEXCHAT_EAT_NONE;
|
retVal = ZOITECHAT_EAT_NONE;
|
||||||
} else {
|
} else {
|
||||||
retVal = POPi;
|
retVal = POPi;
|
||||||
}
|
}
|
||||||
@@ -541,7 +541,7 @@ print_cb (char *word[], void *userdata)
|
|||||||
SAVETMPS;
|
SAVETMPS;
|
||||||
|
|
||||||
if (data->depth)
|
if (data->depth)
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
|
|
||||||
wd = newAV ();
|
wd = newAV ();
|
||||||
sv_2mortal ((SV *) wd);
|
sv_2mortal ((SV *) wd);
|
||||||
@@ -582,11 +582,11 @@ print_cb (char *word[], void *userdata)
|
|||||||
if (SvTRUE (ERRSV)) {
|
if (SvTRUE (ERRSV)) {
|
||||||
zoitechat_printf (ph, "Error in print callback %s", SvPV_nolen (ERRSV));
|
zoitechat_printf (ph, "Error in print callback %s", SvPV_nolen (ERRSV));
|
||||||
if (!SvOK (POPs)) {} /* remove undef from the top of the stack */
|
if (!SvOK (POPs)) {} /* remove undef from the top of the stack */
|
||||||
retVal = HEXCHAT_EAT_NONE;
|
retVal = ZOITECHAT_EAT_NONE;
|
||||||
} else {
|
} else {
|
||||||
if (count != 1) {
|
if (count != 1) {
|
||||||
zoitechat_print (ph, "Print handler should only return 1 value.");
|
zoitechat_print (ph, "Print handler should only return 1 value.");
|
||||||
retVal = HEXCHAT_EAT_NONE;
|
retVal = ZOITECHAT_EAT_NONE;
|
||||||
} else {
|
} else {
|
||||||
retVal = POPi;
|
retVal = POPi;
|
||||||
}
|
}
|
||||||
@@ -1022,7 +1022,7 @@ XS (XS_ZoiteChat_hook_fd)
|
|||||||
data = NULL;
|
data = NULL;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
if ((flags & HEXCHAT_FD_NOTSOCKET) == 0) {
|
if ((flags & ZOITECHAT_FD_NOTSOCKET) == 0) {
|
||||||
/* this _get_osfhandle if from win32iop.h in the perl distribution,
|
/* this _get_osfhandle if from win32iop.h in the perl distribution,
|
||||||
* not the one provided by Windows
|
* not the one provided by Windows
|
||||||
*/
|
*/
|
||||||
@@ -1356,21 +1356,21 @@ xs_init (pTHX)
|
|||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
newCONSTSUB (stash, "PRI_HIGHEST", newSViv (HEXCHAT_PRI_HIGHEST));
|
newCONSTSUB (stash, "PRI_HIGHEST", newSViv (ZOITECHAT_PRI_HIGHEST));
|
||||||
newCONSTSUB (stash, "PRI_HIGH", newSViv (HEXCHAT_PRI_HIGH));
|
newCONSTSUB (stash, "PRI_HIGH", newSViv (ZOITECHAT_PRI_HIGH));
|
||||||
newCONSTSUB (stash, "PRI_NORM", newSViv (HEXCHAT_PRI_NORM));
|
newCONSTSUB (stash, "PRI_NORM", newSViv (ZOITECHAT_PRI_NORM));
|
||||||
newCONSTSUB (stash, "PRI_LOW", newSViv (HEXCHAT_PRI_LOW));
|
newCONSTSUB (stash, "PRI_LOW", newSViv (ZOITECHAT_PRI_LOW));
|
||||||
newCONSTSUB (stash, "PRI_LOWEST", newSViv (HEXCHAT_PRI_LOWEST));
|
newCONSTSUB (stash, "PRI_LOWEST", newSViv (ZOITECHAT_PRI_LOWEST));
|
||||||
|
|
||||||
newCONSTSUB (stash, "EAT_NONE", newSViv (HEXCHAT_EAT_NONE));
|
newCONSTSUB (stash, "EAT_NONE", newSViv (ZOITECHAT_EAT_NONE));
|
||||||
newCONSTSUB (stash, "EAT_HEXCHAT", newSViv (HEXCHAT_EAT_HEXCHAT));
|
newCONSTSUB (stash, "EAT_ZOITECHAT", newSViv (ZOITECHAT_EAT_ZOITECHAT));
|
||||||
newCONSTSUB (stash, "EAT_XCHAT", newSViv (HEXCHAT_EAT_HEXCHAT)); /* for compatibility */
|
newCONSTSUB (stash, "EAT_XCHAT", newSViv (ZOITECHAT_EAT_ZOITECHAT)); /* for compatibility */
|
||||||
newCONSTSUB (stash, "EAT_PLUGIN", newSViv (HEXCHAT_EAT_PLUGIN));
|
newCONSTSUB (stash, "EAT_PLUGIN", newSViv (ZOITECHAT_EAT_PLUGIN));
|
||||||
newCONSTSUB (stash, "EAT_ALL", newSViv (HEXCHAT_EAT_ALL));
|
newCONSTSUB (stash, "EAT_ALL", newSViv (ZOITECHAT_EAT_ALL));
|
||||||
newCONSTSUB (stash, "FD_READ", newSViv (HEXCHAT_FD_READ));
|
newCONSTSUB (stash, "FD_READ", newSViv (ZOITECHAT_FD_READ));
|
||||||
newCONSTSUB (stash, "FD_WRITE", newSViv (HEXCHAT_FD_WRITE));
|
newCONSTSUB (stash, "FD_WRITE", newSViv (ZOITECHAT_FD_WRITE));
|
||||||
newCONSTSUB (stash, "FD_EXCEPTION", newSViv (HEXCHAT_FD_EXCEPTION));
|
newCONSTSUB (stash, "FD_EXCEPTION", newSViv (ZOITECHAT_FD_EXCEPTION));
|
||||||
newCONSTSUB (stash, "FD_NOTSOCKET", newSViv (HEXCHAT_FD_NOTSOCKET));
|
newCONSTSUB (stash, "FD_NOTSOCKET", newSViv (ZOITECHAT_FD_NOTSOCKET));
|
||||||
newCONSTSUB (stash, "KEEP", newSViv (1));
|
newCONSTSUB (stash, "KEEP", newSViv (1));
|
||||||
newCONSTSUB (stash, "REMOVE", newSViv (0));
|
newCONSTSUB (stash, "REMOVE", newSViv (0));
|
||||||
|
|
||||||
@@ -1509,10 +1509,10 @@ perl_command_unloadall (char *word[], char *word_eol[], void *userdata)
|
|||||||
{
|
{
|
||||||
if (my_perl != NULL) {
|
if (my_perl != NULL) {
|
||||||
execute_perl (sv_2mortal (newSVpv ("ZoiteChat::Embed::unload_all", 0)), "");
|
execute_perl (sv_2mortal (newSVpv ("ZoiteChat::Embed::unload_all", 0)), "");
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -1521,11 +1521,11 @@ perl_command_reloadall (char *word[], char *word_eol[], void *userdata)
|
|||||||
if (my_perl != NULL) {
|
if (my_perl != NULL) {
|
||||||
execute_perl (sv_2mortal (newSVpv ("ZoiteChat::Embed::reload_all", 0)), "");
|
execute_perl (sv_2mortal (newSVpv ("ZoiteChat::Embed::reload_all", 0)), "");
|
||||||
|
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
} else {
|
} else {
|
||||||
perl_auto_load( NULL );
|
perl_auto_load( NULL );
|
||||||
}
|
}
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -1536,10 +1536,10 @@ perl_command_load (char *word[], char *word_eol[], void *userdata)
|
|||||||
if (file != NULL )
|
if (file != NULL )
|
||||||
{
|
{
|
||||||
perl_load_file (file);
|
perl_load_file (file);
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -1549,10 +1549,10 @@ perl_command_unload (char *word[], char *word_eol[], void *userdata)
|
|||||||
|
|
||||||
if (my_perl != NULL && file != NULL) {
|
if (my_perl != NULL && file != NULL) {
|
||||||
execute_perl (sv_2mortal (newSVpv ("ZoiteChat::Embed::unload", 0)), file);
|
execute_perl (sv_2mortal (newSVpv ("ZoiteChat::Embed::unload", 0)), file);
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -1562,13 +1562,13 @@ perl_command_reload (char *word[], char *word_eol[], void *eat)
|
|||||||
|
|
||||||
if (my_perl != NULL && file != NULL) {
|
if (my_perl != NULL && file != NULL) {
|
||||||
execute_perl (sv_2mortal (newSVpv ("ZoiteChat::Embed::reload", 0)), file);
|
execute_perl (sv_2mortal (newSVpv ("ZoiteChat::Embed::reload", 0)), file);
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eat)
|
if (eat)
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
else
|
else
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -1577,7 +1577,7 @@ perl_command_eval (char *word[], char *word_eol[], void *userdata)
|
|||||||
if (my_perl != NULL)
|
if (my_perl != NULL)
|
||||||
execute_perl (sv_2mortal (newSVpv ("ZoiteChat::Embed::evaluate", 0)), word_eol[2]);
|
execute_perl (sv_2mortal (newSVpv ("ZoiteChat::Embed::evaluate", 0)), word_eol[2]);
|
||||||
|
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1612,19 +1612,19 @@ zoitechat_plugin_init (zoitechat_plugin * plugin_handle, char **plugin_name,
|
|||||||
*plugin_desc = "Perl scripting interface";
|
*plugin_desc = "Perl scripting interface";
|
||||||
*plugin_version = PACKAGE_VERSION;
|
*plugin_version = PACKAGE_VERSION;
|
||||||
|
|
||||||
zoitechat_hook_command (ph, "load", HEXCHAT_PRI_NORM, perl_command_load, 0, 0);
|
zoitechat_hook_command (ph, "load", ZOITECHAT_PRI_NORM, perl_command_load, 0, 0);
|
||||||
zoitechat_hook_command (ph, "unload", HEXCHAT_PRI_NORM, perl_command_unload, 0,
|
zoitechat_hook_command (ph, "unload", ZOITECHAT_PRI_NORM, perl_command_unload, 0,
|
||||||
0);
|
0);
|
||||||
zoitechat_hook_command (ph, "reload", HEXCHAT_PRI_NORM, perl_command_reload, 0,
|
zoitechat_hook_command (ph, "reload", ZOITECHAT_PRI_NORM, perl_command_reload, 0,
|
||||||
0);
|
0);
|
||||||
zoitechat_hook_command (ph, "pl_reload", HEXCHAT_PRI_NORM, perl_command_reload,
|
zoitechat_hook_command (ph, "pl_reload", ZOITECHAT_PRI_NORM, perl_command_reload,
|
||||||
"Reloads a Perl script. Syntax: /pl_reload <filename.pl>", (int*)1);
|
"Reloads a Perl script. Syntax: /pl_reload <filename.pl>", (int*)1);
|
||||||
zoitechat_hook_command (ph, "unloadall", HEXCHAT_PRI_NORM,
|
zoitechat_hook_command (ph, "unloadall", ZOITECHAT_PRI_NORM,
|
||||||
perl_command_unloadall, "Unloads all loaded Perl scripts.", 0);
|
perl_command_unloadall, "Unloads all loaded Perl scripts.", 0);
|
||||||
zoitechat_hook_command (ph, "reloadall", HEXCHAT_PRI_NORM,
|
zoitechat_hook_command (ph, "reloadall", ZOITECHAT_PRI_NORM,
|
||||||
perl_command_reloadall, "Realoads all loaded Perl scripts.", 0);
|
perl_command_reloadall, "Realoads all loaded Perl scripts.", 0);
|
||||||
|
|
||||||
zoitechat_hook_command (ph, "pl", HEXCHAT_PRI_NORM,
|
zoitechat_hook_command (ph, "pl", ZOITECHAT_PRI_NORM,
|
||||||
perl_command_eval, "Evaluates Perl code. Syntax: /pl <perl code>", 0);
|
perl_command_eval, "Evaluates Perl code. Syntax: /pl <perl code>", 0);
|
||||||
|
|
||||||
/*perl_init (); */
|
/*perl_init (); */
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from contextlib import contextmanager
|
|||||||
from _zoitechat_embedded import ffi, lib
|
from _zoitechat_embedded import ffi, lib
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'EAT_ALL', 'EAT_HEXCHAT', 'EAT_NONE', 'EAT_PLUGIN', 'EAT_XCHAT',
|
'EAT_ALL', 'EAT_ZOITECHAT', 'EAT_NONE', 'EAT_PLUGIN', 'EAT_XCHAT',
|
||||||
'PRI_HIGH', 'PRI_HIGHEST', 'PRI_LOW', 'PRI_LOWEST', 'PRI_NORM',
|
'PRI_HIGH', 'PRI_HIGHEST', 'PRI_LOW', 'PRI_LOWEST', 'PRI_NORM',
|
||||||
'__doc__', '__version__', 'command', 'del_pluginpref', 'emit_print',
|
'__doc__', '__version__', 'command', 'del_pluginpref', 'emit_print',
|
||||||
'find_context', 'get_context', 'get_info',
|
'find_context', 'get_context', 'get_info',
|
||||||
@@ -20,10 +20,10 @@ __version__ = (2, 0)
|
|||||||
__license__ = 'GPL-2.0+'
|
__license__ = 'GPL-2.0+'
|
||||||
|
|
||||||
EAT_NONE = 0
|
EAT_NONE = 0
|
||||||
EAT_HEXCHAT = 1
|
EAT_ZOITECHAT = 1
|
||||||
EAT_XCHAT = EAT_HEXCHAT
|
EAT_XCHAT = EAT_ZOITECHAT
|
||||||
EAT_PLUGIN = 2
|
EAT_PLUGIN = 2
|
||||||
EAT_ALL = EAT_HEXCHAT | EAT_PLUGIN
|
EAT_ALL = EAT_ZOITECHAT | EAT_PLUGIN
|
||||||
|
|
||||||
PRI_LOWEST = -128
|
PRI_LOWEST = -128
|
||||||
PRI_LOW = -64
|
PRI_LOW = -64
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ with open(sys.argv[1]) as f:
|
|||||||
for line in f:
|
for line in f:
|
||||||
if line.startswith('#define'):
|
if line.startswith('#define'):
|
||||||
continue
|
continue
|
||||||
elif line.endswith('HEXCHAT_PLUGIN_H\n'):
|
elif line.endswith('ZOITECHAT_PLUGIN_H\n'):
|
||||||
continue
|
continue
|
||||||
elif 'time.h' in line:
|
elif 'time.h' in line:
|
||||||
output.append('typedef int... time_t;')
|
output.append('typedef int... time_t;')
|
||||||
@@ -70,7 +70,7 @@ int zoitechat_plugin_init(zoitechat_plugin *plugin_handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ph = plugin_handle;
|
ph = plugin_handle;
|
||||||
return _on_plugin_init(name_out, description_out, version_out, arg, HEXCHATLIBDIR);
|
return _on_plugin_init(name_out, description_out, version_out, arg, ZOITECHATLIBDIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
int zoitechat_plugin_deinit(void)
|
int zoitechat_plugin_deinit(void)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ def redirected_stdout():
|
|||||||
sys.stderr = zoitechat_stdout
|
sys.stderr = zoitechat_stdout
|
||||||
|
|
||||||
|
|
||||||
if os.getenv('HEXCHAT_LOG_PYTHON'):
|
if os.getenv('ZOITECHAT_LOG_PYTHON'):
|
||||||
def log(*args):
|
def log(*args):
|
||||||
with redirected_stdout():
|
with redirected_stdout():
|
||||||
print(*args)
|
print(*args)
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ sysinfo_cb (char *word[], char *word_eol[], void *userdata)
|
|||||||
else
|
else
|
||||||
print_info (cmd, announce);
|
print_info (cmd, announce);
|
||||||
|
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -233,7 +233,7 @@ zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char
|
|||||||
*plugin_desc = desc;
|
*plugin_desc = desc;
|
||||||
*plugin_version = version;
|
*plugin_version = version;
|
||||||
|
|
||||||
zoitechat_hook_command (ph, "SYSINFO", HEXCHAT_PRI_NORM, sysinfo_cb, sysinfo_help, NULL);
|
zoitechat_hook_command (ph, "SYSINFO", ZOITECHAT_PRI_NORM, sysinfo_cb, sysinfo_help, NULL);
|
||||||
|
|
||||||
zoitechat_command (ph, "MENU ADD \"Window/Send System Info\" \"SYSINFO\"");
|
zoitechat_command (ph, "MENU ADD \"Window/Send System Info\" \"SYSINFO\"");
|
||||||
zoitechat_printf (ph, _("%s plugin loaded\n"), name);
|
zoitechat_printf (ph, _("%s plugin loaded\n"), name);
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ check_cmd (char *word[], char *word_eol[], void *userdata)
|
|||||||
{
|
{
|
||||||
win_sparkle_check_update_with_ui ();
|
win_sparkle_check_update_with_ui ();
|
||||||
|
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -52,7 +52,7 @@ zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char
|
|||||||
win_sparkle_set_appcast_url (APPCAST_URL);
|
win_sparkle_set_appcast_url (APPCAST_URL);
|
||||||
win_sparkle_init ();
|
win_sparkle_init ();
|
||||||
|
|
||||||
zoitechat_hook_command (ph, "UPDCHK", HEXCHAT_PRI_NORM, check_cmd, upd_help, NULL);
|
zoitechat_hook_command (ph, "UPDCHK", ZOITECHAT_PRI_NORM, check_cmd, upd_help, NULL);
|
||||||
zoitechat_command (ph, "MENU -ishare\\download.png ADD \"Help/Check for Updates\" \"UPDCHK\"");
|
zoitechat_command (ph, "MENU -ishare\\download.png ADD \"Help/Check for Updates\" \"UPDCHK\"");
|
||||||
zoitechat_printf (ph, "%s plugin loaded\n", name);
|
zoitechat_printf (ph, "%s plugin loaded\n", name);
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ winamp(char *word[], char *word_eol[], void *userdata)
|
|||||||
if (!current_play)
|
if (!current_play)
|
||||||
{
|
{
|
||||||
zoitechat_print (ph, "Winamp: Error getting song information.");
|
zoitechat_print (ph, "Winamp: Error getting song information.");
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strchr(current_play, '-'))
|
if (strchr(current_play, '-'))
|
||||||
@@ -120,7 +120,7 @@ winamp(char *word[], char *word_eol[], void *userdata)
|
|||||||
{
|
{
|
||||||
zoitechat_print(ph, "Winamp not found.\n");
|
zoitechat_print(ph, "Winamp not found.\n");
|
||||||
}
|
}
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -137,7 +137,7 @@ zoitechat_plugin_init(zoitechat_plugin *plugin_handle,
|
|||||||
*plugin_desc = "Winamp plugin for ZoiteChat";
|
*plugin_desc = "Winamp plugin for ZoiteChat";
|
||||||
*plugin_version = "0.6";
|
*plugin_version = "0.6";
|
||||||
|
|
||||||
zoitechat_hook_command (ph, "WINAMP", HEXCHAT_PRI_NORM, winamp, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START] - control Winamp or show what's currently playing", 0);
|
zoitechat_hook_command (ph, "WINAMP", ZOITECHAT_PRI_NORM, winamp, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START] - control Winamp or show what's currently playing", 0);
|
||||||
zoitechat_command (ph, "MENU -ishare\\music.png ADD \"Window/Display Current Song (Winamp)\" \"WINAMP\"");
|
zoitechat_command (ph, "MENU -ishare\\music.png ADD \"Window/Display Current Song (Winamp)\" \"WINAMP\"");
|
||||||
|
|
||||||
zoitechat_print (ph, "Winamp plugin loaded\n");
|
zoitechat_print (ph, "Winamp plugin loaded\n");
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include <io.h>
|
#include <io.h>
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#define HEXCHAT_DIR "zoitechat"
|
#define ZOITECHAT_DIR "zoitechat"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEF_FONT "Monospace 9"
|
#define DEF_FONT "Monospace 9"
|
||||||
@@ -305,7 +305,7 @@ get_xdir (void)
|
|||||||
if (!xdir)
|
if (!xdir)
|
||||||
{
|
{
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
xdir = g_build_filename (g_get_user_config_dir (), HEXCHAT_DIR, NULL);
|
xdir = g_build_filename (g_get_user_config_dir (), ZOITECHAT_DIR, NULL);
|
||||||
#else
|
#else
|
||||||
wchar_t* roaming_path_wide;
|
wchar_t* roaming_path_wide;
|
||||||
gchar* roaming_path;
|
gchar* roaming_path;
|
||||||
@@ -936,7 +936,7 @@ make_config_dirs (void)
|
|||||||
}
|
}
|
||||||
g_free (buf);
|
g_free (buf);
|
||||||
|
|
||||||
buf = g_build_filename (get_xdir (), HEXCHAT_SOUND_DIR, NULL);
|
buf = g_build_filename (get_xdir (), ZOITECHAT_SOUND_DIR, NULL);
|
||||||
if (g_mkdir (buf, 0700) != 0)
|
if (g_mkdir (buf, 0700) != 0)
|
||||||
{
|
{
|
||||||
g_free (buf);
|
g_free (buf);
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
/* cfgfiles.h */
|
/* cfgfiles.h */
|
||||||
|
|
||||||
#ifndef HEXCHAT_CFGFILES_H
|
#ifndef ZOITECHAT_CFGFILES_H
|
||||||
#define HEXCHAT_CFGFILES_H
|
#define ZOITECHAT_CFGFILES_H
|
||||||
|
|
||||||
#include "zoitechat.h"
|
#include "zoitechat.h"
|
||||||
|
|
||||||
@@ -82,6 +82,6 @@ struct prefs
|
|||||||
#define TYPE_INT 1
|
#define TYPE_INT 1
|
||||||
#define TYPE_BOOL 2
|
#define TYPE_BOOL 2
|
||||||
|
|
||||||
#define HEXCHAT_SOUND_DIR "sounds"
|
#define ZOITECHAT_SOUND_DIR "sounds"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_CHANOPT_H
|
#ifndef ZOITECHAT_CHANOPT_H
|
||||||
#define HEXCHAT_CHANOPT_H
|
#define ZOITECHAT_CHANOPT_H
|
||||||
|
|
||||||
int chanopt_command (session *sess, char *tbuf, char *word[], char *word_eol[]);
|
int chanopt_command (session *sess, char *tbuf, char *word[], char *word_eol[]);
|
||||||
gboolean chanopt_is_set (unsigned int global, guint8 per_chan_setting);
|
gboolean chanopt_is_set (unsigned int global, guint8 per_chan_setting);
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_CTCP_H
|
#ifndef ZOITECHAT_CTCP_H
|
||||||
#define HEXCHAT_CTCP_H
|
#define ZOITECHAT_CTCP_H
|
||||||
|
|
||||||
void ctcp_handle (session *sess, char *to, char *nick, char *ip, char *msg,
|
void ctcp_handle (session *sess, char *to, char *nick, char *ip, char *msg,
|
||||||
char *word[], char *word_eol[], int id,
|
char *word[], char *word_eol[], int id,
|
||||||
|
|||||||
@@ -1002,7 +1002,7 @@ open_context_cb (char *word[],
|
|||||||
info->context = zoitechat_get_context (ph);
|
info->context = zoitechat_get_context (ph);
|
||||||
contexts = g_list_prepend (contexts, info);
|
contexts = g_list_prepend (contexts, info);
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -1020,7 +1020,7 @@ close_context_cb (char *word[],
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -1044,10 +1044,10 @@ unload_plugin_cb (char *word[], char *word_eol[], void *userdata)
|
|||||||
g_signal_emit (obj,
|
g_signal_emit (obj,
|
||||||
signals[UNLOAD_SIGNAL],
|
signals[UNLOAD_SIGNAL],
|
||||||
0);
|
0);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -1071,17 +1071,17 @@ dbus_plugin_init (zoitechat_plugin *plugin_handle,
|
|||||||
g_object_unref);
|
g_object_unref);
|
||||||
|
|
||||||
zoitechat_hook_print (ph, "Open Context",
|
zoitechat_hook_print (ph, "Open Context",
|
||||||
HEXCHAT_PRI_NORM,
|
ZOITECHAT_PRI_NORM,
|
||||||
open_context_cb,
|
open_context_cb,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
zoitechat_hook_print (ph, "Close Context",
|
zoitechat_hook_print (ph, "Close Context",
|
||||||
HEXCHAT_PRI_NORM,
|
ZOITECHAT_PRI_NORM,
|
||||||
close_context_cb,
|
close_context_cb,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
zoitechat_hook_command (ph, "unload",
|
zoitechat_hook_command (ph, "unload",
|
||||||
HEXCHAT_PRI_HIGHEST,
|
ZOITECHAT_PRI_HIGHEST,
|
||||||
unload_plugin_cb, NULL, NULL);
|
unload_plugin_cb, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
* xclaesse@gmail.com
|
* xclaesse@gmail.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_DBUS_PLUGIN_H
|
#ifndef ZOITECHAT_DBUS_PLUGIN_H
|
||||||
#define HEXCHAT_DBUS_PLUGIN_H
|
#define ZOITECHAT_DBUS_PLUGIN_H
|
||||||
|
|
||||||
int dbus_plugin_init (zoitechat_plugin *plugin_handle,
|
int dbus_plugin_init (zoitechat_plugin *plugin_handle,
|
||||||
char **plugin_name,
|
char **plugin_name,
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
#include <time.h> /* for time_t */
|
#include <time.h> /* for time_t */
|
||||||
#include "proto-irc.h"
|
#include "proto-irc.h"
|
||||||
|
|
||||||
#ifndef HEXCHAT_DCC_H
|
#ifndef ZOITECHAT_DCC_H
|
||||||
#define HEXCHAT_DCC_H
|
#define ZOITECHAT_DCC_H
|
||||||
|
|
||||||
enum dcc_state {
|
enum dcc_state {
|
||||||
STAT_QUEUED = 0,
|
STAT_QUEUED = 0,
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
#include "userlist.h"
|
#include "userlist.h"
|
||||||
#include "dcc.h"
|
#include "dcc.h"
|
||||||
|
|
||||||
#ifndef HEXCHAT_FE_H
|
#ifndef ZOITECHAT_FE_H
|
||||||
#define HEXCHAT_FE_H
|
#define ZOITECHAT_FE_H
|
||||||
|
|
||||||
/* for storage of /menu entries */
|
/* for storage of /menu entries */
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_HISTORY_H
|
#ifndef ZOITECHAT_HISTORY_H
|
||||||
#define HEXCHAT_HISTORY_H
|
#define ZOITECHAT_HISTORY_H
|
||||||
|
|
||||||
#define HISTORY_SIZE 100
|
#define HISTORY_SIZE 100
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_IGNORE_H
|
#ifndef ZOITECHAT_IGNORE_H
|
||||||
#define HEXCHAT_IGNORE_H
|
#define ZOITECHAT_IGNORE_H
|
||||||
|
|
||||||
extern GSList *ignore_list;
|
extern GSList *ignore_list;
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
#include "proto-irc.h"
|
#include "proto-irc.h"
|
||||||
|
|
||||||
#ifndef HEXCHAT_INBOUND_H
|
#ifndef ZOITECHAT_INBOUND_H
|
||||||
#define HEXCHAT_INBOUND_H
|
#define ZOITECHAT_INBOUND_H
|
||||||
|
|
||||||
void inbound_next_nick (session *sess, char *nick, int error,
|
void inbound_next_nick (session *sess, char *nick, int error,
|
||||||
const message_tags_data *tags_data);
|
const message_tags_data *tags_data);
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
/* include stuff for internet */
|
/* include stuff for internet */
|
||||||
|
|
||||||
#ifndef HEXCHAT_INET_H
|
#ifndef ZOITECHAT_INET_H
|
||||||
#define HEXCHAT_INET_H
|
#define ZOITECHAT_INET_H
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
#include "proto-irc.h"
|
#include "proto-irc.h"
|
||||||
|
|
||||||
#ifndef HEXCHAT_MODES_H
|
#ifndef ZOITECHAT_MODES_H
|
||||||
#define HEXCHAT_MODES_H
|
#define ZOITECHAT_MODES_H
|
||||||
|
|
||||||
int is_channel (server *serv, char *chan);
|
int is_channel (server *serv, char *chan);
|
||||||
char get_nick_prefix (server *serv, unsigned int access);
|
char get_nick_prefix (server *serv, unsigned int access);
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_NETWORK_H
|
#ifndef ZOITECHAT_NETWORK_H
|
||||||
#define HEXCHAT_NETWORK_H
|
#define ZOITECHAT_NETWORK_H
|
||||||
|
|
||||||
typedef struct netstore_
|
typedef struct netstore_
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -478,7 +478,7 @@ notify_markonline (server *serv, char *word[], const message_tags_data *tags_dat
|
|||||||
about 27 people */
|
about 27 people */
|
||||||
if (i > PDIWORDS - 5)
|
if (i > PDIWORDS - 5)
|
||||||
{
|
{
|
||||||
/*fprintf (stderr, _("*** HEXCHAT WARNING: notify list too large.\n"));*/
|
/*fprintf (stderr, _("*** ZOITECHAT WARNING: notify list too large.\n"));*/
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -515,7 +515,7 @@ notify_checklist_for_server (server *serv)
|
|||||||
/* LAME: we can't send more than 512 bytes to the server, but *
|
/* LAME: we can't send more than 512 bytes to the server, but *
|
||||||
* if we split it in two packets, our offline detection wouldn't *
|
* if we split it in two packets, our offline detection wouldn't *
|
||||||
work */
|
work */
|
||||||
/*fprintf (stderr, _("*** HEXCHAT WARNING: notify list too large.\n"));*/
|
/*fprintf (stderr, _("*** ZOITECHAT WARNING: notify list too large.\n"));*/
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
#include "proto-irc.h"
|
#include "proto-irc.h"
|
||||||
|
|
||||||
#ifndef HEXCHAT_NOTIFY_H
|
#ifndef ZOITECHAT_NOTIFY_H
|
||||||
#define HEXCHAT_NOTIFY_H
|
#define ZOITECHAT_NOTIFY_H
|
||||||
|
|
||||||
struct notify
|
struct notify
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_OUTBOUND_H
|
#ifndef ZOITECHAT_OUTBOUND_H
|
||||||
#define HEXCHAT_OUTBOUND_H
|
#define ZOITECHAT_OUTBOUND_H
|
||||||
|
|
||||||
#include "zoitechat.h"
|
#include "zoitechat.h"
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ identd_cleanup_response_cb (gpointer userdata)
|
|||||||
static int
|
static int
|
||||||
identd_command_cb (char *word[], char *word_eol[], void *userdata)
|
identd_command_cb (char *word[], char *word_eol[], void *userdata)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (responses != NULL, HEXCHAT_EAT_ALL);
|
g_return_val_if_fail (responses != NULL, ZOITECHAT_EAT_ALL);
|
||||||
|
|
||||||
if (!g_strcmp0 (word[2], "reload"))
|
if (!g_strcmp0 (word[2], "reload"))
|
||||||
{
|
{
|
||||||
@@ -86,11 +86,11 @@ identd_command_cb (char *word[], char *word_eol[], void *userdata)
|
|||||||
identd_start_server ();
|
identd_start_server ();
|
||||||
|
|
||||||
if (service)
|
if (service)
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (service == NULL) /* If we are not running plugins can handle it */
|
if (service == NULL) /* If we are not running plugins can handle it */
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
|
|
||||||
if (word[2] && *word[2] && word[3] && *word[3])
|
if (word[2] && *word[2] && word[3] && *word[3])
|
||||||
{
|
{
|
||||||
@@ -108,7 +108,7 @@ identd_command_cb (char *word[], char *word_eol[], void *userdata)
|
|||||||
zoitechat_command (ph, "HELP IDENTD");
|
zoitechat_command (ph, "HELP IDENTD");
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -258,7 +258,7 @@ identd_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name,
|
|||||||
|
|
||||||
|
|
||||||
responses = g_hash_table_new_full (NULL, NULL, NULL, g_free);
|
responses = g_hash_table_new_full (NULL, NULL, NULL, g_free);
|
||||||
zoitechat_hook_command (ph, "IDENTD", HEXCHAT_PRI_NORM, identd_command_cb,
|
zoitechat_hook_command (ph, "IDENTD", ZOITECHAT_PRI_NORM, identd_command_cb,
|
||||||
_("IDENTD <port> <username>"), NULL);
|
_("IDENTD <port> <username>"), NULL);
|
||||||
|
|
||||||
identd_start_server ();
|
identd_start_server ();
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_PLUGIN_IDENTD_H
|
#ifndef ZOITECHAT_PLUGIN_IDENTD_H
|
||||||
#define HEXCHAT_PLUGIN_IDENTD_H
|
#define ZOITECHAT_PLUGIN_IDENTD_H
|
||||||
|
|
||||||
int identd_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name,
|
int identd_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name,
|
||||||
char **plugin_desc, char **plugin_version, char *arg);
|
char **plugin_desc, char **plugin_version, char *arg);
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ timer_cb (char *word[], char *word_eol[], void *userdata)
|
|||||||
if (!word[2][0])
|
if (!word[2][0])
|
||||||
{
|
{
|
||||||
timer_showlist ();
|
timer_showlist ();
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_ascii_strcasecmp (word[2], "-quiet") == 0)
|
if (g_ascii_strcasecmp (word[2], "-quiet") == 0)
|
||||||
@@ -183,7 +183,7 @@ timer_cb (char *word[], char *word_eol[], void *userdata)
|
|||||||
if (g_ascii_strcasecmp (word[2 + offset], "-delete") == 0)
|
if (g_ascii_strcasecmp (word[2 + offset], "-delete") == 0)
|
||||||
{
|
{
|
||||||
timer_del_ref (atoi (word[3 + offset]), quiet);
|
timer_del_ref (atoi (word[3 + offset]), quiet);
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_ascii_strcasecmp (word[2 + offset], "-refnum") == 0)
|
if (g_ascii_strcasecmp (word[2 + offset], "-refnum") == 0)
|
||||||
@@ -206,7 +206,7 @@ timer_cb (char *word[], char *word_eol[], void *userdata)
|
|||||||
else
|
else
|
||||||
timer_add (ref, (int) timeout * 1000, repeat, command);
|
timer_add (ref, (int) timeout * 1000, repeat, command);
|
||||||
|
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return ZOITECHAT_EAT_ZOITECHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -225,7 +225,7 @@ zoitechat_plugin_init
|
|||||||
*plugin_desc = "IrcII style /TIMER command";
|
*plugin_desc = "IrcII style /TIMER command";
|
||||||
*plugin_version = "";
|
*plugin_version = "";
|
||||||
|
|
||||||
zoitechat_hook_command (ph, "TIMER", HEXCHAT_PRI_NORM, timer_cb, _(HELP), 0);
|
zoitechat_hook_command (ph, "TIMER", ZOITECHAT_PRI_NORM, timer_cb, _(HELP), 0);
|
||||||
|
|
||||||
return 1; /* return 1 for success */
|
return 1; /* return 1 for success */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_PLUGIN_TIMER_H
|
#ifndef ZOITECHAT_PLUGIN_TIMER_H
|
||||||
#define HEXCHAT_PLUGIN_TIMER_H
|
#define ZOITECHAT_PLUGIN_TIMER_H
|
||||||
|
|
||||||
int timer_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name,
|
int timer_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name,
|
||||||
char **plugin_desc, char **plugin_version, char *arg);
|
char **plugin_desc, char **plugin_version, char *arg);
|
||||||
|
|||||||
@@ -466,11 +466,11 @@ plugin_get_libdir (void)
|
|||||||
{
|
{
|
||||||
const char *libdir;
|
const char *libdir;
|
||||||
|
|
||||||
libdir = g_getenv ("HEXCHAT_LIBDIR");
|
libdir = g_getenv ("ZOITECHAT_LIBDIR");
|
||||||
if (libdir && *libdir)
|
if (libdir && *libdir)
|
||||||
return libdir;
|
return libdir;
|
||||||
else
|
else
|
||||||
return HEXCHATLIBDIR;
|
return ZOITECHATLIBDIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -608,14 +608,14 @@ plugin_hook_run (session *sess, char *name, char *word[], char *word_eol[],
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret & HEXCHAT_EAT_HEXCHAT) && (ret & HEXCHAT_EAT_PLUGIN))
|
if ((ret & ZOITECHAT_EAT_ZOITECHAT) && (ret & ZOITECHAT_EAT_PLUGIN))
|
||||||
{
|
{
|
||||||
eat = 1;
|
eat = 1;
|
||||||
goto xit;
|
goto xit;
|
||||||
}
|
}
|
||||||
if (ret & HEXCHAT_EAT_PLUGIN)
|
if (ret & ZOITECHAT_EAT_PLUGIN)
|
||||||
goto xit; /* stop running plugins */
|
goto xit; /* stop running plugins */
|
||||||
if (ret & HEXCHAT_EAT_HEXCHAT)
|
if (ret & ZOITECHAT_EAT_ZOITECHAT)
|
||||||
eat = 1; /* eventually we'll return 1, but continue running plugins */
|
eat = 1; /* eventually we'll return 1, but continue running plugins */
|
||||||
|
|
||||||
list = next;
|
list = next;
|
||||||
@@ -801,11 +801,11 @@ plugin_fd_cb (GIOChannel *source, GIOCondition condition, zoitechat_hook *hook)
|
|||||||
typedef int (zoitechat_fd_cb2) (int fd, int flags, void *user_data, GIOChannel *);
|
typedef int (zoitechat_fd_cb2) (int fd, int flags, void *user_data, GIOChannel *);
|
||||||
|
|
||||||
if (condition & G_IO_IN)
|
if (condition & G_IO_IN)
|
||||||
flags |= HEXCHAT_FD_READ;
|
flags |= ZOITECHAT_FD_READ;
|
||||||
if (condition & G_IO_OUT)
|
if (condition & G_IO_OUT)
|
||||||
flags |= HEXCHAT_FD_WRITE;
|
flags |= ZOITECHAT_FD_WRITE;
|
||||||
if (condition & G_IO_PRI)
|
if (condition & G_IO_PRI)
|
||||||
flags |= HEXCHAT_FD_EXCEPTION;
|
flags |= ZOITECHAT_FD_EXCEPTION;
|
||||||
|
|
||||||
ret = ((zoitechat_fd_cb2 *)hook->callback) (hook->pri, flags, hook->userdata, source);
|
ret = ((zoitechat_fd_cb2 *)hook->callback) (hook->pri, flags, hook->userdata, source);
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_COMMONPLUGIN_H
|
#ifndef ZOITECHAT_COMMONPLUGIN_H
|
||||||
#define HEXCHAT_COMMONPLUGIN_H
|
#define ZOITECHAT_COMMONPLUGIN_H
|
||||||
|
|
||||||
#ifdef PLUGIN_C
|
#ifdef PLUGIN_C
|
||||||
struct _zoitechat_plugin
|
struct _zoitechat_plugin
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "zoitechat.h"
|
#include "zoitechat.h"
|
||||||
|
|
||||||
#ifndef HEXCHAT_PROTO_H
|
#ifndef ZOITECHAT_PROTO_H
|
||||||
#define HEXCHAT_PROTO_H
|
#define ZOITECHAT_PROTO_H
|
||||||
|
|
||||||
#define MESSAGE_TAGS_DATA_INIT \
|
#define MESSAGE_TAGS_DATA_INIT \
|
||||||
{ \
|
{ \
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
#ifndef HEXCHAT_SCRAM_H
|
#ifndef ZOITECHAT_SCRAM_H
|
||||||
#define HEXCHAT_SCRAM_H
|
#define ZOITECHAT_SCRAM_H
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ server_read (GIOChannel *source, GIOCondition condition, server *serv)
|
|||||||
serv->linebuf[serv->pos] = lbuf[i];
|
serv->linebuf[serv->pos] = lbuf[i];
|
||||||
if (serv->pos >= (sizeof (serv->linebuf) - 1))
|
if (serv->pos >= (sizeof (serv->linebuf) - 1))
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"*** HEXCHAT WARNING: Buffer overflow - non-compliant server!\n");
|
"*** ZOITECHAT WARNING: Buffer overflow - non-compliant server!\n");
|
||||||
else
|
else
|
||||||
serv->pos++;
|
serv->pos++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_SERVER_H
|
#ifndef ZOITECHAT_SERVER_H
|
||||||
#define HEXCHAT_SERVER_H
|
#define ZOITECHAT_SERVER_H
|
||||||
|
|
||||||
extern GSList *serv_list;
|
extern GSList *serv_list;
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_SERVLIST_H
|
#ifndef ZOITECHAT_SERVLIST_H
|
||||||
#define HEXCHAT_SERVLIST_H
|
#define ZOITECHAT_SERVLIST_H
|
||||||
|
|
||||||
typedef struct ircserver
|
typedef struct ircserver
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_SSL_H
|
#ifndef ZOITECHAT_SSL_H
|
||||||
#define HEXCHAT_SSL_H
|
#define ZOITECHAT_SSL_H
|
||||||
|
|
||||||
struct cert_info {
|
struct cert_info {
|
||||||
char subject[256];
|
char subject[256];
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef HEXCHAT_SYSINFO_H
|
#ifndef ZOITECHAT_SYSINFO_H
|
||||||
#define HEXCHAT_SYSINFO_H
|
#define ZOITECHAT_SYSINFO_H
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
|||||||
@@ -2237,7 +2237,7 @@ sound_play (const char *file, gboolean quiet)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wavfile = g_build_filename (get_xdir (), HEXCHAT_SOUND_DIR, file, NULL);
|
wavfile = g_build_filename (get_xdir (), ZOITECHAT_SOUND_DIR, file, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_access (wavfile, R_OK) == 0)
|
if (g_access (wavfile, R_OK) == 0)
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "textenums.h"
|
#include "textenums.h"
|
||||||
|
|
||||||
#ifndef HEXCHAT_TEXT_H
|
#ifndef ZOITECHAT_TEXT_H
|
||||||
#define HEXCHAT_TEXT_H
|
#define ZOITECHAT_TEXT_H
|
||||||
|
|
||||||
/* timestamp is non-zero if we are using server-time */
|
/* timestamp is non-zero if we are using server-time */
|
||||||
#define EMIT_SIGNAL_TIMESTAMP(i, sess, a, b, c, d, e, timestamp) \
|
#define EMIT_SIGNAL_TIMESTAMP(i, sess, a, b, c, d, e, timestamp) \
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_TREE_H
|
#ifndef ZOITECHAT_TREE_H
|
||||||
#define HEXCHAT_TREE_H
|
#define ZOITECHAT_TREE_H
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_TYPEDEF_H
|
#ifndef ZOITECHAT_TYPEDEF_H
|
||||||
#define HEXCHAT_TYPEDEF_H
|
#define ZOITECHAT_TYPEDEF_H
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_URL_H
|
#ifndef ZOITECHAT_URL_H
|
||||||
#define HEXCHAT_URL_H
|
#define ZOITECHAT_URL_H
|
||||||
|
|
||||||
extern void *url_tree;
|
extern void *url_tree;
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "proto-irc.h"
|
#include "proto-irc.h"
|
||||||
|
|
||||||
#ifndef HEXCHAT_USERLIST_H
|
#ifndef ZOITECHAT_USERLIST_H
|
||||||
#define HEXCHAT_USERLIST_H
|
#define ZOITECHAT_USERLIST_H
|
||||||
|
|
||||||
struct User
|
struct User
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,8 +30,8 @@
|
|||||||
* --+ Dagmar d'Surreal
|
* --+ Dagmar d'Surreal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_UTIL_H
|
#ifndef ZOITECHAT_UTIL_H
|
||||||
#define HEXCHAT_UTIL_H
|
#define ZOITECHAT_UTIL_H
|
||||||
|
|
||||||
#define rfc_tolower(c) (rfc_tolowertab[(unsigned char)(c)])
|
#define rfc_tolower(c) (rfc_tolowertab[(unsigned char)(c)])
|
||||||
|
|
||||||
|
|||||||
@@ -18,26 +18,26 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* You can distribute this header with your plugins for easy compilation */
|
/* You can distribute this header with your plugins for easy compilation */
|
||||||
#ifndef HEXCHAT_PLUGIN_H
|
#ifndef ZOITECHAT_PLUGIN_H
|
||||||
#define HEXCHAT_PLUGIN_H
|
#define ZOITECHAT_PLUGIN_H
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#define HEXCHAT_PRI_HIGHEST 127
|
#define ZOITECHAT_PRI_HIGHEST 127
|
||||||
#define HEXCHAT_PRI_HIGH 64
|
#define ZOITECHAT_PRI_HIGH 64
|
||||||
#define HEXCHAT_PRI_NORM 0
|
#define ZOITECHAT_PRI_NORM 0
|
||||||
#define HEXCHAT_PRI_LOW (-64)
|
#define ZOITECHAT_PRI_LOW (-64)
|
||||||
#define HEXCHAT_PRI_LOWEST (-128)
|
#define ZOITECHAT_PRI_LOWEST (-128)
|
||||||
|
|
||||||
#define HEXCHAT_FD_READ 1
|
#define ZOITECHAT_FD_READ 1
|
||||||
#define HEXCHAT_FD_WRITE 2
|
#define ZOITECHAT_FD_WRITE 2
|
||||||
#define HEXCHAT_FD_EXCEPTION 4
|
#define ZOITECHAT_FD_EXCEPTION 4
|
||||||
#define HEXCHAT_FD_NOTSOCKET 8
|
#define ZOITECHAT_FD_NOTSOCKET 8
|
||||||
|
|
||||||
#define HEXCHAT_EAT_NONE 0 /* pass it on through! */
|
#define ZOITECHAT_EAT_NONE 0 /* pass it on through! */
|
||||||
#define HEXCHAT_EAT_HEXCHAT 1 /* don't let ZoiteChat see this event */
|
#define ZOITECHAT_EAT_ZOITECHAT 1 /* don't let ZoiteChat see this event */
|
||||||
#define HEXCHAT_EAT_PLUGIN 2 /* don't let other plugins see this event */
|
#define ZOITECHAT_EAT_PLUGIN 2 /* don't let other plugins see this event */
|
||||||
#define HEXCHAT_EAT_ALL (HEXCHAT_EAT_HEXCHAT|HEXCHAT_EAT_PLUGIN) /* don't let anything see this event */
|
#define ZOITECHAT_EAT_ALL (ZOITECHAT_EAT_ZOITECHAT|ZOITECHAT_EAT_PLUGIN) /* don't let anything see this event */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -407,50 +407,50 @@ zoitechat_pluginpref_list (zoitechat_plugin *ph,
|
|||||||
char *dest);
|
char *dest);
|
||||||
|
|
||||||
#if !defined(PLUGIN_C) && (defined(WIN32) || defined(__CYGWIN__))
|
#if !defined(PLUGIN_C) && (defined(WIN32) || defined(__CYGWIN__))
|
||||||
#ifndef HEXCHAT_PLUGIN_HANDLE
|
#ifndef ZOITECHAT_PLUGIN_HANDLE
|
||||||
#define HEXCHAT_PLUGIN_HANDLE (ph)
|
#define ZOITECHAT_PLUGIN_HANDLE (ph)
|
||||||
#endif
|
#endif
|
||||||
#define zoitechat_hook_command ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_command)
|
#define zoitechat_hook_command ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_hook_command)
|
||||||
#define zoitechat_event_attrs_create ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_event_attrs_create)
|
#define zoitechat_event_attrs_create ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_event_attrs_create)
|
||||||
#define zoitechat_event_attrs_free ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_event_attrs_free)
|
#define zoitechat_event_attrs_free ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_event_attrs_free)
|
||||||
#define zoitechat_hook_server ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_server)
|
#define zoitechat_hook_server ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_hook_server)
|
||||||
#define zoitechat_hook_server_attrs ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_server_attrs)
|
#define zoitechat_hook_server_attrs ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_hook_server_attrs)
|
||||||
#define zoitechat_hook_print ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_print)
|
#define zoitechat_hook_print ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_hook_print)
|
||||||
#define zoitechat_hook_print_attrs ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_print_attrs)
|
#define zoitechat_hook_print_attrs ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_hook_print_attrs)
|
||||||
#define zoitechat_hook_timer ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_timer)
|
#define zoitechat_hook_timer ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_hook_timer)
|
||||||
#define zoitechat_hook_fd ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_fd)
|
#define zoitechat_hook_fd ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_hook_fd)
|
||||||
#define zoitechat_unhook ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_unhook)
|
#define zoitechat_unhook ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_unhook)
|
||||||
#define zoitechat_print ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_print)
|
#define zoitechat_print ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_print)
|
||||||
#define zoitechat_printf ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_printf)
|
#define zoitechat_printf ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_printf)
|
||||||
#define zoitechat_command ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_command)
|
#define zoitechat_command ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_command)
|
||||||
#define zoitechat_commandf ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_commandf)
|
#define zoitechat_commandf ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_commandf)
|
||||||
#define zoitechat_nickcmp ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_nickcmp)
|
#define zoitechat_nickcmp ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_nickcmp)
|
||||||
#define zoitechat_set_context ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_set_context)
|
#define zoitechat_set_context ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_set_context)
|
||||||
#define zoitechat_find_context ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_find_context)
|
#define zoitechat_find_context ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_find_context)
|
||||||
#define zoitechat_get_context ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_get_context)
|
#define zoitechat_get_context ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_get_context)
|
||||||
#define zoitechat_get_info ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_get_info)
|
#define zoitechat_get_info ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_get_info)
|
||||||
#define zoitechat_get_prefs ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_get_prefs)
|
#define zoitechat_get_prefs ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_get_prefs)
|
||||||
#define zoitechat_list_get ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_get)
|
#define zoitechat_list_get ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_list_get)
|
||||||
#define zoitechat_list_free ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_free)
|
#define zoitechat_list_free ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_list_free)
|
||||||
#define zoitechat_list_fields ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_fields)
|
#define zoitechat_list_fields ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_list_fields)
|
||||||
#define zoitechat_list_next ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_next)
|
#define zoitechat_list_next ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_list_next)
|
||||||
#define zoitechat_list_str ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_str)
|
#define zoitechat_list_str ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_list_str)
|
||||||
#define zoitechat_list_int ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_int)
|
#define zoitechat_list_int ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_list_int)
|
||||||
#define zoitechat_plugingui_add ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_plugingui_add)
|
#define zoitechat_plugingui_add ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_plugingui_add)
|
||||||
#define zoitechat_plugingui_remove ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_plugingui_remove)
|
#define zoitechat_plugingui_remove ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_plugingui_remove)
|
||||||
#define zoitechat_emit_print ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_emit_print)
|
#define zoitechat_emit_print ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_emit_print)
|
||||||
#define zoitechat_emit_print_attrs ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_emit_print_attrs)
|
#define zoitechat_emit_print_attrs ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_emit_print_attrs)
|
||||||
#define zoitechat_list_time ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_time)
|
#define zoitechat_list_time ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_list_time)
|
||||||
#define zoitechat_gettext ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_gettext)
|
#define zoitechat_gettext ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_gettext)
|
||||||
#define zoitechat_send_modes ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_send_modes)
|
#define zoitechat_send_modes ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_send_modes)
|
||||||
#define zoitechat_strip ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_strip)
|
#define zoitechat_strip ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_strip)
|
||||||
#define zoitechat_free ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_free)
|
#define zoitechat_free ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_free)
|
||||||
#define zoitechat_pluginpref_set_str ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_set_str)
|
#define zoitechat_pluginpref_set_str ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_set_str)
|
||||||
#define zoitechat_pluginpref_get_str ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_get_str)
|
#define zoitechat_pluginpref_get_str ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_get_str)
|
||||||
#define zoitechat_pluginpref_set_int ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_set_int)
|
#define zoitechat_pluginpref_set_int ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_set_int)
|
||||||
#define zoitechat_pluginpref_get_int ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_get_int)
|
#define zoitechat_pluginpref_get_int ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_get_int)
|
||||||
#define zoitechat_pluginpref_delete ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_delete)
|
#define zoitechat_pluginpref_delete ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_delete)
|
||||||
#define zoitechat_pluginpref_list ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_list)
|
#define zoitechat_pluginpref_list ((ZOITECHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_list)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
|
|
||||||
#include <time.h> /* need time_t */
|
#include <time.h> /* need time_t */
|
||||||
|
|
||||||
#ifndef HEXCHAT_H
|
#ifndef ZOITECHAT_H
|
||||||
#define HEXCHAT_H
|
#define ZOITECHAT_H
|
||||||
|
|
||||||
gboolean zoitechat_theme_path_from_arg (const char *arg, char **path_out);
|
gboolean zoitechat_theme_path_from_arg (const char *arg, char **path_out);
|
||||||
gboolean zoitechat_import_theme (const char *path, GError **error);
|
gboolean zoitechat_import_theme (const char *path, GError **error);
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_C_H
|
#ifndef ZOITECHAT_C_H
|
||||||
#define HEXCHAT_C_H
|
#define ZOITECHAT_C_H
|
||||||
|
|
||||||
extern struct zoitechatprefs prefs;
|
extern struct zoitechatprefs prefs;
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_ASCII_H
|
#ifndef ZOITECHAT_ASCII_H
|
||||||
#define HEXCHAT_ASCII_H
|
#define ZOITECHAT_ASCII_H
|
||||||
|
|
||||||
void ascii_open (void);
|
void ascii_open (void);
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_BANLIST_H
|
#ifndef ZOITECHAT_BANLIST_H
|
||||||
#define HEXCHAT_BANLIST_H
|
#define ZOITECHAT_BANLIST_H
|
||||||
|
|
||||||
#include "../common/zoitechat.h"
|
#include "../common/zoitechat.h"
|
||||||
void banlist_opengui (session *sess);
|
void banlist_opengui (session *sess);
|
||||||
@@ -72,4 +72,4 @@ typedef struct mode_info_s {
|
|||||||
void (*tester)(banlist_info *, int); /* Function returns true to set bit into checkable */
|
void (*tester)(banlist_info *, int); /* Function returns true to set bit into checkable */
|
||||||
} mode_info;
|
} mode_info;
|
||||||
|
|
||||||
#endif /* HEXCHAT_BANLIST_H */
|
#endif /* ZOITECHAT_BANLIST_H */
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_CHANLIST_H
|
#ifndef ZOITECHAT_CHANLIST_H
|
||||||
#define HEXCHAT_CHANLIST_H
|
#define ZOITECHAT_CHANLIST_H
|
||||||
|
|
||||||
void chanlist_opengui (server *serv, int do_refresh);
|
void chanlist_opengui (server *serv, int do_refresh);
|
||||||
|
|
||||||
|
|||||||
@@ -98,11 +98,11 @@ cv_tree_init (chanview *cv)
|
|||||||
int wid1, wid2;
|
int wid1, wid2;
|
||||||
static const GtkTargetEntry dnd_src_target[] =
|
static const GtkTargetEntry dnd_src_target[] =
|
||||||
{
|
{
|
||||||
{"HEXCHAT_CHANVIEW", GTK_TARGET_SAME_APP, 75 }
|
{"ZOITECHAT_CHANVIEW", GTK_TARGET_SAME_APP, 75 }
|
||||||
};
|
};
|
||||||
static const GtkTargetEntry dnd_dest_target[] =
|
static const GtkTargetEntry dnd_dest_target[] =
|
||||||
{
|
{
|
||||||
{"HEXCHAT_USERLIST", GTK_TARGET_SAME_APP, 75 }
|
{"ZOITECHAT_USERLIST", GTK_TARGET_SAME_APP, 75 }
|
||||||
};
|
};
|
||||||
|
|
||||||
win = gtk_scrolled_window_new (0, 0);
|
win = gtk_scrolled_window_new (0, 0);
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_CHANVIEW_H
|
#ifndef ZOITECHAT_CHANVIEW_H
|
||||||
#define HEXCHAT_CHANVIEW_H
|
#define ZOITECHAT_CHANVIEW_H
|
||||||
|
|
||||||
typedef struct _chanview chanview;
|
typedef struct _chanview chanview;
|
||||||
typedef struct _chan chan;
|
typedef struct _chan chan;
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_CUSTOM_LIST_H
|
#ifndef ZOITECHAT_CUSTOM_LIST_H
|
||||||
#define HEXCHAT_CUSTOM_LIST_H
|
#define ZOITECHAT_CUSTOM_LIST_H
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
@@ -103,4 +103,4 @@ void custom_list_append (CustomList *, chanlistrow *);
|
|||||||
void custom_list_resort (CustomList *);
|
void custom_list_resort (CustomList *);
|
||||||
void custom_list_clear (CustomList *);
|
void custom_list_clear (CustomList *);
|
||||||
|
|
||||||
#endif /* HEXCHAT_CUSTOM_LIST_H */
|
#endif /* ZOITECHAT_CUSTOM_LIST_H */
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_EDITLIST_H
|
#ifndef ZOITECHAT_EDITLIST_H
|
||||||
#define HEXCHAT_EDITLIST_H
|
#define ZOITECHAT_EDITLIST_H
|
||||||
|
|
||||||
void editlist_gui_open (char *title1, char *title2, GSList * list, char *title, char *wmclass, char *file, char *help);
|
void editlist_gui_open (char *title1, char *title2, GSList * list, char *title, char *wmclass, char *file, char *help);
|
||||||
|
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ log_handler (const gchar *log_domain,
|
|||||||
{
|
{
|
||||||
session *sess;
|
session *sess;
|
||||||
|
|
||||||
/* if (getenv ("HEXCHAT_WARNING_IGNORE")) this gets ignored sometimes, so simply just disable all warnings */
|
/* if (getenv ("ZOITECHAT_WARNING_IGNORE")) this gets ignored sometimes, so simply just disable all warnings */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sess = find_dialog (serv_list->data, "(warnings)");
|
sess = find_dialog (serv_list->data, "(warnings)");
|
||||||
@@ -538,7 +538,7 @@ log_handler (const gchar *log_domain,
|
|||||||
sess = new_ircwindow (serv_list->data, "(warnings)", SESS_DIALOG, 0);
|
sess = new_ircwindow (serv_list->data, "(warnings)", SESS_DIALOG, 0);
|
||||||
|
|
||||||
PrintTextf (sess, "%s\t%s\n", log_domain, message);
|
PrintTextf (sess, "%s\t%s\n", log_domain, message);
|
||||||
if (getenv ("HEXCHAT_WARNING_ABORT"))
|
if (getenv ("ZOITECHAT_WARNING_ABORT"))
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_FE_GTK_H
|
#ifndef ZOITECHAT_FE_GTK_H
|
||||||
#define HEXCHAT_FE_GTK_H
|
#define ZOITECHAT_FE_GTK_H
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_FKEYS_H
|
#ifndef ZOITECHAT_FKEYS_H
|
||||||
#define HEXCHAT_FKEYS_H
|
#define ZOITECHAT_FKEYS_H
|
||||||
|
|
||||||
/* These are cp'ed from history.c --AGL */
|
/* These are cp'ed from history.c --AGL */
|
||||||
#define STATE_SHIFT GDK_SHIFT_MASK
|
#define STATE_SHIFT GDK_SHIFT_MASK
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_GTKUTIL_H
|
#ifndef ZOITECHAT_GTKUTIL_H
|
||||||
#define HEXCHAT_GTKUTIL_H
|
#define ZOITECHAT_GTKUTIL_H
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "../common/fe.h"
|
#include "../common/fe.h"
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_JOIND_H
|
#ifndef ZOITECHAT_JOIND_H
|
||||||
#define HEXCHAT_JOIND_H
|
#define ZOITECHAT_JOIND_H
|
||||||
|
|
||||||
void joind_open (server *serv);
|
void joind_open (server *serv);
|
||||||
void joind_close (server *serv);
|
void joind_close (server *serv);
|
||||||
|
|||||||
@@ -2489,8 +2489,8 @@ mg_create_textarea (session *sess, GtkWidget *box)
|
|||||||
};
|
};
|
||||||
static const GtkTargetEntry dnd_dest_targets[] =
|
static const GtkTargetEntry dnd_dest_targets[] =
|
||||||
{
|
{
|
||||||
{"HEXCHAT_CHANVIEW", GTK_TARGET_SAME_APP, 75 },
|
{"ZOITECHAT_CHANVIEW", GTK_TARGET_SAME_APP, 75 },
|
||||||
{"HEXCHAT_USERLIST", GTK_TARGET_SAME_APP, 75 }
|
{"ZOITECHAT_USERLIST", GTK_TARGET_SAME_APP, 75 }
|
||||||
};
|
};
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 0);
|
vbox = gtk_vbox_new (FALSE, 0);
|
||||||
@@ -4183,7 +4183,7 @@ mg_is_gui_target (GdkDragContext *context)
|
|||||||
target_name = gdk_atom_name (gdk_drag_context_list_targets (context)->data);
|
target_name = gdk_atom_name (gdk_drag_context_list_targets (context)->data);
|
||||||
if (target_name)
|
if (target_name)
|
||||||
{
|
{
|
||||||
/* if it's not HEXCHAT_CHANVIEW or HEXCHAT_USERLIST */
|
/* if it's not ZOITECHAT_CHANVIEW or ZOITECHAT_USERLIST */
|
||||||
/* we should ignore it. */
|
/* we should ignore it. */
|
||||||
if (target_name[0] != 'H')
|
if (target_name[0] != 'H')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_MAINGUI_H
|
#ifndef ZOITECHAT_MAINGUI_H
|
||||||
#define HEXCHAT_MAINGUI_H
|
#define ZOITECHAT_MAINGUI_H
|
||||||
|
|
||||||
extern GtkStyle *input_style;
|
extern GtkStyle *input_style;
|
||||||
extern GtkWidget *parent_window;
|
extern GtkWidget *parent_window;
|
||||||
|
|||||||
@@ -1772,7 +1772,7 @@ menu_about (GtkWidget *wid, gpointer sess)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct mymenu mymenu[] = {
|
static struct mymenu mymenu[] = {
|
||||||
{N_("_ZoiteChat"), 0, 0, M_NEWMENU, MENU_ID_HEXCHAT, 0, 1},
|
{N_("_ZoiteChat"), 0, 0, M_NEWMENU, MENU_ID_ZOITECHAT, 0, 1},
|
||||||
{N_("Network Li_st"), menu_open_server_list, (char *)&pix_book, M_MENUPIX, 0, 0, 1, GDK_KEY_s},
|
{N_("Network Li_st"), menu_open_server_list, (char *)&pix_book, M_MENUPIX, 0, 0, 1, GDK_KEY_s},
|
||||||
{0, 0, 0, M_SEP, 0, 0, 0},
|
{0, 0, 0, M_SEP, 0, 0, 0},
|
||||||
|
|
||||||
@@ -2396,7 +2396,7 @@ menu_create_main (void *accel_group, int bar, int away, int toplevel,
|
|||||||
/* record the English name for /menu */
|
/* record the English name for /menu */
|
||||||
g_object_set_data (G_OBJECT (menu_item), "name", mymenu[i].text);
|
g_object_set_data (G_OBJECT (menu_item), "name", mymenu[i].text);
|
||||||
#ifdef HAVE_GTK_MAC /* Added to app menu, see below */
|
#ifdef HAVE_GTK_MAC /* Added to app menu, see below */
|
||||||
if (!bar || mymenu[i].id != MENU_ID_HEXCHAT)
|
if (!bar || mymenu[i].id != MENU_ID_ZOITECHAT)
|
||||||
#endif
|
#endif
|
||||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), menu_item);
|
gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), menu_item);
|
||||||
gtk_widget_show (menu_item);
|
gtk_widget_show (menu_item);
|
||||||
@@ -2502,7 +2502,7 @@ togitem:
|
|||||||
|
|
||||||
#ifdef HAVE_GTK_MAC
|
#ifdef HAVE_GTK_MAC
|
||||||
/* We want ZoiteChat to be the app menu, not including Quit or ZoiteChat itself */
|
/* We want ZoiteChat to be the app menu, not including Quit or ZoiteChat itself */
|
||||||
if (bar && item && i <= CLOSE_OFFSET + 1 && mymenu[i].id != MENU_ID_HEXCHAT)
|
if (bar && item && i <= CLOSE_OFFSET + 1 && mymenu[i].id != MENU_ID_ZOITECHAT)
|
||||||
{
|
{
|
||||||
if (!submenu || mymenu[i].type == M_MENUSUB)
|
if (!submenu || mymenu[i].type == M_MENUSUB)
|
||||||
gtkosx_application_insert_app_menu_item (osx_app, item, appmenu_offset++);
|
gtkosx_application_insert_app_menu_item (osx_app, item, appmenu_offset++);
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_MENU_H
|
#ifndef ZOITECHAT_MENU_H
|
||||||
#define HEXCHAT_MENU_H
|
#define ZOITECHAT_MENU_H
|
||||||
|
|
||||||
GtkWidget *menu_create_main (void *accel_group, int bar, int away, int toplevel, GtkWidget **menu_widgets);
|
GtkWidget *menu_create_main (void *accel_group, int bar, int away, int toplevel, GtkWidget **menu_widgets);
|
||||||
void menu_urlmenu (GdkEventButton * event, char *url);
|
void menu_urlmenu (GdkEventButton * event, char *url);
|
||||||
@@ -62,9 +62,9 @@ void menu_set_fullscreen (session_gui *gui, int fullscreen);
|
|||||||
#define MENU_ID_JOIN 11
|
#define MENU_ID_JOIN 11
|
||||||
#define MENU_ID_USERMENU 12
|
#define MENU_ID_USERMENU 12
|
||||||
#define MENU_ID_FULLSCREEN 13
|
#define MENU_ID_FULLSCREEN 13
|
||||||
#define MENU_ID_HEXCHAT 14
|
#define MENU_ID_ZOITECHAT 14
|
||||||
|
|
||||||
#if (MENU_ID_NUM < MENU_ID_HEXCHAT)
|
#if (MENU_ID_NUM < MENU_ID_ZOITECHAT)
|
||||||
#error MENU_ID_NUM is set wrong
|
#error MENU_ID_NUM is set wrong
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_PLUGIN_NOTIFICATION_BACKEND_H
|
#ifndef ZOITECHAT_PLUGIN_NOTIFICATION_BACKEND_H
|
||||||
#define HEXCHAT_PLUGIN_NOTIFICATION_BACKEND_H
|
#define ZOITECHAT_PLUGIN_NOTIFICATION_BACKEND_H
|
||||||
|
|
||||||
int notification_backend_supported (void);
|
int notification_backend_supported (void);
|
||||||
void notification_backend_show (const char *title, const char *text);
|
void notification_backend_show (const char *title, const char *text);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ notification_backend_init (const char **error)
|
|||||||
/* Temporarily suppress the "DLL could not be loaded" dialog box before trying to load hcnotifications-winrt.dll */
|
/* Temporarily suppress the "DLL could not be loaded" dialog box before trying to load hcnotifications-winrt.dll */
|
||||||
original_error_mode = GetErrorMode ();
|
original_error_mode = GetErrorMode ();
|
||||||
SetErrorMode(SEM_FAILCRITICALERRORS);
|
SetErrorMode(SEM_FAILCRITICALERRORS);
|
||||||
module = module_load (HEXCHATLIBDIR "\\hcnotifications-winrt.dll");
|
module = module_load (ZOITECHATLIBDIR "\\hcnotifications-winrt.dll");
|
||||||
SetErrorMode (original_error_mode);
|
SetErrorMode (original_error_mode);
|
||||||
|
|
||||||
if (module == NULL)
|
if (module == NULL)
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_NOTIFYGUI_H
|
#ifndef ZOITECHAT_NOTIFYGUI_H
|
||||||
#define HEXCHAT_NOTIFYGUI_H
|
#define ZOITECHAT_NOTIFYGUI_H
|
||||||
|
|
||||||
void notify_gui_update (void);
|
void notify_gui_update (void);
|
||||||
void notify_opengui (void);
|
void notify_opengui (void);
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_PALETTE_H
|
#ifndef ZOITECHAT_PALETTE_H
|
||||||
#define HEXCHAT_PALETTE_H
|
#define ZOITECHAT_PALETTE_H
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_PIXMAPS_H
|
#ifndef ZOITECHAT_PIXMAPS_H
|
||||||
#define HEXCHAT_PIXMAPS_H
|
#define ZOITECHAT_PIXMAPS_H
|
||||||
|
|
||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ incoming_hilight_cb (char *word[], gpointer userdata)
|
|||||||
{
|
{
|
||||||
show_notificationf (word[2], _("Highlighted message from: %s (%s)"), word[1], zoitechat_get_info (ph, "channel"));
|
show_notificationf (word[2], _("Highlighted message from: %s (%s)"), word[1], zoitechat_get_info (ph, "channel"));
|
||||||
}
|
}
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -139,7 +139,7 @@ incoming_message_cb (char *word[], gpointer userdata)
|
|||||||
if (alert) {
|
if (alert) {
|
||||||
show_notificationf(word[2], _("Channel message from: %s (%s)"), word[1], zoitechat_get_info(ph, "channel"));
|
show_notificationf(word[2], _("Channel message from: %s (%s)"), word[1], zoitechat_get_info(ph, "channel"));
|
||||||
}
|
}
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -189,7 +189,7 @@ incoming_priv_cb (char *word[], gpointer userdata)
|
|||||||
else
|
else
|
||||||
show_notificationf (word[2], _("Private message from: %s (%s)"), word[1], network);
|
show_notificationf (word[2], _("Private message from: %s (%s)"), word[1], network);
|
||||||
}
|
}
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -199,10 +199,10 @@ tray_cmd_cb (char *word[], char *word_eol[], gpointer userdata)
|
|||||||
{
|
{
|
||||||
if (should_alert ())
|
if (should_alert ())
|
||||||
show_notification (word[3], word_eol[4]);
|
show_notification (word[3], word_eol[4]);
|
||||||
return HEXCHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -222,24 +222,24 @@ notification_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, c
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
zoitechat_hook_print (ph, "Channel Msg Hilight", HEXCHAT_PRI_LOWEST, incoming_hilight_cb, NULL);
|
zoitechat_hook_print (ph, "Channel Msg Hilight", ZOITECHAT_PRI_LOWEST, incoming_hilight_cb, NULL);
|
||||||
zoitechat_hook_print (ph, "Channel Action Hilight", HEXCHAT_PRI_LOWEST, incoming_hilight_cb, NULL);
|
zoitechat_hook_print (ph, "Channel Action Hilight", ZOITECHAT_PRI_LOWEST, incoming_hilight_cb, NULL);
|
||||||
|
|
||||||
zoitechat_hook_print (ph, "Channel Message", HEXCHAT_PRI_LOWEST, incoming_message_cb, NULL);
|
zoitechat_hook_print (ph, "Channel Message", ZOITECHAT_PRI_LOWEST, incoming_message_cb, NULL);
|
||||||
zoitechat_hook_print (ph, "Channel Action", HEXCHAT_PRI_LOWEST, incoming_message_cb, NULL);
|
zoitechat_hook_print (ph, "Channel Action", ZOITECHAT_PRI_LOWEST, incoming_message_cb, NULL);
|
||||||
zoitechat_hook_print (ph, "Channel Notice", HEXCHAT_PRI_LOWEST, incoming_message_cb, NULL);
|
zoitechat_hook_print (ph, "Channel Notice", ZOITECHAT_PRI_LOWEST, incoming_message_cb, NULL);
|
||||||
|
|
||||||
zoitechat_hook_print (ph, "Private Message", HEXCHAT_PRI_LOWEST, incoming_priv_cb, NULL);
|
zoitechat_hook_print (ph, "Private Message", ZOITECHAT_PRI_LOWEST, incoming_priv_cb, NULL);
|
||||||
zoitechat_hook_print (ph, "Private Message to Dialog", HEXCHAT_PRI_LOWEST, incoming_priv_cb, NULL);
|
zoitechat_hook_print (ph, "Private Message to Dialog", ZOITECHAT_PRI_LOWEST, incoming_priv_cb, NULL);
|
||||||
zoitechat_hook_print (ph, "Private Action", HEXCHAT_PRI_LOWEST, incoming_priv_cb, NULL);
|
zoitechat_hook_print (ph, "Private Action", ZOITECHAT_PRI_LOWEST, incoming_priv_cb, NULL);
|
||||||
zoitechat_hook_print (ph, "Private Action to Dialog", HEXCHAT_PRI_LOWEST, incoming_priv_cb, NULL);
|
zoitechat_hook_print (ph, "Private Action to Dialog", ZOITECHAT_PRI_LOWEST, incoming_priv_cb, NULL);
|
||||||
|
|
||||||
/* Special events treated as priv */
|
/* Special events treated as priv */
|
||||||
zoitechat_hook_print (ph, "Notice", HEXCHAT_PRI_LOWEST, incoming_priv_cb, GINT_TO_POINTER (1));
|
zoitechat_hook_print (ph, "Notice", ZOITECHAT_PRI_LOWEST, incoming_priv_cb, GINT_TO_POINTER (1));
|
||||||
zoitechat_hook_print (ph, "Invited", HEXCHAT_PRI_LOWEST, incoming_priv_cb, GINT_TO_POINTER (2));
|
zoitechat_hook_print (ph, "Invited", ZOITECHAT_PRI_LOWEST, incoming_priv_cb, GINT_TO_POINTER (2));
|
||||||
zoitechat_hook_print (ph, "DCC Offer", HEXCHAT_PRI_LOWEST, incoming_priv_cb, GINT_TO_POINTER (3));
|
zoitechat_hook_print (ph, "DCC Offer", ZOITECHAT_PRI_LOWEST, incoming_priv_cb, GINT_TO_POINTER (3));
|
||||||
|
|
||||||
zoitechat_hook_command (ph, "TRAY", HEXCHAT_PRI_HIGH, tray_cmd_cb, NULL, NULL);
|
zoitechat_hook_command (ph, "TRAY", ZOITECHAT_PRI_HIGH, tray_cmd_cb, NULL, NULL);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_PLUGIN_NOTIFICATION_H
|
#ifndef ZOITECHAT_PLUGIN_NOTIFICATION_H
|
||||||
#define HEXCHAT_PLUGIN_NOTIFICATION_H
|
#define ZOITECHAT_PLUGIN_NOTIFICATION_H
|
||||||
|
|
||||||
int notification_plugin_init (void *, char **, char **, char **, char *);
|
int notification_plugin_init (void *, char **, char **, char **, char *);
|
||||||
int notification_plugin_deinit (void *);
|
int notification_plugin_deinit (void *);
|
||||||
|
|||||||
@@ -622,7 +622,7 @@ static int
|
|||||||
tray_hilight_cb (char *word[], void *userdata)
|
tray_hilight_cb (char *word[], void *userdata)
|
||||||
{
|
{
|
||||||
/*if (tray_status == TS_HIGHLIGHT)
|
/*if (tray_status == TS_HIGHLIGHT)
|
||||||
return HEXCHAT_EAT_NONE;*/
|
return ZOITECHAT_EAT_NONE;*/
|
||||||
|
|
||||||
if (prefs.hex_input_tray_hilight)
|
if (prefs.hex_input_tray_hilight)
|
||||||
{
|
{
|
||||||
@@ -639,14 +639,14 @@ tray_hilight_cb (char *word[], void *userdata)
|
|||||||
_(DISPLAY_NAME));
|
_(DISPLAY_NAME));
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
tray_message_cb (char *word[], void *userdata)
|
tray_message_cb (char *word[], void *userdata)
|
||||||
{
|
{
|
||||||
if (/*tray_status == TS_MESSAGE ||*/ tray_status == TS_HIGHLIGHT)
|
if (/*tray_status == TS_MESSAGE ||*/ tray_status == TS_HIGHLIGHT)
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
|
|
||||||
if (prefs.hex_input_tray_chans)
|
if (prefs.hex_input_tray_chans)
|
||||||
{
|
{
|
||||||
@@ -660,7 +660,7 @@ tray_message_cb (char *word[], void *userdata)
|
|||||||
tray_set_tipf (_("%u channel messages. - %s"), tray_pub_count, _(DISPLAY_NAME));
|
tray_set_tipf (_("%u channel messages. - %s"), tray_pub_count, _(DISPLAY_NAME));
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -694,7 +694,7 @@ tray_priv_cb (char *word[], void *userdata)
|
|||||||
{
|
{
|
||||||
tray_priv (word[1], word[2]);
|
tray_priv (word[1], word[2]);
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -703,7 +703,7 @@ tray_invited_cb (char *word[], void *userdata)
|
|||||||
if (!prefs.hex_away_omit_alerts || tray_find_away_status () != 1)
|
if (!prefs.hex_away_omit_alerts || tray_find_away_status () != 1)
|
||||||
tray_priv (word[2], "Invited");
|
tray_priv (word[2], "Invited");
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -712,7 +712,7 @@ tray_dcc_cb (char *word[], void *userdata)
|
|||||||
const char *network;
|
const char *network;
|
||||||
|
|
||||||
/* if (tray_status == TS_FILEOFFER)
|
/* if (tray_status == TS_FILEOFFER)
|
||||||
return HEXCHAT_EAT_NONE;*/
|
return ZOITECHAT_EAT_NONE;*/
|
||||||
|
|
||||||
network = zoitechat_get_info (ph, "network");
|
network = zoitechat_get_info (ph, "network");
|
||||||
if (!network)
|
if (!network)
|
||||||
@@ -731,7 +731,7 @@ tray_dcc_cb (char *word[], void *userdata)
|
|||||||
tray_file_count, word[1], network, _(DISPLAY_NAME));
|
tray_file_count, word[1], network, _(DISPLAY_NAME));
|
||||||
}
|
}
|
||||||
|
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -739,7 +739,7 @@ tray_focus_cb (char *word[], void *userdata)
|
|||||||
{
|
{
|
||||||
tray_stop_flash ();
|
tray_stop_flash ();
|
||||||
tray_reset_counts ();
|
tray_reset_counts ();
|
||||||
return HEXCHAT_EAT_NONE;
|
return ZOITECHAT_EAT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_PLUGIN_TRAY_H
|
#ifndef ZOITECHAT_PLUGIN_TRAY_H
|
||||||
#define HEXCHAT_PLUGIN_TRAY_H
|
#define ZOITECHAT_PLUGIN_TRAY_H
|
||||||
|
|
||||||
int tray_plugin_init (void *, char **, char **, char **, char *);
|
int tray_plugin_init (void *, char **, char **, char **, char *);
|
||||||
int tray_plugin_deinit (void *);
|
int tray_plugin_deinit (void *);
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_PLUGINGUI_H
|
#ifndef ZOITECHAT_PLUGINGUI_H
|
||||||
#define HEXCHAT_PLUGINGUI_H
|
#define ZOITECHAT_PLUGINGUI_H
|
||||||
|
|
||||||
void plugingui_open (void);
|
void plugingui_open (void);
|
||||||
void plugingui_load (void);
|
void plugingui_load (void);
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_RAWLOG_H
|
#ifndef ZOITECHAT_RAWLOG_H
|
||||||
#define HEXCHAT_RAWLOG_H
|
#define ZOITECHAT_RAWLOG_H
|
||||||
|
|
||||||
void open_rawlog (server *serv);
|
void open_rawlog (server *serv);
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_SERVLISTGUI_H
|
#ifndef ZOITECHAT_SERVLISTGUI_H
|
||||||
#define HEXCHAT_SERVLISTGUI_H
|
#define ZOITECHAT_SERVLISTGUI_H
|
||||||
|
|
||||||
void servlist_autojoinedit (ircnet *net, char *channel, gboolean add);
|
void servlist_autojoinedit (ircnet *net, char *channel, gboolean add);
|
||||||
|
|
||||||
|
|||||||
@@ -2061,7 +2061,7 @@ setup_snd_filereq_cb (GtkWidget *entry, char *file)
|
|||||||
/* Use just the filename if the given sound file is in the default <config>/sounds directory.
|
/* Use just the filename if the given sound file is in the default <config>/sounds directory.
|
||||||
* We're comparing absolute paths so this won't work in portable mode which uses a relative path.
|
* We're comparing absolute paths so this won't work in portable mode which uses a relative path.
|
||||||
*/
|
*/
|
||||||
if (!strcmp (g_path_get_dirname (file), g_build_filename (get_xdir (), HEXCHAT_SOUND_DIR, NULL)))
|
if (!strcmp (g_path_get_dirname (file), g_build_filename (get_xdir (), ZOITECHAT_SOUND_DIR, NULL)))
|
||||||
{
|
{
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), g_path_get_basename (file));
|
gtk_entry_set_text (GTK_ENTRY (entry), g_path_get_basename (file));
|
||||||
}
|
}
|
||||||
@@ -2076,7 +2076,7 @@ setup_snd_filereq_cb (GtkWidget *entry, char *file)
|
|||||||
static void
|
static void
|
||||||
setup_snd_browse_cb (GtkWidget *button, GtkEntry *entry)
|
setup_snd_browse_cb (GtkWidget *button, GtkEntry *entry)
|
||||||
{
|
{
|
||||||
char *sounds_dir = g_build_filename (get_xdir (), HEXCHAT_SOUND_DIR, NULL);
|
char *sounds_dir = g_build_filename (get_xdir (), ZOITECHAT_SOUND_DIR, NULL);
|
||||||
char *filter = NULL;
|
char *filter = NULL;
|
||||||
int filter_type;
|
int filter_type;
|
||||||
#ifdef WIN32 /* win32 only supports wav, others could support anything */
|
#ifdef WIN32 /* win32 only supports wav, others could support anything */
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_SETUP_H
|
#ifndef ZOITECHAT_SETUP_H
|
||||||
#define HEXCHAT_SETUP_H
|
#define ZOITECHAT_SETUP_H
|
||||||
|
|
||||||
void setup_apply_real (int new_pix, int do_ulist, int do_layout, int do_identd);
|
void setup_apply_real (int new_pix, int do_ulist, int do_layout, int do_identd);
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_TEXTGUI_H
|
#ifndef ZOITECHAT_TEXTGUI_H
|
||||||
#define HEXCHAT_TEXTGUI_H
|
#define ZOITECHAT_TEXTGUI_H
|
||||||
|
|
||||||
void PrintTextRaw (void *xtbuf, unsigned char *text, int indent, time_t stamp);
|
void PrintTextRaw (void *xtbuf, unsigned char *text, int indent, time_t stamp);
|
||||||
void pevent_dialog_show (void);
|
void pevent_dialog_show (void);
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_URLGRAB_H
|
#ifndef ZOITECHAT_URLGRAB_H
|
||||||
#define HEXCHAT_URLGRAB_H
|
#define ZOITECHAT_URLGRAB_H
|
||||||
|
|
||||||
void url_opengui (void);
|
void url_opengui (void);
|
||||||
|
|
||||||
|
|||||||
@@ -645,11 +645,11 @@ userlist_create (GtkWidget *box)
|
|||||||
static const GtkTargetEntry dnd_dest_targets[] =
|
static const GtkTargetEntry dnd_dest_targets[] =
|
||||||
{
|
{
|
||||||
{"text/uri-list", 0, 1},
|
{"text/uri-list", 0, 1},
|
||||||
{"HEXCHAT_CHANVIEW", GTK_TARGET_SAME_APP, 75 }
|
{"ZOITECHAT_CHANVIEW", GTK_TARGET_SAME_APP, 75 }
|
||||||
};
|
};
|
||||||
static const GtkTargetEntry dnd_src_target[] =
|
static const GtkTargetEntry dnd_src_target[] =
|
||||||
{
|
{
|
||||||
{"HEXCHAT_USERLIST", GTK_TARGET_SAME_APP, 75 }
|
{"ZOITECHAT_USERLIST", GTK_TARGET_SAME_APP, 75 }
|
||||||
};
|
};
|
||||||
|
|
||||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_USERLISTGUI_H
|
#ifndef ZOITECHAT_USERLISTGUI_H
|
||||||
#define HEXCHAT_USERLISTGUI_H
|
#define ZOITECHAT_USERLISTGUI_H
|
||||||
|
|
||||||
void userlist_set_value (GtkWidget *treeview, gfloat val);
|
void userlist_set_value (GtkWidget *treeview, gfloat val);
|
||||||
gfloat userlist_get_value (GtkWidget *treeview);
|
gfloat userlist_get_value (GtkWidget *treeview);
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_XTEXT_COLOR_H
|
#ifndef ZOITECHAT_XTEXT_COLOR_H
|
||||||
#define HEXCHAT_XTEXT_COLOR_H
|
#define ZOITECHAT_XTEXT_COLOR_H
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HEXCHAT_XTEXT_H
|
#ifndef ZOITECHAT_XTEXT_H
|
||||||
#define HEXCHAT_XTEXT_H
|
#define ZOITECHAT_XTEXT_H
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
|
|||||||
@@ -523,7 +523,7 @@ fe_args (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
g_free (exe);
|
g_free (exe);
|
||||||
#else
|
#else
|
||||||
printf ("%s\n", HEXCHATLIBDIR);
|
printf ("%s\n", ZOITECHATLIBDIR);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
#define ISO_CODES_LOCALEDIR LOCALEDIR
|
#define ISO_CODES_LOCALEDIR LOCALEDIR
|
||||||
#define PACKAGE_NAME "zoitechat"
|
#define PACKAGE_NAME "zoitechat"
|
||||||
#define PACKAGE_VERSION "<#= [string]::Join('.', $versionParts) #>"
|
#define PACKAGE_VERSION "<#= [string]::Join('.', $versionParts) #>"
|
||||||
#define HEXCHATLIBDIR ".\\plugins"
|
#define ZOITECHATLIBDIR ".\\plugins"
|
||||||
#define HEXCHATSHAREDIR "."
|
#define ZOITECHATSHAREDIR "."
|
||||||
#define OLD_PERL
|
#define OLD_PERL
|
||||||
#define GETTEXT_PACKAGE "zoitechat"
|
#define GETTEXT_PACKAGE "zoitechat"
|
||||||
#define PACKAGE_TARNAME "zoitechat-<#= [string]::Join('.', $versionParts) #>"
|
#define PACKAGE_TARNAME "zoitechat-<#= [string]::Join('.', $versionParts) #>"
|
||||||
|
|||||||
Reference in New Issue
Block a user