Skip to content

Commit

Permalink
2.0 Beta
Browse files Browse the repository at this point in the history
Too many fixes to list. It'll be finished soon!
  • Loading branch information
volundmush committed Sep 6, 2015
1 parent ef1b22e commit 385873c
Show file tree
Hide file tree
Showing 15 changed files with 292 additions and 283 deletions.
4 changes: 2 additions & 2 deletions Bulletin Board System - BBS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ th u(NEWCONF,config,BBS,GBS,1,Enable group boards?,BOOL)
&FUN`GETTIMEOUT [u(cobj,bbs)]=if(default(%0/~`%1`NOTIMEOUT,0),X,get(%0/~`%1`TIMEOUT))
@@ %0 - bbs, %1 - post

&INC`READ`SHOWPOST [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDPOST=%0,%1,%2;@pemit %#=u(HEADER,u(fun`name,%0,%2,%q<gid1>));@pemit %#=ljust(Message: %q<bbnum>/%q<postnum> %([if(not(u(game_config,bbs,auto_timeout)),No System Timeout,switch(u(setr,showtimeout,u(FUN`GETTIMEOUT,%q<bb>,%q<post>)),X,No Timeout,>0,etime(%q<showtimeout>),Timed Out!))]%),35)Posted[space(8)]Author%r[ljust(get(%2/~`%q<post>`HDR),35)][ljust(u(fancyday,first(elements(u(setr,details,get(%2/~`%q<post>`DETAILS)),4 3,|,%B)),%#),14)][left(if(strlen(%q<anon>),if(%q<isadmin>,%([ansi(hx,get(%q<bb>/%q<post>`BY))]%),%q<anon>),u(moniker,elements(%q<details>,2,|))),21)]%R[u(SEPARATOR)];@pemit %#=get(%q<bb>/~`%q<post>);@select/inline t(u(nattr,%q<bb>/~`%q<post>`COMM`*))=1,{@attach %!/INC`READ`SHOWCOMMS},0,{@pemit %#=u(SUBHEADER)};th u(FUN`SETREAD,%#,%2,%q<post>)
&INC`READ`SHOWPOST [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDPOST=%0,%1,%2;@pemit %#=u(HEADER,u(fun`name,%0,%2,%q<gid1>));@pemit %#=ljust(Message: %q<bbnum>/%q<postnum> %([if(not(u(game_config,bbs,auto_timeout)),No System Timeout,switch(u(setr,showtimeout,u(FUN`GETTIMEOUT,%q<bb>,%q<post>)),X,No Timeout,>0,etime(%q<showtimeout>),Timed Out!))]%),35)Posted[space(8)]Author%r[ljust(get(%2/~`%q<post>`HDR),35)][ljust(u(fancyday,first(elements(u(setr,details,get(%2/~`%q<post>`DETAILS)),4 3,|,%B)),%#),14)][left(if(strlen(%q<anon>),if(%q<isadmin>,%([ansi(hx,elements(%q<details>,1,|))]%),%q<anon>),u(moniker,elements(%q<details>,2,|))),21)]%R[u(SEPARATOR)];@pemit %#=get(%q<bb>/~`%q<post>);@select/inline t(u(nattr,%q<bb>/~`%q<post>`COMM`*))=1,{@attach %!/INC`READ`SHOWCOMMS},0,{@pemit %#=u(SUBHEADER)};th u(FUN`SETREAD,%#,%2,%q<post>)

&INC`READ`SHOWCOMMS [u(cobj,bbs)]=@dolist u(setr,allcomms,u(sortattr,u(lattr,%q<bb>/%q<post>`COMM`*)))={@pemit %#=u(SEPARATOR,Comment #@ - Added [u(fancytime,get(%q<bb>/##`ON),%#)]);@pemit %#=u(moniker,get(%q<bb>/##`BY)) Commented:;@pemit %#=get(%q<bb>/##);@select/inline #@=1,{@pemit %#=u(SUBHEADER)}}

Expand Down Expand Up @@ -188,7 +188,7 @@ th u(NEWCONF,config,BBS,GBS,1,Enable group boards?,BOOL)

&INC`CONFIG [u(cobj,bbs)]=@attach %!/INC`CHECK`FINDBB=%0,%1,WRITE;@select/inline strlen(%2)=0,{@attach %!/INC`CONFIG`BOARD`SHOW},{@attach %!/INC`PARTIAL=%2,anonymous|timeout[switch(%0,BB,|mandatory)],|,parameter,parameter;@select/inline strlen(%3)=0,{@attach %!/INC`MSG=%q<parameter> for Board [name(%q<bb>)] cleared.;&%q<parameter> %q<bb>},{@attach %!/INC`CONFIG`GLOBAL`%q<parameter>;@attach %!/INC`MSG=%q<parameter> for Board [name(%q<bb>)] set to: %3.;&%q<parameter> %q<bb>=u(strfirstof,%q<entry>,%3)}}

