Advertisement
Guest User

Untitled

a guest
Feb 13th, 2014
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.91 KB | None | 0 0
  1. elif self.isFesta:
  2.                                 maplist = []
  3.                                 dbcur.execute('select code from mapeditor where perma = 2')
  4.                                 rrfRows = dbcur.fetchall()
  5.                                 if rrfRows is None:
  6.                                         pass
  7.                                 else:
  8.                                         for rrf in rrfRows:
  9.                                                 maplist.append(rrf[0])
  10.                                 if len(maplist)>=1:
  11.                                         runthismap = random.choice(maplist)
  12.                                 else:
  13.                                         runthismap = ""
  14.                                 if len(maplist)>=2:
  15.                                         while runthismap == self.ISCM:
  16.                                                 runthismap = random.choice(maplist)
  17.                                 if runthismap=="":
  18.                                         self.ISCM = -1
  19.                                         return 0
  20.                                 else:
  21.                                         mapcode = int(runthismap)
  22.                                         mapname = self.server.getMapName(mapcode)
  23.                                         mapxml   = self.server.getMapXML(mapcode)
  24.                                         yesvotes   = int(self.server.getMapYesVotes(mapcode))
  25.                                         novotes = int(self.server.getMapNoVotes(mapcode))
  26.                                         perma     = int(self.server.getMapPerma(mapcode))
  27.                                         mapnoexist = int(self.server.getMapDel(mapcode))
  28.                                         self.ISCM = mapcode
  29.                                         self.ISCMdata = [mapcode, mapname, mapxml, yesvotes, novotes, perma, mapnoexist]
  30.                                         return "-1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement