diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2007-12-12 23:30:51 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2007-12-12 23:30:51 +0000 |
commit | 30ce1ced040c44c528d0a6e6e9c6b10a1caf1052 (patch) | |
tree | d2dd16bb5c39da490ea4f2895516e72c115a343e | |
parent | d52111a7b05657e4a4fa8417e6655389a50769cf (diff) |
Killed the <server> parameter to "account add" and changed the default
server for OSCAR to what both login.icq.com and login.oscar.aol.com resolve
to these days. There's no need to specify a server anymore so why bother.
And cleaned up the docs (removed all references to those OSCAR servers).
-rw-r--r-- | account.c | 7 | ||||
-rw-r--r-- | doc/user-guide/commands.xml | 12 | ||||
-rw-r--r-- | doc/user-guide/quickstart.xml | 4 | ||||
-rw-r--r-- | protocols/oscar/aim.h | 2 | ||||
-rw-r--r-- | protocols/oscar/oscar.c | 26 | ||||
-rw-r--r-- | root_commands.c | 8 |
6 files changed, 25 insertions, 34 deletions
@@ -94,10 +94,15 @@ char *set_eval_account( set_t *set, char *value ) { g_free( acc->server ); if( *value ) + { acc->server = g_strdup( value ); + return value; + } else + { acc->server = NULL; - return value; + return g_strdup( set->def ); + } } else if( strcmp( set->key, "auto_connect" ) == 0 ) { diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml index ac9bdf11..b4efd967 100644 --- a/doc/user-guide/commands.xml +++ b/doc/user-guide/commands.xml @@ -16,7 +16,7 @@ </description> <bitlbee-command name="add"> - <syntax>account add <protocol> <username> <password> [<server>]</syntax> + <syntax>account add <protocol> <username> <password></syntax> <description> <para> @@ -25,7 +25,7 @@ </description> <bitlbee-command name="jabber"> - <syntax>account add jabber <handle@server.tld> <password> [<servertag>]</syntax> + <syntax>account add jabber <handle@server.tld> <password></syntax> <description> <para> @@ -49,16 +49,16 @@ </bitlbee-command> <bitlbee-command name="oscar"> - <syntax>account add oscar <handle> <password> [<servername>]</syntax> + <syntax>account add oscar <handle> <password></syntax> <description> <para> - Specifying a server is required for OSCAR, since OSCAR can be used for both ICQ- and AIM-connections. Although these days it's supposed to be possible to connect to ICQ via AIM-servers and vice versa, we like to stick with this separation for now. For ICQ connections, the servername is <emphasis>login.icq.com</emphasis>, for AIM connections it's <emphasis>login.oscar.aol.com</emphasis>. + OSCAR is the protocol used to connect to AIM and/or ICQ. The servers will automatically detect if you're using a numeric or non-numeric username so there's no need to tell which network you want to connect to. </para> </description> <ircexample> - <ircline nick="wilmer">account add oscar 72696705 hobbelmeeuw login.icq.com</ircline> + <ircline nick="wilmer">account add oscar 72696705 hobbelmeeuw</ircline> <ircline nick="root">Account successfully added</ircline> </ircexample> </bitlbee-command> @@ -594,7 +594,7 @@ <bitlbee-setting name="server" type="string" scope="account"> <description> <para> - Can be set for Jabber- and OSCAR-connections. For OSCAR, this must be set to <emphasis>login.icq.com</emphasis> if it's an ICQ connection, or <emphasis>login.oscar.aol.com</emphasis> if it's an AIM connection. For Jabber, you have to set this if the servername isn't equal to the part after the @ in the Jabber handle. + Can be set for Jabber- and OSCAR-connections. For Jabber, you might have to set this if the servername isn't equal to the part after the @ in the Jabber handle. For OSCAR this shouldn't be necessary anymore in recent BitlBee versions. </para> </description> </bitlbee-setting> diff --git a/doc/user-guide/quickstart.xml b/doc/user-guide/quickstart.xml index 520f240f..fcb06c6b 100644 --- a/doc/user-guide/quickstart.xml +++ b/doc/user-guide/quickstart.xml @@ -37,12 +37,12 @@ For instance, suppose you have an ICQ account with UIN <emphasis>72696705</empha </para> <ircexample> - <ircline nick="you">account add oscar 72696705 QuickStart login.icq.com</ircline> + <ircline nick="you">account add jabber bitlbee@jabber.org QuickStart</ircline> <ircline nick="root">Account successfully added</ircline> </ircexample> <para> -Other available IM protocols are jabber, msn, and yahoo. Oscar is the protocol used by ICQ and AOL. For oscar, you need to specify the IM-server as a fourth argument (for msn and yahoo there is no fourth argument). For AOL Instant Messenger, the server name is <emphasis>login.oscar.aol.com</emphasis>. For ICQ, the server name is <emphasis>login.icq.com</emphasis>. +Other available IM protocols are msn, oscar, and yahoo. Oscar is the protocol used by ICQ and AOL. </para> <para> diff --git a/protocols/oscar/aim.h b/protocols/oscar/aim.h index 81ea5f9e..9516996c 100644 --- a/protocols/oscar/aim.h +++ b/protocols/oscar/aim.h @@ -93,7 +93,7 @@ typedef guint16 flap_seqnum_t; * the client to connect to it. * */ -#define AIM_DEFAULT_LOGIN_SERVER "login.oscar.aol.com" +#define AIM_DEFAULT_LOGIN_SERVER "login.messaging.aol.com" #define AIM_LOGIN_PORT 5190 /* diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index 8d45acf0..c4683046 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -340,7 +340,7 @@ static void oscar_init(account_t *acc) { set_t *s; - s = set_add( &acc->set, "server", NULL, set_eval_account, acc ); + s = set_add( &acc->set, "server", AIM_DEFAULT_LOGIN_SERVER, set_eval_account, acc ); s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY; if (isdigit(acc->user[0])) { @@ -355,15 +355,7 @@ static void oscar_login(account_t *acc) { struct im_connection *ic = imcb_new(acc); struct oscar_data *odata = ic->proto_data = g_new0(struct oscar_data, 1); - if (isdigit(acc->user[0])) { - odata->icq = TRUE; - /* This is odd but it's necessary for a proper do_import and do_export. - We don't do those anymore, but let's stick with it, just in case - it accidentally fixes something else too... </bitlbee> */ - /* ic->acc->pass[8] = 0; - Not touching this anymore now that it belongs to account_t! - Let's hope nothing will break. ;-) */ - } else { + if (!isdigit(acc->user[0])) { ic->flags |= OPT_DOES_HTML; } @@ -384,24 +376,14 @@ static void oscar_login(account_t *acc) { return; } - if (acc->server == NULL) { - imcb_error(ic, "No servername specified"); - imc_logout(ic, FALSE); - return; - } - - if (g_strcasecmp(acc->server, "login.icq.com") != 0 && - g_strcasecmp(acc->server, "login.oscar.aol.com") != 0) { - imcb_log(ic, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.",acc->server); - } - imcb_log(ic, _("Signon: %s"), ic->acc->user); aim_conn_addhandler(sess, conn, 0x0017, 0x0007, gaim_parse_login, 0); aim_conn_addhandler(sess, conn, 0x0017, 0x0003, gaim_parse_auth_resp, 0); conn->status |= AIM_CONN_STATUS_INPROGRESS; - conn->fd = proxy_connect(acc->server, AIM_LOGIN_PORT, oscar_login_connect, ic); + conn->fd = proxy_connect(set_getstr(&acc->set, "server"), + AIM_LOGIN_PORT, oscar_login_connect, ic); if (conn->fd < 0) { imcb_error(ic, _("Couldn't connect to host")); imc_logout(ic, TRUE); diff --git a/root_commands.c b/root_commands.c index 2a5938e7..dc70feb4 100644 --- a/root_commands.c +++ b/root_commands.c @@ -198,7 +198,7 @@ static void cmd_drop( irc_t *irc, char **cmd ) irc_usermsg( irc, "Account `%s' removed", irc->nick ); break; default: - irc_usermsg( irc, "Error: '%d'", status ); + irc_usermsg( irc, "Error: `%d'", status ); break; } } @@ -233,7 +233,11 @@ static void cmd_account( irc_t *irc, char **cmd ) a = account_add( irc, prpl, cmd[3], cmd[4] ); if( cmd[5] ) + { + irc_usermsg( irc, "Warning: Passing a servername/other flags to `account add' " + "is now deprecated. Use `account set' instead." ); set_setstr( &a->set, "server", cmd[5] ); + } irc_usermsg( irc, "Account successfully added" ); } @@ -316,7 +320,7 @@ static void cmd_account( irc_t *irc, char **cmd ) } else { - irc_usermsg( irc, "No accounts known. Use 'account add' to add one." ); + irc_usermsg( irc, "No accounts known. Use `account add' to add one." ); } } } |