diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2011-12-13 00:34:07 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2011-12-13 00:34:07 +0000 |
commit | 17f057d70b1513710e3d765969205625f0fc7b76 (patch) | |
tree | a246f60ad171749e575816c53e9b89e89cd60788 | |
parent | b926d88bdbb7e1081fed880fbf8e9b9b7fcf519c (diff) |
As I intended for a while already, use account tags everywhere instead of
"protocol(handle)". It's guaranteed to be unique and also shorter.
It may suck for people who have multiple accounts and didn't change their
tags, but that'll hopefully remind them to change them.
-rw-r--r-- | irc_commands.c | 4 | ||||
-rw-r--r-- | protocols/nogaim.c | 2 | ||||
-rw-r--r-- | root_commands.c | 23 |
3 files changed, 15 insertions, 14 deletions
diff --git a/irc_commands.c b/irc_commands.c index 144f6589..52cf31d0 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -433,12 +433,12 @@ static void irc_cmd_oper_hack( irc_t *irc, char **cmd ) { set_setstr( &a->set, "password", password ); irc_rootmsg( irc, "Password added to IM account " - "%s(%s)", a->prpl->name, a->user ); + "%s", a->tag ); /* The IRC client may expect this. 491 suggests the OPER password was wrong, so the client won't expect a +o. It may however repeat the password prompt. We'll see. */ irc_send_num( irc, 491, ":Password added to IM account " - "%s(%s)", a->prpl->name, a->user ); + "%s", a->tag ); } } else if( irc->status & OPER_HACK_IDENTIFY ) diff --git a/protocols/nogaim.c b/protocols/nogaim.c index a44679ce..a47e0e84 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -215,7 +215,7 @@ static void serv_got_crap( struct im_connection *ic, char *format, ... ) /* If we found one, include the screenname in the message. */ if( a ) /* FIXME(wilmer): ui_log callback or so */ - irc_rootmsg( ic->bee->ui_data, "%s(%s) - %s", ic->acc->prpl->name, ic->acc->user, text ); + irc_rootmsg( ic->bee->ui_data, "%s - %s", ic->acc->tag, text ); else irc_rootmsg( ic->bee->ui_data, "%s - %s", ic->acc->prpl->name, text ); diff --git a/root_commands.c b/root_commands.c index 6924fd13..734cb0e8 100644 --- a/root_commands.c +++ b/root_commands.c @@ -412,8 +412,8 @@ static void cmd_account( irc_t *irc, char **cmd ) for( a = irc->b->accounts; a; a = a->next ) if( strcmp( a->pass, PASSWORD_PENDING ) == 0 ) { - irc_rootmsg( irc, "Enter password for account %s(%s) " - "first (use /OPER)", a->prpl->name, a->user ); + irc_rootmsg( irc, "Enter password for account %s " + "first (use /OPER)", a->tag ); return; } @@ -442,7 +442,8 @@ static void cmd_account( irc_t *irc, char **cmd ) set_setstr( &a->set, "server", cmd[5] ); } - irc_rootmsg( irc, "Account successfully added%s", cmd[4] ? "" : + irc_rootmsg( irc, "Account successfully added with tag %s%s", + a->tag, cmd[4] ? "" : ", now use /OPER to enter the password" ); return; @@ -489,8 +490,8 @@ static void cmd_account( irc_t *irc, char **cmd ) if( !a->ic && a->auto_connect ) { if( strcmp( a->pass, PASSWORD_PENDING ) == 0 ) - irc_rootmsg( irc, "Enter password for account %s(%s) " - "first (use /OPER)", a->prpl->name, a->user ); + irc_rootmsg( irc, "Enter password for account %s " + "first (use /OPER)", a->tag ); else account_on( irc->b, a ); } @@ -552,8 +553,8 @@ static void cmd_account( irc_t *irc, char **cmd ) if( a->ic ) irc_rootmsg( irc, "Account already online" ); else if( strcmp( a->pass, PASSWORD_PENDING ) == 0 ) - irc_rootmsg( irc, "Enter password for account %s(%s) " - "first (use /OPER)", a->prpl->name, a->user ); + irc_rootmsg( irc, "Enter password for account %s " + "first (use /OPER)", a->tag ); else account_on( irc->b, a ); } @@ -1092,7 +1093,7 @@ static void cmd_blist( irc_t *irc, char **cmd ) if( bu->status_msg ) g_snprintf( st, sizeof( st ) - 1, "Online (%s)", bu->status_msg ); - g_snprintf( s, sizeof( s ) - 1, "%s %s(%s)", bu->handle, bu->ic->acc->prpl->name, bu->ic->acc->user ); + g_snprintf( s, sizeof( s ) - 1, "%s %s", bu->handle, bu->ic->acc->tag ); irc_rootmsg( irc, format, iu->nick, s, st ); } @@ -1110,7 +1111,7 @@ static void cmd_blist( irc_t *irc, char **cmd ) if( away == 1 ) { - g_snprintf( s, sizeof( s ) - 1, "%s %s(%s)", bu->handle, bu->ic->acc->prpl->name, bu->ic->acc->user ); + g_snprintf( s, sizeof( s ) - 1, "%s %s", bu->handle, bu->ic->acc->tag ); irc_rootmsg( irc, format, iu->nick, s, irc_user_get_away( iu ) ); } n_away ++; @@ -1127,7 +1128,7 @@ static void cmd_blist( irc_t *irc, char **cmd ) if( offline == 1 ) { - g_snprintf( s, sizeof( s ) - 1, "%s %s(%s)", bu->handle, bu->ic->acc->prpl->name, bu->ic->acc->user ); + g_snprintf( s, sizeof( s ) - 1, "%s %s", bu->handle, bu->ic->acc->tag ); irc_rootmsg( irc, format, iu->nick, s, "Offline" ); } n_offline ++; @@ -1151,7 +1152,7 @@ static void cmd_qlist( irc_t *irc, char **cmd ) for( num = 0; q; q = q->next, num ++ ) if( q->ic ) /* Not necessary yet, but it might come later */ - irc_rootmsg( irc, "%d, %s(%s): %s", num, q->ic->acc->prpl->name, q->ic->acc->user, q->question ); + irc_rootmsg( irc, "%d, %s: %s", num, q->ic->acc->tag, q->question ); else irc_rootmsg( irc, "%d, BitlBee: %s", num, q->question ); } |