From 7230aaa7dfcfa4f48c59db8cbdb9b17daf423577 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 24 Aug 2017 01:07:50 -0700 Subject: [PATCH] Add extbans docs (#498) --- docs/modelists/extbans.csv | 33 +++++ docs/modelists/extbans.html | 180 ++++++++++++++++++++++++++++ docs/modelists/modelists-genhtml.py | 45 ++++--- 3 files changed, 240 insertions(+), 18 deletions(-) create mode 100644 docs/modelists/extbans.csv create mode 100644 docs/modelists/extbans.html diff --git a/docs/modelists/extbans.csv b/docs/modelists/extbans.csv new file mode 100644 index 0000000..1185df0 --- /dev/null +++ b/docs/modelists/extbans.csv @@ -0,0 +1,33 @@ +Extban / IRCd,charybdis,InspIRCd,UnrealIRCd +ban_account,$a:,R:,~a: +ban_account_legacy,,,~R: +ban_all_opers,$o,, +ban_all_registered,$a,, +ban_all_ssl,$z,, +ban_banshare,$j:,, +ban_blockcaps,,B:, +ban_blockcolor,,c:, +ban_certfp,,z:,~S: +ban_extgecos,$x:,, +ban_inchannel,$c:,j:,~c: +ban_invites,,A:, +ban_noctcp,,C:, +ban_nojoins,,,~j: +ban_nokicks,,Q:, +ban_nonick,,N:,~n: +ban_nonotice,,T:, +ban_not_account,$~a:,, +ban_not_banshare,$~j:,, +ban_not_extgecos,$~x:,, +ban_not_inchannel,$~c:,, +ban_not_opers,$~o,, +ban_not_realname,$~r:,, +ban_not_server,$~s:,, +ban_not_ssl,$~z,, +ban_opertype,,O:,~O: +ban_partmsgs,,p:, +ban_realname,$r:,r:,~r: +ban_server,$s:,s:, +ban_stripcolor,,S:, +ban_unregistered_matching,,U:, +quiet,+q (cmode),m:,~q: diff --git a/docs/modelists/extbans.html b/docs/modelists/extbans.html new file mode 100644 index 0000000..6d85ad2 --- /dev/null +++ b/docs/modelists/extbans.html @@ -0,0 +1,180 @@ + + + + + + + +Support Extbans for PyLink Relay + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Extban / IRCdcharybdisInspIRCdUnrealIRCd
ban_account$a:dataR:data~a:data
ban_account_legacyn/an/a~R:data
ban_all_opers$on/an/a
ban_all_registered$an/an/a
ban_all_ssl$zn/an/a
ban_banshare$j:datan/an/a
ban_blockcapsn/aB:datan/a
ban_blockcolorn/ac:datan/a
ban_certfpn/az:data~S:data
ban_extgecos$x:datan/an/a
ban_inchannel$c:dataj:data~c:data
ban_invitesn/aA:datan/a
ban_noctcpn/aC:datan/a
ban_nojoinsn/an/a~j:data
ban_nokicksn/aQ:datan/a
ban_nonickn/aN:data~n:data
ban_nonoticen/aT:datan/a
ban_not_account$~a:datan/an/a
ban_not_banshare$~j:datan/an/a
ban_not_extgecos$~x:datan/an/a
ban_not_inchannel$~c:datan/an/a
ban_not_opers$~on/an/a
ban_not_realname$~r:datan/an/a
ban_not_server$~s:datan/an/a
ban_not_ssl$~zn/an/a
ban_opertypen/aO:data~O:data
ban_partmsgsn/ap:datan/a
ban_realname$r:datar:data~r:data
ban_server$s:datas:datan/a
ban_stripcolorn/aS:datan/a
ban_unregistered_matchingn/aU:datan/a
quiet+q
(cmode)
m:data~q:data
+ + \ No newline at end of file diff --git a/docs/modelists/modelists-genhtml.py b/docs/modelists/modelists-genhtml.py index 053839a..835a2e8 100755 --- a/docs/modelists/modelists-genhtml.py +++ b/docs/modelists/modelists-genhtml.py @@ -11,13 +11,38 @@ os.chdir(os.path.dirname(__file__)) FILES = { 'user-modes.csv': 'Supported User Modes for PyLink', - 'channel-modes.csv': 'Supported Channel Modes for PyLink' + 'channel-modes.csv': 'Supported Channel Modes for PyLink', + 'extbans.csv': 'Support Extbans for PyLink Relay', } def _write(outf, text): print(text, end='') outf.write(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 = '%s' % text + elif 'extbans' in articlename: + if text.endswith(':'): + text = '%sdata' % text + else: # Arg-less extban + text = '%s' % text + else: + text = '%s' % text + else: + text = '%s
%s' % (text, note) + text = '%s' % text + else: + text = 'n/a' + return text + for fname, title in FILES.items(): outfname = os.path.splitext(fname)[0] + '.html' print('Generating HTML for %s to %s:' % (fname, outfname)) @@ -119,23 +144,7 @@ td:first-child, th[scope="row"] { elif colidx == 0: text = '%s\n' % coltext else: - # More formatting - if coltext: - coltext = '+' + coltext - - try: - coltext, note = coltext.split(' ', 1) - except ValueError: - if coltext.endswith('*'): - text = '%s' % coltext - else: - text = '%s' % coltext - else: - coltext = '%s
%s' % (coltext, note) - text = '%s' % coltext - else: - text = 'n/a' - + text = _format(fname, coltext) _write(outf, text) _write(outf, "\n")