diff -r de15a9314c04 -r ed430996905d src/protocols/irc/irc.c --- a/src/protocols/irc/irc.c Fri Oct 24 05:46:01 2003 +0000 +++ b/src/protocols/irc/irc.c Fri Oct 24 15:37:17 2003 +0000 @@ -216,6 +216,7 @@ struct irc_conn *irc = gc->proto_data; char hostname[256]; char *buf; + const char *username; GList *connections = gaim_connections_get_all(); if (source < 0) @@ -239,7 +240,8 @@ gethostname(hostname, sizeof(hostname)); hostname[sizeof(hostname) - 1] = '\0'; - buf = irc_format(irc, "vvvv:", "USER", g_get_user_name(), hostname, irc->server, + username = gaim_account_get_string(irc->account, "username", ""); + buf = irc_format(irc, "vvvv:", "USER", strlen(username) ? username : g_get_user_name(), hostname, irc->server, gc->account->alias && *gc->account->alias ? gc->account->alias : IRC_DEFAULT_ALIAS); if (irc_send(irc, buf) < 0) { gaim_connection_error(gc, "Error registering with server"); @@ -554,6 +556,9 @@ option = gaim_account_option_string_new(_("Encoding"), "encoding", IRC_DEFAULT_CHARSET); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + option = gaim_account_option_string_new(_("Username"), "username", ""); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + _irc_plugin = plugin; }