barneygale / mark2

minecraft server wrapper, written in python with twisted
Other
105 stars 27 forks source link

Trigger will not work when townychat plugin is being used #102

Open JamieKG opened 10 years ago

JamieKG commented 10 years ago

Hi I have a issue were if I have townychat plugin running the triggers will not work

Thanks JamieKG

JamieKG commented 10 years ago

So my chat line would be [channel] [town] [serverrank] username: message and [channel] [town] [donatorrank] [serverrank] username: message if you donate how would I setup regex for that or is it even possible Thanks JamieKG

barneygale commented 10 years ago

Could you give a couple of example lines? You can hold shift to select text from console, or just grab it from your logs

JamieKG commented 10 years ago

2013-07-30 18:33:48 | [TC] [H+] Viscount Alixstotle: we can make that happen i think. we dont have any enemy nations yet, but when we do,
2013-07-30 18:33:57 | [g] [AMBV] [V] [m] ~stevo: wtf!!!!
2013-07-30 18:34:04 | [g] [New-Town] [O] JamieKG: test
2013-07-30 18:34:05 | [TC] [m] popir1: do we have any other guards
2013-07-30 18:34:05 | [g] [A.C.|VNNC] [H] MikRED97: lol
2013-07-30 18:34:14 | [g] [T.U.|Keloria] [m] nnjjn: idk i thought u were gonna kill me
2013-07-30 18:34:24 | [g] [AMBV] [V] [m] ~stevo: why???? why would u kill me???
2013-07-30 18:34:39 | [g] [T.U.|Keloria] [m] nnjjn: i thougbt u were gonna kill me
2013-07-30 18:34:52 | [TC] [H+] Viscount Alixstotle: not at the moment. id encourage you to make a shop until we have enemies though.
2013-07-30 18:34:58 | [TC] [H+] Viscount Alixstotle: sell weapons
2013-07-30 18:35:10 | [Prism]: &7MikRED97 found 12 iron ore 0% light
2013-07-30 18:35:24 | [TC] [m] popir1: well... if we do get guards can i be the head of guards
2013-07-30 18:35:31 | [g] [AMBV] [V] [m] ~stevo: u owe me nnjjn i would like some cash for that
2013-07-30 18:35:35 | [TC] [H+] Viscount Alixstotle: sure!
2013-07-30 18:35:57 | [TC] [m] popir1: also how can i set up a shop?

barneygale commented 10 years ago

Add this to your config:

mark2.regex.chat=\\[g\\].*?(?P<username>[A-Za-z0-9_]{1,16}): (?P<message>.+)
JamieKG commented 10 years ago

Thanks for the reply ive tried this but its not working still is there any thing I can add the the username part to make it easer ?