&INC`CONFIG`BOARD`SHOW [u(cobj,bbs)]=@pemit %#=u(HEADER,%q<sysname> - [name(%q<bb>)] Board Settings);@pemit %#=TIMEOUT: [u(strfirstof,u(FUN`CONFIG,%q<bb>,timeout),0)] [if(u(FUN`CONFIG,%q<bb>,timeout),- [etime(u(FUN`CONFIG,%q<bb>,timeout))])] [if(strlen(get(%q<bb>/TIMEOUT)),- Using Board Setting,- Using Global Default)];@pemit %#=ANONYMOUS: [default(%q<bb>/ANONYMOUS,<unset>))];@pemit %#=MANDATORY: [t(get(%q<bb>/MANDATORY))];@pemit %#=u(SUBHEADER)
&INC`CONFIG`BOARD`SHOW [u(cobj,bbs)]=@pemit %#=u(HEADER,%q<sysname> - [name(%q<bb>)] Board Settings);@pemit %#=TIMEOUT: [u(strfirstof,u(FUN`CONFIG,%q<bb>,timeout),0)] [if(u(FUN`CONFIG,%q<bb>,timeout),- [etime(u(FUN`CONFIG,%q<bb>,timeout))])] [if(strlen(get(%q<bb>/TIMEOUT)),- Using Board Setting,- Using Global Default)];@pemit %#=ANONYMOUS: [default(%q<bb>/ANONYMOUS,<unset>)];@pemit %#=MANDATORY: [t(get(%q<bb>/MANDATORY))];@pemit %#=u(SUBHEADER)

