Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(4)  |  Derive(0)  |  Import(3)

src/x/s/xsbs-HEAD/src/pyscripts/NoTeamKillers/notk.py   xsbs(Download)
from Bans.bans import ban
from xsbs.settings import PluginConfig
from xsbs.events import registerServerEventHandler
from xsbs.players import player
from xsbs.ui import warning
def onTeamkill(cn, tcn):
	try:
		if player(cn).teamkills() >= limit:
			ban(cn, duration, 'killing teammates', -1)
		elif warn_tk_limit and player(cn).teamkills() == 1:

src/x/s/xsbs-HEAD/src/pyscripts/NoSpam/nospam.py   xsbs(Download)
from xsbs.events import eventHandler
from xsbs.timers import addTimer
from xsbs.settings import PluginConfig
from xsbs.ui import error, notice, warning
from Bans.bans import ban
	def dealwithspammer(self, ip):
		try:
			playercn = playerByIpString(ip).cn
			ban(playercn, ban_duration, 'spamming server', -1)
		except ValueError:
def check_kick_timeout(cn, victim):
    t = time.time()
    try:
        if (t - spam_last_votekick[cn]) <= 2:
            ban(playercn, ban_duration, 'spamming server', -1)

src/x/s/xsbs-HEAD/src/pyscripts/VoteKick/votekick.py   xsbs(Download)
from xsbs.colors import colordict
from xsbs.settings import PluginConfig
from Bans.bans import ban
import sbserver
import string
			pass
	if votes >= needed:
		ban(cn, 3600, 'Vote', -1)
 
@commandHandler('votekick')