<commit_before>#pylint: disable = F0401
from helpers import *

motd = server.getMotd()


@hook.command("getmotd")
def on_getmotd_command(sender, args):
  plugin_header(sender, "MOTD")
  msg(sender, motd, usecolor = False)


@hook.command("setmotd")
def on_setmotd_command(sender, args):
  global motd
  if sender.hasPermission("utils.setmotd"):
    if not checkargs(sender, args, 1, -1):
      return True

    motd = colorify(" ".join(args).replace("\\n", "\n"))
    broadcast(None, plugin_header(name="MOTD"))
    broadcast(None, "&aNew MOTD:&r\n%s" % motd)
    broadcast(None, " ")
  else:
    noperm(sender)
  return True


@hook.event("server.ServerListPingEvent")<commit_msg>raise test error<commit_after>#pylint: disable = F0401
from helpers import *

motd = server.getMotd()

raise TypeError("testing /modules") # remove this line!

@hook.command("getmotd")
def on_getmotd_command(sender, args):
  plugin_header(sender, "MOTD")
  msg(sender, motd, usecolor = False)


@hook.command("setmotd")
def on_setmotd_command(sender, args):
  global motd
  if sender.hasPermission("utils.setmotd"):
    if not checkargs(sender, args, 1, -1):
      return True

    motd = colorify(" ".join(args).replace("\\n", "\n"))
    broadcast(None, plugin_header(name="MOTD"))
    broadcast(None, "&aNew MOTD:&r\n%s" % motd)
    broadcast(None, " ")
  else:
    noperm(sender)
  return True


@hook.event("server.ServerListPingEvent")
{'fraction_non_alphanumeric': 0.1569317382125264, 'fraction_numerical': 0.00844475721323012, 'mean_word_length': 4.620553359683795, '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': '25806', 'n_tokens_mistral': 535, 'n_tokens_neox': 525, 'n_words': 107}