&INC`CONFIG`BOARD`TIMEOUT [u(cobj,bbs)]=@check strlen(u(setr,entry,u(stringsecs,%3)))=@attach %!/INC`MSG=ERROR: Entry doesn't convert properly. Check [u(pueblize,help stringsecs)] for proper format.
&INC`CONFIG`BOARD`ANONYMOUS [u(cobj,bbs)]=@check strlen(%3)=@attach %!/INC`MSG=ERROR: Anonymous entry must be a string.
Expand Down
15 changes: 10 additions & 5 deletions CORE 01 - Master Code Object - MCO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ th if(isdbref(u(cobj,mco)),,setq(0,create(Master Code Object <MCO>))[tel(%q0,swi

&STARTUP`FUNCTIONS [u(cobj,mco)]=@include %!/STARTUP`FUNCTIONS`[v(game)]
&STARTUP`FUNCTIONS`PENNMUSH [u(cobj,mco)]=@dolist/inline setunion(game_config header subheader separator isadmin isapproved approved sortname color mxpmenu pueblize my_config speech chancolor colornames choosegame sortorder namelink,v(FUNCTIONLIST`EXTRA))={@function %i0=u(cobj,mco),%i0;@function/restrict %i0=localize};@dolist/inline v(FUNCTIONLIST`ADMIN)={@function/restrict %i0=admin}
&STARTUP`FUNCTIONS`RHOSTMUSH [u(cobj,mco)]=@dolist/inline setunion(align sortkey game_config header subheader separator isadmin isapproved approved moniker lvplayers lvthings lvexits sortname color mxpmenu pueblize strfirstof table my_config speech chancolor colornames choosegame sortorder objid namelink,v(FUNCTIONLIST`EXTRA))={@function/privileged %d0=%!/%d0};@dolist/inline v(FUNCTIONLIST`ADMIN)={@admin function_access=%d0 wizard}
&STARTUP`FUNCTIONS`RHOSTMUSH [u(cobj,mco)]=@dolist/inline setunion(align lalign sortkey game_config header subheader separator isadmin isapproved approved moniker lvplayers lvthings lvexits sortname color mxpmenu pueblize strfirstof table my_config speech chancolor colornames choosegame sortorder objid namelink,v(FUNCTIONLIST`EXTRA))={@function/privileged %d0=%!/%d0};@dolist/inline v(FUNCTIONLIST`ADMIN)={@admin function_access=%d0 wizard}

&FUNCTIONLIST`EXTRA [u(cobj,mco)]=
&FUNCTIONLIST`ADMIN [u(cobj,mco)]=
Expand Down Expand Up @@ -197,7 +197,7 @@ th if(isdbref(u(cobj,mco)),,setq(0,create(Master Code Object <MCO>))[tel(%q0,swi
&MONIKER`PENNMUSH [u(cobj,mco)]=moniker(%0)
&MONIKER`RHOSTMUSH [u(cobj,mco)]=cname(%0)

&NAMELINK [u(cobj,mco)]=localize(u(mxpmenu,u(moniker,%0),iter(u(setr,com,u(game_config,SYSTEM,NAMELINK)),%i0 [name(%0)]),%q<com>))
&NAMELINK [u(cobj,mco)]=localize(u(mxpmenu,u(moniker,%0),iter(u(setr,com,u(game_config,SYSTEM,NAMELINK)),%i0 [name(%0)],|,|),%q<com>))

&NAMEGRAB [u(cobj,mco)]=u(NAMEGRAB`[v(game)],%0,%1)
&NAMEGRAB`PENNMUSH [u(cobj,mco)]=namegrab(%0,%1)
Expand Down Expand Up @@ -263,7 +263,7 @@ th if(isdbref(u(cobj,mco)),,setq(0,create(Master Code Object <MCO>))[tel(%q0,swi
@@ Rhost Functions
&ALIGN [u(cobj,mco)]=[printf([iter(%0,$[case(mid(%i0,0,1),<,-[delete(%i0,0,1)],>,[delete(%i0,0,1)],_,_[delete(%i0,0,1)],-,^[delete(%i0,0,1)],=,_[delete(%i0,0,1)],-%i0)]|"s)],%1,%2,%3,%4,%5,%6,%7,%8,%9)]
&SORTKEY [u(cobj,mco)]=munge(#lambda/%[sort%(%%0%,%2%,%3%)%],iter(%1,edit(u(%0,itext(0)),%b,),ifelse(!$v(3),%b,%3),ifelse(!$v(3),%b,%3)),%1,ifelse(!$v(3),%b,%3),ifelse(!$v(4),ifelse(!$v(3),%b,%3),%4))
@@
&LALIGN [u(cobj,mco)]=[strfunc(printf,[iter(%0,$[case(mid(%i0,0,1),<,-[delete(%i0,0,1)],>,[delete(%i0,0,1)],_,_[delete(%i0,0,1)],-,^[delete(%i0,0,1)],=,_[delete(%i0,0,1)],-%i0)]|"s)]%2%1,%2)]

&BASECONV [u(cobj,mco)]=u(BASECONV`[v(game)],%0,%1,%2)
&BASECONV`PENNMUSH [u(cobj,mco)]=baseconv(%0,%1,%2)
Expand Down Expand Up @@ -351,6 +351,11 @@ th if(isdbref(u(cobj,mco)),,setq(0,create(Master Code Object <MCO>))[tel(%q0,swi
&GETPROPERTY`MONIKER [u(cobj,mco)]=u(moniker,%0)
&GETPROPERTY`ALIASNAME [u(cobj,mco)]=name(%0)[if(strlen(u(getalias,%0)),%B\([u(getalias,%0)]\))]
&GETPROPERTY`ALIASMONIKER [u(cobj,mco)]=u(moniker,%0)[if(strlen(u(getalias,%0)),%B\([u(getalias,%0)]\))]
&GETPROPERTY`NAMELINK [u(cobj,mco)]=u(namelink,%0)
&GETPROPERTY`HIDEIDLE [u(cobj,mco)]=u(hideidle,%0)
&GETPROPERTY`HIDECONN [u(cobj,mco)]=u(hideconn,%0)
&GETPROPERTY`SEXLETTER [u(cobj,mco)]=left(get(%0/SEX),1)
&GETPROPERTY`LOCATION [u(cobj,mco)]=if(findable(%#,%0),name(loc(%0)),*UNFINDABLE*)

&GETPROPERTY`WIKI [u(cobj,mco)]=u(weblink,get(%0/D`FINGER`WIKI))
&GETPROPERTY`GROUPNAMES2 [u(cobj,mco)]=u(getproperty`groupnames,%0,1)
Expand Down Expand Up @@ -536,8 +541,8 @@ th if(isdbref(u(cobj,mco)),,setq(0,create(Master Code Object <MCO>))[tel(%q0,swi
&INC`VALID`DBREF [u(cobj,mco)]=@check isdbref(%0)=@attach %!/INC`MSG={ERROR: DBREF not found.};th u(setq,value,u(objid,%0))
&INC`VALID`TZ [u(cobj,mco)]=@check valid(timezone,u(setr,value,%0))=@attach %!/INC`MSG={ERROR: That is not a valid timezone. Check help timezone}
&INC`VALID`DURATION [u(cobj,mco)]=@check u(setr,value,u(stringsecs,%0))=@attach %!/INC`MSG={ERROR: '%0' did not resolve into a time. Check help stringsecs()}
&INC`VALID`POSINT [u(cobj,mco)]=@check u(valnum,%0)=@attach %!/INC`MSG={ERROR: '%0' must be a whole number 0 or greater.}
&INC`VALID`INT [u(cobj,mco)]=@check isint(%0)=@attach %!/INC`MSG={ERROR: '%0' must be a whole number 0.}
&INC`VALID`POSINT [u(cobj,mco)]=@check u(valnum,%0)=@attach %!/INC`MSG={ERROR: '[u(strfirstof,%1,%0)]' must be a whole number 0 or greater.};th u(setq,value,%0)
&INC`VALID`INT [u(cobj,mco)]=@check isint(%0)=@attach %!/INC`MSG={ERROR: '%0' must be a whole number 0.};th u(setq,value,%0)
&INC`VALID`LOCK [u(cobj,mco)]=@check valid(lockkey,%0)=@attach %!/INC`MSG={ERROR: '%0' was not accepted by the @lock system.};th u(setq,value,%0)

@@ MESSAGING SECTION
Expand Down
10 changes: 5 additions & 5 deletions Channel Management System - CMS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ th u(NEWCOBJ,Muzzle Database <MUZZLE>,muzzle,u(cobj,channel),,,WIZARD SAFE !NO_C
@set [u(cobj,channel)]/CMD`+CHANNEL`PENNMUSH=regexp
&CMD`+CHANNEL`RHOSTMUSH [u(cobj,channel)]=$^(?s)(?\:\+)?(?\:channel|chan)(?\:/(\\S+)?)?(?\: +(.+?))?(?\:/(.*?))?(?\:=(.*))?$:@attach %!/CMD`+CHANNEL`MAIN
@set [u(cobj,channel)]/CMD`+CHANNEL`RHOSTMUSH=regexp
&CMD`+CHANNEL`MAIN [u(cobj,channel)]=th setq(sysname,CHANNEL);@attach %!/INC`GETSWITCH=%1;@include %!/INC`CHANNEL`[u(strfirstof,%q<switch>,MAIN)]=%2,%3,$4
&CMD`+CHANNEL`MAIN [u(cobj,channel)]=th setq(sysname,CHANNEL);@attach %!/INC`GETSWITCH=%1;@include %!/INC`CHANNEL`[u(strfirstof,%q<switch>,MAIN)]=%2,%3,%4
@set [u(cobj,channel)]/CMD`+CHANNEL`[switch(v(game),PennMUSH,RHOSTMUSH,RhostMUSH,PENNMUSH)]=no_command

&SYSTEM`NAME [u(cobj,channel)]=u(strfirstof,%q<sysname>,CHANNEL)
Expand All @@ -27,19 +27,19 @@ th u(NEWCOBJ,Muzzle Database <MUZZLE>,muzzle,u(cobj,channel),,,WIZARD SAFE !NO_C

&INC`CHANNEL`COLOR [u(cobj,channel)]=@force/inline %#=+color/channel %0=%1

&INC`CHANNEL`ADD [u(cobj,channel)]=@check strlen(%0)=@attach %!/INC`MSG=ERROR: Channel name empty!;@check valid(channel,%0)=@attach %!/INC`MSG=ERROR: Channel name was not accepted. A channel of that name already exists or the entered name was too long or had unacceptable characters.;@select/inline strlen(%1)=>0,{@stop strmatch(ansi(%1,test),u(setr,error,#-*))=@attach %!/INC`MSG=ERROR: '%1' was not accepted by ansi()! Error returned: %q<error>};@channel/add if(strlen(%1),ansi(%1,%0),%0)=u(game_config,CHANNELS,DEFAULT_PRIVS);@attach %!/INC`CHANNEL`INIT;@attach %!/INC`MSG=Channel [if(strlen(%1),ansi(%1,%0),%0)] created!;@attach %!/INC`MSG`CHAN=Created the [if(strlen(%1),ansi(%1,%0),%0)] channel!
&INC`CHANNEL`ADD [u(cobj,channel)]=@check strlen(%0)=@attach %!/INC`MSG=ERROR: Channel name empty!;@check valid(channel,%0)=@attach %!/INC`MSG=ERROR: Channel name was not accepted. A channel of that name already exists or the entered name was too long or had unacceptable characters.;@select/inline strlen(%1)=>0,{@stop strmatch(ansi(%2,test),u(setr,error,#-*))=@attach %!/INC`MSG=ERROR: '%2' was not accepted by ansi()! Error returned: %q<error>};@channel/add if(strlen(%2),ansi(%2,%0),%0)=u(game_config,CHANNELS,DEFAULT_PRIVS);@attach %!/INC`CHANNEL`INIT;@attach %!/INC`MSG=Channel [if(strlen(%2),ansi(%2,%0),%0)] created!;@attach %!/INC`MSG`CHAN=Created the [if(strlen(%2),ansi(%2,%0),%0)] channel!

th u(NEWCONF,config,CHANNELS,DEFAULT_PRIVS,PQ,Default priveleges for new channels.,WORD)

&INC`CHANNEL`INIT [u(cobj,channel)]=@check match(stripansi(objeval(%#,channels(|))),%0,|)=@attach %!/INC`MSG=ERROR: Channel not found.;@select/inline strmatch(cmogrifier(%0),u(cobj,mop))=0,{@select/inline isdbref(u(setr,mog,u(FIND_IN,u(cobj,mop),MOG-[stripansi(%0)])))=1,{@channel/mogrifier %0=%q<mog>},0,{@tel u(setr,mog,create(MOG-[stripansi(%0)]))=u(cobj,mop);@parent %q<mog>=u(cobj,mop);@channel/mogrifier %0=%q<mog>;@select/inline %q<switch>=INIT,{@attach %!/INC`MSG=Channel initiation of '%0' complete!}}},1,{@select/inline %q<switch>=INIT,{@attach %!/INC`MSG=Channel initiation of '%0' unnecessary!}}

&INC`CHANNEL`DELETE [u(cobj,channel)]=@attach %!/INC`PARTIAL=%0,stripansi(objeval(%#,channels(|))),|,channel,channel;@attach %!/INC`VERIFY={[ansi(hr,WARNING:)] This will delete channel %q<name>. Are you sure? Enter the same command within ten seconds to continue!},CHANNEL DELETE %q<channel>;@select/inline isdbref(u(setr,mog,cmogrifier(%q<channel>)))=1,{@attach %!/DELETE=%q<mog>};@channel/delete %q<channel>;@attach %!/INC`MSG`CHAN=Deleted Channel %q<channel>

&INC`CHANNEL`RENAME [u(cobj,channel)]=@attach %!/INC`PARTIAL=%0,stripansi(objeval(%#,channels(|))),|,channel,channel;@check cor(u(isadmin,%#),testlock(clock(%q<channel>/Mod),%#))=@attach %!/INC`MSG=ERROR: Permission denied.;@check strlen(%1)=@attach %!/INC`MSG=ERROR: New Name field Empty.;@check valid(channel,stripansi(%1),%q<channel>)=@attach %!/INC`MSG=ERROR: Either a channel by that name already exists, or the entered new name wasn't an acceptable channel name.;@channel/name %q<channel>=trim(%1);@attach %!/INC`MSG=You have renamed channel %q<channel> to: [trim(%1)]!;@attach %!/INC`MSG`CHAN=Channel %q<channel> renamed to: [trim(%1)]!
&INC`CHANNEL`RENAME [u(cobj,channel)]=@attach %!/INC`PARTIAL=%0,stripansi(objeval(%#,channels(|))),|,channel,channel;@check cor(u(isadmin,%#),testlock(clock(%q<channel>/Mod),%#))=@attach %!/INC`MSG=ERROR: Permission denied.;@check strlen(%2)=@attach %!/INC`MSG=ERROR: New Name field Empty.;@check valid(channel,stripansi(%2),%q<channel>)=@attach %!/INC`MSG=ERROR: Either a channel by that name already exists, or the entered new name wasn't an acceptable channel name.;@channel/name %q<channel>=trim(%2);@attach %!/INC`MSG=You have renamed channel %q<channel> to: [trim(%2)]!;@attach %!/INC`MSG`CHAN=Channel %q<channel> renamed to: [trim(%2)]!

@@ &INC`CHANNEL`CONFIG [u(cobj,channel)]=@attach %!/INC`PARTIAL=%0,stripansi(objeval(%#,channels(|))),|,channel,channel;@check cor(u(isadmin,%#),testlock(clock(%q<channel>/Mod),%#))=@attach %!/INC`MSG=ERROR: Permission denied.;@stop not(strmatch(parent(u(setr,mog,cmogrifier(%q<channel>))),num(u(cobj,mop))))=@attach %!/INC`MSG=ERROR: Channel is not initialized. Please use +channel/init %q<channel>;@attach %!/INC`PARTIAL=%2,CODENAME,|,parameter,parameter;@select/inline strlen(%1)=0,{&CONF`%q<parameter> %q<mog>;@attach %!/INC`MSG=You cleared Channel %q<channel>'s %q<parameter> Setting.},{@attach %!/INC`CHANNEL`CONFIG`%q<parameter>;&CONF`%q<parameter> %q<mog>=%q<entry>;@attach %!/INC`MSG=You set Channel %q<channel>'s %q<parameter> Setting to: %q<entry>};@attach %!/INC`MSG`CHAN=[if(strlen(%1),set,cleared)] the %q<channel> Channel's %q<parameter> Setting[if(strlen(%1),%bto %1!,.)]
@@ &INC`CHANNEL`CONFIG [u(cobj,channel)]=@attach %!/INC`PARTIAL=%0,stripansi(objeval(%#,channels(|))),|,channel,channel;@check cor(u(isadmin,%#),testlock(clock(%q<channel>/Mod),%#))=@attach %!/INC`MSG=ERROR: Permission denied.;@stop not(strmatch(parent(u(setr,mog,cmogrifier(%q<channel>))),num(u(cobj,mop))))=@attach %!/INC`MSG=ERROR: Channel is not initialized. Please use +channel/init %q<channel>;@attach %!/INC`PARTIAL=%2,CODENAME,|,parameter,parameter;@select/inline strlen(%2)=0,{&CONF`%q<parameter> %q<mog>;@attach %!/INC`MSG=You cleared Channel %q<channel>'s %q<parameter> Setting.},{@attach %!/INC`CHANNEL`CONFIG`%q<parameter>;&CONF`%q<parameter> %q<mog>=%q<entry>;@attach %!/INC`MSG=You set Channel %q<channel>'s %q<parameter> Setting to: %q<entry>};@attach %!/INC`MSG`CHAN=[if(strlen(%2),set,cleared)] the %q<channel> Channel's %q<parameter> Setting[if(strlen(%2),%bto %2!,.)]

&INC`CHANNEL`MOGCONF [u(cobj,channel)]=@attach %!/INC`PARTIAL=%0,stripansi(objeval(%#,channels(|))),|,channel,channel;@check cor(u(isadmin,%#),testlock(clock(%q<channel>/Mod),%#))=@attach %!/INC`MSG=ERROR: Permission denied.;@stop not(strmatch(parent(u(setr,mog,cmogrifier(%q<channel>))),num(u(cobj,mop))))=@attach %!/INC`MSG=ERROR: Channel is not initialized. Please use +channel/init %q<channel>;@switch/first/inline gt(strlen(before(%2,/)),0)=0,{@attach %!/INC`CHANNEL`MOGCONF`SHOWCONFIG},1,{@attach %!/INC`PARTIAL=before(%2,/),v(MOGTYPES),|,mogrifier,mogrifier;@select/inline gt(strlen(after(%2,/)),0)=1,{@attach %!/INC`CHANNEL`MOGCONF`SUBCONFIG},0,{@attach %!/INC`CHANNEL`MOGCONF`MAINCONFIG}}
&INC`CHANNEL`MOGCONF [u(cobj,channel)]=@attach %!/INC`PARTIAL=%0,stripansi(objeval(%#,channels(|))),|,channel,channel;@check cor(u(isadmin,%#),testlock(clock(%q<channel>/Mod),%#))=@attach %!/INC`MSG=ERROR: Permission denied.;@stop not(strmatch(parent(u(setr,mog,cmogrifier(%q<channel>))),num(u(cobj,mop))))=@attach %!/INC`MSG=ERROR: Channel is not initialized. Please use +channel/init %q<channel>;@select/inline gt(strlen(before(%2,/)),0)=0,{@attach %!/INC`CHANNEL`MOGCONF`SHOWCONFIG},1,{@attach %!/INC`PARTIAL=before(%2,/),v(MOGTYPES),|,mogrifier,mogrifier;@select/inline gt(strlen(after(%2,/)),0)=1,{@attach %!/INC`CHANNEL`MOGCONF`SUBCONFIG},0,{@attach %!/INC`CHANNEL`MOGCONF`MAINCONFIG}}

&INC`CHANNEL`MOGCONF`MAINCONFIG [u(cobj,channel)]=@select/inline strlen(%1)=0,{@attach %!/INC`VERIFY={ansi(hr,WARNING:) This will clear the Channel %q<channel> %q<mogrifier> Mogrifier List, which is currently [u(setr,msg,'[get(%q<mog>/MOGUSE`%q<mogrifier>)]'[if(not(hasattr(%q<mog>/MOGUSE`%q<mogrifier>)),%b(inherited))].)] Are you sure? Enter the same command again within ten seconds to continue!},CLEAR %q<mog> %q<mogrifier>;&MOGCONF`%q<mogrifier> %q<mog>;@attach %!/INC`MSG=You clear Channel %q<channel>'s Mogrifier list.;@attach %!/INC`MSG`CHAN=cleared Channel '%q<channel>''s Mogrifier list\, which was %q<msg>},{@check lmath(min,iter(lcstr(%1),match(lcstr(get(%q<mog>/MOGORDER`%q<mogrifier>)),%i0)))=@attach %!/INC`MSG=ERROR: One or more of the entered mogrifier types was not recognized.;th u(setq,oldmog,get(%q<mog>/MOGUSE`%q<mogrifier>),inherited,hasattr(%q<mog>/MOGUSE`%q<mogrifier>));&MOGUSE`%q<mogrifier> %q<mog>=u(setr,newmog,filterbool(#lambda/match(lcstr(%1),\%0),lcstr(get(%q<mog>/MOGORDER`%q<mogrifier>))));@attach %!/INC`MSG=You set Channel %q<channel>'s Mogrifier list to: %q<newmog>;@attach %!/INC`MSG`CHAN=set Channel '%q<channel>''s Mogrifier list\, which was '%q<oldmog>'[if(not(%q<inherited>),%b(inherited))]\, to: %q<newmog>}

Expand Down
Loading

0 comments on commit 385873c

Please sign in to comment.