3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-28 13:42:37 +01:00

docs/modelists: use a different color to represent modes implemented as extbans and vice versa

[skip ci]
This commit is contained in:
James Lu 2017-10-05 19:32:57 -07:00
parent 61fe97b646
commit 0ad2bc2f7b
5 changed files with 18 additions and 15 deletions

View File

@ -48,7 +48,7 @@ owner,,"q (m_customprefix, m_chanprotect)",,y (when enabled),y (when enabled),q,
paranoia,,,,,,,,,,,p*,
permanent,,P (m_permchannels),P,P,P,P,z,,,,,P
private,p,p,p*,p*,p*,p,p,p,p,p*,p*,p
quiet,,,q,q,q,,,,,,,
quiet,,(via extban m:),q,q,q,(via extban ~q:),(via extban ~q:),,,,,
redirect,,L (m_redirect),f,f,f,L,L,,,,,
registered,,r (m_services_account),,,,r,R,R,R,,r,r
regmoderated,,M (m_services_account),,,,M,M,M,,,M,M

1 Channel Mode / IRCd RFC 1459 InspIRCd charybdis Elemental-IRCd ChatIRCd UnrealIRCd Nefarious snircd IRCu ircd-ratbox IRCd-Hybrid ngIRCd
48 paranoia p*
49 permanent P (m_permchannels) P P P P z P
50 private p p p* p* p* p p p p p* p* p
51 quiet (via extban m:) q q q (via extban ~q:) (via extban ~q:)
52 redirect L (m_redirect) f f f L L
53 registered r (m_services_account) r R R R r r
54 regmoderated M (m_services_account) M M M M M

View File

@ -235,7 +235,7 @@ td:first-child, th[scope="row"] {
<td class="tablecell-yes">+p</td><td class="tablecell-yes">+p</td><td class="tablecell-yes2">+p*</td><td class="tablecell-yes2">+p*</td><td class="tablecell-yes2">+p*</td><td class="tablecell-yes">+p</td><td class="tablecell-yes">+p</td><td class="tablecell-yes">+p</td><td class="tablecell-yes">+p</td><td class="tablecell-yes2">+p*</td><td class="tablecell-yes2">+p*</td><td class="tablecell-yes">+p</td></tr>
<tr>
<th scope="row">quiet</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-yes">+q</td><td class="tablecell-yes">+q</td><td class="tablecell-yes">+q</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<td class="tablecell-na note">n/a</td><td class="tablecell-partial">(via extban m:)</td><td class="tablecell-yes">+q</td><td class="tablecell-yes">+q</td><td class="tablecell-yes">+q</td><td class="tablecell-partial">(via extban ~q:)</td><td class="tablecell-partial">(via extban ~q:)</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<tr>
<th scope="row">redirect</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-special">+L<br><span class="note">(m_redirect)</span></td><td class="tablecell-yes">+f</td><td class="tablecell-yes">+f</td><td class="tablecell-yes">+f</td><td class="tablecell-yes">+L</td><td class="tablecell-yes">+L</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>

View File

@ -32,4 +32,4 @@ ban_server,$s:,s:,,
ban_stripcolor,,S:,,
ban_unregistered_mark,,,,~M:
ban_unregistered_matching,,U:,,
quiet,+q (cmode),m:,~q:,~q:
quiet,(via cmode +q),m:,~q:,~q:

1 Extban / IRCd charybdis InspIRCd UnrealIRCd Nefarious
32 ban_stripcolor S:
33 ban_unregistered_mark ~M:
34 ban_unregistered_matching U:
35 quiet +q (cmode) (via cmode +q) m: ~q: ~q:

View File

@ -179,7 +179,7 @@ td:first-child, th[scope="row"] {
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">U:</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<tr>
<th scope="row">quiet</th>
<td class="tablecell-special">+q<br><span class="note">(cmode)</span></td><td class="tablecell-yes">m:</td><td class="tablecell-yes">~q:</td><td class="tablecell-yes">~q:</td></tr>
<td class="tablecell-partial">(via cmode +q)</td><td class="tablecell-yes">m:</td><td class="tablecell-yes">~q:</td><td class="tablecell-yes">~q:</td></tr>
</table>

View File

@ -22,18 +22,21 @@ def _write(outf, text):
def _format(articlename, text):
# More formatting
if text:
if 'modes' in articlename:
text = '+' + text
try:
text, note = text.split(' ', 1)
except ValueError:
if text.endswith('*'):
text = '<td class="tablecell-yes2">%s</td>' % text
else:
text = '<td class="tablecell-yes">%s</td>' % text
if text.startswith('('):
text = '<td class="tablecell-partial">%s</td>' % text
else:
text = '%s<br><span class="note">%s</span>' % (text, note)
text = '<td class="tablecell-special">%s</td>' % text
if 'modes' in articlename:
text = '+' + text
try:
text, note = text.split(' ', 1)
except ValueError:
if text.endswith('*'):
text = '<td class="tablecell-yes2">%s</td>' % text
else:
text = '<td class="tablecell-yes">%s</td>' % text
else:
text = '%s<br><span class="note">%s</span>' % (text, note)
text = '<td class="tablecell-special">%s</td>' % text
else:
text = '<td class="tablecell-na note">n/a</td>'
return text