Regex for Main identifier?

Scans for, and displays main/alt relations in your Guild

Moderator: PleegWat

Regex for Main identifier?

Postby gm128 » Fri Nov 10, 2006 9:55 am

I have the regex for finding my alts figured out, but I'm not sure what to do with the regex for the main, so I thought I would ask. I have it set right now so that if there is no result, it gets set as a main. I would rather make it set them as a mainless alt if there is no result, so I can see who needs their notes changed/updated.

Examples of my player notes:
Main | Ench/Ham-Smith
Alt of Krellen | Eng/Skin

Regex:
/^Alt\sof\s(\w+)/i *works*
Main *doesn't work*
gm128
WR.net Apprentice
WR.net Apprentice
 
Posts: 9
Joined: Wed Aug 16, 2006 11:21 pm

Regex for Main identifier?

Postby PleegWat » Fri Nov 10, 2006 3:18 pm

The main identifier is not a regex but simply a string. With your setup the main identifier would make someone main if his note was "Alt of Main".
The correct configuration is turning the defmain setting on (it is by default I think) then any character for which the regex doesn't match anything is a main.

If that doesn't help I need a site url and a piece of your 'update relations' log
Last edited by PleegWat on Fri Nov 10, 2006 3:19 pm, edited 1 time in total.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Regex for Main identifier?

Postby gm128 » Fri Nov 10, 2006 8:40 pm

Site:
http://www.infernalprogeny.com/roster/
Update Log:
http://www.infernalprogeny.com/main-alt_update.log

As I said above, I do have the "defmain setting" on:
Regex | /^Alt\sof\s(\w+)/i
Apply on field | >Public note<
Use match no | 1
Main identifier | Main
No result | [x] Main - [ ] Mainless Alt
Invalid result | [ ] Main - [x] Mainless Alt
Alt of Alt | >Set as mainless alt<

Maybe you don't have it configured to do what I had imagined it would do. I guess I could look at your code and see, but I'm lazy. Anyway, I want it to also search through player notes for the "Main identifier." The way I have it setup in my in-game roster is like how I tried to say above. If the character is an alt, their player note says "Alt of MAINCHARACTERNAME." If the character is a main character (regardless of if they have alts or not), their player note will start with "Main." Yes, just the word "Main."

Now, if there is "No result" for whether the character is an alt or a main (in example, someone with a blank player note), I want to turn the "defmain setting" off so that they are considered a mainless alt. Right now when you hover over someone in the Main/Alt roster page it says almost everyone is an alt of themselves (Babyt: "Alt of Babyt"), but if someone really does have alts, their main is indeed considered a "Main." Hmm...

I hope I explained my situation a bit better this time. ;)
Last edited by gm128 on Fri Nov 10, 2006 8:46 pm, edited 1 time in total.
gm128
WR.net Apprentice
WR.net Apprentice
 
Posts: 9
Joined: Wed Aug 16, 2006 11:21 pm

Regex for Main identifier?

Postby PleegWat » Fri Nov 10, 2006 9:58 pm

What you describe is not possible currently, but it's a nice idea. I might implement it at some point.

The tooltips have a logic error. I'll fix them for my next release.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Regex for Main identifier?

Postby PleegWat » Sat Nov 11, 2006 3:25 am

I got hit by an inspiration. Try this alt regex:

/^(Main)|^Alt\sof\s(\w+)/i

And set the main identifier to Main.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm


Return to AltMonitor

Who is online

Users browsing this forum: No registered users and 1 guest

cron