mirror of
				https://github.com/Mikaela/Limnoria.git
				synced 2025-10-31 07:37:22 +01:00 
			
		
		
		
	Added supybot.reply.maximumMores.
This commit is contained in:
		
							parent
							
								
									ce75589c6d
								
							
						
					
					
						commit
						93f64b6a68
					
				| @ -1,5 +1,10 @@ | ||||
| 	* Added supybot.reply.truncate, to turn off the normal more'ing | ||||
| 	of replies. | ||||
| 	* Added supybot.reply.maximumMores, to give users the ability to | ||||
| 	set the maximum number of "more" chunks replies will generate. | ||||
| 	 | ||||
| 	* Added supybot.reply.truncate, to turn off the normal chunking | ||||
| 	of replies that later can be retrieved with the more command. | ||||
| 	Setting this variable to On means that no chunks will ever be | ||||
| 	created. | ||||
| 	 | ||||
| 	* Added supybot.plugins.Enforcer.takeRevengeOnOps, which makes | ||||
| 	the bot even take revenge on #channel,ops who try to violate the | ||||
|  | ||||
| @ -567,9 +567,11 @@ class IrcObjectProxy(RichReplyMethods): | ||||
|             else: | ||||
|                 s = ircutils.safeArgument(s) | ||||
|                 allowedLength = 450 - len(self.irc.prefix) | ||||
|                 if len(s) > allowedLength*50: | ||||
|                     log.warning('Cowardly refusing to "more" %s bytes.'%len(s)) | ||||
|                     s = s[:allowedLength*50] | ||||
|                 maximumLength = allowedLength*conf.supybot.reply.maximumMores() | ||||
|                 if len(s) > maximumLength: | ||||
|                     log.warning('Truncating to %s bytes from %s bytes', | ||||
|                                 maximumLength, len(s)) | ||||
|                     s = s[:maximumLength] | ||||
|                 if len(s) < allowedLength or conf.supybot.reply.truncate(): | ||||
|                     s = s[:allowedLength+20] # In case we're truncating. | ||||
|                     self.irc.queueMsg(reply(msg, s, self.prefixName, | ||||
|  | ||||
| @ -193,6 +193,9 @@ supybot.register('reply') | ||||
| supybot.reply.register('truncate', registry.Boolean(False, """Determines | ||||
| whether the bot will simply truncate messages instead of breaking up long | ||||
| messages and using the 'more' command to get the remaining chunks.""")) | ||||
| supybot.reply.register('maximumMores', registry.PositiveInteger(50, """ | ||||
| Determines what the maximum number of chunks (for use with the 'more' command) | ||||
| will be.""")) | ||||
| 
 | ||||
| supybot.reply.register('oneToOne', registry.Boolean(True, """Determines whether | ||||
| the bot will send multi-message replies in a single messsage or in multiple | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jeremy Fincher
						Jeremy Fincher