Mercurial > pidgin
diff src/protocols/irc/irc.c @ 6752:90fd056e755d
[gaim-migrate @ 7284]
disallow spaces in nicks
committer: Tailor Script <tailor@pidgin.im>
| author | Ethan Blanton <elb@pidgin.im> |
|---|---|
| date | Fri, 05 Sep 2003 16:52:43 +0000 |
| parents | 0c5637b5462e |
| children | faa491042c66 |
line wrap: on
line diff
--- a/src/protocols/irc/irc.c Fri Sep 05 07:11:01 2003 +0000 +++ b/src/protocols/irc/irc.c Fri Sep 05 16:52:43 2003 +0000 @@ -141,6 +141,11 @@ gc = gaim_account_get_connection(account); + if (strpbrk(username, " \t\v\r\n") != NULL) { + gaim_connection_error(gc, _("IRC nicks may not contain whitespace")); + return; + } + gc->proto_data = irc = g_new0(struct irc_conn, 1); irc->account = account; @@ -220,6 +225,9 @@ { struct irc_conn *irc = gc->proto_data; + if (irc == NULL) + return; + irc_cmd_quit(irc, "quit", NULL, NULL); if (gc->inpa)
