mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 08:57:25 +01:00 
			
		
		
		
	hybrid, ts6, ratbox: fix +p mode definitions properly
+p is noknock and rfc1459-style private on all 3 IRCds, though the latter bit is undocumented in /help cmodes (maybe it's assumed?) +p is also "paranoia" on hybrid, which adds more restrictions to halfops and /invite
This commit is contained in:
		
							parent
							
								
									e17837cbb1
								
							
						
					
					
						commit
						c107f0062f
					
				@ -44,8 +44,9 @@ oplevel_apass,,,,,,,A,,A,A,
 | 
			
		||||
oplevel_upass,,,,,,,U,,U,U,
 | 
			
		||||
opmoderated,,U (extras/m_opmoderated),z,z,,,,,,,
 | 
			
		||||
owner,,q (m_customprefix/m_chanprotect),,y (when enabled),q,,,,,,
 | 
			
		||||
paranoia,,,,,,p,,,,,
 | 
			
		||||
permanent,,P (m_permchannels),P,P,P,,z,,,,P
 | 
			
		||||
private,p,p,,,p,,p,p,p,p,p
 | 
			
		||||
private,p,p,,,p,,p,,p,p,p
 | 
			
		||||
quiet,,,q,q,,,,,,,
 | 
			
		||||
redirect,,L (m_redirect),f,f,L,,L,,,,
 | 
			
		||||
registered,,r (m_services_account),,,r,r,R,,R,R,r
 | 
			
		||||
 | 
			
		||||
		
		
			
  | 
@ -27,16 +27,18 @@ class HybridProtocol(TS6Protocol):
 | 
			
		||||
        f = self.send
 | 
			
		||||
 | 
			
		||||
        # https://github.com/grawity/irc-docs/blob/master/server/ts6.txt#L80
 | 
			
		||||
        # Note: according to hybrid source code, +p is paranoia, noknock,
 | 
			
		||||
        # AND rfc1459-style private, though the last isn't documented.
 | 
			
		||||
        cmodes = {
 | 
			
		||||
            # TS6 generic modes:
 | 
			
		||||
            'op': 'o', 'halfop': 'h', 'voice': 'v', 'ban': 'b', 'key': 'k',
 | 
			
		||||
            'limit': 'l', 'moderated': 'm', 'noextmsg': 'n',
 | 
			
		||||
            'secret': 's', 'topiclock': 't',
 | 
			
		||||
            'secret': 's', 'topiclock': 't', 'private': 'p',
 | 
			
		||||
            # hybrid-specific modes:
 | 
			
		||||
            'blockcolor': 'c', 'inviteonly': 'i', 'noctcp': 'C',
 | 
			
		||||
            'regmoderated': 'M', 'operonly': 'O', 'regonly': 'R',
 | 
			
		||||
            'sslonly': 'S', 'banexception': 'e', 'noknock': 'p',
 | 
			
		||||
            'registered': 'r', 'invex': 'I',
 | 
			
		||||
            'registered': 'r', 'invex': 'I', 'paranoia': 'p',
 | 
			
		||||
            # Now, map all the ABCD type modes:
 | 
			
		||||
            '*A': 'beI', '*B': 'k', '*C': 'l', '*D': 'cimnprstCMORS'
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -27,7 +27,7 @@ class RatboxProtocol(TS6Protocol):
 | 
			
		||||
        # Note: +r, +e, and +I support will be negotiated on link
 | 
			
		||||
        self.cmodes = {'op': 'o', 'secret': 's', 'private': 'p', 'noextmsg': 'n', 'moderated': 'm',
 | 
			
		||||
                       'inviteonly': 'i', 'topiclock': 't', 'limit': 'l', 'ban': 'b', 'voice': 'v',
 | 
			
		||||
                       'key': 'k', 'sslonly': 'S',
 | 
			
		||||
                       'key': 'k', 'sslonly': 'S', 'noknock': 'p',
 | 
			
		||||
                       '*A': 'beI',
 | 
			
		||||
                       '*B': 'k',
 | 
			
		||||
                       '*C': 'l',
 | 
			
		||||
 | 
			
		||||
@ -273,6 +273,7 @@ class TS6Protocol(TS6BaseProtocol):
 | 
			
		||||
                        'op': 'o', 'voice': 'v', 'ban': 'b', 'key': 'k', 'limit':
 | 
			
		||||
                        'l', 'moderated': 'm', 'noextmsg': 'n', 'noknock': 'p',
 | 
			
		||||
                        'secret': 's', 'topiclock': 't', 'inviteonly': 'i',
 | 
			
		||||
                        'private': 'p',
 | 
			
		||||
                         # charybdis-specific modes:
 | 
			
		||||
                        'quiet': 'q', 'redirect': 'f', 'freetarget': 'F',
 | 
			
		||||
                        'joinflood': 'j', 'largebanlist': 'L', 'permanent': 'P',
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user