MCCTeam / Minecraft-Console-Client

Lightweight console for Minecraft chat and automated scripts
https://mccteam.github.io
Other
1.67k stars 402 forks source link

using Hangman in C# Script with regex ? #1066

Closed Chtholly closed 4 years ago

Chtholly commented 4 years ago

[ChatFormat] builtins=true

private=...

While using this in Settings MCC respond /msg bot start and Hangman dont starts. If I delete the '#' infront of 'private=...' regex wont work anymore. Is it possible to start Hangman via C# and using regex together ?

ORelio commented 4 years ago

I don't think so. The Hangman bot waits for a private message so the Regex needs to be right. If your regex does not properly detect private messages, that won't work because the bot won't see the message. The Regex should then be improved to properly catch all types of private messages.

Chtholly commented 4 years ago

Im using a regex in matches.ini that detects private messages, when i delete in settings the '#' infront of private=... then hangman responds on msgs and starts, but then matches.ini wont work anymore and this is the problem, i need that regex in matches.ini works and that i can start hangman on msgs or with a command via c#

ORelio commented 4 years ago

You should put your regex in the [ChatFormat] section, then AutoRespond will automatically use it with actionprivate and you just need to put some keywork in the match, or some regex that will be evaluated only against the message part of the private message instead of the whole line.

Chtholly commented 4 years ago

Thanks, works now