<commit_before>/* *********************************************************************
 *
 *  This file is part of Full Metal Galaxy.
 *  http://www.fullmetalgalaxy.com
 *
 *  Full Metal Galaxy is free software: you can redistribute it and/or 
 *  modify it under the terms of the GNU Affero General Public License
 *  as published by the Free Software Foundation, either version 3 of 
 *  the License, or (at your option) any later version.
 *
 *  Full Metal Galaxy is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public 
 *  License along with Full Metal Galaxy.  
 *  If not, see <http://www.gnu.org/licenses/>.
 *
 *  Copyright 2010, 2011 <NAME>
 *
 * *********************************************************************/
package com.fullmetalgalaxy.model.persist.gamelog;

import com.fullmetalgalaxy.model.RpcFmpException;
import com.fullmetalgalaxy.model.persist.Game;



/**
 * @author <NAME>
 *
 */
public class EbEvtMessage extends AnEventUser
{
  static final long serialVersionUID = 1;

  private String m_message = null;

  /**
   * 
   */
  public EbEvtMessage()
  {
    super();
    this.init();
  }


  @Override
  public void reinit()
  {
    super.reinit();
    this.init();
  }

  private void init()
  {
    m_message = null;
  }

  @Override
  public GameLogType getType()
  {
    return GameLogType.EvtMessage;
  }

  @Override
  public void exec(Game p_game) throws RpcFmpException
  {
    super.exec( p_game );
  }


  @Override
  public void unexec(Game p_game) throws RpcFmpException
  {
    super.unexec( p_game );
  }


  // Bean getter / setter
  // ====================
  /**
   * if message start with './', '/' or 'http://', message is a web page url
   * @return the message
   */
  public String getMessage()
  {
    return m_message;
  }

  /**
   * @param p_message the message to set
   */
  public void setMessage(String p_message)
  {
    m_message = p_message;
  }


<commit_msg>Issue 147:	lien dans commentaires<commit_after>/* *********************************************************************
 *
 *  This file is part of Full Metal Galaxy.
 *  http://www.fullmetalgalaxy.com
 *
 *  Full Metal Galaxy is free software: you can redistribute it and/or 
 *  modify it under the terms of the GNU Affero General Public License
 *  as published by the Free Software Foundation, either version 3 of 
 *  the License, or (at your option) any later version.
 *
 *  Full Metal Galaxy is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public 
 *  License along with Full Metal Galaxy.  
 *  If not, see <http://www.gnu.org/licenses/>.
 *
 *  Copyright 2010, 2011 <NAME>
 *
 * *********************************************************************/
package com.fullmetalgalaxy.model.persist.gamelog;

import com.fullmetalgalaxy.model.GameType;
import com.fullmetalgalaxy.model.RpcFmpException;
import com.fullmetalgalaxy.model.persist.Game;



/**
 * @author <NAME>
 *
 */
public class EbEvtMessage extends AnEventUser
{
  static final long serialVersionUID = 1;

  private String m_message = null;

  /**
   * 
   */
  public EbEvtMessage()
  {
    super();
    this.init();
  }


  @Override
  public void reinit()
  {
    super.reinit();
    this.init();
  }

  private void init()
  {
    m_message = null;
  }

  @Override
  public GameLogType getType()
  {
    return GameLogType.EvtMessage;
  }

  @Override
  public void exec(Game p_game) throws RpcFmpException
  {
    super.exec( p_game );
    // if message start by recording, we don't touch it...
    if( p_game.getGameType() == GameType.Puzzle
        && (p_game.getMessage() == null || !p_game.getMessage().startsWith(
            EventsPlayBuilder.GAME_MESSAGE_RECORDING_TAG )) )
    {
      p_game.setMessage( getMessage() );
    }
  }


  @Override
  public void unexec(Game p_game) throws RpcFmpException
  {
    super.unexec( p_game );
  }


  // Bean getter / setter
  // ====================
  /**
   * if message start with './', '/' or 'http://', message is a web page url
   * @return the message
   */
  public String getMessage()
  {
    return m_message;
  }

  /**
   * @param p_message the message to set
   */
  public void setMessage(String p_message)
  {
    m_message = p_message;
  }



{'fraction_non_alphanumeric': 0.15927889713679746, 'fraction_numerical': 0.004878048780487805, 'mean_word_length': 3.1008695652173914, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '6613858', 'n_tokens_mistral': 1493, 'n_tokens_neox': 1397, 'n_words': 454}