mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 00:47:21 +01:00 
			
		
		
		
	
							parent
							
								
									d3ccdca3d1
								
							
						
					
					
						commit
						171eccf9c7
					
				@ -15,7 +15,9 @@ PPRINT_MAX_LINES = 20
 | 
			
		||||
PPRINT_WIDTH = 200
 | 
			
		||||
 | 
			
		||||
if not conf.conf['pylink'].get("debug_enabled", False):
 | 
			
		||||
    raise RuntimeError("pylink::debug_enabled must be enabled to load this plugin")
 | 
			
		||||
    raise RuntimeError("pylink::debug_enabled must be enabled to load this plugin. "
 | 
			
		||||
                       "This should ONLY be used in test environments for debugging and development, "
 | 
			
		||||
                       "as anyone with access to this plugin's commands can run arbitrary code as the PyLink user!")
 | 
			
		||||
 | 
			
		||||
def _exec(irc, source, args, locals_dict=None):
 | 
			
		||||
    """<code>
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@ raw.py: Provides a 'raw' command for sending raw text to IRC.
 | 
			
		||||
from pylinkirc import utils
 | 
			
		||||
from pylinkirc.coremods import permissions
 | 
			
		||||
from pylinkirc.log import log
 | 
			
		||||
 | 
			
		||||
from pylinkirc import conf
 | 
			
		||||
 | 
			
		||||
@utils.add_cmd
 | 
			
		||||
def raw(irc, source, args):
 | 
			
		||||
@ -18,8 +18,9 @@ def raw(irc, source, args):
 | 
			
		||||
    if irc.protoname == 'clientbot':
 | 
			
		||||
        # exec.raw is included for backwards compatibility with PyLink 1.x
 | 
			
		||||
        perms = ['raw.raw', 'exec.raw']
 | 
			
		||||
    else:
 | 
			
		||||
        perms = ['raw.raw.unsupported_network']
 | 
			
		||||
    elif not conf.conf['pylink'].get("raw_enabled", False):
 | 
			
		||||
        raise RuntimeError("Raw commands are not supported on this protocol")
 | 
			
		||||
 | 
			
		||||
    permissions.check_permissions(irc, source, perms)
 | 
			
		||||
 | 
			
		||||
    args = ' '.join(args)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user