<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from defaults import *
from emoji import *
import re
import socket 

def commands(nick,channel,message):
  if containsGreetings(message):
    hello(channel, nick)

  global optout_nicks
  if message.find(botnick+': about')!=-1 or message.find(botnick+' about')!=-1:
    ircsock.send('PRIVMSG %s :%s: I am an Emoji bot that adds emoji auto corrects. Go http://git.io/v05Ik for more info.!\r\n' % (channel,nick))
  elif message.find(botnick+': optout')!=-1 or message.find(botnick+' optout')!=-1:
    if nick not in optout_nicks:
      optout_nicks += [nick]
    ircsock.send('PRIVMSG %s :%s: You have been opted out %s. Note when emo-bot disconnects you will be opted back in by default. More at [gir-url].\r\n' % (channel,nick, Emo.get(":cry:")))
  elif message.find(botnick+': optin')!=-1 or message.find(botnick+' optin')!=-1:
    ircsock.send('PRIVMSG %s :%s: You are already been opted in %s .\r\n' % (channel,nick, Emo.get(":guitar:")))
  elif message.find(botnick+': help')!=-1 or message.find(botnick+' help')!=-1:
    ircsock.send('PRIVMSG %s :%s: Available commands [about, optout,].\r\n' % (channel,nick))

def opted_out_commads(nick, channel, message):
  """<commit_msg>modifications<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from defaults import *
from emoji import *
import re
import socket 

def commands(nick,channel,message):
  if containsGreetings(message):
    hello(channel, nick)

  global optout_nicks
  if message.find(botnick+': about')!=-1 or message.find(botnick+' about')!=-1:
    ircsock.send('PRIVMSG %s :%s: I am an Emoji bot that adds emoji auto corrects. Go http://git.io/v05Ik for more info.!\r\n' % (channel,nick))
  elif message.find(botnick+': optout')!=-1 or message.find(botnick+' optout')!=-1:
    if nick not in optout_nicks:
      optout_nicks += [nick]
    ircsock.send('PRIVMSG %s :%s: You have been opted out %s. Note when emo-bot disconnects you will be opted back in by default. More at [gir-url].\r\n' % (channel,nick, Emo.get(":cry:")))
  elif message.find(botnick+': optin')!=-1 or message.find(botnick+' optin')!=-1:
    ircsock.send('PRIVMSG %s :%s: You are already been opted in %s .\r\n' % (channel,nick, Emo.get(":guitar:")))
  elif message.find(botnick+': help')!=-1 or message.find(botnick+' help')!=-1:
    ircsock.send('PRIVMSG %s :%s: Available commands [about, optout,].\r\n' % (channel,nick))
  else:
    print("Not a valid command")

def opted_out_commads(nick, channel, message):
  """
{'fraction_non_alphanumeric': 0.1778217821782178, 'fraction_numerical': 0.008712871287128714, 'mean_word_length': 4.30672268907563, 'pattern_counts': {'":': 4, '<': 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': '6727190', 'n_tokens_mistral': 941, 'n_tokens_neox': 924, 'n_words': 251}