<commit_before><?php

class Friends_Plugin{
   private $db;
   
   public function __construct(DatabaseHandler $db){
      $this->db = $db;
   }
   
   public function events(){
     return [
       new PluginEventList("trigger", "system.user.login", "userlogin")
     ];<commit_msg>Update plugin.php<commit_after><?php

class Friends_Plugin{
   private $db;
   
   public function __construct(DatabaseHandler $db){
      $this->db = $db;
   }
   
   public function events(){
     return [
       new PluginEventList("trigger", "system.user.login",     "userlogin"),
       new PluginEventList("trigger", "client.javascript.end", "javascriptend")
     ];
   }
   
   public function javascriptend(){
      ?>
<script>
   commands["friend"] = function(data){
      var arg = data.message.substr(8).split(" ");
      for(var i=0;i<arg.length;i++){
         switch(arg[i]){
            case "login":
               i++;
               sys.currentPage().line(
                  data.time,
                  "",
                  "Bot",
                  "[color=green]Your friend "+arg[i]+" has just login[/color]"
                  );
              break;
         }
      }
   };
</script>
      <?php
{'fraction_non_alphanumeric': 0.14583333333333334, 'fraction_numerical': 0.0016666666666666668, 'mean_word_length': 1.9009661835748792, 'pattern_counts': {'":': 1, '<': 9, '<?xml version=': 0, '>': 8, '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': '5660817', 'n_tokens_mistral': 355, 'n_tokens_neox': 345, 'n_words': 70}