Skip to content

Commit

Permalink
Update server.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Red_wolf2467 committed Nov 16, 2024
1 parent e3f1c02 commit 30e0d5e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def load_ids():

def check_chatfilter(input_str: str, badwords, goodwords, threshold=2):
input_data = input_str.lower().split()
flagged_words = {}
flagged_word = {}

for word in input_data:
cleaned_word = word.strip(string.punctuation)
Expand All @@ -72,9 +72,10 @@ def check_chatfilter(input_str: str, badwords, goodwords, threshold=2):
best_distance = current_distance

if best_match:
flagged_words[cleaned_word] = best_match
flagged_word = best_match
break

return flagged_words
return flagged_word


def check_user_db(input_id: int, ids_list):
Expand Down

0 comments on commit 30e0d5e

Please sign in to comment.