Loading

Paste #pdtf3gbwd

  1.             elif message.startswith('!resetme') or message.startswith('!reset'):
  2.                 if client.play_as == 255:
  3.                     conn.send_packet(AdminChat,
  4.                     action = Action.CHAT,
  5.                     destType = DestType.CLIENT,
  6.                     clientID = ClientID.SERVER,
  7.                     message = 'You can\'t dissolve the spectators, that\'d be silly!')
  8.                 # doing this first isn't perfect but I'm lazy
  9.                 else:
  10.                     companyparticipants = []
  11.                     companyID = client.play_as
  12.                     companyclients = 0
  13.                     for c in conn.clients.values():
  14.                         if client.play_as == companyID:
  15.                             companyclients++
  16.                     if (companyclients > 1):
  17.                         conn.send_packet(AdminChat,
  18.                             action = Action.CHAT,
  19.                             destType = DestType.CLIENT,
  20.                             clientID = ClientID.SERVER,
  21.                             message = 'Your company has other players in it - get them to leave before resetting!')

Comments