Channel Protection Script - 13/07/10 01:48 AM
I wrote a small channel protection script for a game I play to keep the folks in the channel limited to either people in our guild or visitors that we've identified. To do this I created three classes of users MASTERS, MEMBERS, and VISITORS. Essentially the vast majority of it is either ON JOINS where it either kicks if they are in no group, announces them if they are a visitor or does nothing if they are a member or master. And then a variety of commands to support this and some other game stuff.
So anyway, now the game has opened up a second server and I have a new channel and new list of users I want to support using this same script. The problem is that I would still ideally have the same groups of users and the same ON JOIN, ON TEXT scripts, but I don't know how to separate the two channels because these all exist in the users.ini file.
So basically looking for a general suggestion for what the best fix would be. I thought of going away from using users.ini and creating a hash table for each channel. The main drawback for this is (in my mind) would be that I would have to rewrite all my ON TEXT and ON JOINs to be looking through these tables on every text rather than using it in the header (i.e. ON VISITOR:JOIN:...). Seems like it should be doable, but not sure if this creates more of a performance issue or not?
So anyway, now the game has opened up a second server and I have a new channel and new list of users I want to support using this same script. The problem is that I would still ideally have the same groups of users and the same ON JOIN, ON TEXT scripts, but I don't know how to separate the two channels because these all exist in the users.ini file.
So basically looking for a general suggestion for what the best fix would be. I thought of going away from using users.ini and creating a hash table for each channel. The main drawback for this is (in my mind) would be that I would have to rewrite all my ON TEXT and ON JOINs to be looking through these tables on every text rather than using it in the header (i.e. ON VISITOR:JOIN:...). Seems like it should be doable, but not sure if this creates more of a performance issue or not?