diff options
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 73 |
1 files changed, 71 insertions, 2 deletions
@@ -1474,6 +1474,48 @@ irc_to_utf8 (struct app_context *ctx, const char *text) } static void +irc_handle_join (struct app_context *ctx, const struct irc_message *msg) +{ + // TODO: if the user is us, create a new buffer and activate it. + // TODO: log a message +} + +static void +irc_handle_kick (struct app_context *ctx, const struct irc_message *msg) +{ + // TODO: remove user from the channel + // TODO: log a message +} + +static void +irc_handle_mode (struct app_context *ctx, const struct irc_message *msg) +{ + // TODO: parse the mode change and apply it + // TODO: log a message +} + +static void +irc_handle_nick (struct app_context *ctx, const struct irc_message *msg) +{ + // TODO: rename the user in all relevant channels + // TODO: if it's us, rename ourselves + // TODO: log a message in all relevant channels +} + +static void +irc_handle_notice (struct app_context *ctx, const struct irc_message *msg) +{ + // TODO: log a message +} + +static void +irc_handle_part (struct app_context *ctx, const struct irc_message *msg) +{ + // TODO: remove user from the channel + // TODO: log a message +} + +static void irc_handle_ping (struct app_context *ctx, const struct irc_message *msg) { if (msg->params.len) @@ -1482,6 +1524,25 @@ irc_handle_ping (struct app_context *ctx, const struct irc_message *msg) irc_send (ctx, "PONG"); } +static void +irc_handle_privmsg (struct app_context *ctx, const struct irc_message *msg) +{ + // TODO: log a message +} + +static void +irc_handle_quit (struct app_context *ctx, const struct irc_message *msg) +{ + // TODO: remove user from all channels + // TODO: log a message +} + +static void +irc_handle_topic (struct app_context *ctx, const struct irc_message *msg) +{ + // TODO: log a message +} + static struct irc_handler { char *name; @@ -1490,8 +1551,16 @@ static struct irc_handler g_irc_handlers[] = { // This list needs to stay sorted - // TODO: handle as much as we can - { "PING", irc_handle_ping }, + { "JOIN", irc_handle_join }, + { "KICK", irc_handle_kick }, + { "MODE", irc_handle_mode }, + { "NICK", irc_handle_nick }, + { "NOTICE", irc_handle_notice }, + { "PART", irc_handle_part }, + { "PING", irc_handle_ping }, + { "PRIVMSG", irc_handle_privmsg }, + { "QUIT", irc_handle_quit }, + { "TOPIC", irc_handle_topic }, }; static int |