|
|
Author |
Message |
chewiie
Joined: 10 Aug 2006 Posts: 4
|
|
Back to top |
|
 |
Lokorin Site Admin
Joined: 03 Apr 2006 Posts: 697
|
Posted: Sat Aug 12, 2006 5:50 pm Post subject: |
|
|
It should be possible to alter the join and leave patterns so that they also trigger on commands. There is just one problem, if one does something like the following patterns
Join pattern:
| Code: |
| \[\w{3} (\w{3}) (\d{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})\] (?:You tell .*?:\d+, '\*[jJoin] ([^\s]+)'|([^\s]+) joined the raid.) |
Join format:
| Code: |
| $6|$1|$2|$3|$4|$5|$7 |
Leave pattern:
| Code: |
| \[\w{3} (\w{3}) (\d{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})\] (?:You tell .*?:\d+, '\*[lLeave] ([^\s]+)'|([^\s]+) has left the raid.) |
Leave format:
| Code: |
| $6|$1|$2|$3|$4|$5|$7 |
then the number of the captured group will depend on whether it was a command or someone who joined the raid, so those wont work. The way to get around that would be rearrange the join commands so that the names could be captured by the same group in both cases, but I think there might be some other way to get around it so that one gets the normal *Join Foo commands.
In the mean time the following works.
Join pattern:
| Code: |
| \[\w{3} (\w{3}) (\d{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})\] (?:You tell .*?:\d+, ')?([^\s]+) (?:joined the raid.|\*[jJ]oin') |
Join format:
| Code: |
| $6|$1|$2|$3|$4|$5|$7 |
Leave pattern:
| Code: |
| \[\w{3} (\w{3}) (\d{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})\] (?:You tell .*?:\d+, ')?([^\s]+) (?:has left the raid.|\*[Ll]eave') |
Leave format:
| Code: |
| $6|$1|$2|$3|$4|$5|$7 |
So to add someone manually you just have to say
to a channel where Foo is the name of the member. To remove someone you would use
instead.
If no one can find a way to allow the name to come last in the command then a solution could be to allow variables in the format's fallback value which are specified with !. So that
would mean "use the value captured by group 7 if defined, otherwise use the value captured by group 8". |
|
Back to top |
|
 |
chewiie
Joined: 10 Aug 2006 Posts: 4
|
Posted: Sun Aug 13, 2006 6:07 pm Post subject: |
|
|
Thank a lot for this quick answer. I am going to check and see the best form
Thank you |
|
Back to top |
|
 |
chewiie
Joined: 10 Aug 2006 Posts: 4
|
Posted: Thu Aug 17, 2006 11:38 pm Post subject: |
|
|
I am using the second form and it works great, thank again.
I have another question about pattern. I notice that on EQ the loot is under the form of :
| Code: |
| -- xxx has looted name_of_the_stuff -- |
which is working great on the parser
But if I am the one taking the log and analizing it all my own loots are under the form
| Code: |
-- you have looted name_of_the_stuff --
|
so they are not parsed
Tried to simply switch from
| Code: |
| \[\w{3} (\w{3}) (\d{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})\] --([^\s]+) has looted a (.+).-- |
to
| Code: |
| \[\w{3} (\w{3}) (\d{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})\] --([^\s]+) looted a (.+).-- |
(dropped the "has") but the loot is no more analyzed in that case.
Maybe there is a way to solve that ?
TY  |
|
Back to top |
|
 |
Lokorin Site Admin
Joined: 03 Apr 2006 Posts: 697
|
Posted: Fri Aug 18, 2006 10:12 am Post subject: |
|
|
The following should work:
Loot pattern:
| Code: |
| \[\w{3} (\w{3}) (\d{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})\] --(?:You have|([^\s]+) has) looted a (.+).-- |
Loot format:
| Code: |
| $6|$1|$2|$3|$4|$5|$7!YourNameHere|$8|0 |
(Replace "YourNameHere" with your character's name.) |
|
Back to top |
|
 |
chewiie
Joined: 10 Aug 2006 Posts: 4
|
Posted: Sun Aug 20, 2006 11:21 pm Post subject: |
|
|
Working great, thank you again
I am really enjoying this tool. |
|
Back to top |
|
 |
|