diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-15 17:37:13 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-15 17:37:13 +0100 |
commit | 1fc283ed7dc504a519db57d442f498e3c803586b (patch) | |
tree | 69f383daf37a3e7d453f0a72068afd50a37af438 /Applications/IRCClient/IRCClient.h | |
parent | ad08165a252d096ba7e4730efce9fb96181b5373 (diff) | |
download | serenity-1fc283ed7dc504a519db57d442f498e3c803586b.zip |
IRCClient+LibGUI: Add an input box so we can send messages to channels.
Implement this using a GTextEditor with a special single-line mode.
This new mode needs some polishing, but it's already very useful.
Diffstat (limited to 'Applications/IRCClient/IRCClient.h')
-rw-r--r-- | Applications/IRCClient/IRCClient.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Applications/IRCClient/IRCClient.h b/Applications/IRCClient/IRCClient.h index fffa333aec..04771b722a 100644 --- a/Applications/IRCClient/IRCClient.h +++ b/Applications/IRCClient/IRCClient.h @@ -13,6 +13,7 @@ class IRCClientWindowListModel; class GNotifier; class IRCClient { + friend class IRCChannel; public: IRCClient(const String& address, int port = 6667); ~IRCClient(); @@ -45,6 +46,10 @@ public: const IRCClientWindow& window_at(int index) const { return *m_windows.at(index); } IRCClientWindow& window_at(int index) { return *m_windows.at(index); } + 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&); + private: struct Message { String prefix; @@ -57,6 +62,7 @@ private: void send_user(); void send_nick(); void send_pong(const String& server); + void send_privmsg(const String& target, const String&); void process_line(); void handle_join(const Message&); void handle_ping(const Message&); @@ -64,6 +70,7 @@ private: void handle_privmsg(const Message&); void handle(const Message&, const String& verbatim); IRCQuery& ensure_query(const String& name); + IRCChannel& ensure_channel(const String& name); String m_hostname; int m_port { 0 }; |