Exemple #1
0
	def addanswer(self, hour, msg):
		inth = int(hour)
		msgislink = re.search(r'https?:\/\/', msg)
		if(len(msg) > 1 and inth < 24 and inth >= 0 and not msgislink):
			self.lastmsg = msg
			self.lastfile = str(hour)
			return iohandler.addlinetofile(self.path, hour, msg)
		return False
Exemple #2
0
 def addanswer(self, hour, msg):
     hour = int(hour)
     msgislink = re.search(r'https?:\/\/', msg)
     if(len(msg) > 1 and hour < 24 and hour >= 0 and not msgislink):
         self.lastmsg = msg
         self.lasthour = str(hour)
         self.answers[hour].append(msg)
         return iohandler.addlinetofile(self.path, hour, msg)
     return False