예제 #1
0
파일: nospam.py 프로젝트: GunioRobot/xsbs
	def add_spamming_case(self, ip):
		if ip in self.spammerlist.keys():
			self.spammerlist[ip] += 1
			if self.spammerlist[ip] > warnings:
				self.dealwithspammer(ip)
				del self.spammerlist[ip]
			else:
				playerByIpString(ip).message(warning(warn_spam_message.substitute(colordict)))
		else:
			self.spammerlist[ip] = 1
			playerByIpString(ip).message(warning(warn_spam_message.substitute(colordict)))
예제 #2
0
파일: nospam.py 프로젝트: pguenth/xsbs
 def add_spamming_case(self, ip):
     if ip in self.spammerlist.keys():
         self.spammerlist[ip] += 1
         if self.spammerlist[ip] > warnings:
             self.dealwithspammer(ip)
             del self.spammerlist[ip]
         else:
             playerByIpString(ip).message(
                 warning(warn_spam_message.substitute(colordict)))
     else:
         self.spammerlist[ip] = 1
         playerByIpString(ip).message(
             warning(warn_spam_message.substitute(colordict)))
예제 #3
0
파일: nospam.py 프로젝트: pguenth/xsbs
 def dealwithspammer(self, ip):
     try:
         playercn = playerByIpString(ip).cn
         ban(playercn, ban_duration, 'spamming server', -1)
     except ValueError:
         print "Error while banning spamming player by IP"
예제 #4
0
파일: nospam.py 프로젝트: GunioRobot/xsbs
	def dealwithspammer(self, ip):
		try:
			playercn = playerByIpString(ip).cn
			ban(playercn, ban_duration, 'spamming server', -1)
		except ValueError:
			print "Error while banning spamming player by IP"