View Single Post
04/25/17, 02:05 PM   #9
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Ah. I was confused by the method name. Toggle usually means it turns it on and off, but your method only turns it on.
Did you test if the first message that triggers enable() shows up in the log?

There also seems to be a small mistake in your code. You ignore the values in listenInTheseChannels and only enable the chatlog when channelType == CHAT_CHANNEL_SAY.
Lua Code:
  1. local function ChatLogger_ToggleChatLog(eventCode, channelType, fromName, text, isCustomerService, fromDisplayName)
  2.     if not playerInCyro and listenInTheseChannels[channelType]  then
  3.             enable()
  4.     end
  5. end

I am still not sure why this would be preferable to just turning the log on when the player logs in. :P
  Reply With Quote