From c1a8a163703a903c7a69e06286013f12d6bf865e Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 6 Jun 2010 00:16:52 +0100 Subject: Restored the "chat with" command, let's keep it around at least for now. Maybe it's nice to keep since it's only one command, as opposed to /join + /invite. --- root_commands.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index 7c54e272..eb42c888 100644 --- a/root_commands.c +++ b/root_commands.c @@ -1018,19 +1018,19 @@ static void cmd_chat( irc_t *irc, char **cmd ) irc_usermsg( irc, "Could not add chatroom." ); } } - /* else if( g_strcasecmp( cmd[1], "with" ) == 0 ) { - user_t *u; + irc_user_t *iu; MIN_ARGS( 2 ); - if( ( u = user_find( irc, cmd[2] ) ) && u->ic && u->ic->acc->prpl->chat_with ) + if( ( iu = irc_user_by_name( irc, cmd[2] ) ) && + iu->bu && iu->bu->ic->acc->prpl->chat_with ) { - if( !u->ic->acc->prpl->chat_with( u->ic, u->handle ) ) + if( !iu->bu->ic->acc->prpl->chat_with( iu->bu->ic, iu->bu->handle ) ) { irc_usermsg( irc, "(Possible) failure while trying to open " - "a groupchat with %s.", u->nick ); + "a groupchat with %s.", iu->nick ); } } else @@ -1038,7 +1038,6 @@ static void cmd_chat( irc_t *irc, char **cmd ) irc_usermsg( irc, "Can't open a groupchat with %s.", cmd[2] ); } } - */ else { irc_usermsg( irc, "Unknown command: %s %s. Please use \x02help commands\x02 to get a list of available commands.", "chat", cmd[1] ); -- cgit v1.2.3