You could have an NPC in game that has a registration script. They hail and go through whatever process you like, ultimately generating a random password and whispering it to the client. The perl script should write the account name and the generated password to a table in the db. You might query that table first to see if they've already completed registration or if they've only attempted it and decide how resets or forgotten temporary passwords will be handled.
Next, when they go to the forum to register, you would need to add two new form elements for the account name and the temporary password. In phpbb this is pretty easy. I already use the account_ip table on my server to keep spammers out of my forums without having to worry about registration emails. If it all matches up you update that original username/temp pw table to include the forum username and current status, which at creation should probably be 0. Just to be clear, login server account names should not be forum usernames. They really should never be exposed, instead map one to the other privately.
The last step would be to update status based on forum settings. The easy way would be to set up a cron job or scheduled task to process updates, but even with a cache to prevent redundant updates, your overhead will grow with your userbase, regardless of whether or not they are playing. If you really wanted to get intimate with your BB package you could insert immediate update hooks any time a group is changed, which would probably be more efficient but also a little more complex.
I think status gets re-read when a user logs in so just writing the status to the db should be fine. If I'm wrong you could use a telnet library.
This all assumes you're competent and comfortable with some programming, mostly perl and php. I've never used vBulletin (I'm guessing that's what your VB stands for) but you wouldn't be able to do this without source access.
|