fjaros / wowchat

WoWChat is a clientless Discord integration chat bot for old versions of World of Warcraft.
GNU General Public License v3.0
138 stars 97 forks source link

problem with the %user #92

Closed FissAa closed 1 year ago

FissAa commented 1 year ago

Hello, I encounter a problem with the %user, indeed the name of the character in game is displayed on discord always with the last letter of the character name missing. example: the character "magicus" writes a message, it will be displayed "magicu" ... can you help me to correct this problem? version 5.4.8 MOP

fjaros commented 1 year ago

I am not able to reproduce this. Are there any special characters? What's the name length and exact names? What server are you on? Can you paste me the chat config?

FissAa commented 1 year ago

No special characters, normal length, I attach screen and config

FissAa commented 1 year ago

33A6AEF6-A465-4250-A60D-9663425F628C 47209961-65DE-41F3-982B-98772D718F23

FissAa commented 1 year ago
# Global Discord Configurations
discord {
  # Paste the Discord Token below
  # Or set the DISCORD_TOKEN environment variable (this is useful if you want to keep sensitive information out of the config file).
  token=***

  enable_dot_commands=0

  # List of server (dot) commands that are explicitly enabled
  # Leaving this as empty means ALL commands are enabled/disabled based on "enable_dot_commands" setting.
  # The commands here should reflect exactly how the command is input in game. Do not prepend the dot character.
  # We can also accept wildcards like "lookup *" or "pinfo *"
  dot_commands_whitelist=[
    #"server info"
    #"lookup *"
  ]

  # List of Discord channels where commands are enabled. If this is unspecified or empty,
  # ALL channels will have command permissions.
  enable_commands_channels=[

  ]

  # If a tag matching fails from Discord when someone @ a non-existent or unmatched person or role,
  # the bot will whisper back notifying so.
  enable_tag_failed_notifications=1
}

# Global WoW Configurations
wow {
  # You MUST keep this as Mac on Warden (anticheat) enabled servers. Windows Warden is not implemented.
  # Only reason to change this is for servers on which Mac login is not working and also which have Warden disabled.
  platform=mac

  # Whether to treat server's MotD message as a server SYSTEM message.
  enable_server_motd=0

 # version=1.12.1
 # realmlist=167.114.128.42
 # realm=The Construct
 # account=${?WOW_ACCOUNT}
 # password=${?WOW_PASSWORD}
 # character=${?WOW_CHARACTER}

# Other example configurations

# version=1.12.1
# realmlist=logon.lightshope.org
# realm=Northdale
# account=<discord bot account>
# password=<discord bot password>
# character=<in game character>

# version=2.4.3
# realmlist=logon.vengeancewow.com
# realm=stonetalon
# account=<discord bot account>
# password=<discord bot password>
# character=<in game character>

# version=3.3.5
# realmlist=wow.gamer-district.org
# realm=Echoes 1x
# account=<discord bot account>
# password=<discord bot password>
# character=<in game character>

# version=4.3.4
# realmlist=login.hades-wow.com
# realm=hades
# account=<discord bot account>
# password=<discord bot password>
# character=<in game character>

 version=5.4.8
 realmlist=logon.shadoria.com
 realm=**********
 account=********
 password=************
 character=shadoria
}

# guild notifications
#guild {
  online {
    enabled=0
    format="`[%user] has come online.`"
  }
  offline {
    enabled=0
    format="`[%user] has gone offline.`"
  }
  promoted {
    enabled=0
    format="`[%user] has promoted [%target] to [%rank].`"
  }
  demoted {
    enabled=0
    format="`[%user] has demoted [%target] to [%rank].`"
  }
  joined {
    enabled=0
    format="`[%user] has joined the guild.`"
  }
  left {
    enabled=0
    format="`[%user] has left the guild.`"
  }
  removed {
    enabled=0
    format="`[%target] has been kicked out of the guild by [%user].`"
  }
  motd {
    enabled=0
    format="`Guild Message of the Day: %message`"
  }
  achievement {
    enabled=0
    format="%user has earned the achievement %achievement!"
  }

# chat to redirect
chat {
  channels=[

    {
      direction=discord_to_wow
      discord {
        channel=1024943290539311174
        format=" %user : %message"
      }
      wow {
        type=channel
        channel=world
        format=" %user : %message"
      }
    }

    # Custom channels

    {
      direction=wow_to_discord
      a
      }
      discord {
        channel=1024943290539311174
        format=" %user : %message"
      }
    }
    # Class channels

  ]
}

filters {
  enabled=0
  # patterns are Java Regexes. Google has the answers you seek.
  patterns=[
    ".*(?i)(?=.*g.?ld)(?=.*level)(?=.*item).*$" # case insensitive filter for messages containing all 3 words g?ld, level, and item in any order
    ".*(?=.*>>)(?=.*<<).*$" # filter for messages containg >> and << in any order (both must be in the message)
  ]
}
fjaros commented 1 year ago

@FissAa thanks! I could not reproduce it on Mistblade, but I could on Shadoria. It was a small bug with the way names are read which only occurred on Shadoria because not many names are registered there so the id numbers are smaller. Fixed in https://github.com/fjaros/wowchat/commit/845ac93d703d49df0bd81d4f51f239b1c6535d89 . Please redownload the zip file from releases