Merge branch 'master' of ayu.incorporeal.org:dr.botzo
This commit is contained in:
		
						commit
						69243ce1e5
					
				
							
								
								
									
										4
									
								
								BUGS
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								BUGS
									
									
									
									
									
								
							| @ -9,3 +9,7 @@ dr.botzo --- BUGS | ||||
|    * get_db() in Module is not thread-aware, threads other than the main bot thread | ||||
|      cannot call it (see Twitter.py) | ||||
|      ProgrammingError: SQLite objects created in a thread can only be used in that same thread.The object was created in thread id 1 and this is thread id 2 | ||||
|    * various stuff (or at least !alias list) doesn't get privmsg handling right, and | ||||
|      ends up sending the reply to the bot itself (as that is the target of the incoming | ||||
|      privmsg, same as in a channel, but the bot is supposed to overwrite the nick case | ||||
|      with the sender's) | ||||
|  | ||||
| @ -187,6 +187,9 @@ class Markov(Module): | ||||
|         k2 = self.start2 | ||||
| 
 | ||||
|         words = line.split() | ||||
|         if len(words) <= 0: | ||||
|             return line | ||||
| 
 | ||||
|         self.starts.append(words[0]) | ||||
| 
 | ||||
|         try: | ||||
| @ -281,6 +284,8 @@ class Markov(Module): | ||||
|             else: | ||||
|                 if len(gen_words) < min_size and len(filter(lambda a: a != self.stop, key_hits)) > 0: | ||||
|                     gen_words.append(random.choice(filter(lambda a: a != self.stop, key_hits))) | ||||
|                 elif len(key_hits) <= 0: | ||||
|                     gen_words.append(self.stop) | ||||
|                 else: | ||||
|                     gen_words.append(random.choice(key_hits)) | ||||
| 
 | ||||
|  | ||||
| @ -236,6 +236,9 @@ class Twitter(Module): | ||||
|     def _check_self_timeline(self): | ||||
|         """Check my timeline, and if there are entries, print them to the channel.""" | ||||
| 
 | ||||
|         # re-register this check | ||||
|         Timer(300, self._check_self_timeline, ()).start() | ||||
| 
 | ||||
|         if self.authed: | ||||
|             # get the id of the last check we made | ||||
|             since_id = self._get_last_since_id() | ||||
| @ -263,9 +266,6 @@ class Twitter(Module): | ||||
|                 # set since_id | ||||
|                 self._set_last_since_id(new_since_id) | ||||
| 
 | ||||
|                 # re-register this check | ||||
|                 Timer(300, self._check_self_timeline, ()).start() | ||||
| 
 | ||||
|     def _return_tweet_or_retweet_text(self, tweet, print_source=False): | ||||
|         """ | ||||
|         Return a string of the author and text body of a status, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user