diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/chatnets.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/fe-common-core.c | 1 | ||||
-rw-r--r-- | src/fe-common/core/formats.c | 6 | ||||
-rw-r--r-- | src/fe-common/irc/fe-netjoin.c | 8 | ||||
-rw-r--r-- | src/fe-common/irc/fe-netsplit.c | 11 | ||||
-rw-r--r-- | src/fe-text/gui-readline.c | 6 | ||||
-rw-r--r-- | src/irc/dcc/dcc-get.c | 15 |
7 files changed, 26 insertions, 23 deletions
diff --git a/src/core/chatnets.c b/src/core/chatnets.c index dd4d94b3..e0a7a8d9 100644 --- a/src/core/chatnets.c +++ b/src/core/chatnets.c @@ -132,7 +132,7 @@ static void chatnet_read(CONFIG_NODE *node) CHATNET_REC *rec; char *type; - if (node == NULL || node->key == NULL) + if (node == NULL || node->key == NULL || !is_node_list(node)) return; type = config_node_get_str(node, "type", NULL); diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c index fd0e6cf0..512fc84c 100644 --- a/src/fe-common/core/fe-common-core.c +++ b/src/fe-common/core/fe-common-core.c @@ -150,7 +150,6 @@ void fe_common_core_init(void) settings_add_level("lookandfeel", "timestamp_level", "ALL"); settings_add_time("lookandfeel", "timestamp_timeout", "0"); - settings_add_bool("lookandfeel", "bell_beeps", FALSE); settings_add_level("lookandfeel", "beep_msg_level", ""); settings_add_bool("lookandfeel", "beep_when_window_active", TRUE); settings_add_bool("lookandfeel", "beep_when_away", TRUE); diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c index 9aa7698d..a58d839a 100644 --- a/src/fe-common/core/formats.c +++ b/src/fe-common/core/formats.c @@ -1224,11 +1224,7 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text) } } - if (type == 7) { - /* bell */ - if (settings_get_bool("bell_beeps")) - signal_emit("beep", 0); - } else if (type == 4 && *ptr == FORMAT_STYLE_CLRTOEOL) { + if (type == 4 && *ptr == FORMAT_STYLE_CLRTOEOL) { /* clear to end of line */ flags |= GUI_PRINT_FLAG_CLRTOEOL; } diff --git a/src/fe-common/irc/fe-netjoin.c b/src/fe-common/irc/fe-netjoin.c index 22ca642c..4eb388c0 100644 --- a/src/fe-common/irc/fe-netjoin.c +++ b/src/fe-common/irc/fe-netjoin.c @@ -164,7 +164,7 @@ static void print_channel_netjoins(char *channel, TEMP_PRINT_REC *rec, g_free(channel); } -static void print_netjoins(NETJOIN_SERVER_REC *server, const char *channel) +static void print_netjoins(NETJOIN_SERVER_REC *server, const char *filter_channel) { TEMP_PRINT_REC *temp; GHashTable *channels; @@ -189,7 +189,9 @@ static void print_netjoins(NETJOIN_SERVER_REC *server, const char *channel) next2 = g_slist_next(tmp2); - if (channel != NULL && strcasecmp(realchannel, channel) != 0) + /* Filter the results by channel if asked to do so */ + if (filter_channel != NULL && + strcasecmp(realchannel, filter_channel) != 0) continue; temp = g_hash_table_lookup(channels, realchannel); @@ -251,7 +253,7 @@ static void sig_print_starting(TEXT_DEST_REC *dest) if (!IS_IRC_SERVER(dest->server)) return; - if (dest->level != MSGLEVEL_PUBLIC) + if (!(dest->level & MSGLEVEL_PUBLIC)) return; if (!server_ischannel(dest->server, dest->target)) diff --git a/src/fe-common/irc/fe-netsplit.c b/src/fe-common/irc/fe-netsplit.c index aa05639b..17fb1994 100644 --- a/src/fe-common/irc/fe-netsplit.c +++ b/src/fe-common/irc/fe-netsplit.c @@ -142,7 +142,7 @@ static void get_server_splits(void *key, NETSPLIT_REC *split, } } -static void print_server_splits(IRC_SERVER_REC *server, TEMP_SPLIT_REC *rec, const char *channel) +static void print_server_splits(IRC_SERVER_REC *server, TEMP_SPLIT_REC *rec, const char *filter_channel) { GString *destservers; char *sourceserver; @@ -168,7 +168,8 @@ static void print_server_splits(IRC_SERVER_REC *server, TEMP_SPLIT_REC *rec, con for (tmp = rec->channels; tmp != NULL; tmp = tmp->next) { TEMP_SPLIT_CHAN_REC *chan = tmp->data; - if (channel != NULL && strcasecmp(channel, chan->name) != 0) + if (filter_channel != NULL && + strcasecmp(chan->name, filter_channel) != 0) continue; g_string_truncate(chan->nicks, chan->nicks->len-2); @@ -249,13 +250,13 @@ static void sig_print_starting(TEXT_DEST_REC *dest) if (printing_splits) return; - if (IS_IRC_SERVER(dest->server) == FALSE) + if (!IS_IRC_SERVER(dest->server)) return; - if (dest->level != MSGLEVEL_PUBLIC) + if (!(dest->level & MSGLEVEL_PUBLIC)) return; - if (server_ischannel(dest->server, dest->target) == FALSE) + if (!server_ischannel(dest->server, dest->target)) return; rec = IRC_SERVER(dest->server); diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index 7c71edd7..2c2eac21 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -611,12 +611,8 @@ static void key_yank_next_cutbuffer(void) guint length = 0; char *cutbuffer; - if (!previous_yank_preceded) { - if (settings_get_bool("bell_beeps")) { - signal_emit("beep", 0); - } + if (!previous_yank_preceded) return; - } if (active_entry->kill_ring == NULL) return; diff --git a/src/irc/dcc/dcc-get.c b/src/irc/dcc/dcc-get.c index f7a95bb9..73c1b864 100644 --- a/src/irc/dcc/dcc-get.c +++ b/src/irc/dcc/dcc-get.c @@ -30,6 +30,8 @@ #include "dcc-get.h" #include "dcc-send.h" +static char *dcc_get_recv_buffer; + GET_DCC_REC *dcc_get_create(IRC_SERVER_REC *server, CHAT_DCC_REC *chat, const char *nick, const char *arg) { @@ -139,14 +141,20 @@ static void sig_dccget_send(GET_DCC_REC *dcc) dcc_get_send_received(dcc); } +#define DCC_GET_RECV_BUFFER_SIZE 32768 + /* input function: DCC GET received data */ static void sig_dccget_receive(GET_DCC_REC *dcc) { - char buffer[512]; int ret; + if (dcc_get_recv_buffer == NULL) { + dcc_get_recv_buffer = g_malloc(DCC_GET_RECV_BUFFER_SIZE); + } + for (;;) { - ret = net_receive(dcc->handle, buffer, sizeof(buffer)); + ret = net_receive(dcc->handle, dcc_get_recv_buffer, + DCC_GET_RECV_BUFFER_SIZE); if (ret == 0) break; if (ret < 0) { @@ -156,7 +164,7 @@ static void sig_dccget_receive(GET_DCC_REC *dcc) return; } - if (write(dcc->fhandle, buffer, ret) != ret) { + if (write(dcc->fhandle, dcc_get_recv_buffer, ret) != ret) { /* most probably out of disk space */ signal_emit("dcc error write", 2, dcc, g_strerror(errno)); @@ -596,4 +604,5 @@ void dcc_get_deinit(void) signal_remove("dcc destroyed", (SIGNAL_FUNC) sig_dcc_destroyed); signal_remove("ctcp msg dcc send", (SIGNAL_FUNC) ctcp_msg_dcc_send); command_unbind("dcc get", (SIGNAL_FUNC) cmd_dcc_get); + g_free_and_null(dcc_get_recv_buffer); } |