usermode as config file option
This commit is contained in:
		
							parent
							
								
									e4e2014086
								
							
						
					
					
						commit
						f310eadb6a
					
				| @ -4,4 +4,7 @@ port = 6667 | ||||
| channel = #bss | ||||
| nick = dr_devzo | ||||
| name = dr. devzo | ||||
| 
 | ||||
| usermode = -x | ||||
| 
 | ||||
| debug = true | ||||
|  | ||||
| @ -9,8 +9,10 @@ import irclib | ||||
| # handler for when the bot has connected to IRC | ||||
| def on_connect(connection, event): | ||||
|     # user modes | ||||
|     # TODO: config file | ||||
|     connection.mode(nick, '-x') | ||||
|     try: | ||||
|         usermode = config.get('IRC', 'usermode') | ||||
|         connection.mode(nick, usermode) | ||||
|     except NoOptionError: pass | ||||
| 
 | ||||
|     # join the specified channel | ||||
|     # TODO: support multiple | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user