Advertisement
MeKLiN2

Untitled

Feb 25th, 2022
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. def do_ban2(self, user_name):
  2. unkickable_accounts = ['yoshi', 'microindulgence', 'ultravioletx', 'dylanreplay', 'banehollow', 'godlyneckbeard' \
  3. 'nonbanfaber', 'culturecollage', \
  4. 'txisthereason', 'sanguine', 'fruitl0op', \
  5. 'tirednormie2', 'weagle2', 'blushbrush', 'neetknight', \
  6. 'yoshi', 'b0undb0nes', 'thebookclub'] \
  7.  
  8. if user_name.startswith('*'):
  9. user_name = user_name.lstrip('*')
  10. _users = self._bot.users.search_containing(user_name)
  11. if len(_users) > 0:
  12. for i, user in enumerate(_users):
  13. if user.nick != self._bot.nick and user.level > self._user.level and i <= self._conf.MAX_MATCH_BANS - 1:
  14. if user.account in unkickable_accounts:
  15. self._responder('Only MeKLiN can ban Ultramod: %s' % user.account)
  16. else:
  17. self._bot.send_ban_msg(user.handle)
  18.  
  19. else:
  20. _user = self._bot.users.search_by_nick(user_name)
  21. if _user is None:
  22. self._responder('Nickname kicks are CaSe SeNsiTiVe. No user named: %s' % user_name)
  23. elif _user.level < self._user.level:
  24. self._responder('Cant ban self.')
  25. elif _user.account in unkickable_accounts:
  26. self._responder('Only MeKLiN can ban Ultramod: %s' % _user.account)
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement