<commit_before>using Gee;

namespace yrcd {
  class yrcd_router : Object {
    public yrcd_server server;
    public yrcd_router(yrcd_server k) {
      server = k;
    }
    public void route (yrcd_user user, string? msg) {
      if (msg == null) {
        user.server.log("Received null message, disconnecting user %d".printf(user.id));
        user.quit(null);
        return;
      }
      string stripped = strip_end(msg);
      string[] args = tokenize(stripped);
      if (args[0] != null) {
        user.server.log("USER %d: received line %s".printf(user.id,stripped));
        user.update_timestamp();
        switch (args[0].down()) {
          case "quit" :
            user.server.log("Received QUIT");
            user.quit(null);
            break;
          case "nick" :
            user.change_nick(args);
            break;
          case "user" :
            user.user_reg(args);
            break;
          case "privmsg" :
            privmsg_handler(user,args);
            break;
          case "join" :
            join_handler(user,args);
            break;
          default :
            unknown_command_handler(user, args);
            break;
        }
      }
    }
    public void unknown_command_handler(yrcd_user user, string[] args) {
      user.fire_numeric(ERR_UNKNOWNCOMMAND, args[0]);
    }
    public void join_handler(yrcd_user user, string[] args) {
      if (server.get_channel_by_name(args[1]) == null) {<commit_msg>"recognize" pong<commit_after>using Gee;

namespace yrcd {
  class yrcd_router : Object {
    public yrcd_server server;
    public yrcd_router(yrcd_server k) {
      server = k;
    }
    public void route (yrcd_user user, string? msg) {
      if (msg == null) {
        user.server.log("Received null message, disconnecting user %d".printf(user.id));
        user.quit(null);
        return;
      }
      string stripped = strip_end(msg);
      string[] args = tokenize(stripped);
      if (args[0] != null) {
        user.server.log("USER %d: received line %s".printf(user.id,stripped));
        user.update_timestamp();
        switch (args[0].down()) {
          case "quit" :
            user.server.log("Received QUIT");
            user.quit(null);
            break;
          case "nick" :
            user.change_nick(args);
            break;
          case "user" :
            user.user_reg(args);
            break;
          case "privmsg" :
            privmsg_handler(user,args);
            break;
          case "join" :
            join_handler(user,args);
            break;
          case "pong" :
            break;
          default :
            unknown_command_handler(user, args);
            break;
        }
      }
    }
    public void unknown_command_handler(yrcd_user user, string[] args) {
      user.fire_numeric(ERR_UNKNOWNCOMMAND, args[0]);
    }
    public void join_handler(yrcd_user user, string[] args) {
      if (server.get_channel_by_name(args[1]) == null) {
{'fraction_non_alphanumeric': 0.1188386225523295, 'fraction_numerical': 0.0027008777852802163, 'mean_word_length': 1.882295719844358, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1304143', 'n_tokens_mistral': 911, 'n_tokens_neox': 894, 'n_words': 190}