DANIEL: Talkative tyler fix

This commit is contained in:
John 2015-06-09 19:00:08 +03:00 committed by Loudrob
parent 2c1c6e08c4
commit be659d24f7
2 changed files with 4 additions and 6 deletions

View file

@ -52,17 +52,17 @@ def saveChanges():
LOCAL_LIST.sort() LOCAL_LIST.sort()
LOCAL_LIST = removeDuplicates(LOCAL_LIST) LOCAL_LIST = removeDuplicates(LOCAL_LIST)
addedWords = []
for word in LOCAL_LIST: for word in LOCAL_LIST:
if word in addedWords or '\\' in word: if '\\' in word:
print 'Word contains illegal characters: %s' % word
continue continue
try: try:
word.decode('ascii') word.decode('ascii')
except: except:
print 'Word cannot be decoded in ASCII mode: %s' % word
continue continue
addedWords.append(word)
if "'" in word: if "'" in word:
f.write(' "%s",\n' % word) f.write(' "%s",\n' % word)
@ -73,10 +73,8 @@ def saveChanges():
print 'Your changes have been saved! Make sure to push your changes!' print 'Your changes have been saved! Make sure to push your changes!'
LOCAL_LIST = WhiteListData.WHITELIST LOCAL_LIST = WhiteListData.WHITELIST
print 'Welcome to the Toontown Stride Whitelist Tool!' print 'Welcome to the Toontown Stride Whitelist Tool!'
print 'Type any word you want to add to the whitelist.' print 'Type any word you want to add to the whitelist.'
print 'If you wish to remove a word, type "r <word>".' print 'If you wish to remove a word, type "r <word>".'

View file

@ -30,7 +30,7 @@ class DistributedSmartNPC(DistributedNPCToonBase):
def handleCollisionSphereEnter(self, collEntry): def handleCollisionSphereEnter(self, collEntry):
self.sendUpdate('avatarEnter', []) self.sendUpdate('avatarEnter', [])
def chatUpdate(self, message): def chatUpdate(self, message, chatFlags):
self.sendUpdate('talkMessage', [base.localAvatar.doId, message]) self.sendUpdate('talkMessage', [base.localAvatar.doId, message])
def greet(self, npcId, avId): def greet(self, npcId, avId):