Mercurial > pidgin
diff src/protocols/irc/irc.c @ 3511:7e1c6c16dd41
[gaim-migrate @ 3583]
a notify.so fix from deryni.
Also, I added some code so that when IRC tells you your nick is already in use, it will ask you to enter a new one rather than just wait to get kicked off.
Of course, I didn't test it all, and because I suck, it doesn't work.
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Sun, 15 Sep 2002 03:40:48 +0000 |
| parents | 3335ef5fbecc |
| children | f4cec5d41a89 |
line wrap: on
line diff
--- a/src/protocols/irc/irc.c Sat Sep 14 23:27:28 2002 +0000 +++ b/src/protocols/irc/irc.c Sun Sep 15 03:40:48 2002 +0000 @@ -813,6 +813,14 @@ id->liststr = g_string_append(id->liststr, word_eol[4]); } +static void irc_change_nick(void *a, char *b) { + struct gaim_connection *gc = a; + struct irc_data *id = gc->proto_data; + char buf[IRC_BUF_LEN]; + g_snprintf(buf, sizeof(buf), "NICK %s\r\n", b); + irc_write(id->fd, buf, strlen(buf)); +} + static void process_numeric(struct gaim_connection *gc, char *word[], char *word_eol[]) { struct irc_data *id = gc->proto_data; @@ -898,6 +906,8 @@ case 431: do_error_dialog(_("No IRC nickname given"), NULL, GAIM_ERROR); break; + case 433: + do_prompt_dialog(_("That nick is already in use. Please enter a new nick"), gc->displayname, gc, irc_change_nick, NULL); default: if (n > 400 && n < 502) { char errmsg[IRC_BUF_LEN];
