mirror of
https://github.com/irssi/irssi.git
synced 2026-08-23 02:22:36 +02:00
Code ended up in wrong place during refactoring
This commit is contained in:
parent
6a75df0b40
commit
a86f7ef7d7
3 changed files with 8 additions and 18 deletions
|
|
@ -250,8 +250,6 @@ static CHANNEL_SETUP_REC *channel_setup_fill_rec(CHANNEL_SETUP_REC *rec, GHashTa
|
|||
{
|
||||
char *botarg, *botcmdarg;
|
||||
|
||||
g_return_if_fail(rec != NULL);
|
||||
|
||||
botarg = g_hash_table_lookup(optlist, "bots");
|
||||
botcmdarg = g_hash_table_lookup(optlist, "botcmd");
|
||||
|
||||
|
|
@ -302,7 +300,6 @@ static void cmd_channel_add(const char *data)
|
|||
if (*password != '\0' && g_strcmp0(password, "-") != 0) rec->password = g_strdup(password);
|
||||
|
||||
rec = channel_setup_fill_rec(rec, optlist);
|
||||
|
||||
channel_setup_create(rec);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
TXT_CHANSETUP_ADDED, channel, chatnet);
|
||||
|
|
@ -336,16 +333,15 @@ static void cmd_channel_modify(const char *data)
|
|||
}
|
||||
|
||||
rec = channel_setup_find(channel, chatnet);
|
||||
if (rec == NULL) {
|
||||
if (rec == NULL)
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_CHANSETUP_NOT_FOUND, channel, chatnet);
|
||||
} else {
|
||||
else {
|
||||
if (g_hash_table_lookup(optlist, "bots")) g_free_and_null(rec->botmasks);
|
||||
if (g_hash_table_lookup(optlist, "botcmd")) g_free_and_null(rec->autosendcmd);
|
||||
if (*password != '\0') g_free_and_null(rec->password);
|
||||
if (*password != '\0' && g_strcmp0(password, "-") != 0) rec->password = g_strdup(password);
|
||||
|
||||
rec = channel_setup_fill_rec(rec, optlist);
|
||||
|
||||
channel_setup_create(rec);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
TXT_CHANSETUP_MODIFIED, channel, chatnet);
|
||||
|
|
|
|||
|
|
@ -107,7 +107,6 @@ static SERVER_SETUP_REC *create_server_setup(GHashTable *optlist)
|
|||
|
||||
static SERVER_SETUP_REC *server_setup_fill_rec(SERVER_SETUP_REC *rec, GHashTable *optlist)
|
||||
{
|
||||
g_return_if_fail(rec != NULL);
|
||||
char *value;
|
||||
|
||||
if (g_hash_table_lookup(optlist, "6"))
|
||||
|
|
@ -207,9 +206,7 @@ static void cmd_server_add(const char *data)
|
|||
if (*password != '\0' && g_strcmp0(password, "-") != 0) rec->password = g_strdup(password);
|
||||
|
||||
rec = server_setup_fill_rec(rec, optlist);
|
||||
|
||||
signal_emit("server add fill", 2, rec, optlist);
|
||||
|
||||
server_setup_add(rec);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
TXT_SETUPSERVER_ADDED, addr, port);
|
||||
|
|
@ -251,9 +248,7 @@ static void cmd_server_modify(const char *data)
|
|||
if (*password != '\0' && g_strcmp0(password, "-") != 0) rec->password = g_strdup(password);
|
||||
|
||||
rec = server_setup_fill_rec(rec, optlist);
|
||||
|
||||
signal_emit("server modify fill", 2, rec, optlist);
|
||||
|
||||
server_setup_add(rec);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||
TXT_SETUPSERVER_MODIFIED, addr, port);
|
||||
|
|
|
|||
|
|
@ -92,8 +92,6 @@ static IRC_CHATNET_REC *network_setup_fill_rec(IRC_CHATNET_REC *rec, GHashTable
|
|||
{
|
||||
char *value;
|
||||
|
||||
g_return_if_fail(rec != NULL);
|
||||
|
||||
value = g_hash_table_lookup(optlist, "kicks");
|
||||
if (value != NULL) rec->max_kicks = atoi(value);
|
||||
value = g_hash_table_lookup(optlist, "msgs");
|
||||
|
|
@ -170,12 +168,13 @@ static void cmd_network_add(const char *data)
|
|||
g_free_and_null(rec->own_host);
|
||||
rec->own_ip4 = rec->own_ip6 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_hash_table_lookup(optlist, "usermode")) g_free_and_null(rec->usermode);
|
||||
if (g_hash_table_lookup(optlist, "autosendcmd")) g_free_and_null(rec->autosendcmd);
|
||||
if (g_hash_table_lookup(optlist, "sasl_mechanism")) g_free_and_null(rec->sasl_mechanism);
|
||||
if (g_hash_table_lookup(optlist, "sasl_username")) g_free_and_null(rec->sasl_username);
|
||||
if (g_hash_table_lookup(optlist, "sasl_password")) g_free_and_null(rec->sasl_password);
|
||||
}
|
||||
|
||||
rec = network_setup_fill_rec(rec, optlist);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue