@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@ Chat channel (works on MUX 2.0.19.305p3 #4 [BETA]) @@ (single-channel simple system) @@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@ Commands: (coordinator) @@ chat/add @@ chat/rem @@ chat/clean @@ (everyone) @@ chat (or chat :blahs, or chat ;blah) @@ chat/who @@ chat/list @@ To temporarily remove yourself, @@ &mute me=1 @@ @set me/mute=visual @@ To hear the channel again, @@ &mute me= @@ @@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@ The Chat channel owner/coordinator needs to set the following: @@ &CMD-ADDMEMBER me=$chat/add *:@swi [match(num(*%0),#-1*)]=1,{@pemit %#=Not a player.},{@pemit %#=[name(*%0)] added to your chat channel.;&list-chat me=[setunion(u(list-chat),[num(*%0)])];}; &CMD-REMMEMBER me=$chat/rem *:@pemit %#=Removing [name(*%0)] from your chat channel.;&list-chat me=[remove(u(list-chat),num(*%0))]; &CMD-CLEANLIST me=$chat/clean:@pemit %#=You wipe non-players off your chat channel.;&list-chat me=[s(iter(u(list-chat),switch(type(##),player,##,)))]; &CMD-LIST me=$chat/list:@pemit %#=[center(Chat channel,79,=)][iter(u(list-chat),%r%b[u(xshowmember,##,%0)])]%r[repeat(=,79)] &CMD-WHOSON me=$chat/who:@pemit %#=[u(xheader)]%r%b[u(xlister)][repeat(=,79)] &CMD-TALK me=$chat *:@pemit %#=[ifelse(hasattr(%#,mute),You are set mute.,)];@pemit/list [iter(u(list-chat),ifelse(and(not(get(##/mute)),hasflag(##,connect)),##,))]=[ifelse(hasattr(%#,mute),, [name(%#)][switch(mid(%0,0,1),:,%b[delete(%0,0,1)],{;},delete(%0,0,1),%bsays "%0")])]; &XSHOWMEMBER me=[switch(hasflag(%0,connect),1,[ljust([name(%0)] ,45)],[ljust(mid([name(%0)] < [get(%0/last)] >,0,45),45)])][rjust(mid(switch(hasflag(%0,unfindable),1,Unfindable,name(room(%0))),0,30),30)] &XHEADER me=[center(Chat: Who's on:,79,=)]%r[ljust(Name <+=on/-=off>,20)][rjust(Idle/Connect,15)][rjust(Location,30)]%r[repeat(-,79)] &XLISTER me=s(iter(u(list-chat),switch(hasflag(##,connect),1,[ifelse(get(##/mute),-,+)][ljust(name(##),22,.)][rjust(u(sec-conv,idle(##)),5,.)][rjust(u(sec-conv,conn(##)),5,.)][rjust(mid(switch(hasflag(##,unfindable),1,Unfindable,name(room(##))),0,40),40,.)]%r,))) &SEC-CONV me=switch(gt(%0,3600),1,div(%0,3600)h,switch(gt(%0,60),1,div(%0,60)m,%0s)) chat/add [name(me)] @set me/list-chat=visual @lock/use me=me @pemit me=DONE! @@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@ Everyone else needs to do this: @@ &CMD-LIST me=$chat/list:@pemit %#=[center(Chat channel,79,=)][iter(u(list-chat),%r%b[u(xshowmember,##,%0)])]%r[repeat(=,79)] &CMD-WHOSON me=$chat/who:@pemit %#=[u(xheader)]%r%b[u(xlister)][repeat(=,79)] &CMD-TALK me=$chat *:@pemit %#=[ifelse(hasattr(%#,mute),You are set mute.,)];@pemit/list [iter(u(list-chat),ifelse(and(not(get(##/mute)),hasflag(##,connect)),##,))]=[ifelse(hasattr(%#,mute),, [name(%#)][switch(mid(%0,0,1),:,%b[delete(%0,0,1)],{;},delete(%0,0,1),%bsays "%0")])]; &XSHOWMEMBER me=[switch(hasflag(%0,connect),1,[ljust([name(%0)] ,45)],[ljust(mid([name(%0)] < [get(%0/last)] >,0,45),45)])][rjust(mid(switch(hasflag(%0,unfindable),1,Unfindable,name(room(%0))),0,30),30)] &XHEADER me=[center(Chat: Who's on:,79,=)]%r[ljust(Name <+=on/-=off>,20)][rjust(Idle/Connect,15)][rjust(Location,30)]%r[repeat(-,79)] &XLISTER me=s(iter(u(list-chat),switch(hasflag(##,connect),1,[ifelse(get(##/mute),-,+)][ljust(name(##),22,.)][rjust(u(sec-conv,idle(##)),5,.)][rjust(u(sec-conv,conn(##)),5,.)][rjust(mid(switch(hasflag(##,unfindable),1,Unfindable,name(room(##))),0,40),40,.)]%r,))) &SEC-CONV me=switch(gt(%0,3600),1,div(%0,3600)h,switch(gt(%0,60),1,div(%0,60)m,%0s)) @@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ @@ CHANGE #123 in the next line to the DB # of whoever is the @@ owner/coordinator of the chat channel! @@ @@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ &list-chat me=[get(#123/list-chat)] @lock/use me=me @pemit me=DONE!