Author Topic: Adding new I3 channels  (Read 1322 times)

Offline quixadhal

  • BFF
  • ***
  • Posts: 629
    • View Profile
    • WileyMUD
Adding new I3 channels
« on: February 10, 2013, 09:55:44 AM »
For those running the dist-lib of Discworld, you may find yourself in the situation where
you wish to add MORE I3 channels to the game.  This is foolish, but if you insist,
this is what you need to do.

If you're wanting to make your very own channel, you'll need to call
    exec return "/net/intermud3/services"->AddChannel("channel name", 0);

Now that the channel exists on the I3 server, you have to add it to the hard-coded
list of I3 channels.

    edit /include/creator.h

    Add an entry to the INTERMUD_MAP mapping, where the KEY is your local channel name,
        and the VALUE is the name it has on the I3 system.

Code: [Select]
        #define INTERMUD_MAP ([ "dwchat" : "discworld-chat", "dwcre" : "discworld-cre",
                                "intergossip" : "imud_gossip", "intercre" : "imud_code",
                                "dchat" : "dchat" ])

    Next, you need to either add it to the hard-coded GetLocalChannel() function in
        /net/intermud3/services/channels.c, or replace that function with this:

Code: [Select]
        #include <creator.h>

        string GetLocalChannel(string channel) {
            return allocate_mapping(values(INTERMUD_MAP), keys(INTERMUD_MAP))[channel] || 0;

    Once that's done, you need to reload both systems:

        dupdate /net/intermud3/services.c
        dupdate /global/lord.c