1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

/SET default_nick -> /SET nick

/FORMAT own_me -> /FORMAT own_action


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@654 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-09-06 23:24:12 +00:00 committed by cras
parent ecb334b6cc
commit 8478a63c36
5 changed files with 13 additions and 13 deletions

View File

@ -105,7 +105,7 @@ static void server_setup_fill(SERVER_CONNECT_REC *conn,
conn->address = g_strdup(address); conn->address = g_strdup(address);
conn->port = port > 0 ? port : 6667; conn->port = port > 0 ? port : 6667;
if (!conn->nick) conn->nick = g_strdup(settings_get_str("default_nick")); if (!conn->nick) conn->nick = g_strdup(settings_get_str("nick"));
conn->username = g_strdup(settings_get_str("user_name")); conn->username = g_strdup(settings_get_str("user_name"));
conn->realname = g_strdup(settings_get_str("real_name")); conn->realname = g_strdup(settings_get_str("real_name"));
@ -425,7 +425,7 @@ void servers_setup_init(void)
{ {
settings_add_str("server", "hostname", ""); settings_add_str("server", "hostname", "");
settings_add_str("server", "default_nick", NULL); settings_add_str("server", "nick", NULL);
settings_add_str("server", "user_name", NULL); settings_add_str("server", "user_name", NULL);
settings_add_str("server", "real_name", NULL); settings_add_str("server", "real_name", NULL);

View File

@ -151,7 +151,7 @@ void fe_common_irc_finish_init(void)
if (cmdline_nick != NULL) { if (cmdline_nick != NULL) {
/* override nick found from setup */ /* override nick found from setup */
iconfig_set_str("settings", "default_nick", cmdline_nick); iconfig_set_str("settings", "nick", cmdline_nick);
} }
if (cmdline_hostname != NULL) { if (cmdline_hostname != NULL) {

View File

@ -476,7 +476,7 @@ static void event_connected(IRC_SERVER_REC *server)
g_return_if_fail(server != NULL); g_return_if_fail(server != NULL);
nick = settings_get_str("default_nick"); nick = settings_get_str("nick");
if (*nick == '\0' || g_strcasecmp(server->nick, nick) == 0) if (*nick == '\0' || g_strcasecmp(server->nick, nick) == 0)
return; return;

View File

@ -127,7 +127,7 @@ FORMAT_REC fecommon_irc_formats[] = {
{ "own_msg_private", "%K[%rmsg%K(%R$0%K)]%n $1", 2, { 0, 0 } }, { "own_msg_private", "%K[%rmsg%K(%R$0%K)]%n $1", 2, { 0, 0 } },
{ "own_msg_private_query", "%K<%W$2%K>%n %|$1", 3, { 0, 0, 0 } }, { "own_msg_private_query", "%K<%W$2%K>%n %|$1", 3, { 0, 0, 0 } },
{ "own_notice", "%K[%rnotice%K(%R$0%K)]%n $1", 2, { 0, 0 } }, { "own_notice", "%K[%rnotice%K(%R$0%K)]%n $1", 2, { 0, 0 } },
{ "own_me", "%W * $0%n $1", 2, { 0, 0 } }, { "own_action", "%W * $0%n $1", 2, { 0, 0 } },
{ "own_ctcp", "%K[%rctcp%K(%R$0%K)]%n $1 $2", 3, { 0, 0, 0 } }, { "own_ctcp", "%K[%rctcp%K(%R$0%K)]%n $1 $2", 3, { 0, 0, 0 } },
{ "own_wall", "%K[%WWall%K/%c$0%K]%n $1", 2, { 0, 0 } }, { "own_wall", "%K[%WWall%K/%c$0%K]%n $1", 2, { 0, 0 } },

View File

@ -84,7 +84,7 @@ static void sig_server_setup_fill_chatnet(IRC_SERVER_CONNECT_REC *conn,
static void init_userinfo(void) static void init_userinfo(void)
{ {
const char *set, *default_nick, *user_name; const char *set, *nick, *user_name;
char *str; char *str;
/* check if nick/username/realname wasn't read from setup.. */ /* check if nick/username/realname wasn't read from setup.. */
@ -106,22 +106,22 @@ static void init_userinfo(void)
} }
/* nick */ /* nick */
default_nick = settings_get_str("default_nick"); nick = settings_get_str("nick");
if (default_nick == NULL || *default_nick == '\0') { if (nick == NULL || *nick == '\0') {
str = g_getenv("IRCNICK"); str = g_getenv("IRCNICK");
iconfig_set_str("settings", "default_nick", iconfig_set_str("settings", "nick",
str != NULL ? str : user_name); str != NULL ? str : user_name);
default_nick = settings_get_str("default_nick"); nick = settings_get_str("nick");
} }
/* alternate nick */ /* alternate nick */
set = settings_get_str("alternate_nick"); set = settings_get_str("alternate_nick");
if (set == NULL || *set == '\0') { if (set == NULL || *set == '\0') {
if (strlen(default_nick) < 9) if (strlen(nick) < 9)
str = g_strconcat(default_nick, "_", NULL); str = g_strconcat(nick, "_", NULL);
else { else {
str = g_strdup(default_nick); str = g_strdup(nick);
str[strlen(str)-1] = '_'; str[strlen(str)-1] = '_';
} }
iconfig_set_str("settings", "alternate_nick", str); iconfig_set_str("settings", "alternate_nick", str);