Mercurial > pidgin.yaz
changeset 7323:443fc7d6fbff
[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 <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Fri, 24 Oct 2003 15:37:17 +0000 |
parents | ab828b8c3f22 |
children | 4963abdebd29 |
files | src/protocols/irc/irc.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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; }