&version *mudnet=4.0.3a @@ hardcode fix for some sync failures @@ hardcode fix for dropped channel subscriptions after bot restart @@ re-fix penn mnwho @edit *mudnet/TRH_WHO={;@pemit/silent me=%vkREND},{;@wait 2=@pemit/silent me=%vkREND} @@ re-fix penn pmatch, in case this didn't work the first time @edit *mudnet/TR_REQUEST={u_pmatch,%6,%6,%6},{u_pmatch2,%6} @@ de-spam mnpage feedback &TRH_PAGE *MudNet=@pemit [setr(6,u(u_pmatch2,%6))]=switch(%7,:,From afar%, %4%(%3%)@%5 %8,%;,From afar%, %4%(%3%)@%5%8,",%4%(%3%)@%5 pages: %8,%4%(%3%)@%5 pages: %7%8);@pemit me=%vkRANSWERrequest|%0|[switch(%7,:,Long distance to [name(r(6))]: "%4 %8".,%;,Long distance to [name(r(6))]: "%4%8".,",You paged [name(r(6))] with "%8".,You paged [name(r(6))] with "%7%8".)] @edit [switch(first(version()),Penn*,*mudnet/TRH_PAGE,#-1)]={@pemit [},{@pemit/silent [} @edit [switch(first(version()),Penn*,*mudnet/TRH_PAGE,#-1)]={@pemit me},{@pemit/silent me} @@ Oops, no pmatch() on older TinyMUSH. &U_PMATCH *MudNet=switch(num(first(%1)),#-*,switch(num(*%2),#-*,num(first(%0)),num(*%2)),num(first(%1))) @edit [switch(first(version()),Penn*,*mudnet/U_PMATCH,#-1)]={num(first(%1)))},{#$)} @edit *mudnet/U_PMATCH2={pmatch(},{num(*} @@ Oops, no ifelse() on older TinyMUSH. &DO_MNCLIST [get(*mudnet/globals)]=$mnclist:@pemit %#=switch(0,words(setr(0,squish(iter(lcstr(lattr(%vc/on_*)),switch(member(get(%vc/##),%#),0,,after(##,on_)))))),You are not on any Mudnet channels.,You are on these Mudnet channels: %q0) &DO_MNCSYNC [get(*mudnet/globals)]=$mncsync:@pemit *MudNet=switch(or(strmatch(num(*MudNet),%#),hasflag(%#,wizard)),0,,%vkRCSYNCrequest|[owner(%#)]|%#|%n|[iter(lcstr(lattr(%vc/on_*)),after(##,on_))]) @@ The time has come to drop the mn* command, which causes things to fail @@ silently when you typo any other mn command. It's probably better to fail @@ silently on valid mn commands when the bot's not connected. @wipe [get(*mudnet/globals)]/do_mn @@ Make sure we have a normal ansi normal on Penn. @switch first(version())=Penn*,&vn me=[extract(ansi(hrG,foo)ok,3,1,o)] @@ This allows MudNet to deliver channel messages to non-players using @@ @pemit/list (plain @pemit is not similarly broken, so we could also @@ theoretically @dolist to deliver channel messages, ugh). @power [switch(first(version),Penn*,#-1,Rhost*,#-1,*mudnet)]=long_fingers @@ Add mnupdate command for wizards to request automatic installation of @@ future softcode updates. Not yet activated. &DO_MNUPDATE [get(*mudnet/globals)]=$mnupdate*:@pemit *MudNet=switch(hasflag(%#,wizard),0,,%vkRUPDrequest|[owner(%#)]|%#|%n|[get(*mudnet/version)])|%0 @@ Update and shorten mncredits, and refer to the webpage for @@ additional history. &DO_MNCREDITS [get(*mudnet/globals)]=$mncredits:@pemit %#=[repeat(=*,38)]%r[center(MudNet Credits \(Version [get(*MudNet/VERSION)]\),76)]%r[repeat(-,76)]%rMudNet version 4 is Alierak@ChaoticMUX's second major revision of the robot (this time for consistency and customization, the first was for speed). For more information on the history of MudNet, please visit http://www.mudnet.org/about-credits.php%r%tMudNet is currently maintained by Alierak, Bobby, hellspawn, sTiLe, and Zenty at ChaoticMUX. We'd like to thank the following people who have helped with testing and improving MudNet 4 since its release: Ashen-Shugar, Errant@SG-1, Felix@Century, Javelin, Meglos, Melinda Bellemore, and RedWolf@Fallout.%r%tIf you would like MudNet on your MUSH, please visit http://www.mudnet.org/%r[repeat(=*,38)] @@ Add mnhelp mnlock. @edit [get(*mudnet/globals)]/help_mudnet={, http},{, `mnhelp mnlock',%r%band http} &HELP_MNLOCK [get(*mudnet/globals)]=$mnhelp mnlock:@pemit %#=In MudNet 4, you can block some commands by placing some code in your mnlock attribute. Depending on the server configuration, you may also need to do '@set me/mnlock=visual' so that MudNet can evaluate it as a u-function. If your mnlock returns 0, it will block a command.%r%rParameters:%r%t%%0 - pid%r%t%%1 - command (chan, cwho, cwhoall, finger, search, who2, mail, page)%r%t%%2 - invoker's owner dbref%r%t%%3 - invoker's dbref%r%t%%4 - invoker's name%r%t%%5 - name of invoker's MU*%r%rAdditional arguments depend on the type of command. See `mnhelp mnlock2' for more. &HELP_MNLOCK2 [get(*mudnet/globals)]=$mnhelp mnlock2:@pemit %#=Command-specific parameters:%r%rchan, cwho, cwhoall%r%t%%6 - channel name%r%t%%7 - first character of message (chan only)%r%t%%8 - rest of message (chan only)%rfinger, search, who2%r%t%%6 - victim's name%rmail%r%t%%6 - recipient's name%r%t%%7 - subject%r%t%%8 - message body%rpage%r%t%%6 - recipient's name%r%t%%7 - first character of message%r%t%%8 - rest of message%r%rSee `mnhelp mnlock3' for examples. &HELP_MNLOCK3 [get(*mudnet/globals)]=$mnhelp mnlock3:@pemit %#=Examples:%r%rTo block everything:%r%t&mnlock me=0%r%rTo block mnpages from everything that belongs to #37@SpamMUSH:%r%t&mnlock me=not(strmatch(%%1-%%2-%%5,page-#37-SpamMUSH))%r%rJavelin suggests keeping a list of patterns for commands you'd allow, and patterns for commands you'd deny, for example:%r%t&mnlock me=or(squish(iter(v(mn_allow),strmatch(%%1-%%2-%%5,##))),%r%t[space(14)]not(squish(iter(v(mn_deny),strmatch(%%1-%%2-%%5,##)))))%r%t&mn_allow me=*-*-NiceMUSH page-*-OkayMUSH cwho*-*-*%r%t&mn_deny me=page-*-* chan-*-SpamMUSH *-*-EvilMUSH%r%rWizards may also set mnlock_world on MudNet to override individual mnlocks or to block commands that don't have a particular victim.%r%rSee also: http://www.mudnet.org/help-locking.php @@ COMSYS UPDATE: @@ Add Felix@Century's 'mn chan message'. @@ Add last-channel tracking and 'mnc message'. @@ Consistently use r(0) instead of %q0. @@ Combine mncwho and mncwhoall for better handling of missing args. &DO_MNJOIN [get(*mudnet/globals)]=$mnjoin *:&on_%0 %vc=setunion(%#,setr(0,get(%vc/on_%0)));@pemit %#=switch(0,member(r(0),%#),,You're already on that channel.);@pemit *MudNet=switch(0,not(member(r(0),%#)),,udefault(%vc/an_%0,1),,%vkRCHANrequest|[owner(%#)]|%#|%n|%0|:has joined this channel.);&lc_%# %vc=%0 @edit [get(*mudnet/globals)]/DO_MNLEAVE={%q0},{r(0)} &DO_MNCLIST [get(*mudnet/globals)]=$mnclist:@pemit %#=switch(0,words(setr(0,squish(iter(lcstr(lattr(%vc/on_*)),switch(member(get(%vc/##),%#),0,,after(##,on_)))))),You are not on any Mudnet channels.,You are on these Mudnet channels: [r(0)])%rYour default channel is: [default(%vc/lc_%#,0)] &DO_MNCHAN [get(*mudnet/globals)]=$mnchan *=*:@pemit %#=switch(0,setr(0,member(get(%vc/on_%0),%#)),You're not on that channel.);@pemit *MudNet=switch(0,r(0),,%vkRCHANrequest|[owner(%#)]|%#|%n|%0|%1);&lc_%# [switch(0,r(0),#-1,%vc)]=%0 &DO_MN [get(*mudnet/globals)]=$mn * *:@pemit %#=switch(0,setr(0,member(get(%vc/on_%0),%#)),You're not on that channel.);@pemit *MudNet=switch(0,r(0),,%vkRCHANrequest|[owner(%#)]|%#|%n|%0|%1);&lc_%# [switch(0,r(0),#-1,%vc)]=%0 &DO_MNC [get(*mudnet/globals)]=$mnc *:@pemit %#=switch(0,setr(0,member(get(%vc/on_[setr(1,default(%vc/lc_%#,0))]),%#)),You're not on channel [r(1)].);@pemit *MudNet=switch(0,r(0),,%vkRCHANrequest|[owner(%#)]|%#|%n|[r(1)]|%0) &DO_MNCWHO [get(*mudnet/globals)]=$mncwho*:@pemit *MudNet=%vkRCWHOrequest|[owner(%#)]|%#|%n|[switch(%0,%b*=*,trim(before(%0,=)),%b*,trim(%0),all)]|[switch(%0,%b*=*,after(%0,=),all *,rest(%0),default(%vc/lc_%#,0))] @wipe [get(*mudnet/globals)]/DO_MNCWHOALL &HELP_COMSYS [get(*mudnet/globals)]=$mnhelp comsys:@pemit %#=MudNet now includes a softcoded comsys with support for multiple channels. To "create" a channel, you can simply join it, get other people to join it, and start sending messages. Channel messages are sent only to worlds where someone is listening on the channel. We've purposely provided no way to get a list of all channels that currently exist%; this means you can set up a private channel just by picking an obscure name. For general public conversations, we suggest using channel 0 for starters.%r%rCommands:%r%bmnjoin - subscribes you to a MudNet channel (alphanumeric only)%r%bmnleave - unsubscribes you from a channel%r%bmnclist - lists the MudNet channels you're on%r%bmncwho %[=%] - shows you who is on the MudNet channel for %r%bmncwhoall %[%] - returns a cwho list for all worlds%r%bmnchan = - sends a message to everyone on %r%bmn - equivalent to mnchan%r%bmnc - sends a message on the last channel used @edit [switch(first(version()),Penn*,get(*mudnet/globals),#-1)]/*={%vc},{%xc} @pemit me=MudNet 4.0.3a update completed.