mirror of
				https://github.com/jlu5/PyLink.git
				synced 2025-11-04 00:47:21 +01:00 
			
		
		
		
	pylink, world: default tests mode to False, simplify imports
This commit is contained in:
		
							parent
							
								
									77e13bce03
								
							
						
					
					
						commit
						be19f88e86
					
				
							
								
								
									
										8
									
								
								pylink
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								pylink
									
									
									
									
									
								
							@ -1,12 +1,12 @@
 | 
			
		||||
#!/usr/bin/env python3
 | 
			
		||||
"""
 | 
			
		||||
PyLink IRC Services launcher.
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
import os
 | 
			
		||||
import sys
 | 
			
		||||
try:
 | 
			
		||||
    from pylinkirc import world, conf
 | 
			
		||||
    # This must be set to False to disable test mode and enable threaded connections.
 | 
			
		||||
    # Otherwise you'll only be able to connect to one net at a time! Which is boring.
 | 
			
		||||
    world.testing = False
 | 
			
		||||
except ImportError:
 | 
			
		||||
    sys.stderr.write("ERROR: Failed to import PyLink main module (pylinkirc.world).\n\nIf you are "
 | 
			
		||||
                     "running PyLink from source, please install PyLink first using 'python3 "
 | 
			
		||||
@ -30,7 +30,7 @@ if __name__ == '__main__':
 | 
			
		||||
    conf.loadConf(args.config)
 | 
			
		||||
 | 
			
		||||
    from pylinkirc.log import log
 | 
			
		||||
    from pylinkirc import classes, utils, coremods, world
 | 
			
		||||
    from pylinkirc import classes, utils, coremods
 | 
			
		||||
    log.info('PyLink %s starting...', world.version)
 | 
			
		||||
 | 
			
		||||
    # Write a PID file unless specifically told not to.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										9
									
								
								world.py
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								world.py
									
									
									
									
									
								
							@ -7,12 +7,9 @@ import threading
 | 
			
		||||
import subprocess
 | 
			
		||||
import os
 | 
			
		||||
 | 
			
		||||
# Global variable to indicate whether we're being ran directly, or imported
 | 
			
		||||
# for a testcase. This defaults to True.
 | 
			
		||||
testing = True
 | 
			
		||||
 | 
			
		||||
# Sets the default protocol module to use with tests.
 | 
			
		||||
testing_ircd = 'inspircd'
 | 
			
		||||
# This indicates whether we're running in tests modes. What it actually does
 | 
			
		||||
# though is control whether IRC connections should be threaded or not.
 | 
			
		||||
testing = False
 | 
			
		||||
 | 
			
		||||
# Statekeeping for our hooks list, IRC objects, loaded plugins, and initialized
 | 
			
		||||
# service bots.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user