fix callwords

This commit is contained in:
cidoku 2025-02-21 00:57:42 -03:00
parent f13d9cf754
commit f1eb849d8d

View File

@ -2527,10 +2527,10 @@ class gui(QtGui.QWidget):
self.char.play_idle(f_char, f_emote, self.scaling[0]) self.char.play_idle(f_char, f_emote, self.scaling[0])
self.anim_state = 3 self.anim_state = 3
if exists(AOpath+"callwords.ini"): if exists(AO2XPpath+"callwords.ini"):
callwords = [line.rstrip() for line in open(AOpath+"callwords.ini")] callwords = [line.rstrip() for line in open(AO2XPpath+"callwords.ini")]
for callword in callwords: for callword in callwords:
if callword.lower() in self.m_chatmessage[CHATMSG].lower(): if callword.decode('utf-8').lower() in self.m_chatmessage[CHATMSG].lower().split(" "):
self.ooclog.append("<b>%s called you.</b>" % f_char) self.ooclog.append("<b>%s called you.</b>" % f_char)
snd = audio.loadhandle(False, "word_call.wav", 0, 0, BASS_STREAM_AUTOFREE) snd = audio.loadhandle(False, "word_call.wav", 0, 0, BASS_STREAM_AUTOFREE)
if snd: if snd: