mirror of
				https://github.com/Mikaela/Limnoria.git
				synced 2025-10-30 23:27:24 +01:00 
			
		
		
		
	Added docstrings for the class. Eventually help should show these instead of the dispatcher helps.
This commit is contained in:
		
							parent
							
								
									17d6c1b93e
								
							
						
					
					
						commit
						4396d65b94
					
				| @ -94,6 +94,12 @@ conf.registerChannelValue(conf.supybot.plugins.Enforcer, 'ChanServ', | ||||
| 
 | ||||
| _chanCap = ircdb.makeChannelCapability | ||||
| class Enforcer(callbacks.Privmsg): | ||||
|     """Manages various things concerning channel security.  Check out the | ||||
|     supybot.plugins.Enforcer.autoOp, supybot.plugins.Enforcer.autoHalfop, | ||||
|     supybot.plugins.Enforcer.autoVoice, supybot.plugins.Enforcer.takeRevenge, | ||||
|     supybot.plugins.Enforcer.cycleToGetOps, and | ||||
|     supybot.plugins.Enforcer.ChanServ to configure the behavior of this plugin. | ||||
|     """ | ||||
|     def __init__(self): | ||||
|         callbacks.Privmsg.__init__(self) | ||||
|         self.topics = ircutils.IrcDict() | ||||
|  | ||||
| @ -30,7 +30,7 @@ | ||||
| ### | ||||
| 
 | ||||
| """ | ||||
| Warns people when they join a channel if their ident is root. | ||||
| Warns (or even kicks) people when they join a channel if their ident is root. | ||||
| """ | ||||
| 
 | ||||
| __revision__ = "$Id$" | ||||
| @ -60,6 +60,11 @@ conf.registerChannelValue(conf.supybot.plugins.RootWarner, 'kick', | ||||
|     join the channel with an ident of 'root' or '~root'.""")) | ||||
| 
 | ||||
| class RootWarner(callbacks.Privmsg): | ||||
|     """Warns or kicks people who appear to be using IRC as root.  Check out the | ||||
|     configuration variables supybot.plugins.RootWarner.warn, | ||||
|     supybot.plugins.RootWarner.kick, and supybot.plugins.RootWarner.warning to | ||||
|     configure this plugin's behavior. | ||||
|     """ | ||||
|     def doJoin(self, irc, msg): | ||||
|         user = ircutils.userFromHostmask(msg.prefix) | ||||
|         if user == 'root' or user == '~root': | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jeremy Fincher
						Jeremy Fincher