| 237 g_free(buf); |
238 g_free(buf); |
| 238 } |
239 } |
| 239 |
240 |
| 240 gethostname(hostname, sizeof(hostname)); |
241 gethostname(hostname, sizeof(hostname)); |
| 241 hostname[sizeof(hostname) - 1] = '\0'; |
242 hostname[sizeof(hostname) - 1] = '\0'; |
| 242 buf = irc_format(irc, "vvvv:", "USER", g_get_user_name(), hostname, irc->server, |
243 username = gaim_account_get_string(irc->account, "username", ""); |
| |
244 buf = irc_format(irc, "vvvv:", "USER", strlen(username) ? username : g_get_user_name(), hostname, irc->server, |
| 243 gc->account->alias && *gc->account->alias ? gc->account->alias : IRC_DEFAULT_ALIAS); |
245 gc->account->alias && *gc->account->alias ? gc->account->alias : IRC_DEFAULT_ALIAS); |
| 244 if (irc_send(irc, buf) < 0) { |
246 if (irc_send(irc, buf) < 0) { |
| 245 gaim_connection_error(gc, "Error registering with server"); |
247 gaim_connection_error(gc, "Error registering with server"); |
| 246 return; |
248 return; |
| 247 } |
249 } |
| 552 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
554 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
| 553 |
555 |
| 554 option = gaim_account_option_string_new(_("Encoding"), "encoding", IRC_DEFAULT_CHARSET); |
556 option = gaim_account_option_string_new(_("Encoding"), "encoding", IRC_DEFAULT_CHARSET); |
| 555 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
557 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
| 556 |
558 |
| |
559 option = gaim_account_option_string_new(_("Username"), "username", ""); |
| |
560 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
| |
561 |
| 557 _irc_plugin = plugin; |
562 _irc_plugin = plugin; |
| 558 } |
563 } |
| 559 |
564 |
| 560 GAIM_INIT_PLUGIN(irc, _init_plugin, info); |
565 GAIM_INIT_PLUGIN(irc, _init_plugin, info); |