Skip to content

Commit

Permalink
Added the Toontown Fellowship Whitelist Tool! Updated the whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
chandler14362 committed Feb 5, 2015
1 parent dffb741 commit 747fa18
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 12 deletions.
3 changes: 3 additions & 0 deletions tools/whitelist_tool.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
python -m whitelist_tool
pause
55 changes: 55 additions & 0 deletions tools/whitelist_tool.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import os
os.chdir('../')

from toontown.chat import WhiteListData


def acceptWord():
word = raw_input('> ').rstrip().lower()

if word == 'exit()':
saveChanges()
return

if word in LOCAL_LIST:
print 'The word "%s" is already whitelisted.' % word
else:
LOCAL_LIST.append(word)
print 'Added the word "%s" to the whitelist.' % word

acceptWord()


def saveChanges():
print 'Saving the whitelist...'

with open('toontown/chat/WhiteListData.py', 'w') as f:
f.write('WHITELIST = [\n')

LOCAL_LIST.sort()
addedWords = []

for word in LOCAL_LIST:
if word in addedWords:
continue
addedWords.append(word)

if "'" in word:
f.write(' "%s",\n' % word)
else:
f.write(" '%s',\n" % word)

f.write(']')

print 'Your changes have been saved! Make sure to push your changes!'


LOCAL_LIST = WhiteListData.WHITELIST


print 'Welcome to the Toontown Fellowship Whitelist Tool!'
print 'Type any word you want to add to the whitelist.'
print 'When you are done and want to save your changes, type "exit()"'


acceptWord()
29 changes: 17 additions & 12 deletions toontown/chat/WhiteListData.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'&',
"'",
"'boss",
"'cause",
"'course",
"'ello",
"'em",
Expand Down Expand Up @@ -6150,6 +6151,7 @@
'changes',
"changin'",
'changing',
'chanisthebest',
'channel',
"channel's",
'channeled',
Expand Down Expand Up @@ -7824,6 +7826,7 @@
'cookie',
"cookie's",
'cookies',
'cookiesncream',
"cookin'",
'cooking',
'cookouts',
Expand Down Expand Up @@ -8259,6 +8262,7 @@
'crazycorner',
"crazycorner's",
'crazycorners',
'crazyknucklesthebestblackcat',
'crazyquilt',
"crazyquilt's",
'crazyquilts',
Expand Down Expand Up @@ -11764,8 +11768,6 @@
'dyslectic',
'dyslexia',
'dyslexic',
'decor',
'deja',
'e-mail',
'e.g.',
'e.z.',
Expand Down Expand Up @@ -12592,6 +12594,7 @@
'evades',
'evading',
'eval',
'evan',
"evan's",
'evans',
'evaporate',
Expand Down Expand Up @@ -15339,6 +15342,7 @@
'funzone',
'fur',
'furball',
'furbud',
'furious',
'furiously',
'furnace',
Expand Down Expand Up @@ -19544,8 +19548,6 @@
'izzy',
"izzy's",
'izzys',
"i'd",
"i've",
'j.k.',
'ja',
'jab',
Expand Down Expand Up @@ -22007,6 +22009,7 @@
'mash',
'mashed',
'mask',
'masodoodle',
'mass',
'massey',
'massive',
Expand Down Expand Up @@ -22549,6 +22552,7 @@
'migrator',
'mike',
"mike's",
'mikeizepic',
'mikes',
'mikey',
"mikey's",
Expand Down Expand Up @@ -23101,6 +23105,7 @@
'muddled',
'muddy',
'mudhands',
'mudkip',
'mudmoss',
'mudpie',
'muerte',
Expand Down Expand Up @@ -23280,7 +23285,6 @@
'navy',
"navy's",
'nay',
'naive',
'nd',
'near',
'nearby',
Expand Down Expand Up @@ -25529,6 +25533,7 @@
'pinecones',
'pined',
'ping',
'pingas',
'pinged',
'pinging',
'pining',
Expand Down Expand Up @@ -29461,6 +29466,7 @@
'shot',
'shots',
'should',
"should've",
'shoulda',
'shoulder',
'shouldered',
Expand All @@ -29470,7 +29476,6 @@
"shouldn'a",
"shouldn't",
'shouldnt',
"should've",
'shout',
'shouted',
'shouter',
Expand Down Expand Up @@ -29650,6 +29655,7 @@
'sinking',
'sinks',
'sins',
'sip',
'sir',
'siren',
"siren's",
Expand Down Expand Up @@ -29807,6 +29813,7 @@
'slide',
'slides',
'sliding',
'slier',
'slight',
'slighted',
'slighter',
Expand Down Expand Up @@ -29857,6 +29864,7 @@
'slump',
'slush',
'slushy',
'sly',
'smackdab',
'small',
'smallband',
Expand Down Expand Up @@ -32277,10 +32285,10 @@
'thanx',
'thar',
'that',
"that'd",
"that'll",
"that's",
'thats',
"that'd",
'thayer',
'thayers',
'the',
Expand Down Expand Up @@ -35013,8 +35021,8 @@
'wifi',
'wig',
'wiggle',
'wiggles',
"wiggle's",
'wiggles',
'wigs',
'wii',
'wiidburns',
Expand Down Expand Up @@ -35554,11 +35562,11 @@
'wot',
'wough',
'would',
"would've",
'woulda',
'wouldest',
"wouldn't",
'wouldnt',
"would've",
'wound',
'wound-up',
'wounded',
Expand Down Expand Up @@ -35860,8 +35868,6 @@
'youtube',
'youtuber',
'youve',
"you'd",
"you've",
'yow',
'yowl',
'yoyo',
Expand Down Expand Up @@ -36265,5 +36271,4 @@
'zyyk',
'zzz',
'zzzzzs',
"'cause"
]

0 comments on commit 747fa18

Please sign in to comment.