From 71dc8543dc4eeafabbe28bae52ec1d05ce9f5fea Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 10 Dec 2007 22:33:08 +0000 Subject: Fixed "set xxx" syntax (it showed all settings instead of just xxx). --- root_commands.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index 642f5374..2a5938e7 100644 --- a/root_commands.c +++ b/root_commands.c @@ -402,9 +402,7 @@ static void cmd_account( irc_t *irc, char **cmd ) return; } - if( ( strcmp( cmd[3], "=" ) ) == 0 && cmd[4] ) - irc_usermsg( irc, "Warning: Correct syntax: \002account set \002 (without =)" ); - else if( g_strncasecmp( cmd[2], "-del", 4 ) == 0 ) + if( g_strncasecmp( cmd[2], "-del", 4 ) == 0 ) set_reset( &a->set, set_name ); else set_setstr( &a->set, set_name, cmd[3] ); @@ -744,16 +742,11 @@ static void cmd_yesno( irc_t *irc, char **cmd ) static void cmd_set( irc_t *irc, char **cmd ) { - char *set_name = NULL; + char *set_name = cmd[1]; if( cmd[1] && cmd[2] ) { - if( ( strcmp( cmd[2], "=" ) ) == 0 && cmd[3] ) - { - irc_usermsg( irc, "Warning: Correct syntax: \002set \002 (without =)" ); - return; - } - else if( g_strncasecmp( cmd[1], "-del", 4 ) == 0 ) + if( g_strncasecmp( cmd[1], "-del", 4 ) == 0 ) { set_reset( &irc->set, cmd[2] ); set_name = cmd[2]; @@ -761,7 +754,6 @@ static void cmd_set( irc_t *irc, char **cmd ) else { set_setstr( &irc->set, cmd[1], cmd[2] ); - set_name = cmd[1]; } } if( set_name ) /* else 'forgotten' on purpose.. Must show new value after changing */ -- cgit v1.2.3 From 30ce1ced040c44c528d0a6e6e9c6b10a1caf1052 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 12 Dec 2007 23:30:51 +0000 Subject: Killed the 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). --- root_commands.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'root_commands.c') 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." ); } } } -- cgit v1.2.3 From e7311208511c391b4f55161b6be93dbffb381c5e Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 11 Jan 2008 00:45:18 +0000 Subject: Adding own handle to protocol name in blist output for people with multiple accounts on the same IM network. --- root_commands.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index dc70feb4..26a42a25 100644 --- a/root_commands.c +++ b/root_commands.c @@ -820,7 +820,7 @@ static void cmd_blist( irc_t *irc, char **cmd ) { if( online == 1 ) { - g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->ic->acc->prpl->name ); + g_snprintf( s, sizeof( s ) - 1, "%s@%s %s(%s)", u->user, u->host, u->ic->acc->prpl->name, u->ic->acc->user ); irc_usermsg( irc, format, u->nick, s, "Online" ); } @@ -831,7 +831,7 @@ static void cmd_blist( irc_t *irc, char **cmd ) { if( away == 1 ) { - g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->ic->acc->prpl->name ); + g_snprintf( s, sizeof( s ) - 1, "%s@%s %s(%s)", u->user, u->host, u->ic->acc->prpl->name, u->ic->acc->user ); irc_usermsg( irc, format, u->nick, s, u->away ); } n_away ++; @@ -841,7 +841,7 @@ static void cmd_blist( irc_t *irc, char **cmd ) { if( offline == 1 ) { - g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->ic->acc->prpl->name ); + g_snprintf( s, sizeof( s ) - 1, "%s@%s %s(%s)", u->user, u->host, u->ic->acc->prpl->name, u->ic->acc->user ); irc_usermsg( irc, format, u->nick, s, "Offline" ); } n_offline ++; -- cgit v1.2.3 From 7adc657830fe76df344bf718df45ca05cc015d4e Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 9 Feb 2008 23:54:09 +0000 Subject: Restored "add -tmp". A bit hackish, but it will do for now. --- root_commands.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index 26a42a25..8e315bd4 100644 --- a/root_commands.c +++ b/root_commands.c @@ -448,7 +448,7 @@ static void cmd_add( irc_t *irc, char **cmd ) if( g_strcasecmp( cmd[1], "-tmp" ) == 0 ) { add_on_server = 0; - cmd ++; /* So evil... :-D */ + cmd ++; } if( !( a = account_get( irc, cmd[1] ) ) ) @@ -480,12 +480,13 @@ static void cmd_add( irc_t *irc, char **cmd ) } } - /* By making this optional, you can talk to people without having to - add them to your *real* (server-side) contact list. */ if( add_on_server ) a->ic->acc->prpl->add_buddy( a->ic, cmd[2], NULL ); - - /* add_buddy( a->ic, NULL, cmd[2], cmd[2] ); */ + else + /* Yeah, officially this is a call-*back*... So if we just + called add_buddy, we'll wait for the IM server to respond + before we do this. */ + imcb_add_buddy( a->ic, cmd[2], NULL ); irc_usermsg( irc, "Adding `%s' to your contact list", cmd[2] ); } -- cgit v1.2.3