Update of /cvsroot/gaim/gaim/src/protocols/irc
In directory usw-pr-cvs1:/tmp/cvs-serv30362/src/protocols/irc
Modified Files:
irc.c
Log Message:
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.
Index: irc.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- irc.c 14 Sep 2002 03:17:05 -0000 1.82
+++ irc.c 15 Sep 2002 03:40:48 -0000 1.83
@@ -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];
|