fix false positives in testbot
This commit is contained in:
		
							
								
								
									
										13
									
								
								test/testbot
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								test/testbot
									
									
									
									
									
								
							| @@ -91,17 +91,24 @@ class MUCBot(slixmpp.ClientXMPP): | |||||||
|  |  | ||||||
|     def muc_message(self, msg): |     def muc_message(self, msg): | ||||||
|         rtime=time.time() |         rtime=time.time() | ||||||
|         rcpt=msg['from'].bare |         if msg['mucnick'] == self.nick: | ||||||
|  |             return | ||||||
|         body="%(body)s" % msg |         body="%(body)s" % msg | ||||||
|  |         unknownmsg = True | ||||||
|         if self.room1 in str(msg['from']): |         if self.room1 in str(msg['from']): | ||||||
|             for i in results2: |             for i in results2: | ||||||
|                 if i[0] == body: |                 if 'xmppbot: ' + i[0] == body: | ||||||
|                     i[2] = rtime |                     i[2] = rtime | ||||||
|  |                     unknownmsg = False | ||||||
|  |  | ||||||
|         if self.room2 in str(msg['from']): |         if self.room2 in str(msg['from']): | ||||||
|             for i in results1: |             for i in results1: | ||||||
|                 if i[0] == body: |                 if 'xmppbot: ' + i[0] == body: | ||||||
|                     i[2] = rtime |                     i[2] = rtime | ||||||
|  |                     unknownmsg = False | ||||||
|  |  | ||||||
|  |         if unknownmsg: | ||||||
|  |             print("Unknown message recieved: " + body) | ||||||
|  |  | ||||||
|         if allmsgsrecv() is True: |         if allmsgsrecv() is True: | ||||||
|             printandexit() |             printandexit() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user