3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 12:12:53 +01:00

p10: add support for nefarious2 extbans

Closes #524.
This commit is contained in:
James Lu 2017-08-31 14:52:03 -07:00
parent 7f112e3c66
commit 74ae6fd7c0
3 changed files with 88 additions and 65 deletions

View File

@ -1,33 +1,35 @@
Extban / IRCd,charybdis,InspIRCd,UnrealIRCd Extban / IRCd,charybdis,InspIRCd,UnrealIRCd,Nefarious
ban_account,$a:,R:,~a: ban_account,$a:,R:,~a:,~a:
ban_account_legacy,,,~R: ban_account_legacy,,,~R:,
ban_all_opers,$o,, ban_all_opers,$o,,,
ban_all_registered,$a,, ban_all_registered,$a,,,
ban_all_ssl,$z,, ban_all_ssl,$z,,,
ban_banshare,$j:,, ban_banshare,$j:,,,~j:
ban_blockcaps,,B:, ban_blockcaps,,B:,,
ban_blockcolor,,c:, ban_blockcolor,,c:,,
ban_certfp,,z:,~S: ban_certfp,,z:,~S:,
ban_extgecos,$x:,, ban_extgecos,$x:,,,
ban_inchannel,$c:,j:,~c: ban_inchannel,$c:,j:,~c:,~c:
ban_invites,,A:, ban_invites,,A:,,
ban_noctcp,,C:, ban_mark,,,,~m:
ban_nojoins,,,~j: ban_noctcp,,C:,,
ban_nokicks,,Q:, ban_nojoins,,,~j:,
ban_nonick,,N:,~n: ban_nokicks,,Q:,,
ban_nonotice,,T:, ban_nonick,,N:,~n:,~n:
ban_not_account,$~a:,, ban_nonotice,,T:,,
ban_not_banshare,$~j:,, ban_not_account,$~a:,,,
ban_not_extgecos,$~x:,, ban_not_banshare,$~j:,,,
ban_not_inchannel,$~c:,, ban_not_extgecos,$~x:,,,
ban_not_opers,$~o,, ban_not_inchannel,$~c:,,,
ban_not_realname,$~r:,, ban_not_opers,$~o,,,
ban_not_server,$~s:,, ban_not_realname,$~r:,,,
ban_not_ssl,$~z,, ban_not_server,$~s:,,,
ban_opertype,,O:,~O: ban_not_ssl,$~z,,,
ban_partmsgs,,p:, ban_opertype,,O:,~O:,
ban_realname,$r:,r:,~r: ban_partmsgs,,p:,,
ban_server,$s:,s:, ban_realname,$r:,r:,~r:,~r:
ban_stripcolor,,S:, ban_server,$s:,s:,,
ban_unregistered_matching,,U:, ban_stripcolor,,S:,,
quiet,+q (cmode),m:,~q: ban_unregistered_mark,,,,~M:
ban_unregistered_matching,,U:,,
quiet,+q (cmode),m:,~q:,~q:

1 Extban / IRCd charybdis InspIRCd UnrealIRCd Nefarious
2 ban_account $a: R: ~a: ~a:
3 ban_account_legacy ~R:
4 ban_all_opers $o
5 ban_all_registered $a
6 ban_all_ssl $z
7 ban_banshare $j: ~j:
8 ban_blockcaps B:
9 ban_blockcolor c:
10 ban_certfp z: ~S:
11 ban_extgecos $x:
12 ban_inchannel $c: j: ~c: ~c:
13 ban_invites A:
14 ban_noctcp ban_mark C: ~m:
15 ban_nojoins ban_noctcp C: ~j:
16 ban_nokicks ban_nojoins Q: ~j:
17 ban_nonick ban_nokicks N: Q: ~n:
18 ban_nonotice ban_nonick T: N: ~n: ~n:
19 ban_not_account ban_nonotice $~a: T:
20 ban_not_banshare ban_not_account $~j: $~a:
21 ban_not_extgecos ban_not_banshare $~x: $~j:
22 ban_not_inchannel ban_not_extgecos $~c: $~x:
23 ban_not_opers ban_not_inchannel $~o $~c:
24 ban_not_realname ban_not_opers $~r: $~o
25 ban_not_server ban_not_realname $~s: $~r:
26 ban_not_ssl ban_not_server $~z $~s:
27 ban_opertype ban_not_ssl $~z O: ~O:
28 ban_partmsgs ban_opertype p: O: ~O:
29 ban_realname ban_partmsgs $r: r: p: ~r:
30 ban_server ban_realname $s: $r: s: r: ~r: ~r:
31 ban_stripcolor ban_server $s: S: s:
32 ban_unregistered_matching ban_stripcolor U: S:
33 quiet ban_unregistered_mark +q (cmode) m: ~q: ~M:
34 ban_unregistered_matching U:
35 quiet +q (cmode) m: ~q: ~q:

View File

