1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:17:34 +00:00

IRCClient: Implement the "part from channel" action.

Also make sure the action is disabled while we're not in a window that
corresponds to an open channel. :^)

Fixes #277.
This commit is contained in:
Andreas Kling 2019-07-07 21:51:08 +02:00
parent d47432487d
commit ea9340aeca
5 changed files with 32 additions and 2 deletions

View file

@ -44,6 +44,7 @@ public:
Function<void()> on_disconnect;
Function<void()> on_server_message;
Function<void(const String&)> on_nickname_changed;
Function<void(IRCChannel&)> on_part_from_channel;
Function<IRCWindow*(void*, IRCWindow::Type, const String&)> aid_create_window;
Function<IRCWindow*()> aid_get_active_window;
@ -59,6 +60,8 @@ public:
const IRCWindow& window_at(int index) const { return *m_windows.at(index); }
IRCWindow& window_at(int index) { return *m_windows.at(index); }
void did_part_from_channel(Badge<IRCChannel>, IRCChannel&);
void handle_user_input_in_channel(const String& channel_name, const String&);
void handle_user_input_in_query(const String& query_name, const String&);
void handle_user_input_in_server(const String&);