<commit_before>#!/usr/bin/env python3
# -*- coding: utf8 -*-

"""
    This module add the class needed for creating custom chat command

    :Example:

    Here's a simple ChatPlugin which will send a HelloWorld on use

    ``
    ChatHelloWorld(ChatPlugin):
        helper = "Display Hello World"
        cimmand

        def __call__(self, serv, message):
            serv.send_message("Hello world", to="me")
    ``
"""


class ChatPlugin(object):
    """
        Inherit from this class to add a command in the chat.

        helper: Text that will be show when calling the help command
        permission: Permission needed for this command (see ability)
        room: Specify here if the command need to be execute in a room
        command: The command to use to call this function
    """

    helper = ""
    permission = None
    room = False
    command = None

    def can(self, serv):
        """
            Method call each time somenone try to run this command

            :param serv: The StepmaniaController instance
            :type serv: StepmaniaController
            :return: True if authorize False if not<commit_msg>Correct chat plugin example in docsctring<commit_after>#!/usr/bin/env python3
# -*- coding: utf8 -*-

"""
    This module add the class needed for creating custom chat command

    :Example:

    Here's a simple ChatPlugin which will send a HelloWorld on use

    ``
    ChatHelloWorld(ChatPlugin):
        helper = "Display Hello World"
        command = "hello"

        def __call__(self, serv, message):
            serv.send_message("Hello world", to="me")
    ``
"""


class ChatPlugin(object):
    """
        Inherit from this class to add a command in the chat.

        helper: Text that will be show when calling the help command
        permission: Permission needed for this command (see ability)
        room: Specify here if the command need to be execute in a room
        command: The command to use to call this function
    """

    helper = ""
    permission = None
    room = False
    command = None

    def can(self, serv):
        """
            Method call each time somenone try to run this command

            :param serv: The StepmaniaController instance
            :type serv: StepmaniaController
            :return: True if authorize False if not
{'fraction_non_alphanumeric': 0.07358003442340792, 'fraction_numerical': 0.0017211703958691911, 'mean_word_length': 2.3025568181818183, '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': '4475109', 'n_tokens_mistral': 604, 'n_tokens_neox': 575, 'n_words': 263}