mirror of
https://github.com/irssi/irssi.git
synced 2024-10-27 05:20:20 -04:00
/SERVER ADD -ircnet should add the network to config with the same case as
in /IRCNET list. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2568 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
1997b58c3a
commit
1855e6cc5c
@ -27,6 +27,7 @@
|
|||||||
#include "servers-setup.h"
|
#include "servers-setup.h"
|
||||||
|
|
||||||
#include "levels.h"
|
#include "levels.h"
|
||||||
|
#include "irc-chatnets.h"
|
||||||
#include "irc-servers.h"
|
#include "irc-servers.h"
|
||||||
#include "servers-reconnect.h"
|
#include "servers-reconnect.h"
|
||||||
#include "irc-servers-setup.h"
|
#include "irc-servers-setup.h"
|
||||||
@ -40,12 +41,17 @@
|
|||||||
static void sig_server_add_fill(IRC_SERVER_SETUP_REC *rec,
|
static void sig_server_add_fill(IRC_SERVER_SETUP_REC *rec,
|
||||||
GHashTable *optlist)
|
GHashTable *optlist)
|
||||||
{
|
{
|
||||||
|
IRC_CHATNET_REC *ircnet;
|
||||||
char *value;
|
char *value;
|
||||||
|
|
||||||
value = g_hash_table_lookup(optlist, "ircnet");
|
value = g_hash_table_lookup(optlist, "ircnet");
|
||||||
if (value != NULL) {
|
if (value != NULL) {
|
||||||
g_free_and_null(rec->chatnet);
|
g_free_and_null(rec->chatnet);
|
||||||
if (*value != '\0') rec->chatnet = g_strdup(value);
|
if (*value != '\0') {
|
||||||
|
ircnet = ircnet_find(value);
|
||||||
|
rec->chatnet = ircnet != NULL ? ircnet->name :
|
||||||
|
g_strdup(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
value = g_hash_table_lookup(optlist, "cmdspeed");
|
value = g_hash_table_lookup(optlist, "cmdspeed");
|
||||||
|
Loading…
Reference in New Issue
Block a user