-
Notifications
You must be signed in to change notification settings - Fork 0
/
Faction System.txt
273 lines (172 loc) · 33.1 KB
/
Faction System.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
@@ Faction System
@skip isdbref(tag(setr(1,fac)))={@assert/inline isdbref(globalroom())=@pemit %#=ERROR: No master room set!;@assert/inline isdbref(setr(0,create(Faction System,,t)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE !NO_COMMAND;@tag/add %q1=%q0;@tel %q0=globalroom()}
@skip isdbref(tag(setr(1,fac_parent)))={@assert/inline isdbref(tag(stor))=@pemit %#=ERROR: No faction system set!;@assert/inline isdbref(setr(0,create(Faction Parent,,t)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE NO_COMMAND;@tag/add %q1=%q0;@tel %q0=[tag(stor)]}
@@ Staff are considered rank 0. Lower numbers are better.
&RANK.1.NAME #fac.parent=Leader
&RANK.1.PERM #fac.parent=
&RANK.1.FLAGS #fac.parent=NODELETE
&RANK.2.NAME #fac.parent=Second
&RANK.2.PERM #fac.parent=
&RANK.2.FLAGS #fac.parent=NODELETE
&RANK.3.NAME #fac.parent=Officer
&RANK.3.PERM #fac.parent=
&RANK.3.FLAGS #fac.parent=NODELETE
&RANK.4.NAME #fac.parent=Member
&RANK.4.PERM #fac.parent=
&RANK.4.FLAGS #fac.parent=NODELETE
&CONFIG.PERM #fac_parent=@assert/inline lte(getfacrank(%2,%#),2)=@pemit %#=Permission denied.
&CONFIG.STARTRANK.DESC #fac_parent=The Rank # for new members.
&CONFIG.STARTRANK.DEFAULT #fac_parent=4
&CONFIG.STARTRANK_VALID #fac_parent=@assert/inline hasattrp(%2/RANK.%0.NAME)=@pemit %#=The '[cname(%2)]' have no such rank.;@assert/inline gte(%0,3)=@pemit %#=Startrank must be 3+.
&CONFIG.STARTRANK.PERM #fac_parent=@assert/inline lte(facrank(%2,%#),2)=@pemit %#=Permission Denied. Only Rank 2 or better can change STARTRANK.
&CONFIG.STARTRANK.TYPE #fac_parent=POSINT
&CONFIG.INVITE.DESC #fac_parent=The Rank you must be at to be able to extend invitations or process applications to join.
&CONFIG.INVITE.DEFAULT #fac_parent=3
&CONFIG.INVITE.PERM #fac_parent=@assert/inline lte(facrank(%2,%#),1)=@pemit %#=Permission Denied. Only Rank 1 or better can change INVITE.
&CONFIG.INVITE.TYPE #fac_parent=INT
&CONFIG.KICK.DESC #fac_parent=The Rank you must be at in order to remove other members who are below your own rank.
&CONFIG.KICK.DEFAULT #fac_parent=2
&CONFIG.KICK.PERM #fac_parent=@assert/inline lte(facrank(%2,%#),1)=@pemit %#=Permission Denied. Only Rank 1 or better can change KICK.
&CONFIG.KICK.TYPE #fac_parent=INT
&CONFIG.CATEGORY.DESC #fac_parent=The Category that this faction belongs to.
&CONFIG.CATEGORY.DEFAULT #fac_parent=Uncategorized
&CONFIG.CATEGORY.PERM #fac_parent=@assert/inline lte(facrank(%2,%#),0)=@pemit %#=Permission Denied. Only Staff may change CATEGORY.
&CONFIG.CATEGORY.TYPE #fac_parent=WORD
&CONFIG.HIDDEN.DESC #fac_parent=If true, the faction can't be seen on public listings. A Hidden faction might be ICly clandestine or secretive, or OOCly kept hidden for code purposes.
&CONFIG.HIDDEN.DEFAULT #fac_parent=1
&CONFIG.HIDDEN.PERM #fac_parent=@assert/inline lte(facrank(%2,%#),0)=@pemit %#=Permission Denied. Only Staff may change HIDDEN.
&CONFIG.HIDDEN.TYPE #fac_parent=BOOL
&CONFIG.CANLEAVE.DESC #fac_parent=If true, members can leave at will. This might be disabled for admin-managed factions.
&CONFIG.CANLEAVE.DEFAULT #fac_parent=1
&CONFIG.CANLEAVE.PERM #fac_parent=@assert/inline lte(facrank(%2,%#),0)=@pemit %#=Permission Denied. Only Staff may change CANLEAVE.
&CONFIG.CANLEAVE.TYPE #fac_parent=BOOL
&CONFIG.TITLESELF.DESC #fac_parent=Can members set their own Faction Titles? If false, anyone of INVITE rank or better can still set the titles of their lessers.
&CONFIG.TITLESELF.DEFAULT #fac_parent=1
&CONFIG.TITLESELF.TYPE #fac_parent=BOOL
&CONFIG.PRIVATE.DESC #fac_parent=If true, only other members can identify members. Membership information is not public.
&CONFIG.PRIVATE.DEFAULT #fac_parent=1
&CONFIG.PRIVATE.PERM #fac_parent=@assert/inline lte(facrank(%2,%#),0)=@pemit %#=Permission Denied. Only Staff may change PRIVATE.
&CONFIG.PRIVATE.TYPE #fac_parent=BOOL
&CONFIG.OPEN.DESC #fac_parent=Whether the public can request to join the group using a command. The group must not be HIDDEN for this to make sense.
&CONFIG.OPEN.DEFAULT #fac_parent=0
&CONFIG.OPEN.PERM #fac_parent=@assert/inline lte(facrank(%2,%#),1)=@pemit %#=Permission Denied. Only Rank 1 may change PRIVATE.
&CONFIG.OPEN.TYPE #fac_parent=BOOL
&CONFIG.ABBREVIATION.DESC #fac_parent=At most 3 letters which uniquely identify this faction. Used for displays and BBS board prefixes.
&CONFIG.ABBREVIATION.DEFAULT #fac_parent=
&CONFIG.ABBREVIATION_VALID #fac_parent=@assert/inline regmatchi(%0,\[A-Za-z\]\{1\,3\})=@pemit %#=ABBREVIATION must be at most 3 letters a-z. No spaces!;@break/inline match(setunion(iter(setdiff(u(FN.FACTIONS),objid(%2)),getconf(%i0,ABBREVIATION),%b,|),,|,|),%0,|)=@pemit %#=Abbreviation conflict detected.
&CONFIG.ABBREVIATION.PERM #fac_parent=@assert/inline lte(facrank(%2,%#),0)=@pemit %#=Permission Denied. Only Staff may change ABBREVIATION.
&CONFIG.ABBREVIATION.TYPE #fac_parent=WORD
@@ Helper functions
&FIL.ABBR #fac=t(strlen(getconf(%0,ABBREVIATION)))
&FN.FACTIONS #fac=if(%0,filter(%!/FIL.ABBR,searchngobjid(TOTEMS=F)),searchngobjid(TOTEMS=F))
&FIL.VISIBLE #fac=if(!getconf(%0,HIDDEN),1,facismember(%0,%1))
&FIL.SELECTABLE #fac=facismember(%0,%1)
&FN.GETABBR #fac=after(grab(iter(u(FN.VISIBLE,%:,1),[getconf(%i0,ABBREVIATION)]~%i0,%b,|),%0~*,|),~)
&GPFN.FACISMEMBER #fac=if(hastotem(%0,FACTION),cor(if(%2,,gtebittype(%1,2)),if(cor(gtebittype(%:,2),!getconf(%0,PRIVATE),match(get(%0/MEMBERS),%:)),cor(t(match(get(%0/MEMBERS),objid(%1))),cand(ortotems(%1,N I),match(get(%1/GAME.FACTIONS),objid(%0)))),0)),0)
@@ %0 - faction object, %1 - member being checked. %2 - don't check for staff.
&GPFN.FACGETRANK #fac=if(facismember(%0,%1,%2),if(cand(!t(%2),gtebittype(%1,2)),0,get_kv(get(%1/FAC.[edit(objid(%0),:,_)]),Rank)))
@@ %0 - faction object, %1 - member to check. %2 - disable staff rank 0 override.
@@ This will return null if %0 is not a faction, or if %1 is not a member or staff.
&FN.VISIBLE #fac=filter(%!/FIL.VISIBLE,u(FN.FACTIONS,%1),%b,%b,objid(%0))
&FN.SELECTABLE #fac=filter(%!/FIL.SELECTABLE,u(FN.FACTIONS,%1),%b,%b,objid(%0))
&FN.MEMBERS #fac=filterobjid(get(%0/MEMBERS))
&FN.RANKMEMBERS #fac=iter(u(FN.MEMBERS,%0),%i0,%i0~[get_kv(get(%i0/FAC.[edit(objid(%0),:,_)]),Rank)],%b,|)
&COMP_RANK #fac=comp(after(%0,~),after(%1,~))
&FN.SORTRANKMEMBERS #fac=sortby(%!/COMP_RANK,u(FN.RANKMEMBERS,%0),|,|)
&FIL.RNK #fac=strfunc(%2,[after(%0,~)] %1)
&FN.RNK #fac=filter(%!/FIL.RNK,u(FN.RANKMEMBERS,%0),|,|,%2,%1)
&FN.GTRANK #fac=u(FN.RNK,%0,%1,gt)
&FN.GTERANK #fac=u(FN.RNK,%0,%1,gte)
&FN.LTRANK #fac=u(FN.RNK,%0,%1,lt)
&FN.LTERANK #fac=u(FN.RNK,%0,%1,lte)
&FN.EQRANK #fac=u(FN.RNK,%0,%1,eq)
&GPFN.FACLISTPERMS #fac=privatize(1,if(facismember(%0,%1,%2),setunion(setunion(if(setr(0,facgetrank(%0,%1,1)),get(%0/RANK.%q0.PERM)),getconf(%0,ALLPERM)),get_kv(get(%1/FAC.[edit(objid(%0),:,_)]),Grant))))
@@ %0 - faction, %1 - member, %2 - disable staff check
&GPFN.FACHASPERM #fac=if(facismember(%0,%1,%3),if(cand(!t(%3),gtebittype(%1,2)),1,t(match(faclistperms(%0,%1),%2))),0)
@@ %0 - faction, %1 - member, %2 - permission. %3 - disable staff check
&FIL.MEMVISIBLE #fac=cand(u(FIL.VISIBLE,%0,%1),if(cand(getconf(%0,PRIVATE),!facismember(%0,%1)),0,1))
&GPFN.FACGETMEMBERSHIPS #fac=filter(%!/FIL.VISIBLE,filterobjid(get(%0/FAC.MEMBERSHIPS)),%b,%b,%:)
@startup #fac=@attach #inc/REGISTER_FUNCTIONS
@@ Global Eval Locks
&LK.FACMEMBER #globobj=if(facismember(before(%1,_),%:),%1,#-1)
&LK.FACHASPERM #globobj=if(fachasperm(before(%1,_),%:,after(%1,_)),%1,#-1)
&LK.FACLTERANK #globobj=privatize(1,if(cand(isint(setr(0,facgetrank(before(%1,_),%:))),lte(%q0,after(%1,_))),%1,#-1))
@@ Command and Logic
&CMD.@FACTION #fac=$^(?s)(?\:@|\+)?(fac|faction)(?\:/(\\S+)?)?(?\: +(.+?))?(?\:=(.*))?$:@attach #inc/GET_SWITCH=%2;@attach %!/SW.[strfirstof(%q<switch>,MAIN)]=trim(%3),%4
@set #fac/CMD.@FACTION=regexp
&SWITCHES.0 #fac=OPTIONS|RENAME|CREATE|SELECT|INVITE|RESCIND|APPLY|CANCEL|ACCEPTINVITE|REJECTINVITE|ACCEPTAPP|REJECTAPP|TITLE|ASSIGN|MKRANK|RNRANK|RMRANK|GRANT|REVOKE|RANKS|LEAVE|KICK
&SWITCHES.5 #fac=CONFIG|DELETE|ADDMEMBER
&CONFIG.PERM #fac=@assert/inline gtebittype(%#,6)=@pemit %#=Permission denied.
&CONFIG.PCQUOTA.DESC #fac=Number of factions an ordinary player can create? Can be 0 for none.
&CONFIG.PCQUOTA.TYPE #fac=INT
&CONFIG.PCQUOTA.DEFAULT #fac=0
&CONFIG.ALLOWRENAME.DESC #fac=Allow faction leaders to rename their faction?
&CONFIG.ALLOWRENAME.TYPE #fac=BOOL
&CONFIG.ALLOWRENAME.DEFAULT #fac=0
&FIND_FACTION #fac=@assert/inline strlen(%0)=@pemit %#=No faction entered.;@assert/inline words(setr(!,u(FN.[if(%2,SELECTABLE,VISIBLE)],%:),%1_choices))=@pemit %#=No viable factions. [if(%2,You can only select factions you belong to.)];@assert/inline isobjid(setr(!,namegrab(r(%1_choices),%0),%1))=@pemit %#=That did not match a valid faction. [if(%2,You can only select factions you belong to.)];
&SW.SELECT #fac=@attach %!/FIND_FACTION=%0,fac,1;@set %#=FACTION:[objid(%q<fac>)];@pemit %#=Selected '[cname(%q<fac>)]' for other faction commands.
&SW.CONFIG #fac=@attach #inc/CONFIG=%0,%1,%!
&CURRENT_FACTION #fac=@assert/inline cand(isobjid(setr(!,get(%#/FACTION),%0)),hastotem(r(%0),FACTION))=@pemit %#=ERROR: You have no faction selected. Use [ansi(hw,@fselect <faction>)] to select one.
&SW.OPTIONS #fac=@attach %!/CURRENT_FACTION=fac;@attach #inc/CONFIG=%0,%1,%q<fac>
&FACTION_ADMIN #fac=gtebittype(%0,5)
&FACTION_CHECK_NAME #fac=@assert/inline strlen(%0)=@pemit %#=Faction name field empty.;@assert/inline valid(name,stripansi(%0))=@pemit %#=That's not a good name for a THING object.;@break/inline isdbref(setr(!,namefind(setdiff(u(FN.GROUPS),%1),stripansi(%0)),exist))=@pemit %#=Name conflict detected.;
&SW.CREATE #fac=@assert/inline or(u(FACTION_ADMIN,%#),cand(getconf(%!,PCQUOTA),!hasflag(%#,GUEST)))=@pemit %#=Permission denied.;@if cand(!u(FACTION_ADMIN,%#),gte(words(filterobjid(get(%#/CREATED_FACTIONS))),getconf(%!,PCQUOTA)))=@pemit %#=You cannot create any more factions. Rename or delete some. Alternatively contact staff to create it for you.;@attach %!/FACTION_CHECK_NAME=%0;@assert/inline isdbref(setr(!,create(stripansi(%0),,t),fac))=@pemit %#=Error creating faction: %q<fac>;@set %q<fac>=SAFE INDESTRUCTIBLE;@parent %q<fac>=[tag(fac_parent)];@tel %q<fac>=[tag(fac_parent)];@totem %q<fac>=FACTION;@if has_markup(%0)={@name/ansi %q<fac>=%0};@if u(FACTION_ADMIN,%#)={@if strlen(%1)={@attach #inc/GET_PLAYER=%1,t1;@attach %!/ADD_MEMBER=%q<fac>,%q<t1>,1}},{@attach %!/ADD_MEMBER=%q<fac>,%:,1;@set %#=CREATED_FACTIONS:[setunion(filterobjid(get(%#/CREATED_FACTIONS)),objid(%q<fac>))]};@pemit %#=You created the faction: '[cname(%q<fac>)]'
&ADD_MEMBER #fac=@dolist/inline MEMBERS MEMBERS.%2={@set %0=%d0:[setunion(filterobjid(get(%0/%d0)),objid(%1))]};@set %1=FAC.[edit(objid(%0),:,_)]:[set_kv(get(%1/FAC.[edit(objid(%0),:,_)]),Rank,%2)];@set %1=FAC.MEMBERSHIPS:[setunion(filterobjid(get(%1/FAC.MEMBERSHIPS)),objid(%0))];@attach %!/SORT_MEMBERS=%0
&REMOVE_MEMBER #fac=@dolist/inline setunion(lattr(%0/MEMBERS*),lattr(%0/GRANT_*))={@set %0=%d0:[setdiff(filterobjid(get(%0/%d0)),objid(%1))]};@wipe %1/FAC.[num(%0)]_*;@attach %!/SORT_MEMBERS=%0
&FN.COMPARE_RANK #fac=comp(get_kv(get(%0/FAC.%q<sfac>),Rank),get_kv(get(%1/FAC.%q<sfac>),Rank)))
&SORT_MEMBERS #fac=th setq(!,edit(objid(%0),:,_),sfac);@set %0=MEMBERS:[sortby(FN.COMPARE_RANK,get(%0/MEMBERS))]
&SW.RENAME #fac=@attach %!/FIND_FACTION=%0,fac,0;@assert/inline cor(u(FACTION_ADMIN,%#),cand(getconf(%!,ALLOWRENAME),lte(facgetrank(%q<fac>,%:),1)))=@pemit %#=Permission denied.;@attach %!/FACTION_CHECK_NAME=%1,%q<fac>;th setq(!,cname(%q<fac>),oldname);@name/ansi %q<fac>=%1;@pemit/list [setunion(get(%q<fac>/MEMBERS),%:)]=%q<oldname>> %k renamed the faction to: [cname(%q<fac>)];@attach #inc/MSG_ALERT=Renamed Faction '%q<oldname>' to: [cname(%q<fac>)]
&SW.DELETE #fac=@attach %!/FIND_FACTION=%0,fac,0;@assert/inline match(name(%q<fac>)|[num(%q<fac>)]|[objid(%q<fac>)],%1,|)=@pemit %#=ERROR: Must enter faction's full name, dbref or objid as second argument to verify.;@attach %!/FACTION_ALERT=Deleted the Faction.;@set %q<fac>=!INDESTRUCTIBLE !SAFE;th setq(!,FAC.[edit(objid(%q<fac>,:,_))],attr);@dolist/inline [get(%q<fac>/MEMBERS)]={@wipe %d0/%q<attr>.*;@pemit %d0=The [cname(%q<fac>)] Faction has been deleted.}
&FN.LIST_COLUMN #fac=ansi(confoverride(%#,COLUMN),printf($-5s $-20s $-21s $-21s $-7s,Dbref,Name,Leader,Second,Onl/Mem))
&FN.IS_PRIVATE #fac=if(getconf(%0,PRIVATE),if(facismember(%0,%1),2,1),0)
&FN.VISIBLE_MEMBER #fac=cor(!cor(getconf(%0,PRIVATE),getconf(%0,HIDDEN)),facismember(%0,%2))
&FN.VISIBLE_MEMBERSHIPS #fac=filter(FN.VISIBLE_MEMBER,get(%0/FAC.MEMBERSHIPS),%b,%b,objid(%0),objid(%1))
@@ %0 - target objid, %1 - viewer objid
&FN.LIST_MEMBERS #fac=if(words(setr(!,filterobjid(get(%0/MEMBERS.%1)),members)),switch(u(FN.IS_PRIVATE,%0,%:),0,iter(%q<members>,cname(%i0),%b,%,%b),1,Private!,\(Private\)%B[iter(%q<members>,cname(%i0),%b,%,%b)]))
&FN.LIST_ROW #fac=printf($-5s $-20s $-21s $-21s $:0:3s/$:0:3s,num(%0),cname(%0),u(FN.LIST_MEMBERS,%0,1),u(FN.LIST_MEMBERS,%0,2),switch(setr(!,u(FN.IS_PRIVATE,%0,%:),pri),1,???,words(setinter(setr(!,filterobjid(get(%0/MEMBERS)),mem),lwhoid(%#)))),switch(%q<pri>,1,???,words(%q<mem>)))
&FN.SORTCATEGORY #fac=comp(getconf(%0,CATEGORY),getconf(%1,CATEGORY),I)
&INC.LIST_FACTIONS #fac=@pemit %#=header(mudname() Factions);@pemit %#=u(FN.LIST_COLUMN);@if words(setr(!,sortname(u(FN.VISIBLE,%:)),fac))={@dolist/inline sortby(FN.SORTCATEGORY,%q<fac>)={@skip strmatch(%q<lastcat>,setr(!,capnames(getconf(%d0,CATEGORY)),lastcat))={@pemit %#=separator(%q<lastcat>)};@pemit %#=u(FN.LIST_ROW,%d0)}};@pemit %#=footer()
&FN.ROSTER.COLUMNS #fac=printf($-23s $-20s $-25s $-6s,Name,Rank,Title,Idle)
&FN.ROSTER.ROW #fac=printf($-23s $-20s $-25s $-6s,cname(%0),get(%1/RANK.[get(%0/FAC.[edit(objid(%1),:,_)].RANK)].NAME),get(%0/FAC.[edit(objid(%1),:,_)].TITLE),hideidle(%0))
&INC.DISPLAY_FACTION #fac=@attach %!/FIND_FACTION=%0,fac,0;@break/inline cand(getconf(%q<fac>,PRIVATE),!facismember(%q<fac>,%:))=@pemit %#=Cannot view the details of a private faction you do not belong to.;@pemit %#=header(cname(%q<fac>));@if strlen(setr(!,get(%q<fac>/DESCRIBE),desc))={@pemit %#=%q<desc>;@pemit %#=subheader()};@pemit %#=ansi(confoverride(%#,COLUMN),u(FN.ROSTER.COLUMNS));@if words(setr(!,get(%q<fac>/MEMBERS),members))={@dolist/inline %q<members>={@pemit %#=u(FN.ROSTER.ROW,%d0,%q<fac>)}};@pemit %#=footer(Objid: [objid(%q<fac>)])
&SW.MAIN #fac=@if strlen(%0)={@attach %!/INC.DISPLAY_FACTION=%0},{@attach %!/INC.LIST_FACTIONS}
&INC.LIST_INVITES #fac=@pemit %#=header(cname(%q<fac> Pending Invitations);@pemit %#=elist(iter(filterobjid(get(%q<fac>/INVITES)),cname(%i0),%b,|),,|);@pemit %#=footer()
&INC.STARTINV #fac=@attach %!/CURRENT_FACTION=fac;@assert/inline lte(setr(!,facgetrank(%q<fac>,%:),myrank),setr(!,getconf(%q<fac>,INVITE),needed))=@pemit %#=Permission Denied. You need Rank %q<needed> or better.;@attach #inc/GET_PLAYER=%0,t1;@break/inline match(get(%q<fac>/MEMBERS),%q<t1>)=@pemit %#=They are already a member!;
&SW.INVITE #fac=@attach %!/INC.STARTINV;@break/inline match(setr(!,filterobjid(get(%q<fac>/INVITES)),data),%:)=@pemit %#=They already have an outstanding invite to the [cname(%q<fac>)].;@set %q<fac>=INVITES:[setunion(%q<data>,%q<t1>)];@pemit %#=You invite [cname(%q<t1>)] to join the [cname(%q<fac>)].;@attach %!/FACTION_ALERT=Invite [cname(%q<t1>)] to join.;@pemit %q<t1>=You have been invited to join the [cname(%q<fac>)]. Type [ansi(hw,@fac/acceptinvite [name(%q<fac>)])] to accept or [ansi(hw,@fac/rejectinvite [name(%q<fac>)])] to reject.
&SW.RESCIND #fac=@attach %!/INC.STARTINV;@assert/inline match(setr(!,filterobjid(get(%q<fac>/INVITES)),data),%:)=@pemit %#=They don't have an outstanding invite to the [cname(%q<fac>)].;@set %q<fac>=INVITES:[setdiff(%q<data>,%q<t1>)];@pemit %#=You rescind [cname(%q<t1>)]'s invitation to join the [cname(%q<fac>)].;@attach %!/FACTION_ALERT=Rescinded [cname(%q<t1>)]'s invite.;@pemit %q<t1>=Your invitation to join the [cname(%q<fac>)] was rescinded.
&INC.GETSTART #fac=@assert/inline hasattrp(%q<fac>/RANK.[setr(!,getconf(%q<fac>,STARTRANK),start)].NAME)=@pemit %#=ERROR: The faction's STARTRANK is not configured properly. Contact leadership or staff.;
&INC.GETINV #fac=@attach %!/FIND_FACTION=%0,fac,0;@break/inline match(get(%q<fac>/MEMBERS),%:)=@pemit %#=You're already a member!;@assert/inline match(setr(!,filterobjid(get(%q<fac>/INVITES)),data),%:)=@pemit %#=You haven't been invited!;
&SW.ACCEPTINVITE #fac=@attach %!/INC.GETINV;@attach %!/INC.GETSTART;@attach %!/ADD_MEMBER=%q<fac>,%:,%q<start>;@set %q<fac>=INVITES:[setdiff(%q<data>,%:)];@pemit %#=You have joined the [cname(%q<fac>)]! Welcome!;@attach %!/FACTION_ALERT=Joined at Rank %q<start>.
&SW.REJECTINVITE #fac=@attach %!/INC.GETINV;@set %q<fac>=INVITES:[setdiff(%q<data>,%:)];@pemit %#=You decline the [cname(%q<fac>)]'s invite! Welcome!;@attach %!/FACTION_ALERT=Declined joining.
&SW.APPLY #fac=@attach %!/FIND_FACTION=%0,fac,0;@assert/inline getconf(%q<fac>,OPEN)=@pemit %#=Sorry, the [cname(%q<fac>)] are not accepting applications right now. You'll need to obtain an invite.;@break/inline match(get(%q<fac>/MEMBERS),%:)=@pemit %#=You're already a member!;@break/inline match(setr(!,filterobjid(get(%q<fac>/APPLICATIONS)),data),%:)=@pemit %#=You have already applied to the [cname(%q<fac>)].;@set %q<fac>=APPLICATIONS:[setunion(%q<data>,%:)];@pemit %#=You apply to join the [cname(%q<fac>)]. A ranking member will have to review.;@attach %!/FACTION_ALERT=Applied to join.
&SW.CANCEL #fac=@attach %!/FIND_FACTION=%0,fac,0;@assert/inline match(setr(!,filterobjid(get(%q<fac>/APPLICATIONS)),data),%:)=@pemit %#=You have not applied to the [cname(%q<fac>)].;@set %q<fac>=APPLICATIONS:[setdiff(%q<data>,%:)];@pemit %#=You withdraw your application to the [cname(%q<fac>)].;@attach %!/FACTION_ALERT=Withdrew application.
&INC.LIST_APPS #fac=@pemit %#=header(cname(%q<fac> Pending Applications);@pemit %#=elist(iter(filterobjid(get(%q<fac>/APPLICATIONS)),cname(%i0),%b,|),,|);@pemit %#=footer()
&INC.GETAPP #fac=@attach #inc/GET_PLAYER=%0,t1;@assert/inline match(setr(!,filterobjid(get(%q<fac>/APPLICATIONS)),data),%q<t1>)=@pemit %#=[cname(%q<t1>)] is not an applicant for the [cname(%q<fac>)]!
&SW.ACCEPTAPP #fac=@attach %!/CURRENT_FACTION=fac;@assert/inline lte(setr(!,facgetrank(%q<fac>,%:),myrank),setr(!,getconf(%q<fac>,INVITE),needed))=@pemit %#=Permission Denied. You need Rank %q<needed> or better.;@if strlen(%0)={@attach %!/INC.GETAPP;@attach %!/INC.GETSTART;@attach %!/ADD_MEMBER=%q<fac>,%q<t1>,%q<start>;@set %q<fac>=APPLICATIONS:[setdiff(%q<data>,%q<t1>)];@pemit %#=You accepted [cname(%q<t1>)]'s application into the [cname(%q<fac>)]!;@pemit %q<t1>=You have joined the [cname(%q<fac>)]! Welcome!;@attach %!/FACTION_ALERT=Accepted [cname(%q<t1>)] at Rank %q<start>.},{@attach %!/INC.LIST_APPS}
&SW.REJECTAPP #fac=@attach %!/CURRENT_FACTION=fac;@assert/inline lte(setr(!,facgetrank(%q<fac>,%:),myrank),setr(!,getconf(%q<fac>,INVITE),needed))=@pemit %#=Permission Denied. You need Rank %q<needed> or better.;@if strlen(%0)={@attach %!/INC.GETAPP;@set %q<fac>=APPLICATIONS:[setdiff(%q<data>,%q<t1>)];@pemit %#=You rejected [cname(%q<t1>)]'s application into the [cname(%q<fac>)]!;@pemit %q<t1>=Your application to the [cname(%q<fac>)] was rejected.;@attach %!/FACTION_ALERT=Rejected [cname(%q<t1>)]'s application.},{@attach %!/INC.LIST_APPS}
&SW.LEAVE #fac=@attach %!/CURRENT_FACTION=fac;@assert/inline getconf(%q<fac>,CANLEAVE)=@pemit %#=Permission denied. CANLEAVE is disabled for the [cname(%q<fac>)]. Only admin may manage membership of this faction.;@attach %!/REMOVE_MEMBER=%q<fac>,%:;@pemit %#=You have left the [cname(%q<fac>)];@attach %!/FACTION_ALERT=Left the faction.
&SW.KICK #fac=@attach %!/CURRENT_FACTION=fac;@assert/inline lte(setr(!,facgetrank(%q<fac>,%:),myrank),getconf(%q<fac>,KICK))=@pemit %#=Permission denied.;@attach #inc/GET_PLAYER=%0,t1;@assert/inline facismember(%q<fac>,%q<t1>,1)=@pemit %#=[cname(%q<t1>)] is not a member!;@assert/inline lt(%q<myrank>,facgetrank(%q<fac>,%q<t1>))=@pemit %#=Can only kick those of inferior rank.;@attach %!/REMOVE_MEMBER=%q<fac>,%q<t1>;@pemit %#=You kicked [cname(%q<t1>)] from the [cname(%q<fac>)]!;@pemit %q<t1>=You've been kicked from the [cname(%q<fac>)]!;@attach %!/FACTION_ALERT=Kicked [cname(%q<t1>)] from the Faction.
&SW.ADDMEMBER #fac=@attach %!/CURRENT_FACTION=fac;@attach #inc/GET_PLAYER=%0,t1;@break/inline facismember(%q<fac>,%q<t1>,1)=@pemit %#=[cname(%q<t1>)] is already a member!;@if strlen(%1)={@attach #inc/VALID.POSINT=%1,rank;@assert/inline hasattrp(%q<fac>/RANK.%q<value>.NAME)=@pemit %#=The [cname(%q<fac>)] lacks that rank.;th setq(!,%q<value>,start)},{@attach %!/INC.GETSTART};@attach %!/ADD_MEMBER=%q<fac>,%q<t1>,%q<start>;@pemit %#=Added [cname(%q<t1>)] to the [cname(%q<fac>)] at Rank %q<start>.;@pemit %q<t1>=You have joined the [cname(%q<fac>)]! Welcome!;@attach %!/FACTION_ALERT=Added [cname(%q<t1>)] at Rank %q<start>.
&SW.TITLE #fac=@attach %!/CURRENT_FACTION=fac;@if strlen(%1)={@attach #inc/GET_PLAYER=%0,t1;th setq(!,%1,title)},{th setq(!,%0,title);th setq(!,%:,t1)};@assert/inline cor(lte(setr(!,facgetrank(%q<fac>,%:),myrank),1),setr(!,getconf(%q<fac>,TITLESELF),titleself),lt(%q<myrank>,getconf(%q<fac>,INVITE)))=@pemit %#=Permission denied. You must meet the INVITE rank or be a Leader to set titles.;@assert/inline lte(facgetrank(%q<fac>,%:),setr(!,getconf(%q<fac>,INVITE),needed))=@pemit %#=Permission Denied. You need Rank %q<needed> or better.;@assert/inline facismember(%q<fac>,%q<t1>)=@pemit %#=[cname(%q<t1>)] is not a member of [cname(%q<fac>)]!;@assert/inline cor(cand(%q<titleself>,strmatch(%:,%q<t1>)),lte(%q<myrank>,1),lt(facgetrank(%q<fac>,%q<t1>),%q<myrank>))=@pemit %#=You have no Factional authority over [cname(%q<t1>)].;th setq(!,default(%q<t1>/FAC.[edit(objid(%q<fac>),:,_)].TITLE,empty!),oldtitle);@if strlen(%q<title>)={@set %q<t1>=FAC.[edit(objid(%q<fac>),:,_)].TITLE:%q<title>;@if strmatch(%:,%q<t1>)={@pemit %#=You set your [cname(%q<fac>)] Title to: '%q<title>'. It was: %q<oldtitle>;@attach %!/FACTION_ALERT=Set own Title to '%q<title>'. Old Title was: %q<oldtitle>},{@pemit %#=Set [cname(%q<t1>)]'s Faction '[cname(%q<fac>)]' Title to: '%q<title>'. It was: %q<oldtitle>;@pemit %q<t1>=Your Faction '[cname(%q<fac>)]' Title was set to: '%q<title>'. It was: %q<oldtitle>;@attach %!/FACTION_ALERT=[cname(%q<t1>)]'s Title was set to: '%q<title>'. It was: %q<oldtitle>}},{@set %q<t1>=FAC.[edit(objid(%q<fac>),:,_)].TITLE:;@if strmatch(%:,%q<t1>)={@pemit %#=You clear your [cname(%q<fac>)] Title. It was: %q<oldtitle>;@attach %!/FACTION_ALERT=Cleared own Title. It was: %q<oldtitle>},{@pemit %#=Cleared [cname(%q<t1>)]'s Faction '[cname(%q<fac>)]' Title. It was: %q<oldtitle>;@pemit %q<t1>=Your Faction '[cname(%q<fac>)]' Title was cleared. It was: %q<oldtitle>;@attach %!/FACTION_ALERT=[cname(%q<t1>)]'s Title was cleared. It was: %q<oldtitle>}}
&SW.ASSIGN #fac=@attach %!/CURRENT_FACTION=fac;@assert/inline lte(setr(!,facgetrank(%q<fac>,%:),myrank),2)=@pemit %#=Permission denied. Requires Rank 2 or better.;@attach #inc/GET_PLAYER=%0,t1;@break/inline strmatch(%q<t1>,%:)=Yeah that's not happening.;@assert/inline facismember(%q<fac>,%q<t1>)=@pemit %#=[cname(%q<t1>)] is not a member of [cname(%q<fac>)]!;@assert/inline lt(setr(!,facgetrank(%q<fac>,%q<t1>),oldrank),%q<myrank>)=@pemit %#=You have no Factional authority over [cname(%q<t1>)].;@attach #inc/VALID.POSINT=%1,Rank;@assert/inline gt(%q<myrank>,%q<value>)=@pemit %#=Can only assign ranks lesser than your own.;@set %q<fac>=MEMBERS.%q<oldrank>:[listdiff(filterobjid(get(%q<fac>/MEMBERS.%q<oldrank>)),%q<t1>)];@set %q<fac>=MEMBERS.%q<value>:[sortname(setunion(filterobjid(get(%q<fac>/MEMBERS.%q<value>)),%q<t1>))];@set %q<t1>=FAC.[edit(objid(%q<fac>),:,_)]:[set_kv(get(%q<t1>/FAC.[edit(objid(%q<fac>),:,_)]),Rank,%q<value>)];@attach %!/SORT_MEMBERS=%q<fac>;@pemit %#=You change [cname(%q<t1>)]'s Faction '[cname(%q<fac>)]' Rank to: %q<value>. Was: %q<oldrank>;@pemit %q<t1>=Your Faction '[cname(%q<fac>)]' Rank is now: %q<value>.;@attach %!/FACTION_ALERT=Changed [cname(%q<t1>)]'s Rank to: %q<value>. Was: %q<oldrank>
&SW.MKRANK #fac=@attach %!/CURRENT_FACTION=fac;@assert/inline lte(facgetrank(%q<fac>,%:),1)=@pemit %#=Permission denied. Leader-only.;@assert/inline isint(%0)=@pemit %#=Must enter a rank #.;@break/inline hasattrp(%q<fac>/RANK.%0.%NAME)=@pemit %#=Rank already exists. Use /rnrank to rename it instead.;@assert/inline strlen(%1)=@pemit %#=What will you call the rank?;@set %q<fac>=RANK.%0.NAME:%1;@pemit %#=Rank %0: '%1' created for the [cname(%q<fac>)];@attach %!/FACTION_ALERT=Created Rank %0: %1
&SW.RNRANK #fac=@attach %!/CURRENT_FACTION=fac;@assert/inline lte(facgetrank(%q<fac>,%:),1)=@pemit %#=Permission denied. Leader-only.;@assert/inline isint(%0)=@pemit %#=Must enter a rank #.;@assert/inline hasattrp(%q<fac>/RANK.%0.NAME)=@pemit %#=Rank does not exist. Use /mknrank to rename it.;@set %q<fac>=RANK.%0.NAME:%1;@pemit %#=Rank %0: '%1' created for the [cname(%q<fac>)];@attach %!/FACTION_ALERT=Renamed Rank %0 to: %1
&SW.RMRANK #fac=@attach %!/CURRENT_FACTION=fac;@assert/inline lte(facgetrank(%q<fac>,%:),1)=@pemit %#=Permission denied. Leader-only.;@assert/inline isint(%0)=@pemit %#=Must enter a rank #.;@break/inline lte(%0,4)=@pemit %#=The built-in ranks 1-4 cannot be deleted.;@assert/inline hasattr(%q<fac>/RANK.%0.%NAME)=@pemit %#=Rank does not exist.;@break/inline words(filterobjid(get(%q<fac>/MEMBERS.%0)))=@pemit %#=Rank %0 has members! Change their ranks with /assign first.;@wipe %q<fac>/RANK.%0.*;@pemit %#=Rank %0 deleted from the [cname(%q<fac>)];@attach %!/FACTION_ALERT=Deleted Rank %0
®_PERM #fac=[A-Za-z]{2,16}
&FN.VALID_PERM #fac=if(regmatchi(%0,v(REG_PERM)),1,#-1 PERMS MUST BE ALPHABETICAL. Between 2 and 16 Characters. No spaces.)
&INC.LIST_GRANTS #fac=@pemit %#=header(cname(%0): Rank Permissions);@if words(setr(!,lattrp(%0/RANK.*.PERM),grants))={@dolist/inline %q<grants>={@pemit %#=[ansi(hw,Rank [elementsmux(%d0,2,_)]: )][get(%0/%d0)]}};@if words(setr(!,lattrp(%0/GRANT_*),grants))={@pemit %#=separator(Explicit Grants);@dolist/inline %q<grants>={@pemit %#=[ansi(hw,[after(%d0,_)]:]%B[iter(sortname(filterobjid(get(%0/%d0))),cname(%i0),%b,\,%B)]}};@pemit %#=footer()
&INC.GRANT_PERM #fac=@assert/inline cand(strlen(%2),lmin(iter(%2,u(FN.VALID_PERM,%i0))))=@pemit %#=Your perm string did not validate. It can be a list of one of more permissions which are purely alphabetical and between 2-6 characters.;@if cand(isint(strlen(%1)),hasattrp(%0/RANK.%1.NAME))={@set %0=RANK.%1.PERM:[setunion(get(%0/RANK.%1.PERM),ucstr(%2))];@pemit %#=Permissions added to Faction '[cname(%0)]' Rank %1: %2;@attach #inc/MSG_ALERT=Permissions added to Faction '[cname(%0)]' Rank %1: %2;@attach %!/FACTION_ALERT=Permissions added to Faction '[cname(%0)]' Rank %1: %2},{@attach #inc/GET_PLAYER=%1,t1;@assert/inline match(get(%0/MEMBERS),%q<t1>)=@pemit %#=They are not a member!;@dolist/inline %2=%d0:[setunion(filterobjid(get(%0/%d0)),%q<t1>)];@set %q<t1>=FAC.[edit(objid(%0),:,_)]:[set_kv(get(%q<t1>/FAC.[edit(objid(%0),:,_)]),Rank,setunion(get_kv(get(%q<t1>/FAC.[edit(objid(%0),:,_)]),Rank),ucstr(%2)))];@pemit %#=Faction '[cname(%0)]' Permissions added to Member '[cname(%q<t1>)]': %2;@pemit %q<t1>=You have gained the following Faction '[cname(%0)]' Permissions: %2;@attach %!/FACTION_ALERT=Faction '[cname(%0)]' Permissions added to Member '[cname(%q<t1>)]': %2}
@@ %0 - fac, %1 target, %2 - permstring.
&SW.GRANT #fac=@attach %!/CURRENT_FACTION=fac;@assert/inline lte(facgetrank(%q<fac>,%:),setr(!,getconf(%q<fac>,INVITE),needed))=@pemit %#=Permission Denied. You need Rank %q<needed> or better.;@if strlen(%0)={@attach %!/INC.GRANT_PERM=%q<fac>,%0,%1},{@attach %!/INC.LIST_GRANTS=%q<fac>}
&INC.REVOKE_PERM #fac=@assert/inline cand(strlen(%2),lmin(iter(%2,u(FN.VALID_PERM,%i0))))=@pemit %#=Your perm string did not validate. It can be a list of one of more permissions which are purely alphabetical and between 2-6 characters.;@if cand(isint(strlen(%1)),hasattrp(%0/RANK.%1.NAME))={@set %0=RANK.%1.PERM:[setdiff(get(%0/RANK.%1.PERM),ucstr(%2))];@pemit %#=Permissions removed from Faction '[cname(%0)]' Rank %1: %2;@attach #inc/MSG_ALERT=Permissions removed from Faction '[cname(%0)]' Rank %1: %2;@attach %!/FACTION_ALERT=removed from Faction '[cname(%0)]' Rank %1: %2},{@attach #inc/GET_PLAYER=%1,t1;@assert/inline match(get(%0/MEMBERS),%q<t1>)=@pemit %#=They are not a member!;@dolist/inline %2=%d0:[setdiff(filterobjid(get(%0/%d0)),%q<t1>)];@set %q<t1>=FAC.[edit(objid(%0),:,_)]:[set_kv(get(%q<t1>/FAC.[edit(objid(%0),:,_)]),Rank,setdiff(get_kv(get(%q<t1>/FAC.[edit(objid(%0),:,_)]),Rank),ucstr(%2)))];@pemit %#=Faction '[cname(%0)]' Permissions removed from Member '[cname(%q<t1>)]': %2;@pemit %q<t1>=You have lost the following Faction '[cname(%0)]' Permissions: %2;@attach %!/FACTION_ALERT=Faction '[cname(%0)]' Permissions removed from Member '[cname(%q<t1>)]': %2}
&SW.REVOKE #fac=@attach %!/CURRENT_FACTION=fac;@assert/inline lte(facgetrank(%q<fac>,%:),setr(!,getconf(%q<fac>,INVITE),needed))=@pemit %#=Permission Denied. You need Rank %q<needed> or better.;@if strlen(%0)={@attach %!/INC.REVOKE_PERM=%q<fac>,%0,%1},{@attach %!/INC.LIST_GRANTS=%q<fac>}
&FN.RANK_COLUMN #fac=printf($-3s $-20s $-40s,Num,Name,Perms)
&FN.RANK_ROW #fac=printf($-3s $-20s $-40s,%1,default(%0/RANK.%1.NAME,??),get(%0/RANK.%1.PERM))
&SW.RANKS #fac=@attach %!/CURRENT_FACTION=fac;@pemit %#=header(cname(%q<fac>): Ranks);@pemit %#=ansi(confoverride(%#,COLUMN),u(FN.RANK_COLUMN));@if words(setr(!,sort(iter(lattrp(%q<fac>/RANK.*.NAME),elementsmux(%i0,2,_))),ranks))={@dolist/inline %q<ranks>={@pemit %#=u(FN.RANK_ROW,%q<fac>,%d0)}};@pemit %#=footer()
&FACLOCKS #fac=[ansi(hc,Faction Locks)]%R%RFor restricting game resources to faction access, three eval Lock Keys are provided.%R%R[ansi(hw,LK.FACMEMBER/<factiondbref>)]%R%TCheck to see if the person is a faction member.%R%R[ansi(hw,LK.FACHASPERM/<factiondbref>_<PERMNAME>)]%R%TCheck to see if the person has a specific permission.%R%R[ansi(hw,LK.FACLTERANK/<factiondbref>_<rank#>)]%R%TCheck to see if the person has rank # or better.%R%RExample: [ansi(hw,@lock north=LK.FACMEMBER/#5)], [ansi(hw,@lock north=LK.FACHASPERM/#5_HQACCESS)], and [ansi(hw,@lock north=LK.FACLTERANK/#5_2)]
&HLP_@FACTION #fac=The Faction System is meant to represent all manner of groups, organizations, guilds, agencies, and similar, and may also be useful for some out-of-character organization as well.%R%R[ansi(hc,Aliases:)]%B@fac, @faction, +fac, +faction%R%R[ansi(hc,Concepts)]%R%R[ansi(hw,Rank:)] All group members have a Rank. Leaders are Rank 1. Second in Command is rank 2. By default, Ranks 3 and 4 are Officer and Member. New Ranks at 5+ can be created or destroyed by leader. All Rank names can be changed.%R%R[ansi(hw,Permissions:)] Ranks and individual members may be granted PERMISSIONS, which are checked by locks. These have no other purpose.%R%R[ansi(hc,Administration Commands)]%R%R[ansi(hw,@fac \[<faction>\])]%R%TWithout arguments, view all visible factions. With, view a given faction's roster and details.%R%R[ansi(hw,@fac/create <name>)]%R%TCreate a Faction and become its leader.%R%R[ansi(hw,@fac/rename <faction>=<new name>)]%R%TRename a faction.%R%R[ansi(hw,@fac/select <faction>)]%R%T'Select' a faction. This will be used by numerous other commands.%R%R[ansi(hc,With a Faction Selected)]%R%R[ansi(hw,@fac/options \[<option>=<value>\])]%R%TWithout arguments, view current options. With, set new values, if you have permissions.%R%R[ansi(hw,@fac/ranks)]%R%TDisplay information about a faction's ranks.%R%R[ansi(hw,@fac/mkrank <number>=<name>)]%R%TCreate a new Rank and set its name.%R%R[ansi(hw,@fac/rnrank <number>=<name>)]%R%TRename a Rank.%R%R[ansi(hw,@fac/rmrank <number>)]%R%TDelete a Rank. There must not be any members at the rank, nor can it be the STARTRANK.%R%R[ansi(hw,@fac/invite \[<player>\])]%R%TExtend an invitation to join the group to <player>. Without arguments, display pending Invitations.%R%R[ansi(hw,@fac/rescind <player>)]%R%TRescind an outstanding invitation.%R%R[ansi(hw,@fac/leave)]%R%TLeave the selected Faction.%R%R[ansi(hw,@fac/kick <player>)]%R%TRemove a player from the Faction.%R%R[ansi(hw,@fac/acceptapp \[<player>\])]%R%TAccept a player's application to join. Without arguments, display pending applications.%R%R[ansi(hw,@fac/rejectapp <player>)]%R%TReject a pending application.%R%R[ansi(hw,@fac/title <title>)] or [ansi(hw,@fac/title <player>=<title>)]%R%TSet a title. The first form sets your own title, the latter can set another member's title.%R%R[ansi(hw,@fac/grant <rank or member>=<permission list>)]%R%TGrant Permissions to a specific member or to a rank. Ex: @fac/grant 3=HQENTRY RADIO%R%R[ansi(hw,@fac/revoke <rank or member>=<permission list>)]%R%TRemoves Permissions from a specific member or rank.%R%R[ansi(hw,Utility Commands)]%R%R[ansi(hw,@fac/apply <faction>)]%R%TApply to join a faction.%R%R[ansi(hw,@fac/cancel <faction>)]%R%TWithdraw your application to join.%R%R[ansi(hw,@fac/acceptinvite <faction>)]%R%TAccept an invitation into a Faction.%R%R[u(FACLOCKS)]
+help/add Community/@faction=#fac/HLP_@FACTION
+help/summary @faction=Organized Groups/Guilds/Gangs/etc.
&SHLP_@FACTION #fac=Note: Staff are considered Rank 0 and to be pseudo-members of all Factions with all possible Permissions.%R%ROnly Staff may set certain @fac/options.%R%R[ansi(hc,Administration Commands)]%R%R[ansi(hw,@fac/create <faction>=<player>)]%R%TCreate a Faction with <player> as the Leader.%R%R[ansi(hw,@fac/config \[<option>=<value>)\])]%R%TConfigure the Faction system itself.%R%R[ansi(hw,@fac/delete <faction>=<verify>)]%R%TDelete a Faction. CAREFUL WITH THIS.%R%R[ansi(hw,@fac/addmember <player>=<rank>)]%R%TWith a Faction Selected, arbitrarily add a new member.
+shelp/add Community/@faction=#fac/SHLP_@FACTION
+shelp/summary @faction=Organized Groups/Guilds/Gangs/etc.