@ -76,103 +76,110 @@ td:first-child, th[scope="row"] {
<th scope="col">charybdis</th> <th scope="col">charybdis</th>
<th scope="col">InspIRCd</th> <th scope="col">InspIRCd</th>
<th scope="col">UnrealIRCd</th> <th scope="col">UnrealIRCd</th>
<th scope="col">Nefarious</th>
</tr> </tr>
<tr> <tr>
<th scope="row">ban_account</th> <th scope="row">ban_account</th>
<td class="tablecell-yes">$a:<span class="note">data</span></td><td class="tablecell-yes">R:<span class="note">data</span></td><td class="tablecell-yes">~a:<span class="note">data</span></td></tr> <td class="tablecell-yes">$a:<span class="note">data</span></td><td class="tablecell-yes">R:<span class="note">data</span></td><td class="tablecell-yes">~a:<span class="note">data</span></td><td class="tablecell-yes">~a:<span class="note">data</span></td></tr>
<tr> <tr>
<th scope="row">ban_account_legacy</th> <th scope="row">ban_account_legacy</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-yes">~R:<span class="note">data</span></td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-yes">~R:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr>
<tr> <tr>
<th scope="row">ban_all_opers</th> <th scope="row">ban_all_opers</th>
<td class="tablecell-yes2">$o</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes2">$o</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> <tr>
<th scope="row">ban_all_registered</th> <th scope="row">ban_all_registered</th>
<td class="tablecell-yes2">$a</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes2">$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> <tr>
<th scope="row">ban_all_ssl</th> <th scope="row">ban_all_ssl</th>
<td class="tablecell-yes2">$z</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes2">$z</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> <tr>
<th scope="row">ban_banshare</th> <th scope="row">ban_banshare</th>
<td class="tablecell-yes">$j:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes">$j:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-yes">~j:<span class="note">data</span></td></tr>
<tr> <tr>
<th scope="row">ban_blockcaps</th> <th scope="row">ban_blockcaps</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">B:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-yes">B:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<tr> <tr>
<th scope="row">ban_blockcolor</th> <th scope="row">ban_blockcolor</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">c:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-yes">c:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<tr> <tr>
<th scope="row">ban_certfp</th> <th scope="row">ban_certfp</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">z:<span class="note">data</span></td><td class="tablecell-yes">~S:<span class="note">data</span></td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-yes">z:<span class="note">data</span></td><td class="tablecell-yes">~S:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr>
<tr> <tr>
<th scope="row">ban_extgecos</th> <th scope="row">ban_extgecos</th>
<td class="tablecell-yes">$x:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes">$x:<span class="note">data</span></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> <tr>
<th scope="row">ban_inchannel</th> <th scope="row">ban_inchannel</th>
<td class="tablecell-yes">$c:<span class="note">data</span></td><td class="tablecell-yes">j:<span class="note">data</span></td><td class="tablecell-yes">~c:<span class="note">data</span></td></tr> <td class="tablecell-yes">$c:<span class="note">data</span></td><td class="tablecell-yes">j:<span class="note">data</span></td><td class="tablecell-yes">~c:<span class="note">data</span></td><td class="tablecell-yes">~c:<span class="note">data</span></td></tr>
<tr> <tr>
<th scope="row">ban_invites</th> <th scope="row">ban_invites</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">A:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-yes">A:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<tr>
<th scope="row">ban_mark</th>
<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-yes">~m:<span class="note">data</span></td></tr>
<tr> <tr>
<th scope="row">ban_noctcp</th> <th scope="row">ban_noctcp</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">C:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-yes">C:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<tr> <tr>
<th scope="row">ban_nojoins</th> <th scope="row">ban_nojoins</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-yes">~j:<span class="note">data</span></td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td><td class="tablecell-yes">~j:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr>
<tr> <tr>
<th scope="row">ban_nokicks</th> <th scope="row">ban_nokicks</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">Q:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-yes">Q:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<tr> <tr>
<th scope="row">ban_nonick</th> <th scope="row">ban_nonick</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">N:<span class="note">data</span></td><td class="tablecell-yes">~n:<span class="note">data</span></td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-yes">N:<span class="note">data</span></td><td class="tablecell-yes">~n:<span class="note">data</span></td><td class="tablecell-yes">~n:<span class="note">data</span></td></tr>
<tr> <tr>
<th scope="row">ban_nonotice</th> <th scope="row">ban_nonotice</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">T:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-yes">T:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<tr> <tr>
<th scope="row">ban_not_account</th> <th scope="row">ban_not_account</th>
<td class="tablecell-yes">$~a:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes">$~a:<span class="note">data</span></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> <tr>
<th scope="row">ban_not_banshare</th> <th scope="row">ban_not_banshare</th>
<td class="tablecell-yes">$~j:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes">$~j:<span class="note">data</span></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> <tr>
<th scope="row">ban_not_extgecos</th> <th scope="row">ban_not_extgecos</th>
<td class="tablecell-yes">$~x:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes">$~x:<span class="note">data</span></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> <tr>
<th scope="row">ban_not_inchannel</th> <th scope="row">ban_not_inchannel</th>
<td class="tablecell-yes">$~c:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes">$~c:<span class="note">data</span></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> <tr>
<th scope="row">ban_not_opers</th> <th scope="row">ban_not_opers</th>
<td class="tablecell-yes2">$~o</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes2">$~o</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> <tr>
<th scope="row">ban_not_realname</th> <th scope="row">ban_not_realname</th>
<td class="tablecell-yes">$~r:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes">$~r:<span class="note">data</span></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> <tr>
<th scope="row">ban_not_server</th> <th scope="row">ban_not_server</th>
<td class="tablecell-yes">$~s:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes">$~s:<span class="note">data</span></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> <tr>
<th scope="row">ban_not_ssl</th> <th scope="row">ban_not_ssl</th>
<td class="tablecell-yes2">$~z</td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes2">$~z</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> <tr>
<th scope="row">ban_opertype</th> <th scope="row">ban_opertype</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">O:<span class="note">data</span></td><td class="tablecell-yes">~O:<span class="note">data</span></td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-yes">O:<span class="note">data</span></td><td class="tablecell-yes">~O:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr>
<tr> <tr>
<th scope="row">ban_partmsgs</th> <th scope="row">ban_partmsgs</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">p:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-yes">p:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<tr> <tr>
<th scope="row">ban_realname</th> <th scope="row">ban_realname</th>
<td class="tablecell-yes">$r:<span class="note">data</span></td><td class="tablecell-yes">r:<span class="note">data</span></td><td class="tablecell-yes">~r:<span class="note">data</span></td></tr> <td class="tablecell-yes">$r:<span class="note">data</span></td><td class="tablecell-yes">r:<span class="note">data</span></td><td class="tablecell-yes">~r:<span class="note">data</span></td><td class="tablecell-yes">~r:<span class="note">data</span></td></tr>
<tr> <tr>
<th scope="row">ban_server</th> <th scope="row">ban_server</th>
<td class="tablecell-yes">$s:<span class="note">data</span></td><td class="tablecell-yes">s:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-yes">$s:<span class="note">data</span></td><td class="tablecell-yes">s:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<tr> <tr>
<th scope="row">ban_stripcolor</th> <th scope="row">ban_stripcolor</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">S:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-yes">S:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<tr>
<th scope="row">ban_unregistered_mark</th>
<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-yes">~M:<span class="note">data</span></td></tr>
<tr> <tr>
<th scope="row">ban_unregistered_matching</th> <th scope="row">ban_unregistered_matching</th>
<td class="tablecell-na note">n/a</td><td class="tablecell-yes">U:<span class="note">data</span></td><td class="tablecell-na note">n/a</td></tr> <td class="tablecell-na note">n/a</td><td class="tablecell-yes">U:<span class="note">data</span></td><td class="tablecell-na note">n/a</td><td class="tablecell-na note">n/a</td></tr>
<tr> <tr>
<th scope="row">quiet</th> <th scope="row">quiet</th>
<td class="tablecell-special">+q<br><span class="note">(cmode)</span></td><td class="tablecell-yes">m:<span class="note">data</span></td><td class="tablecell-yes">~q:<span class="note">data</span></td></tr> <td class="tablecell-special">+q<br><span class="note">(cmode)</span></td><td class="tablecell-yes">m:<span class="note">data</span></td><td class="tablecell-yes">~q:<span class="note">data</span></td><td class="tablecell-yes">~q:<span class="note">data</span></td></tr>
</table> </table>

View File

@ -796,6 +796,20 @@ class P10Protocol(IRCS2SProtocol):
'registered': 'r', 'cloak_sethost': 'h', 'cloak_fakehost': 'f', 'registered': 'r', 'cloak_sethost': 'h', 'cloak_fakehost': 'f',
'cloak_hashedhost': 'C', 'cloak_hashedip': 'c', 'locop': 'O', 'cloak_hashedhost': 'C', 'cloak_hashedip': 'c', 'locop': 'O',
'*A': '', '*B': '', '*C': 'fCcrh', '*D': 'oOiwskgxnqBdDHIRWaXLz'}) '*A': '', '*B': '', '*C': 'fCcrh', '*D': 'oOiwskgxnqBdDHIRWaXLz'})
# Nefarious supports extbans as documented at
# https://github.com/evilnet/nefarious2/blob/master/doc/extendedbans.txt
self.extbans_matching.update({
'ban_account': '~a:',
'ban_inchannel': '~c:',
'ban_realname': '~r:',
'ban_mark': '~m:',
'ban_unregistered_mark': '~M:',
'ban_banshare': '~j:'
})
self.extbans_acting.update({
'quiet': '~q:',
'ban_nonick': '~n:'
})
elif p10_ircd == 'snircd': elif p10_ircd == 'snircd':
# snircd has +u instead of +Q for hidequits, and fewer chanel modes. # snircd has +u instead of +Q for hidequits, and fewer chanel modes.
cmodes = {'oplevel_apass': 'A', 'oplevel_upass': 'U', 'delayjoin': 'D', 'regonly': 'r', cmodes = {'oplevel_apass': 'A', 'oplevel_upass': 'U', 'delayjoin': 'D', 'regonly': 'r',