aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-03-10 23:58:28 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2010-03-10 23:58:28 +0000
commita0bd4c247472c1997afbe8683ef460dadbb16b46 (patch)
tree477ffcd100ba3b136aac57bd162fb783f2fefdf0
parent3e1ef92cecad385c64c2398355d90225ac54440c (diff)
Huh, what was that dead code doing there.. :-/
-rw-r--r--root_commands.c73
1 files changed, 0 insertions, 73 deletions
diff --git a/root_commands.c b/root_commands.c
index 5de616fb..c79ff325 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -1114,79 +1114,6 @@ static void cmd_chat( irc_t *irc, char **cmd )
{
irc_usermsg( irc, "Unknown command: %s %s. Please use \x02help commands\x02 to get a list of available commands.", "chat", cmd[1] );
}
-
-
-
-#if 0
- account_t *a;
- struct im_connection *ic;
- char *chat, *channel, *nick = NULL, *password = NULL;
- struct groupchat *c;
-
- if( !( a = account_get( irc, cmd[1] ) ) )
- {
- irc_usermsg( irc, "Invalid account" );
- return;
- }
- else if( !( a->ic && ( a->ic->flags & OPT_LOGGED_IN ) ) )
- {
- irc_usermsg( irc, "That account is not on-line" );
- return;
- }
- else if( a->prpl->chat_join == NULL )
- {
- irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] );
- return;
- }
- ic = a->ic;
-
- chat = cmd[2];
- if( cmd[3] )
- {
- if( strchr( CTYPES, cmd[3][0] ) == NULL )
- channel = g_strdup_printf( "&%s", cmd[3] );
- else
- channel = g_strdup( cmd[3] );
- }
- else
- {
- char *s;
-
- channel = g_strdup_printf( "&%s", chat );
- if( ( s = strchr( channel, '@' ) ) )
- *s = 0;
- }
- if( cmd[3] && cmd[4] )
- nick = cmd[4];
- else
- nick = irc->nick;
- if( cmd[3] && cmd[4] && cmd[5] )
- password = cmd[5];
-
- if( !nick_ok( channel + 1 ) )
- {
- irc_usermsg( irc, "Invalid channel name: %s", channel );
- g_free( channel );
- return;
- }
- else if( g_strcasecmp( channel, irc->channel ) == 0 || irc_chat_by_channel( irc, channel ) )
- {
- irc_usermsg( irc, "Channel already exists: %s", channel );
- g_free( channel );
- return;
- }
-
- if( ( c = a->prpl->chat_join( ic, chat, nick, password ) ) )
- {
- g_free( c->channel );
- c->channel = channel;
- }
- else
- {
- irc_usermsg( irc, "Tried to join chat, not sure if this was successful" );
- g_free( channel );
- }
-#endif
}
const command_t commands[] = {