degesch: unindent some code

This commit is contained in:
Přemysl Eric Janouch 2015-05-16 09:40:02 +02:00
parent 25d3f6e44a
commit 634d960c8d
1 changed files with 20 additions and 26 deletions

View File

@ -5117,9 +5117,7 @@ handle_command_join (struct app_context *ctx, char *arguments)
// TODO: check if the arguments are in the form of // TODO: check if the arguments are in the form of
// "channel(,channel)* key(,key)*" // "channel(,channel)* key(,key)*"
irc_send (s, "JOIN %s", arguments); irc_send (s, "JOIN %s", arguments);
else else if (ctx->current_buffer->type != BUFFER_CHANNEL)
{
if (ctx->current_buffer->type != BUFFER_CHANNEL)
buffer_send_error (ctx, ctx->current_buffer, buffer_send_error (ctx, ctx->current_buffer,
"%s: %s", "Can't join", "%s: %s", "Can't join",
"no argument given and this buffer is not a channel"); "no argument given and this buffer is not a channel");
@ -5131,7 +5129,6 @@ handle_command_join (struct app_context *ctx, char *arguments)
else else
// TODO: send the key if known // TODO: send the key if known
irc_send (s, "JOIN %s", ctx->current_buffer->channel->name); irc_send (s, "JOIN %s", ctx->current_buffer->channel->name);
}
return true; return true;
} }
@ -5146,9 +5143,7 @@ handle_command_part (struct app_context *ctx, char *arguments)
// TODO: check if the arguments are in the form of "channel(,channel)*" // TODO: check if the arguments are in the form of "channel(,channel)*"
// TODO: make sure to send the reason as one argument // TODO: make sure to send the reason as one argument
irc_send (s, "PART %s", arguments); irc_send (s, "PART %s", arguments);
else else if (ctx->current_buffer->type != BUFFER_CHANNEL)
{
if (ctx->current_buffer->type != BUFFER_CHANNEL)
buffer_send_error (ctx, ctx->current_buffer, buffer_send_error (ctx, ctx->current_buffer,
"%s: %s", "Can't part", "%s: %s", "Can't part",
"no argument given and this buffer is not a channel"); "no argument given and this buffer is not a channel");
@ -5158,7 +5153,6 @@ handle_command_part (struct app_context *ctx, char *arguments)
"%s: %s", "Can't join", "you're not on the channel"); "%s: %s", "Can't join", "you're not on the channel");
else else
irc_send (s, "PART %s", ctx->current_buffer->channel->name); irc_send (s, "PART %s", ctx->current_buffer->channel->name);
}
return true; return true;
} }