<commit_before>/**
 * Copyright (C) 2012 MK124
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program 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 General Public License for more details.
 */

package net.gtaun.wl.chat;

import net.gtaun.shoebill.resource.Plugin;
import net.gtaun.util.event.EventManager;
import net.gtaun.wl.chat.impl.ChatChannelServiceImpl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 新未来世界聊天频道插件主类。
 * 
 * @author MK124
 */
public class ChatChannelPlugin extends Plugin
{
	public static final Logger LOGGER = LoggerFactory.getLogger(ChatChannelPlugin.class);
	
	
	private ChatChannelServiceImpl chatChannelService;
	
	
	public ChatChannelPlugin()
	{
		
	}
	
	@Override
	protected void onEnable() throws Throwable
	{
		EventManager eventManager = getEventManager();
		chatChannelService = new ChatChannelServiceImpl(eventManager);
		registerService(ChatChannelService.class, chatChannelService);
		
		if (chatChannelService.getDefaultChannel() == null)
		{
			ChatChannel defaultChannel = chatChannelService.createChannel("Default");
			defaultChannel.setPrefixFormat("");
			
			chatChannelService.setDefaultChannel(defaultChannel);
			LOGGER.info("No default channel, create a default channel.");
		}<commit_msg>令 ChatChannelPlugin 继承 WlPlugin 。<commit_after>/**
 * Copyright (C) 2012 MK124
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program 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 General Public License for more details.
 */

package net.gtaun.wl.chat;

import net.gtaun.util.event.EventManager;
import net.gtaun.wl.chat.impl.ChatChannelServiceImpl;
import net.gtaun.wl.common.WlPlugin;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 新未来世界聊天频道插件主类。
 * 
 * @author MK124
 */
public class ChatChannelPlugin extends WlPlugin
{
	public static final Logger LOGGER = LoggerFactory.getLogger(ChatChannelPlugin.class);
	
	
	private ChatChannelServiceImpl chatChannelService;
	
	
	public ChatChannelPlugin()
	{
		
	}
	
	@Override
	protected void onEnable() throws Throwable
	{
		EventManager eventManager = getEventManager();
		chatChannelService = new ChatChannelServiceImpl(eventManager);
		registerService(ChatChannelService.class, chatChannelService);
		
		if (chatChannelService.getDefaultChannel() == null)
		{
			ChatChannel defaultChannel = chatChannelService.createChannel("Default");
			defaultChannel.setPrefixFormat("");
			
			chatChannelService.setDefaultChannel(defaultChannel);
			LOGGER.info("No default channel, create a default channel.");
		}
{'fraction_non_alphanumeric': 0.08103779628443306, 'fraction_numerical': 0.008327994875080076, 'mean_word_length': 4.751381215469613, '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': '2648269', 'n_tokens_mistral': 948, 'n_tokens_neox': 880, 'n_words': 270}