mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 00:47:21 +01:00 
			
		
		
		
	protocols: numericServer(...) -> numeric(...)
This commit is contained in:
		
							parent
							
								
									3a53005d8c
								
							
						
					
					
						commit
						196282db86
					
				@ -39,7 +39,7 @@ def handle_whois(irc, source, command, args):
 | 
			
		||||
        log.warning('(%s) Got a WHOIS request for %r from %r, but the target '
 | 
			
		||||
                    'doesn\'t exist in irc.users!', irc.name, target, source)
 | 
			
		||||
        return
 | 
			
		||||
    f = irc.proto.numericServer
 | 
			
		||||
    f = irc.proto.numeric
 | 
			
		||||
    server = irc.getServer(target) or irc.sid
 | 
			
		||||
    nick = user.nick
 | 
			
		||||
    sourceisOper = ('o', None) in irc.users[source].modes
 | 
			
		||||
 | 
			
		||||
@ -68,7 +68,7 @@ internals](https://github.com/GLolol/PyLink/blob/0.4.0-dev/classes.py#L267-L272)
 | 
			
		||||
 | 
			
		||||
- **`notice`**`(self, source, target, text)` - Sends a NOTICE from a PyLink client.
 | 
			
		||||
 | 
			
		||||
- **`numericServer`**`(self, source, numeric, target, text)` - Sends a raw numeric `numeric` with `text` from the `source` server to `target`.
 | 
			
		||||
- **`numeric`**`(self, source, numeric, target, text)` - Sends a raw numeric `numeric` with `text` from the `source` server to `target`.
 | 
			
		||||
 | 
			
		||||
- **`partClient`**`(self, client, channel, reason=None)` - Sends a part from a PyLink client.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -281,7 +281,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
 | 
			
		||||
        if not (target is None or source is None):
 | 
			
		||||
            self._send(source, 'PING %s %s' % (source, target))
 | 
			
		||||
 | 
			
		||||
    def numericServer(self, source, numeric, target, text):
 | 
			
		||||
    def numeric(self, source, numeric, target, text):
 | 
			
		||||
        raise NotImplementedError("Numeric sending is not yet implemented by this "
 | 
			
		||||
                                  "protocol module. WHOIS requests are handled "
 | 
			
		||||
                                  "locally by InspIRCd servers, so there is no "
 | 
			
		||||
 | 
			
		||||
@ -36,7 +36,7 @@ class TS6BaseProtocol(Protocol):
 | 
			
		||||
 | 
			
		||||
    ### OUTGOING COMMANDS
 | 
			
		||||
 | 
			
		||||
    def numericServer(self, source, numeric, target, text):
 | 
			
		||||
    def numeric(self, source, numeric, target, text):
 | 
			
		||||
        """Sends raw numerics from a server to a remote client, used for WHOIS
 | 
			
		||||
        replies."""
 | 
			
		||||
        self._send(source, '%s %s %s' % (numeric, target, text))
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user