summaryrefslogtreecommitdiff
path: root/src/irc/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core')
-rw-r--r--src/irc/core/irc-nicklist.c5
-rw-r--r--src/irc/core/irc-servers-setup.c13
2 files changed, 3 insertions, 15 deletions
diff --git a/src/irc/core/irc-nicklist.c b/src/irc/core/irc-nicklist.c
index 9de3febc..ef410277 100644
--- a/src/irc/core/irc-nicklist.c
+++ b/src/irc/core/irc-nicklist.c
@@ -255,8 +255,9 @@ static void event_nick_in_use(IRC_SERVER_REC *server, const char *data)
}
/* nick already in use - need to change it .. */
- if (strcmp(server->nick, server->connrec->nick) == 0 &&
- server->connrec->alternate_nick != NULL) {
+ if (g_strcasecmp(server->nick, server->connrec->nick) == 0 &&
+ server->connrec->alternate_nick != NULL &&
+ g_strcasecmp(server->connrec->alternate_nick, server->nick) != 0) {
/* first try, so try the alternative nick.. */
g_free(server->nick);
server->nick = g_strdup(server->connrec->alternate_nick);
diff --git a/src/irc/core/irc-servers-setup.c b/src/irc/core/irc-servers-setup.c
index 8606a470..e661083a 100644
--- a/src/irc/core/irc-servers-setup.c
+++ b/src/irc/core/irc-servers-setup.c
@@ -112,19 +112,6 @@ static void init_userinfo(void)
nick = settings_get_str("nick");
}
- /* alternate nick */
- set = settings_get_str("alternate_nick");
- if (set == NULL || *set == '\0') {
- if (strlen(nick) < 9)
- str = g_strconcat(nick, "_", NULL);
- else {
- str = g_strdup(nick);
- str[strlen(str)-1] = '_';
- }
- settings_set_str("alternate_nick", str);
- g_free(str);
- }
-
/* host name */
set = settings_get_str("hostname");
if (set == NULL || *set == '\0') {