Mercurial > pidgin.yaz
changeset 10002:8ba9a9048d73
[gaim-migrate @ 10919]
Configurable realname for IRC
committer: Tailor Script <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Fri, 10 Sep 2004 01:43:41 +0000 |
parents | 4d2269c6c673 |
children | 33431f91e4a8 |
files | src/protocols/irc/irc.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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();