<commit_before><?php

#####################################################################################################

function cmd_user($client_index,$items)
{
  global $nicks;
  global $connections;
  # USER crutchy crutchy 192.168.0.21 :crutchy
  # USER HOSTSctl 8 * :APK
  # USER <username>[<connection id>] <hostname> <servername> :<realname>
  $nick=client_nick($client_index,False,False);
  $conn=connection_index($client_index);
  if (($nick===False) or ($conn===False))
  {
    return;
  }
  $param_parts=explode(" ",$items["params"]);
  if (count($param_parts)<>3)
  {
    do_reply($client_index,"ERROR: INCORRECT NUMBER OF PARAMS (NUMERIC 461)");
    return;
  }
  $connection=$connections[$conn];
  if ($connection["authenticated"]==False)
  {
    $username=substr($param_parts[0],0,strlen($param_parts[0])-CONNECTION_ID_LEN);
    $conn_id=substr($param_parts[0],strlen($param_parts[0])-CONNECTION_ID_LEN);
    if ($nicks[$nick]["connection_id"]==$conn_id)
    {
      $connections[$conn]["authenticated"]=True;
      do_reply($client,"SUCCESSFULLY AUTHENTICATED AS \"$nick\" USING CONNECTION ID \"$conn_id\"");
    }
    else
    {
      do_reply($client,"ERROR: CONNECTION ID MISMATCH");
      return;
    }
  }
  else
  {
    $username=$param_parts[0];
  }
  if (isset($nicks[$nick]["prefix"])==False)
  {
    $nicks[$nick]["username"]=$username;
    $nicks[$nick]["hostname"]=$param_parts[1];
    $nicks[$nick]["servername"]=$param_parts[2];
    $nicks[$nick]["realname"]=$items["trailing"];
    $nicks[$nick]["prefix"]=$nick."!".$connection["ident_prefix"].$nicks[$nick]["username"]."@".$nicks[$nick]["hostname"];
  }
  var_dump($nicks);
  $addr=$connection["addr"];
  broadcast("*** USER MESSAGE RECEIVED FROM $addr");
}

#####################################################################################################

?>
<commit_msg>whatever i changed<commit_after><?php

#####################################################################################################

function cmd_user($client_index,$items)
{
  global $nicks;
  global $connections;
  # USER crutchy crutchy 192.168.0.21 :crutchy
  # USER HOSTSctl 8 * :APK
  # USER <username>[<connection id>] <hostname> <servername> :<realname>
  $nick=client_nick($client_index,False,False);
  $conn=connection_index($client_index);
  if (($nick===False) or ($conn===False))
  {
    return;
  }
  $param_parts=explode(" ",$items["params"]);
  if (count($param_parts)<>3)
  {
    do_reply($client_index,"ERROR: INCORRECT NUMBER OF PARAMS (NUMERIC 461)");
    return;
  }
  $connection=$connections[$conn];
  if ($connection["authenticated"]==False)
  {
    $username=substr($param_parts[0],0,strlen($param_parts[0])-CONNECTION_ID_LEN);
    $conn_id=substr($param_parts[0],strlen($param_parts[0])-CONNECTION_ID_LEN);
    if ($nicks[$nick]["connection_id"]==$conn_id)
    {
      $connections[$conn]["authenticated"]=True;
      do_reply($client_index,"SUCCESSFULLY AUTHENTICATED AS \"$nick\" USING CONNECTION ID \"$conn_id\"");
    }
    else
    {
      do_reply($client_index,"ERROR: CONNECTION ID MISMATCH");
      return;
    }
  }
  else
  {
    $username=$param_parts[0];
  }
  if (isset($nicks[$nick]["prefix"])==False)
  {
    $nicks[$nick]["username"]=$username;
    $nicks[$nick]["hostname"]=$param_parts[1];
    $nicks[$nick]["servername"]=$param_parts[2];
    $nicks[$nick]["realname"]=$items["trailing"];
    $nicks[$nick]["prefix"]=$nick."!".$connection["ident_prefix"].$nicks[$nick]["username"]."@".$nicks[$nick]["hostname"];
  }
  var_dump($nicks);
  $addr=$connection["addr"];
  broadcast("*** USER MESSAGE RECEIVED FROM $addr");
}

#####################################################################################################

?>

{'fraction_non_alphanumeric': 0.29265687583444594, 'fraction_numerical': 0.011748998664886516, 'mean_word_length': 5.975791433891993, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6295358', 'n_tokens_mistral': 1304, 'n_tokens_neox': 1258, 'n_words': 162}