# HG changeset patch # User Ethan Blanton # Date 1094780621 0 # Node ID 8ba9a9048d73efe108731a03dde936e996b71efe # Parent 4d2269c6c673863b786d57b6b3946bb90474d4b1 [gaim-migrate @ 10919] Configurable realname for IRC committer: Tailor Script diff -r 4d2269c6c673 -r 8ba9a9048d73 src/protocols/irc/irc.c --- a/src/protocols/irc/irc.c Thu Sep 09 22:43:54 2004 +0000 +++ b/src/protocols/irc/irc.c Fri Sep 10 01:43:41 2004 +0000 @@ -274,7 +274,7 @@ struct irc_conn *irc = gc->proto_data; char hostname[256]; char *buf; - const char *username; + const char *username, *realname; GList *connections = gaim_connections_get_all(); if (source < 0) { @@ -301,8 +301,9 @@ gethostname(hostname, sizeof(hostname)); hostname[sizeof(hostname) - 1] = '\0'; username = gaim_account_get_string(irc->account, "username", ""); + realname = gaim_account_get_string(irc->account, "realname", ""); 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); + strlen(realname) ? realname : IRC_DEFAULT_ALIAS); if (irc_send(irc, buf) < 0) { gaim_connection_error(gc, "Error registering with server"); return; @@ -710,6 +711,9 @@ option = gaim_account_option_string_new(_("Username"), "username", ""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + option = gaim_account_option_string_new(_("Real name"), "realname", ""); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + _irc_plugin = plugin; irc_register_commands();