diff options
Diffstat (limited to 'Applications/IRCClient/IRCClient.cpp')
-rw-r--r-- | Applications/IRCClient/IRCClient.cpp | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/Applications/IRCClient/IRCClient.cpp b/Applications/IRCClient/IRCClient.cpp index f6f4837195..947be679f3 100644 --- a/Applications/IRCClient/IRCClient.cpp +++ b/Applications/IRCClient/IRCClient.cpp @@ -35,13 +35,8 @@ #include <AK/StringBuilder.h> #include <LibCore/DateTime.h> #include <LibCore/Notifier.h> -#include <arpa/inet.h> -#include <netinet/in.h> -#include <stdio.h> -#include <sys/socket.h> #include <pwd.h> -#include <time.h> -#include <unistd.h> +#include <stdio.h> #define IRC_DEBUG @@ -305,15 +300,15 @@ void IRCClient::handle(const Message& msg) return handle_rpl_namreply(msg); case RPL_ENDOFNAMES: return handle_rpl_endofnames(msg); - case RPL_BANLIST: + case RPL_BANLIST: return handle_rpl_banlist(msg); - case RPL_ENDOFBANLIST: + case RPL_ENDOFBANLIST: return handle_rpl_endofbanlist(msg); - case ERR_NOSUCHNICK: + case ERR_NOSUCHNICK: return handle_err_nosuchnick(msg); - case ERR_UNKNOWNCOMMAND: + case ERR_UNKNOWNCOMMAND: return handle_err_unknowncommand(msg); - case ERR_NICKNAMEINUSE: + case ERR_NICKNAMEINUSE: return handle_err_nicknameinuse(msg); } } @@ -901,7 +896,7 @@ void IRCClient::handle_user_command(const String& input) auto channel = parts[1]; part_channel(channel); join_channel(channel); - } else { + } else { auto* window = current_window(); if (!window || window->type() != IRCWindow::Type::Channel) return; @@ -915,7 +910,7 @@ void IRCClient::handle_user_command(const String& input) if (parts.size() >= 2) { auto channel = parts[1]; send_banlist(channel); - } else { + } else { auto* window = current_window(); if (!window || window->type() != IRCWindow::Type::Channel) return; @@ -936,14 +931,14 @@ void IRCClient::handle_user_command(const String& input) auto channel = parts[1]; auto topic = input.view().substring_view_starting_after_substring(channel); send_topic(channel, topic); - } else { + } else { auto* window = current_window(); if (!window || window->type() != IRCWindow::Type::Channel) return; auto channel = window->channel().name(); auto topic = input.view().substring_view_starting_after_substring(parts[0]); send_topic(channel, topic); - } + } return; } if (command == "/KICK") { @@ -959,7 +954,7 @@ void IRCClient::handle_user_command(const String& input) auto nick = parts[2]; auto reason = input.view().substring_view_starting_after_substring(nick); send_kick(channel, nick, reason); - } else { + } else { auto* window = current_window(); if (!window || window->type() != IRCWindow::Type::Channel) return; @@ -967,7 +962,7 @@ void IRCClient::handle_user_command(const String& input) auto nick = parts[1]; auto reason = input.view().substring_view_starting_after_substring(nick); send_kick(channel, nick, reason); - } + } return; } if (command == "/LIST") { |