#format IAC %a 255
#format DONT %a 254
#format DO %a 253
#format WONT %a 252
#format WILL %a 251
#format SB %a 250
#format SE %a 240
#format MSDP %a 69
#format VAR %a 01
#format VAL %a 02
#format OPEN %a 03
#format CLOSE %a 04
#config debug on
#event {SESSION CONNECTED}
{
#send {$IAC$DO$MSDP\};
#send {$IAC$SB$MSDP${VAR}INTERMUD${VAL}TIN$IAC$SE\}
}
#event {IAC SB MSDP}
{
#switch {"%0"}
{
#case {"TIN_CHAT"}
{
#var TIN_CHAT {%1};
#all chat
};
#case {"TIN_TELL"}
{
#var TIN_TELL {%1};
tell
}
}
}
#alias {chat}
{
#send {@tin_data{TIN_CHAT}\}
}
#alias {tell}
{
#if {"$TIN_TELL[RECIPIENT_HOST]" != "%*.%*"}
{
#return
};
#$TIN_TELL[RECIPIENT_HOST] #send {@tin_data{TIN_TELL}\}
}
#function {tin_data}
{
#var {result} {$IAC$SB$MSDP${VAR}%0$VAL$OPEN};
#foreach {$%0[]} {key}
{
#var {result} {$result$VAR$key$VAL$%0[$key]}
};
#var {result} {$result}$CLOSE$IAC$SE
}
#ses godwars2.org:3000 godwars2.org 3000
There are a couple of problems:
1) In an ideal situation there'd be one client connecting all participating MUDs, but as this is unlikely to happen there ought to be some kind of mechanism to avoid two clients connected to the same two MUDs relaying the same message twice. One solution is doing this server side, the server simply blocks duplicate messages, which might be the easiest approach. Another option is having a master server that all clients connect to that deals with conflict resolution, the advantage is that it puts less of an implementation burden on mud servers.
2) Existing Intermud protocols exist, not sure if it's the smartest idea to add yet another one.
3) Rogue clients and vandalism could be a problem. Servers may very well have to only allow Intermud clients from specific domains, or require a password.
4) Is it desirable to have clients perform tasks like mail? If the client side mail functionality is good enough a server may very well decide to handle all mud mail client side, maybe even have a specific trusted client or master server to handle mail. Other useful services could be added as well, like user profiles.
The actual data transfers would be pretty simple MSDP messages. For example:
IAC SB MSDP VAR "TIN_MAIL" VAL MSDP_OPEN VAR "SENDER" VAL "Runter" VAR "RECIPIENT" VAL "Scandum" VAR "HOST" VAL "lolamud.net" VAR "SUBJECT" VAL "Come on Scandum" VAR "MESSAGE" VAL "Teach me your skills. How do You check to find out if people are hacking your files. If it was you I want you to teach me. How do you get information on people. How do you get into other people's computers. Do you upload a program like Sub11? I want to be able to hear people talking through their microphones when they think they are all alone.. is this possible?" MSDP_CLOSE IAC SE