GMCP module tracking

Post Reply
User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

GMCP module tracking

Post by Vadi »

I'm thinking that we need some sort of a mini-utility system shipped with Mudlet that'll allow developers to enable/disable GMCP modules without worrying that it might interfere with other scripts. Essentially if module A and module B request GMCP feature A to be available, and then module A doesn't need it anymore, the feature should not be disabled until module B doesn't need it anymore either.

Has anyone had ideas on this?

conslo
Posts: 15
Joined: Fri Aug 20, 2010 7:47 pm

Re: GMCP module tracking

Post by conslo »

a simple function, takes the gmcp feature (string), a bool (enable or disable), and a "module name" (string), when the bool is true, adds the module name to a table and enables the gmcp feature if it isn't already, whenever the bool is false, removes the module name from the table then checks to see if the table is empty, if it is, disables the gmcp feature

Post Reply