예제 #1
0
파일: User.py 프로젝트: oscarekholm/imouto
	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
예제 #2
0
파일: User.py 프로젝트: djohsson/imouto
 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