# HG changeset patch # User Ethan Blanton # Date 1067009837 0 # Node ID 443fc7d6fbff14da19fce571ae19584c36909677 # Parent ab828b8c3f22f55bbac312a68deffc3572dc269e [gaim-migrate @ 7909] The username reported to the IRC server can now be set in the account options for an IRC account. committer: Tailor Script diff -r ab828b8c3f22 -r 443fc7d6fbff 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; }