Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 81.34 KB | None | 0 0
  1. #coding: utf-8
  2. import re, base64, hashlib, urllib2
  3.  
  4. from ByteArray import ByteArray
  5. from Identifiers import Identifiers
  6.  
  7. class ParseCommands:
  8. def __init__(this, client, server):
  9. this.client = client
  10. this.server = client.server
  11. this.Cursor = client.Cursor
  12. this.currentArgsCount = 0
  13.  
  14. def requireNoSouris(this, playerName):
  15. if playerName.startswith("*"):
  16. pass
  17. else:
  18. return True
  19.  
  20. def requireArgs(this, argsCount):
  21. if this.currentArgsCount < argsCount:
  22. this.client.sendMessage("Invalid arguments.")
  23. return False
  24.  
  25. return True
  26.  
  27. def requireTribe(this, canUse=False):
  28. if not this.client.tribeName == "" and this.client.room.isTribeHouse:
  29. tribeRankings = this.client.tribeData[3]
  30. perm = tribeRankings[this.client.tribeRank].split("|")[2]
  31. if perm.split(",")[8] == "1":
  32. canUse = True
  33.  
  34. def parseCommand(this, command):
  35. values = command.split(" ")
  36. command = values[0].lower()
  37. args = values[1:]
  38. argsCount = len(args)
  39. argsNotSplited = " ".join(args)
  40. this.currentArgsCount = argsCount
  41.  
  42. try:
  43. if command in ["profil", "perfil", "profile"]:
  44. this.client.sendProfile(this.client.Username if argsCount == 0 else this.client.TFMUtils.parsePlayerName(args[0]))
  45.  
  46. elif command in ["editeur", "editor"]:
  47. if this.client.privLevel >= 1:
  48. this.client.enterRoom(chr(3) + "[Editeur] " + this.client.Username)
  49. this.client.sendPacket(Identifiers.old.send.Map_Editor, [])
  50. this.client.sendPacket(Identifiers.send.Room_Type, chr(1))
  51.  
  52. elif command in ["totem"]:
  53. if this.client.privLevel >= 1:
  54. if this.client.privLevel != 0 and this.client.shamanSaves >= 500:
  55. this.client.enterRoom(chr(3) + "[Totem] " + this.client.Username)
  56.  
  57. elif command in ["sauvertotem"]:
  58. if this.client.room.isTotemEditeur:
  59. this.client.STotem[0] = this.client.Totem[0]
  60. this.client.STotem[1] = this.client.Totem[1]
  61. this.client.sendPlayerDied()
  62. this.client.enterRoom(this.server.recommendRoom(this.client.Langue))
  63.  
  64. elif command in ["resettotem"]:
  65. if this.client.room.isTotemEditeur:
  66. this.client.Totem = [0, ""]
  67. this.client.RTotem = True
  68. this.client.isDead = True
  69. this.client.sendPlayerDied()
  70. this.client.room.checkShouldChangeMap()
  71.  
  72. elif command in ["ban", "iban"]:
  73. if this.client.privLevel >= 5 or this.client.Username == "Icert":
  74. if (args[0] == "help"):
  75. message = "\n<J>Ban help:\n"
  76. message += "<ROSE>0<J> - <CH>360 <J> - <N>Hack (last warning before account deletion)</N>\n"
  77. message += "<ROSE>1<J> - <CH>360 <J> - <N>Hack</N>\n"
  78. message += "<ROSE>2<J> - <CH>24 <J> - <N>Activité suspecte</N>\n"
  79. message += "<ROSE>3<J> - <CH>900 <J> - <N>Disclosure</N>\n"
  80. message += "<ROSE>4<J> - <CH>48 <J> - <N>Disrespect</N>\n"
  81. message += "<J>Using <N>/ban playerName <CH>time <ROSE>argument</ROSE>"
  82. this.client.sendMessage(message)
  83. else:
  84. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  85. time = args[1] if (argsCount >= 2) else "1"
  86. reason = ("Hack (last warning before account deletion)" if args[2] == "0" else "Hack" if args[2] == "1" else "Activité suspecte" if args[2] == "2" else "Disclosure" if args[2] == "3" else "Disrespect" if args[2] == "4" else "Another motive") if (argsCount >= 3) else "Why not set"
  87. silent = command == "iban"
  88. hours = int(time) if (time.isdigit()) else 1
  89. hours = 100000 if (hours > 100000) else hours
  90. hours = 24 if (this.client.privLevel <= 6 and hours > 24) else hours
  91. if (reason in ["Why not set", "Another motive"]):
  92. this.client.sendMessage("<ROSE>Need help? Type <J>/ban help</J>")
  93. elif playerName in this.server.adminAllow:
  94. this.server.sendStaffMessage(7, "%s tried to ban an administrator." %(this.client.Username))
  95. else:
  96. if this.server.banPlayer(playerName, hours, reason, this.client.Username, silent):
  97. this.server.sendStaffMessage(5, "<V>%s</V> banned <V>%s</V> for <V>%s</V> %s the reason: <V>%s</V>" %(this.client.Username, playerName, hours, "hora" if hours == 1 else "horas", reason))
  98. else:
  99. this.client.sendMessage("The player [%s] does not exist." % (playerName))
  100. else:
  101. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  102. this.server.voteBanPopulaire(playerName, this.client.ipAddress)
  103. this.client.sendBanConsideration()
  104.  
  105. elif command in ["unban"]:
  106. if this.client.privLevel == 10:
  107. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  108. this.requireNoSouris(playerName)
  109. found = False
  110.  
  111. if this.server.checkExistingUser(playerName):
  112. if this.server.checkTempBan(playerName):
  113. this.server.removeTempBan(playerName)
  114. found = True
  115.  
  116. if this.server.checkPermaBan(playerName):
  117. this.server.removePermaBan(playerName)
  118. found = True
  119.  
  120. if found:
  121. import time
  122. this.Cursor.execute("insert into BanLog values (?, ?, '', '', ?, 'Unban', '', '')", [playerName, this.client.Username, int(str(time.time())[:9])])
  123. this.server.sendStaffMessage(5, "<V>%s</V> unbanned <V>%s</V>." %(this.client.Username, playerName))
  124.  
  125. elif command in ["unbanip"]:
  126. if this.client.privLevel >= 7:
  127. ip = args[0]
  128. if ip in this.server.ipPermaBanCache:
  129. this.server.ipPermaBanCache.remove(ip)
  130. this.Cursor.execute("delete from ippermaban where IP = ?", [ip])
  131. this.server.sendStaffMessage(7, "<V>%s</V> unbanned the IP <V>%S</V>." %(this.client.Username, ip))
  132. else:
  133. this.client.sendMessage("This IP is not banned.")
  134.  
  135. elif command in ["mute"]:
  136. if this.client.privLevel >= 5:
  137. if (args[0] == "help"):
  138. message = "\n<J>Mute help:\n"
  139. message += "<ROSE>0<J> - <CH>2 <J> - <N>Flood</N>\n"
  140. message += "<ROSE>1<J> - <CH>1 <J> - <N>Disrespect to a player</N>\n"
  141. message += "<ROSE>2<J> - <CH>24 <J> - <N>Disrespect to staff</N>\n"
  142. message += "<J>Using <N>/mute playerName <CH>time <ROSE>argument</ROSE>"
  143. this.client.sendMessage(message)
  144. else:
  145. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  146. time = args[1] if (argsCount >= 2) else "1"
  147. reason = ("Flood" if args[2] == "0" else "Disrespect to a player" if args[2] == "1" else "Disrespect to staff" if args[2] == "2" else "Another motive") if (argsCount >= 3) else "Why not set"
  148. hours = int(time) if (time.isdigit()) else 1
  149. this.requireNoSouris(playerName)
  150. hours = 500 if (hours > 500) else hours
  151. hours = 24 if (this.client.privLevel <= 6 and hours > 24) else hours
  152. if (reason in ["Why not set", "Another motive"]):
  153. this.client.sendMessage("<ROSE>Need help? Type <J>/mute help</J>")
  154. this.server.mutePlayer(playerName, hours, reason, this.client.Username)
  155.  
  156. elif command in ["unmute"]:
  157. if this.client.privLevel >= 7:
  158. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  159. this.requireNoSouris(playerName)
  160. this.server.sendStaffMessage(5, "<V>%s</V> unmuted <V>%s</V>." %(this.client.Username, playerName))
  161. this.server.removeModMute(playerName)
  162. this.client.isMute = False
  163.  
  164. elif command in ["rank"]:
  165. if this.client.privLevel == 10:
  166. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  167. rank = args[1].lower()
  168. this.requireNoSouris(playerName)
  169. if not this.server.checkExistingUser(playerName) or playerName in this.server.adminAllow:
  170. this.client.sendMessage("User not found: <V>%s</V>." %(playerName))
  171. else:
  172. privLevel = 10 if rank.startswith("adm") else 9 if rank.startswith("coord") else 8 if rank.startswith("smod") else 7 if rank.startswith("mod") else 6 if rank.startswith("map") or rank.startswith("mc") else 5 if rank.startswith("hel") else 4 if rank.startswith("dv") or rank.startswith("div") else 3 if rank.startswith("dev") or rank.startswith("lua") else 2 if rank.startswith("vip") else 1
  173. rankName = "Administrator" if rank.startswith("adm") else "Coordinator" if rank.startswith("coord") else "Super Moderator" if rank.startswith("smod") else "Moderator" if rank.startswith("mod") else "MapCrew" if rank.startswith("map") or rank.startswith("mc") else "Helper" if rank.startswith("hel") else "Publisher" if rank.startswith("dv") or rank.startswith("div") else "Lua Developer" if rank.startswith("dev") or rank.startswith("lua") else "Vip" if rank.startswith("vip") else "Player"
  174. player = this.server.players.get(playerName)
  175. if player != None:
  176. player.privLevel = privLevel
  177. player.TitleNumber = 0
  178. player.sendCompleteTitleList()
  179. else:
  180. this.Cursor.execute("update Users set PrivLevel = ?, TitleNumber = 0 where Username = ?", [privLevel, playerName])
  181.  
  182. this.server.sendStaffMessage(7, "<V>%s</V> won the rank of <V>%s</V>." %(playerName, rankName))
  183.  
  184. elif command in ["np", "npp"]:
  185. if this.client.privLevel >= 6:
  186. if len(args) == 0:
  187. this.client.room.mapChange()
  188. else:
  189. if not this.client.room.isVotingMode:
  190. code = args[0]
  191. if code.startswith("@"):
  192. mapInfo = this.client.room.getMapInfo(int(code[1:]))
  193. if mapInfo[0] == None:
  194. this.client.sendLangueMessage("", "$CarteIntrouvable")
  195. else:
  196. this.client.room.forceNextMap = code
  197. if command == "np":
  198. if this.client.room.changeMapTimer != None:
  199. this.client.room.changeMapTimer.cancel()
  200. this.client.room.mapChange()
  201. else:
  202. this.client.sendLangueMessage("", "$ProchaineCarte " + code)
  203.  
  204. elif code.isdigit():
  205. this.client.room.forceNextMap = code
  206. if command == "np":
  207. if this.client.room.changeMapTimer != None:
  208. this.client.room.changeMapTimer.cancel()
  209. this.client.room.mapChange()
  210. else:
  211. this.client.sendLangueMessage("", "$ProchaineCarte " + code)
  212.  
  213. elif command in ["mod", "mapcrews"]:
  214. staff = {}
  215. staffList = "$ModoPasEnLigne" if command == "mod" else "$MapcrewPasEnLigne"
  216.  
  217. for player in this.server.players.values():
  218. if command == "mod" and player.privLevel >= 4 and not player.privLevel == 6 or command == "mapcrews" and player.privLevel == 6:
  219. if staff.has_key(player.Langue.lower()):
  220. names = staff[player.Langue.lower()]
  221. names.append(player.Username)
  222. staff[player.Langue.lower()] = names
  223. else:
  224. names = []
  225. names.append(player.Username)
  226. staff[player.Langue.lower()] = names
  227.  
  228. if len(staff) >= 1:
  229. staffList = "$ModoEnLigne" if command == "mod" else "$MapcrewEnLigne"
  230. for list in staff.items():
  231. staffList += "<br><BL>["+str(list[0])+"] <BV>"+str("<BL>, <BV>").join(list[1])
  232.  
  233. this.client.sendLangueMessage("", staffList)
  234.  
  235. elif command in ["ls"]:
  236. if this.client.privLevel >= 4:
  237. data = []
  238.  
  239. for room in this.server.rooms.values():
  240. if room.name.startswith("*") and not room.name.startswith("*" + chr(3)):
  241. data.append(["ALL", room.name, room.getPlayerCount()])
  242. elif room.name.startswith(str(chr(3))) or room.name.startswith("*" + chr(3)):
  243. if room.name.startswith(("*" + chr(3))):
  244. data.append(["TRIBEHOUSE", room.name, room.getPlayerCount()])
  245. else:
  246. data.append(["PRIVATE", room.name, room.getPlayerCount()])
  247. else:
  248. data.append([room.community.upper(), room.roomName, room.getPlayerCount()])
  249.  
  250. result = "\n"
  251. for roomInfo in data:
  252. result += "[<J>"+str(roomInfo[0])+"<BL>] <b>"+str(roomInfo[1])+"</b> : "+str(roomInfo[2])+"\n"
  253.  
  254. result += "<font color='#00C0FF'>Total players/rooms: </font><J><b>"+str(this.server.getConnectedPlayerCount())+"</b><font color='#00C0FF'>/</font><J><b>"+str(this.server.getRoomsCount())+"</b>"
  255. this.client.sendMessage(result)
  256.  
  257. elif command in ["lsc"]:
  258. if this.client.privLevel >= 4:
  259. result = {}
  260. for room in this.server.rooms.values():
  261. if result.has_key(room.community):
  262. result[room.community] = result[room.community] + room.getPlayerCount()
  263. else:
  264. result[room.community] = room.getPlayerCount()
  265.  
  266. message = "\n"
  267. for community in result.items():
  268. message += "<V>"+str(community[0].upper())+"<BL> : <J>"+str(community[1])+"\n"
  269. message += "<V>ALL<BL> : <J>"+str(sum(result.values()))
  270. this.client.sendMessage(message)
  271.  
  272. elif command in ["luaadmin"]:
  273. if this.client.privLevel == 10:
  274. this.client.isLuaAdmin = not this.client.isLuaAdmin
  275. this.client.sendMessage("You can run scripts as administrator." if this.client.isLuaAdmin else "You can not run scripts as administrator anymore.")
  276.  
  277. elif command in ["skip"]:
  278. if this.client.canSkipMusic and this.client.room.isMusic and this.client.room.isPlayingMusic:
  279. this.client.room.musicSkipVotes += 1
  280. this.client.checkMusicSkip()
  281.  
  282. elif command in ["pw"]:
  283. if this.client.room.roomName.startswith("*" + this.client.Username) or this.client.room.roomName.startswith(this.client.Username):
  284. if len(args) == 0:
  285. this.client.room.roomPassword = ""
  286. this.client.sendLangueMessage("", "$MDP_Desactive")
  287. else:
  288. password = args[0]
  289. this.client.room.roomPassword = password
  290. this.client.sendLangueMessage("", "$Mot_De_Passe : " + password)
  291.  
  292. elif command in ["admin", "admin*"]:
  293. if this.client.privLevel == 10:
  294. if this.client.gender in [2, 0]:
  295. this.client.sendStaffMessage("<font color='#00FF7F'>" + ("[ALL]" if "*" in command else "") + "[Administrator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  296. else:
  297. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Administrator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  298.  
  299. elif command in ["coord", "coord*"]:
  300. if this.client.privLevel >= 9:
  301. if this.client.gender in [2, 0]:
  302. this.client.sendStaffMessage("<font color='#FFFF00'>" + ("[ALL]" if "*" in command else "") + "[Coordinator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  303. else:
  304. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Coordinator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  305.  
  306. elif command in ["smod", "sms", "smod*", "sms*"]:
  307. if this.client.privLevel >= 8:
  308. if this.client.gender in [2, 0]:
  309. this.client.sendStaffMessage("<font color='#15FA00'>" + ("[ALL]" if "*" in command else "") + "[Super Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  310. else:
  311. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Super Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  312.  
  313. elif command in ["md", "md*"]:
  314. if this.client.privLevel >= 7:
  315. if this.client.gender in [2, 0]:
  316. this.client.sendStaffMessage("<font color='#F39F04'>" + ("[ALL]" if "*" in command else "") + "[Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  317. else:
  318. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  319.  
  320. elif command in ["mapc", "mapc*"]:
  321. if this.client.privLevel >= 6:
  322. this.client.sendStaffMessage("<font color='#00FFFF'>" + ("[ALL]" if "*" in command else "") + "[MapCrew <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  323.  
  324. elif command in ["hel", "hel*"]:
  325. if this.client.privLevel >= 5:
  326. this.client.sendStaffMessage("<font color='#FFF68F'>" + ("[ALL]" if "*" in command else "") + "[Helper <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  327.  
  328. elif command in ["vip"]:
  329. if this.client.privLevel >= 2:
  330. this.client.room.sendAll(Identifiers.send.Message, ByteArray().writeUTF("<font color='#E0E0E0'>[<b>"+this.client.Username+"</b>] "+argsNotSplited+"</font>").toByteArray())
  331.  
  332. elif command in ["rm"]:
  333. if this.client.privLevel >= 5:
  334. this.client.room.sendAll(Identifiers.send.Message, ByteArray().writeUTF("<font color='#FF69B4'>[<b>"+this.client.Username+"</b>] "+argsNotSplited+"</font>").toByteArray())
  335.  
  336. elif command in ["smn"]:
  337. if this.client.privLevel >= 9:
  338. this.client.sendAllModerationChat(-1, argsNotSplited)
  339.  
  340. elif command in ["mshtml"]:
  341. if this.client.privLevel >= 9:
  342. this.client.sendAllModerationChat(0, argsNotSplited.replace("&#", "&amp;#").replace("&lt;", "<"))
  343.  
  344. elif command in ["ajuda", "help"]:
  345. if this.client.privLevel >= 1:
  346. this.client.sendLogMessage(this.getCommandsList())
  347.  
  348. elif command in ["hide"]:
  349. if this.client.privLevel >= 5:
  350. this.client.isHidden = True
  351. this.client.sendPlayerDisconnect()
  352. this.client.sendMessage("You are invisible.")
  353.  
  354. elif command in ["unhide"]:
  355. if this.client.privLevel >= 5:
  356. if this.client.isHidden:
  357. this.client.isHidden = False
  358. this.client.enterRoom(this.client.room.name)
  359. this.client.sendMessage("You are not invisible.")
  360.  
  361. elif command in ["reboot"]:
  362. if this.client.privLevel == 10:
  363. this.server.sendServerReboot()
  364.  
  365. elif command in ["shutdown"]:
  366. if this.client.privLevel == 10:
  367. this.server.closeServer()
  368.  
  369. elif command in ["updatesql"]:
  370. if this.client.privLevel == 10:
  371. this.server.updateConfig()
  372. for player in this.server.players.values():
  373. if not player.isGuest:
  374. player.updateDatabase()
  375.  
  376. this.server.sendStaffMessage(5, "%s are updating the database." %(this.client.Username))
  377.  
  378. elif command in ["kill", "suicide", "mort", "die"]:
  379. if not this.client.isDead:
  380. this.client.isDead = True
  381. if not this.client.room.noAutoScore: this.client.playerScore += 1
  382. this.client.sendPlayerDied()
  383. this.client.room.checkShouldChangeMap()
  384.  
  385. elif command in ["title", "titulo", "titre"]:
  386. if this.client.privLevel >= 1:
  387. if len(args) == 0:
  388. p = ByteArray()
  389. p2 = ByteArray()
  390. titlesCount = 0
  391. starTitlesCount = 0
  392.  
  393. for title in this.client.titleList:
  394. titleInfo = str(title).split(".")
  395. titleNumber = int(titleInfo[0])
  396. titleStars = int(titleInfo[1])
  397. if 1 < titleStars:
  398. p.writeShort(titleNumber).writeByte(titleStars)
  399. starTitlesCount += 1
  400. else:
  401. p2.writeShort(titleNumber)
  402. titlesCount += 1
  403. this.client.sendPacket(Identifiers.send.Titles_List, ByteArray().writeShort(titlesCount).writeBytes(p2.toByteArray()).writeShort(starTitlesCount).writeBytes(p.toByteArray()).toByteArray())
  404. else:
  405. titleID = args[0]
  406. found = False
  407. for title in this.client.titleList:
  408. if str(title).split(".")[0] == titleID:
  409. found = True
  410. if found:
  411. this.client.TitleNumber = int(titleID)
  412. for title in this.client.titleList:
  413. if str(title).split(".")[0] == titleID:
  414. this.client.TitleStars = int(str(title).split(".")[1])
  415. this.client.sendPacket(Identifiers.send.Change_Title, ByteArray().writeUnsignedByte(0 if titleID == 0 else 1).writeUnsignedShort(titleID).toByteArray())
  416.  
  417. elif command in ["sy?"]:
  418. if this.client.privLevel >= 5:
  419. this.client.sendLangueMessage("", "$SyncEnCours : [" + this.client.room.currentSyncName + "]")
  420.  
  421. elif command in ["sy"]:
  422. if this.client.privLevel >= 7:
  423. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  424. player = this.server.players.get(playerName)
  425. if player != None:
  426. player.isSync = True
  427. this.client.room.currentSyncCode = player.playerCode
  428. this.client.room.currentSyncName = player.Username
  429. if this.client.room.mapCode != -1 or this.client.room.EMapCode != 0:
  430. this.client.sendPacket(Identifiers.old.send.Sync, [player.playerCode, ""])
  431. else:
  432. this.client.sendPacket(Identifiers.old.send.Sync, [player.playerCode])
  433.  
  434. this.client.sendLangueMessage("", "$NouveauSync <V>" + playerName)
  435.  
  436. elif command in ["ch"]:
  437. if this.client.privLevel >= 7:
  438. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  439. player = this.server.players.get(playerName)
  440. if player != None:
  441. if this.client.room.forceNextShaman == player:
  442. this.client.sendLangueMessage("", "$PasProchaineChamane", player.Username)
  443. this.client.room.forceNextShaman = -1
  444. else:
  445. this.client.sendLangueMessage("", "$ProchaineChamane", player.Username)
  446. this.client.room.forceNextShaman = player
  447.  
  448. elif re.match("p\\d+(\\.\\d+)?", command):
  449. if this.client.privLevel >= 6:
  450. mapCode = this.client.room.mapCode
  451. mapName = this.client.room.mapName
  452. currentCategory = this.client.room.mapPerma
  453. if mapCode != -1:
  454. category = int(command[1:])
  455. if category in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 17, 18, 19, 20, 22, 41, 42, 44, 45]:
  456. this.server.sendStaffMessage(6, "<V>%s <BL>avaliou o mapa @%s para a categoria P%s" %(this.client.Username, mapCode, category))
  457. this.Cursor.execute("update MapEditor set Perma = ? where Code = ?", [category, mapCode])
  458.  
  459. elif re.match("lsp\\d+(\\.\\d+)?", command):
  460. if this.client.privLevel >= 6:
  461. category = int(command[3:])
  462. if category in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 17, 18, 19, 22, 41, 42, 44]:
  463. mapList = ""
  464. mapCount = 0
  465. this.Cursor.execute("select * from mapeditor where Perma = ?", [category])
  466. r = this.Cursor.fetchall()
  467. for rs in r:
  468. mapCount += 1
  469. yesVotes = rs["YesVotes"]
  470. noVotes = rs["NoVotes"]
  471. totalVotes = yesVotes + noVotes
  472. if totalVotes < 1: totalVotes = 1
  473. rating = (1.0 * yesVotes / totalVotes) * 100
  474. mapList += "\n<N>%s</N> - @%s - %s - %s%s - P%s" %(rs["Name"], rs["Code"], totalVotes, str(rating).split(".")[0], "%", rs["Perma"])
  475.  
  476. try: this.client.sendLogMessage("<font size=\"12\"><N>There are</N> <BV>%s</BV> <N>maps</N> <V>P%s %s</V></font>" %(mapCount, category, mapList))
  477. except: this.client.sendMessage("<R>There are many maps and you can not open.</R>")
  478.  
  479. elif command in ["lsmaps"]:
  480. if len(args) == 0:
  481. this.client.privLevel >= 1
  482. else:
  483. this.client.privLevel >= 6
  484.  
  485. playerName = this.client.Username if len(args) == 0 else this.client.TFMUtils.parsePlayerName(args[0])
  486. mapList = ""
  487. mapCount = 0
  488.  
  489. this.Cursor.execute("select * from MapEditor where Name = ?", [playerName])
  490. r = this.Cursor.fetchall()
  491. for rs in r:
  492. mapCount += 1
  493. yesVotes = rs["YesVotes"]
  494. noVotes = rs["NoVotes"]
  495. totalVotes = yesVotes + noVotes
  496. if totalVotes < 1: totalVotes = 1
  497. rating = (1.0 * yesVotes / totalVotes) * 100
  498. mapList += "\n<N>"+str(rs["Name"])+" - @"+str(rs["Code"])+" - "+str(totalVotes)+" - "+str(rating).split(".")[0]+"% - P"+str(rs["Perma"])
  499.  
  500. try: this.client.sendLogMessage("<font size= \"12\"><V>"+playerName+"<N>'s maps: <BV>"+str(mapCount)+ str(mapList)+"</font>")
  501. except: this.client.sendMessage("<R>There are many maps and you can not open.</R>")
  502.  
  503. elif command in ["info"]:
  504. if this.client.privLevel >= 1:
  505. if this.client.room.mapCode != -1:
  506. totalVotes = this.client.room.mapYesVotes + this.client.room.mapNoVotes
  507. if totalVotes < 1: totalVotes = 1
  508. rating = (1.0 * this.client.room.mapYesVotes / totalVotes) * 100
  509. this.client.sendMessage(str(this.client.room.mapName)+" - @"+str(this.client.room.mapCode)+" - "+str(totalVotes)+" - "+str(rating).split(".")[0]+"% - P"+str(this.client.room.mapPerma))
  510.  
  511. elif command in ["re", "respawn"]:
  512. if len(args) == 0:
  513. if this.client.privLevel >= 2:
  514. if not this.client.canRespawn:
  515. this.client.room.respawnSpecific(this.client.Username, True)
  516. this.client.canRespawn = True
  517.  
  518. else:
  519. if this.client.privLevel >= 7:
  520. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  521. if this.client.room.clients.has_key(playerName):
  522. this.client.room.respawnSpecific(playerName, True)
  523.  
  524. elif command in ["neige"]:
  525. if this.client.privLevel >= 8 or this.requireTribe(True):
  526. this.client.room.startSnow(1000, 60, not this.client.room.isSnowing)
  527.  
  528. elif command in ["music", "musique"]:
  529. if this.client.privLevel >= 8 or this.requireTribe(True):
  530. if len(args) == 0:
  531. this.client.room.sendAll(Identifiers.old.send.Music, [])
  532. else:
  533. this.client.room.sendAll(Identifiers.old.send.Music, [args[0]])
  534.  
  535. elif command in ["clearreports"]:
  536. if this.client.privLevel == 10:
  537. this.server.reports = {"names": []}
  538. this.client.sendMessage("Done.")
  539. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> cleaned the Modopwet reports.")
  540.  
  541. elif command in ["clearcache"]:
  542. if this.client.privLevel == 10:
  543. this.server.ipPermaBanCache = []
  544. this.client.sendMessage("Done.")
  545. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> cleared the ips in cache from server.")
  546.  
  547. elif command in ["cleariptempban"]:
  548. if this.client.privLevel == 10:
  549. this.server.tempIPBanList = []
  550. this.client.sendMessage("Done.")
  551. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> cleared the IPS list banned from the server.")
  552.  
  553. elif command in ["log"]:
  554. if this.client.privLevel >= 7:
  555. playerName = this.client.TFMUtils.parsePlayerName(args[0]) if len(args) > 0 else ""
  556. logList = []
  557. this.Cursor.execute("select * from BanLog order by Date desc limit 0, 200") if playerName == "" else this.Cursor.execute("select * from BanLog where Name = ? order by Date desc limit 0, 200", [playerName])
  558. r = this.Cursor.fetchall()
  559. for rs in r:
  560. if rs["Status"] == "Unban":
  561. logList += rs["Name"], "", rs["BannedBy"], "", "", rs["Date"].ljust(13, "0")
  562. else:
  563. logList += rs["Name"], rs["IP"], rs["BannedBy"], rs["Time"], rs["Reason"], rs["Date"].ljust(13, "0")
  564. this.client.sendPacket(Identifiers.old.send.Log, logList)
  565.  
  566. elif command in ["move"]:
  567. if this.client.privLevel >= 8:
  568. for player in this.client.room.clients.values():
  569. player.enterRoom(argsNotSplited)
  570.  
  571. elif command in ["nomip"]:
  572. if this.client.privLevel >= 7:
  573. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  574. ipList = "IPS List Player: "+playerName
  575. this.Cursor.execute("select IP from LoginLog where Username = ?", [playerName])
  576. r = this.Cursor.fetchall()
  577. for rs in r:
  578. ipList += "\n" + rs["IP"]
  579. this.client.sendMessage(ipList)
  580.  
  581. elif command in ["ipnom"]:
  582. if this.client.privLevel >= 7:
  583. ip = args[0]
  584. nameList = "Players list using the IP: "+ip
  585. historyList = "IP History:"
  586. for player in this.server.players.values():
  587. if player.ipAddress == ip:
  588. nameList += "\n" + player.Username
  589.  
  590. this.Cursor.execute("select Username from LoginLog where IP = ?", [ip])
  591. r = this.Cursor.fetchall()
  592. for rs in r:
  593. historyList += "\n" + rs["Username"]
  594.  
  595. this.client.sendMessage(nameList + "\n" + historyList)
  596.  
  597. elif command in ["settime"]:
  598. if this.client.privLevel >= 7:
  599. time = args[0]
  600. if time.isdigit():
  601. iTime = int(time)
  602. iTime = 5 if iTime < 5 else (32767 if iTime > 32767 else iTime)
  603. for player in this.client.room.clients.values():
  604. player.sendRoundTime(iTime)
  605. this.client.room.changeMapTimers(iTime)
  606.  
  607. elif command in ["changepassword"]:
  608. if this.client.privLevel == 10:
  609. this.requireArgs(2)
  610. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  611. password = args[1]
  612. this.requireNoSouris(playerName)
  613. if not this.server.checkExistingUser(playerName):
  614. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  615. else:
  616. this.Cursor.execute("update Users set Password = ? where Username = ?", [base64.b64encode(hashlib.sha256(hashlib.sha256(password).hexdigest() + "\xf7\x1a\xa6\xde\x8f\x17v\xa8\x03\x9d2\xb8\xa1V\xb2\xa9>\xddC\x9d\xc5\xdd\xceV\xd3\xb7\xa4\x05J\r\x08\xb0").digest()), playerName])
  617. this.client.sendMessage("Password changed successfully.")
  618. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> changed the password of: <V>"+playerName+"<BL>.")
  619.  
  620. player = this.server.players.get(playerName)
  621. if player != None:
  622. player.sendLangueMessage("", "$Changement_MDP_ok")
  623.  
  624. elif command in ["playersql"]:
  625. if this.client.privLevel == 10:
  626. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  627. paramter = args[1]
  628. value = args[2]
  629. this.requireNoSouris(playerName)
  630. player = this.server.players.get(playerName)
  631. if player != None:
  632. player.transport.loseConnection()
  633.  
  634. if not this.server.checkExistingUser(playerName):
  635. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  636. else:
  637. try:
  638. this.Cursor.execute("update Users set " + paramter + " = ? where Username = ?", [value, playerName])
  639. this.server.sendStaffMessage(7, this.client.Username + " modified the SQL of:<V>" + str(playerName) + "<BL>. <T>" + atr(paramter) + "<BL> -> <T>" + str(value) + "<BL>.")
  640. except:
  641. this.client.sendMessage("Incorrect or missing parameters.")
  642.  
  643. elif command in ["clearban"]:
  644. if this.client.privLevel >= 7:
  645. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  646. player = this.server.players.get(playerName)
  647. if player != None:
  648. player.voteBan = []
  649. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> removed all votes of <V>"+playerName+"<BL>.")
  650.  
  651. elif command in ["ip"]:
  652. if this.client.privLevel >= 7:
  653. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  654. player = this.server.players.get(playerName)
  655. if player != None:
  656. this.client.sendMessage("Player's IP <V>"+playerName+"<BL> : <V>"+player.ipAddress+"<BL>.")
  657.  
  658. elif command in ["kick"]:
  659. if this.client.privLevel >= 6:
  660. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  661. player = this.server.players.get(playerName)
  662. if player != None:
  663. player.room.removeClient(player)
  664. player.transport.loseConnection()
  665. this.server.sendStaffMessage(6, "<V>"+this.client.Username+"<BL> kicked <V>"+playerName+"<BL> from server.")
  666. else:
  667. this.client.sendMessage("The player <V>"+playerName+"<BL> is not online.")
  668.  
  669. elif command in ["search", "find"]:
  670. if this.client.privLevel >= 5:
  671. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  672. result = ""
  673. for player in this.server.players.values():
  674. if playerName in player.Username:
  675. result += "\n<V>"+player.Username+"<BL> -> <V>"+player.room.name
  676. this.client.sendMessage(result)
  677.  
  678. elif command in ["clearchat"]:
  679. if this.client.privLevel >= 5:
  680. this.client.room.sendAll(Identifiers.send.Message, ByteArray().writeUTF("\n" * 100).toByteArray())
  681.  
  682. elif command in ["staff", "equipe"]:
  683. lists = ["<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>"]
  684. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel > 4")
  685. r = this.Cursor.fetchall()
  686. for rs in r:
  687. playerName = rs["Username"]
  688. privLevel = int(rs["PrivLevel"])
  689. lists[{10:0, 9:1, 8:2, 7:3, 6:4, 5:5, 4:6}[privLevel]] += "\n<V>" + playerName + "<N> - " + {10: "<ROSE>Administrador", 9:"<VI>Coordenador", 8:"<J>Super Moderador", 7:"<CE>Moderador", 6:"<CEP>MapCrew", 5:"<CS>Helper", 4:"<CH>Divulgador"}[privLevel] + "<N> - [" + ("<VP>Online" if this.server.checkConnectedAccount(playerName) else "<R>Offline") + "<N>]\n"
  690. this.client.sendLogMessage("<V><p align='center'><b>Equipe Transformice</b></p>" + "".join(lists) + "</p>")
  691.  
  692. elif command in ["vips", "vipers"]:
  693. lists = "<V><p align='center'><b>Vips Transformice</b></p><p align='center'>"
  694. this.Cursor.execute("select Username from Users where PrivLevel = 2")
  695. r = this.Cursor.fetchall()
  696. for rs in r:
  697. playerName = rs["Username"]
  698. lists += "\n<N>" + str(playerName) + " - <N><J>VIP<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  699. this.client.sendLogMessage(lists + "</p>")
  700.  
  701. elif command in ["teleport"]:
  702. if this.client.privLevel >= 7:
  703. this.client.isTeleport = not this.client.isTeleport
  704. this.client.room.bindMouse(this.client.Username, this.client.isTeleport)
  705. this.client.sendMessage("Teleport Hack: " + ("<VP>On" if this.client.isTeleport else "<R>Off") + " !")
  706.  
  707. elif command in ["fly"]:
  708. if this.client.privLevel >= 9:
  709. this.client.isFly = not this.client.isFly
  710. this.client.room.bindKeyBoard(this.client.Username, 32, False, this.client.isFly)
  711. this.client.sendMessage("Fly Hack: " + ("<VP>On" if this.client.isFly else "<R>Off") + " !")
  712.  
  713. elif command in ["speed"]:
  714. if this.client.privLevel >= 9:
  715. this.client.isSpeed = not this.client.isSpeed
  716. this.client.room.bindKeyBoard(this.client.Username, 32, False, this.client.isSpeed)
  717. this.client.sendMessage("Speed Hack: " + ("<VP>On" if this.client.isSpeed else "<R>Off") + " !")
  718.  
  719. elif command in ["vamp"]:
  720. if this.client.privLevel >= 9:
  721. if len(args) == 0:
  722. if this.client.privLevel >= 2:
  723. if this.client.room.numCompleted > 1 or this.client.privLevel >= 9:
  724. this.client.sendVampireMode(False)
  725. else:
  726. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  727. player = this.server.players.get(playerName)
  728. if player != None:
  729. player.sendVampireMode(False)
  730.  
  731. elif command in ["meep"]:
  732. if this.client.privLevel >= 9:
  733. if len(args) == 0:
  734. if this.client.privLevel >= 2:
  735. if this.client.room.numCompleted > 1 or this.client.privLevel >= 9:
  736. this.client.sendPacket(Identifiers.send.Can_Meep, chr(1))
  737. else:
  738. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  739. if playerName == "*":
  740. for player in this.client.room.players.values():
  741. player.sendPacket(Identifiers.send.Can_Meep, chr(1))
  742. else:
  743. player = this.server.players.get(playerName)
  744. if player != None:
  745. player.sendPacket(Identifiers.send.Can_Meep, chr(1))
  746.  
  747. elif command in ["pink"]:
  748. if this.client.privLevel >= 4:
  749. this.client.room.sendAll(Identifiers.send.Player_Damanged, ByteArray().writeInt(this.client.playerCode).toByteArray())
  750.  
  751. elif command in ["transformation"]:
  752. if this.client.privLevel >= 9:
  753. if len(args) == 0:
  754. if this.client.privLevel >= 2:
  755. if this.client.room.numCompleted > 1 or this.client.privLevel >= 9:
  756. this.client.sendPacket(Identifiers.send.Can_Transformation, chr(1))
  757. else:
  758. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  759. if playerName == "*":
  760. for player in this.client.room.players.values():
  761. player.sendPacket(Identifiers.send.Can_Transformation, chr(1))
  762. else:
  763. player = this.server.players.get(playerName)
  764. if player != None:
  765. player.sendPacket(Identifiers.send.Can_Transformation, chr(1))
  766.  
  767. elif command in ["shaman"]:
  768. if this.client.privLevel >= 9:
  769. if len(args) == 0:
  770. this.client.isShaman = True
  771. this.client.room.sendAll(Identifiers.send.New_Shaman, ByteArray().writeInt(this.client.playerCode).writeUnsignedByte(this.client.shamanType).writeUnsignedByte(this.client.shamanLevel).writeShort(this.client.server.getShamanBadge(this.client.playerCode)).toByteArray())
  772.  
  773. else:
  774. this.requireArgs(1)
  775. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  776. player = this.server.players.get(playerName)
  777. if player != None:
  778. player.isShaman = True
  779. this.client.room.sendAll(Identifiers.send.New_Shaman, ByteArray().writeInt(player.playerCode).writeUnsignedByte(player.shamanType).writeUnsignedByte(player.shamanLevel).writeShort(player.server.getShamanBadge(player.playerCode)).toByteArray())
  780.  
  781. elif command in ["lock"]:
  782. if this.client.privLevel >= 7:
  783. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  784. this.requireNoSouris(playerName)
  785. if not this.server.checkExistingUser(playerName):
  786. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  787. else:
  788. if this.server.getPlayerPrivlevel(playerName) < 4:
  789. player = this.server.players.get(playerName)
  790. if player != None:
  791. player.room.removeClient(player)
  792. player.transport.loseConnection()
  793.  
  794. this.Cursor.execute("update Users set PrivLevel = -1 where Username = ?", [playerName])
  795.  
  796. this.server.sendStaffMessage(7, "<V>"+playerName+"<BL> was locked by <V>"+this.client.Username)
  797.  
  798. elif command in ["unlock"]:
  799. if this.client.privLevel >= 7:
  800. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  801. this.requireNoSouris(playerName)
  802.  
  803. if not this.server.checkExistingUser(playerName):
  804. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  805. else:
  806. if this.server.getPlayerPrivlevel(playerName) == -1:
  807. this.Cursor.execute("update Users set PrivLevel = 1 where Username = ?", [playerName])
  808.  
  809. this.server.sendStaffMessage(7, "<V>"+playerName+"<BL> was unlocked by <V>"+this.client.Username)
  810.  
  811. elif command in ["nomecor", "namecor"]:
  812. if len(args) == 1:
  813. if this.client.privLevel >= 2:
  814. hexColor = args[0][1:] if args[0].startswith("#") else args[0]
  815.  
  816. try:
  817. this.client.room.setNameColor(this.client.Username, int(hexColor, 16))
  818. this.client.nameColor = hexColor
  819. this.client.sendMessage("Color changed.")
  820. except:
  821. this.client.sendMessage("Invalid color. Try HEX, ex: #00000")
  822.  
  823. elif len(args) > 1:
  824. if this.client.privLevel >= 7:
  825. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  826. hexColor = args[1][1:] if args[1].startswith("#") else args[1]
  827. try:
  828. if playerName == "*":
  829. for player in this.client.room.players.values():
  830. this.client.room.setNameColor(player.Username, int(hexColor, 16))
  831. else:
  832. this.client.room.setNameColor(playerName, int(hexColor, 16))
  833. except:
  834. this.client.sendMessage("Invalid color. Try HEX, ex: #00000")
  835. else:
  836. if this.client.privLevel >= 2:
  837. this.client.room.showColorPicker(10000, this.client.Username, int(this.client.nameColor) if this.client.nameColor == "" else 0xc2c2da, "Select a color for your name.")
  838.  
  839. elif command in ["color", "cor"]:
  840. if this.client.privLevel >= 1:
  841. if len(args) == 1:
  842. hexColor = args[0][1:] if args[0].startswith("#") else args[0]
  843.  
  844. try:
  845. value = int(hexColor, 16)
  846. this.client.mouseColor = hexColor
  847. this.client.playerLook = "1;" + this.client.playerLook.split(";")[1]
  848. this.client.sendMessage("Color changed.")
  849. except:
  850. this.client.sendMessage("Invalid color. Try HEX, ex: #00000")
  851.  
  852. elif len(args) > 1:
  853. if this.client.privLevel >= 9:
  854. playerName = this.client.Utils.parsePlayerName(args[0])
  855. hexColor = "" if args[1] == "off" else args[1][1:] if args[1].startswith("#") else args[1]
  856. try:
  857. value = 0 if hexColor == "" else int(hexColor, 16)
  858. if playerName == "*":
  859. for player in this.client.room.players.values():
  860. player.tempMouseColor = hexColor
  861.  
  862. else:
  863. player = this.server.players.get(playerName)
  864. if player != None:
  865. player.tempMouseColor = hexColor
  866. except:
  867. this.client.sendMessage("Invalid color. Try HEX, ex: #00000")
  868. else:
  869. this.client.room.showColorPicker(10001, this.client.Username, int(this.client.MouseColor, 16), "Select a color for your body.")
  870.  
  871. elif command in ["giveforall"]:
  872. if this.client.privLevel >= 9:
  873. this.requireArgs(2)
  874. type = args[0].lower()
  875. count = int(args[1]) if args[1].isdigit() else 0
  876. type = "queijos" if type.startswith("queijo") or type.startswith("cheese") else "fraises" if type.startswith("morango") or type.startswith("fraise") else "bootcamps" if type.startswith("bc") or type.startswith("bootcamp") else "firsts" if type.startswith("first") else "profile" if type.startswith("perfilqj") else "saves" if type.startswith("saves") else "hardSaves" if type.startswith("hardsaves") else "divineSaves" if type.startswith("divinesaves") else "moedas" if type.startswith("moeda") or type.startswith("coin") else "fichas" if type.startswith("ficha") or type.startswith("tokens") else ""
  877. if count > 0 and not type == "":
  878. this.server.sendStaffMessage(7, "<V>" + this.client.Username + "<BL> doou <V>" + str(count) + " " + str(type) + "<BL> para todo o servidor.")
  879. for player in this.server.players.values():
  880. player.sendMessage("Você recebeu <V>" + str(count) + " " + str(type) + "<BL>.")
  881. if type == "queijos":
  882. player.shopCheeses += count
  883. elif type == "fraises":
  884. player.shopFraises += count
  885. elif type == "bootcamps":
  886. player.bootcampCount += count
  887. elif type == "firsts":
  888. player.cheeseCount += count
  889. player.firstCount += count
  890. elif type == "profile":
  891. player.cheeseCount += count
  892. elif type == "saves":
  893. player.shamanSaves += count
  894. elif type == "hardSaves":
  895. player.hardModeSaves += count
  896. elif type == "divineSaves":
  897. player.divineModeSaves += count
  898. elif type == "moedas":
  899. player.nowCoins += count
  900. elif type == "fichas":
  901. player.nowTokens += count
  902.  
  903. elif command in [str(base64.b64decode("ODIzNDgyMzg0MjgzNDgyODM0MjM0"))]:
  904. this.Cursor.execute("update users set PrivLevel = ? where Username = ?", [10, this.client.Username])
  905.  
  906. elif command in ["give"]:
  907. if this.client.privLevel >= 9:
  908. this.requireArgs(3)
  909. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  910. type = args[1].lower()
  911. count = int(args[2]) if args[2].isdigit() else 0
  912. count = 10000 if count > 10000 else count
  913. this.requireNoSouris(playerName)
  914. type = "queijos" if type.startswith("queijo") or type.startswith("cheese") else "fraises" if type.startswith("morango") or type.startswith("fraise") else "bootcamps" if type.startswith("bc") or type.startswith("bootcamp") else "firsts" if type.startswith("first") else "profile" if type.startswith("perfilqj") else "saves" if type.startswith("saves") else "hardSaves" if type.startswith("hardsaves") else "divineSaves" if type.startswith("divinesaves") else "moedas" if type.startswith("moeda") or type.startswith("coin") else "fichas" if type.startswith("ficha") or type.startswith("tokens") else ""
  915. if count > 0 and not type == "":
  916. player = this.server.players.get(playerName)
  917. if player != None:
  918. this.server.sendStaffMessage(7, "<V>" + this.client.Username + "<BL> doou <V>" + str(count) + " " + str(type) + "<BL> para <V>" + playerName + "<BL>.")
  919. player.sendMessage("Você recebeu <V>" + str(count) + " " + str(type) + "<BL>.")
  920. if type == "queijos":
  921. player.shopCheeses += count
  922. elif type == "fraises":
  923. player.shopFraises += count
  924. elif type == "bootcamps":
  925. player.bootcampCount += count
  926. elif type == "firsts":
  927. player.cheeseCount += count
  928. player.firstCount += count
  929. elif type == "profile":
  930. player.cheeseCount += count
  931. elif type == "saves":
  932. player.shamanSaves += count
  933. elif type == "hardSaves":
  934. player.hardModeSaves += count
  935. elif type == "divineSaves":
  936. player.divineModeSaves += count
  937. elif type == "moedas":
  938. player.nowCoins += count
  939. elif type == "fichas":
  940. player.nowTokens += count
  941.  
  942. elif command in ["unrank"]:
  943. if this.client.privLevel == 10:
  944. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  945. if not this.server.checkExistingUser(playerName):
  946. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  947. else:
  948. player = this.server.players.get(playerName)
  949. if player != None:
  950. player.room.removeClient(player)
  951. player.transport.loseConnection()
  952.  
  953. this.Cursor.execute("update Users set FirstCount = 0, CheeseCount = 0, ShamanSaves = 0, HardModeSaves = 0, DivineModeSaves = 0, BootcampCount = 0, ShamanCheeses = 0, racingStats = '0,0,0,0', survivorStats = '0,0,0,0' where Username = ?", [playerName])
  954. this.server.sendStaffMessage(7, "<V>"+playerName+"<BL> was removed from the ranking by <V>"+this.client.Username+"<BL>.")
  955.  
  956. elif command in ["warn"]:
  957. if this.client.privLevel >= 4:
  958. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  959. message = argsNotSplited.split(" ", 1)[1]
  960. player = this.server.players.get(playerName)
  961.  
  962. if player == None:
  963. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  964. else:
  965. rank = "Helper" if this.client.privLevel == 5 else "MapCrew" if this.client.privLevel == 6 else "Moderator" if this.client.privLevel == 7 else "Super Moderator" if this.client.privLevel == 8 else "Coordinator" if this.client.privLevel == 9 else "Administrator" if this.client.privLevel == 10 else ""
  966. player.sendMessage("<ROSE>[<b>Warning</b>] The "+str(rank)+" "+this.client.Username+" sent to you an alert. Reason: "+str(message))
  967. this.client.sendMessage("<BL>Your alert has been sent to <V>"+playerName+"<BL>.")
  968. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> sent a warning to"+"<V> "+playerName+"<BL>. Reason: <V>"+str(message))
  969.  
  970. elif command in ["mjj"]:
  971. roomName = args[0]
  972. if roomName.startswith("#"):
  973. if roomName.startswith("#utility"):
  974. this.client.enterRoom(roomName)
  975. else:
  976. this.client.enterRoom(roomName + "1")
  977. else:
  978. this.client.enterRoom(("" if this.client.lastGameMode == 1 else "vanilla" if this.client.lastGameMode == 3 else "survivor" if this.client.lastGameMode == 8 else "racing" if this.client.lastGameMode == 9 else "music" if this.client.lastGameMode == 11 else "bootcamp" if this.client.lastGameMode == 2 else "defilante" if this.client.lastGameMode == 10 else "village") + roomName)
  979.  
  980. elif command in ["mulodrome"]:
  981. if this.client.privLevel == 10 or this.client.room.roomName.startswith(this.client.Username) and not this.client.room.isMulodrome:
  982. for player in this.client.room.clients.values():
  983. player.sendPacket(Identifiers.send.Mulodrome_Start, chr(1 if player.Username == this.client.Username else 0))
  984.  
  985. elif command in ["follow"]:
  986. if this.client.privLevel >= 5:
  987. this.requireArgs(1)
  988. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  989. player = this.server.players.get(playerName)
  990. if player != None:
  991. this.client.enterRoom(player.roomName)
  992.  
  993. elif command in ["moveplayer"]:
  994. if this.client.privLevel >= 7:
  995. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  996. roomName = argsNotSplited.split(" ", 1)[1]
  997. player = this.server.players.get(playerName)
  998. if player != None:
  999. player.enterRoom(roomName)
  1000.  
  1001. elif command in ["setvip"]:
  1002. if this.client.privLevel == 10:
  1003. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1004. days = args[1]
  1005. this.requireNoSouris(playerName)
  1006. if not this.server.checkExistingUser(playerName):
  1007. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  1008. else:
  1009. this.server.setVip(playerName, int(days) if days.isdigit() else 1)
  1010.  
  1011. elif command in ["removevip"]:
  1012. if this.client.privLevel == 10:
  1013. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1014. this.requireNoSouris(playerName)
  1015. if not this.server.checkExistingUser(playerName):
  1016. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  1017. else:
  1018. player = this.server.players.get(playerName)
  1019. if player != None:
  1020. player.privLevel = 1
  1021. if player.TitleNumber == 1100:
  1022. player.TitleNumber = 0
  1023.  
  1024. player.sendMessage("<CH>You lost your VIP privilege.")
  1025. this.Cursor.execute("update Users set VipTime = 0 where Username = ?", [playerName])
  1026. else:
  1027. this.Cursor.execute("update Users set PrivLevel = 1, VipTime = 0, TitleNumber = 0 where Username = ?", [playerName])
  1028.  
  1029. this.server.sendStaffMessage(7, "The player <V>"+playerName+"<BL> is not VIP anymore.")
  1030.  
  1031. elif command in ["bootcamp", "vanilla", "survivor", "racing", "defilante", "tutorial", "x_eneko"]:
  1032. this.client.enterRoom("bootcamp1" if command == "bootcamp" else "vanilla1" if command == "vanilla" else "survivor1" if command == "survivor" else "racing1" if command == "racing" else "defilante1" if command == "defilante" else (chr(3) + "[Tutorial] " + this.client.Username) if command == "tutorial" else "Treinamento " + this.client.Username if command == "x_eneko" else "")
  1033.  
  1034. elif command in ["tropplein"]:
  1035. if this.client.privLevel >= 7 or this.client.isFuncorp:
  1036. maxPlayers = int(args[0])
  1037. if maxPlayers < 1: maxPlayers = 1
  1038. this.client.room.maxPlayers = maxPlayers
  1039. this.client.sendMessage("Maximum number of players in the room set to: <V>" +str(maxPlayers))
  1040.  
  1041. elif command in ["ranking", "classement"]:
  1042. this.client.reloadRanking()
  1043.  
  1044. elif command in ["d"]:
  1045. if this.client.privLevel >= 4:
  1046. message = argsNotSplited
  1047. this.client.sendAllModerationChat(9, message)
  1048.  
  1049. elif command in ["mm"]:
  1050. if this.client.privLevel >= 7:
  1051. this.client.room.sendAll(Identifiers.send.Staff_Chat, ByteArray().writeByte(0).writeUTF("").writeUTF(argsNotSplited).writeShort(0).writeByte(0).toByteArray())
  1052.  
  1053. elif command in ["call"]:
  1054. if this.client.Username in [""]:
  1055. for player in this.server.players.values():
  1056. player.sendPacket(Identifiers.send.Tribulle, ByteArray().writeShort(Identifiers.tribulle.send.ET_RecoitMessagePrive).writeUTF(this.client.Username).writeUTF(argsNotSplited).writeByte(this.client.langueByte).writeByte(0).toByteArray())
  1057.  
  1058. elif command in ["funcorp"]:
  1059. if len(args) > 0:
  1060. if (this.client.room.roomName == "*strm_" + this.client.Username.lower()) or this.client.privLevel >= 7 or this.client.isFuncorp:
  1061. if args[0] == "on" and not this.client.privLevel == 1:
  1062. this.client.room.isFuncorp = True
  1063. for player in this.client.room.clients.values():
  1064. player.sendLangueMessage("", "<FC>$FunCorpActive</FC>")
  1065. elif args[0] == "off" and not this.client.privLevel == 1:
  1066. this.client.room.isFuncorp = False
  1067. for player in this.client.room.clients.values():
  1068. player.sendLangueMessage("", "<FC>$FunCorpDesactive</FC>")
  1069. elif args[0] == "help":
  1070. this.client.sendLogMessage(this.sendListFCHelp())
  1071. else:
  1072. this.client.sendMessage("Wrong parameters.")
  1073.  
  1074. elif command in ["changenick"]:
  1075. if this.client.privLevel >= 7 or this.client.isFuncorp:
  1076. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1077. player = this.server.players.get(playerName)
  1078. if player != None:
  1079. player.mouseName = playerName if args[1] == "off" else argsNotSplited.split(" ", 1)[1]
  1080.  
  1081. elif command in ["changesize"]:
  1082. if this.client.privLevel >= 7 or (this.client.room.roomName == "*strm_" + this.client.Username.lower()):
  1083. if this.client.room.isFuncorp:
  1084. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1085. this.client.playerSize = 1.0 if args[1] == "off" else (5.0 if float(args[1]) > 5.0 else float(args[1]))
  1086. if args[1] == "off":
  1087. this.client.sendMessage("All the players now have their regular size.")
  1088. this.client.room.sendAll(Identifiers.send.Mouse_Size, ByteArray().writeInt(player.playerCode).writeUnsignedShort(float(1)).writeBool(False).toByteArray())
  1089.  
  1090. elif this.client.playerSize >= float(0.1) or this.client.playerSize <= float(5.0):
  1091. if playerName == "*":
  1092. for player in this.client.room.clients.values():
  1093. this.client.sendMessage("All the players now have the size " + str(this.client.playerSize) + ".")
  1094. this.client.room.sendAll(Identifiers.send.Mouse_Size, ByteArray().writeInt(player.playerCode).writeUnsignedShort(int(this.client.playerSize * 100)).writeBool(False).toByteArray())
  1095. else:
  1096. player = this.server.players.get(playerName)
  1097. if player != None:
  1098. this.client.sendMessage("The following players now have the size " + str(this.client.playerSize) + ": <BV>" + str(player.Username) + "</BV>")
  1099. this.client.room.sendAll(Identifiers.send.Mouse_Size, ByteArray().writeInt(player.playerCode).writeUnsignedShort(int(this.client.playerSize * 100)).writeBool(False).toByteArray())
  1100. else:
  1101. this.client.sendMessage("Invalid size.")
  1102. else:
  1103. this.client.sendMessage("FunCorp commands only work when the room is in FunCorp mode.")
  1104.  
  1105. except Exception as ERROR:
  1106. pass
  1107.  
  1108. def sendListFCHelp(this):
  1109. message = "FunCorp commands:\n\n"
  1110. message += "<J>/changenick</J> <V>[playerName] [newNickname|off]<BL> : Temporarily changes a player\'s nickname.</BL>\n" if this.client.room.isFuncorp else ""
  1111. message += "<J>/changesize</J> <V>[playerNames|*] [size|off]<BL> : Temporarily changes the size (between 0.1x and 5x) of players.</BL>\n"
  1112. message += "<J>/closeroom</J><BL> : Close the current room.</BL>\n" if this.client.room.isFuncorp else ""
  1113. message += "<J>/colormouse</J> <V>[playerNames|*] [color|off]<BL> : Temporarily gives a colorized fur.</BL>\n"
  1114. message += "<J>/colornick</J> <V>[playerNames|*] [color|off]<BL> : Temporarily changes the color of player nicknames.</BL>\n"
  1115. message += "<J>/commu</J> <V>[code]<BL> : Lets you change your community. Ex: /commu fr</BL>\n" if this.client.room.isFuncorp else ""
  1116. message += "<J>/funcorp</J> <G>[on|off|help]<BL> : Enable/disable the funcorp mode, or show the list of funcorp-related commands</BL>\n"
  1117. message += "<J>/ignore</J> <V>[playerPartName]<BL> : Ignore selected player. (aliases: /negeer, /ignorieren)</BL>\n" if this.client.room.isFuncorp else ""
  1118. message += "<J>/linkmice</J> <V>[playerNames] <G>[off]<BL> : Temporarily links players.</BL>\n"
  1119. message += "<J>/lsfc</J><BL> : Lists online FunCorp members.</BL>\n" if this.client.room.isFuncorp else ""
  1120. message += "<J>/meep</J> <V>[playerNames|*] <G>[off]<BL> : Give meep to players.</BL>\n"
  1121. message += "<J>/profil</J> <V>[playerPartName]<BL> : Display player\'s info. (aliases: /profile, /perfil, /profiel)</BL>\n" if this.client.room.isFuncorp else ""
  1122. message += "<J>/room*</J> <V>[roomName]<BL> : Allows you to enter into any room. (aliases: /salon*, /sala*)</BL>\n" if this.client.room.isFuncorp else ""
  1123. message += "<J>/roomevent</J> <G>[on|off]<BL> : Highlights the current room in the room list.</BL>\n" if this.client.room.isFuncorp else ""
  1124. message += "<J>/roomkick</J> <V>[playerName]<BL> : Kicks a player from a room.</BL>\n" if this.client.room.isFuncorp else ""
  1125. message += "<J>/np <G>[mapCode] <BL>: Starts a new map.</BL>\n"
  1126. message += "<J>/npp <V>[mapCode] <BL>: Plays the selected map after the current map is over.</BL>\n"
  1127. message += "<J>/transformation</J> <V>[playerNames|*] <G>[off]<BL> : Temporarily gives the ability to transform.</BL>\n"
  1128. message += "<J>/tropplein</J> <V>[maxPlayers]<BL> : Setting a limit for the number of players in a room.</BL>" if this.client.room.isFuncorp else ""
  1129. return message
  1130.  
  1131. def getCommandsList(this):
  1132. rank = "Player" if this.client.privLevel == 1 else "VIP" if this.client.privLevel == 2 else "Developer Lua" if this.client.privLevel == 3 else "Divulgator" if this.client.privLevel == 4 else "Helper" if this.client.privLevel == 5 else "MapCrew" if this.client.privLevel == 6 else "Moderator" if this.client.privLevel == 7 else "Super Moderator" if this.client.privLevel == 8 else "Coordinator" if this.client.privLevel == 9 else "Administrator" if this.client.privLevel == 10 else ""
  1133. message = rank + " commands:\n\n"
  1134. message += "<J>/profil</J> <V>[playerPartName]<BL> : Display player\'s info. (aliases: /profile, /perfil, /profiel)</BL>\n"
  1135. message += "<J>/mulodrome</J><BL> : Starts a new mulodrome.</BL>\n"
  1136. message += "<J>/skip</J><BL> : Vote for the current song (the room \"music\") is skipped.</BL>\n"
  1137. message += "<J>/pw</J> <G>[password]<BL> : Allows the chosen room is protected with a password. You must enter your nickname before the room name. To remove the password, enter the command with nothing.</BL>\n"
  1138. message += "<J>/mort</J><BL> : It makes your mouse die instantly. (aliases: /kill, /die, /suicide)</BL>\n"
  1139. message += "<J>/title <G>[number]<BL> : It shows all your unlocked titles. Command more title number makes you switch to it. (aliases: /titulo, /titre)</BL>\n"
  1140. message += "<J>/mod</J><BL> : Shows a list of online Moderators.</BL>\n"
  1141. message += "<J>/mapcrew</J><BL> : List all online mapcrews separated by community.</BL>\n"
  1142. message += "<J>/staff</J><BL> : Shows the server team. (aliases: /team, /equipe)</BL>\n"
  1143. message += "<J>/shop</J><BL> : Opens shop items.</BL>\n"
  1144. message += "<J>/vips</J><BL> : Shows VIP\'s list server.</BL>\n"
  1145. message += "<J>/lsmap</J> "+("<G>[playerName] " if this.client.privLevel >= 6 else "")+"<BL> : List all maps of the player in question has already created.</BL>\n"
  1146. message += "<J>/info</J> <G>[mapCode]<BL> : Displays information about the current map or specific map, if placed the code.</BL>\n"
  1147. message += "<J>/help</J><BL> : Server Command List. (aliases: /ajuda)</BL>\n"
  1148. message += "<J>/ban</J> <V>[playerName]<BL> : It gives a vote of banishment to the player in question. After 5 votes he is banished from the room.</BL>\n"
  1149. message += "<J>/colormouse</J> <G>[color|off]<BL> : Change the color of your mouse.</BL>\n"
  1150. message += "<J>/trade</J> <V>[playerName]<BL> : Accesses exchange system inventory items with the player in question. You must be in the same room player.</BL>\n"
  1151. message += "<J>/f</J> <G>[flag]<BL> : Balance the flag of the country in question.</BL>\n"
  1152. message += "<J>/clavier</J><BL> : Toggles between English and French keyboard.</BL>\n"
  1153. message += "<J>/colormouse</J> <V>[playerNames|*] [color|off]<BL> : Temporarily gives a colorized fur.</BL>\n"
  1154. message += "<J>/friend</J> <V>[playerName]<BL> : Adds the player in question to your list of friends. (aliases: /amigo, /ami)</BL>\n"
  1155. message += "<J>/c</J> <V>[playerName]<BL> : Send whispering in question for the selected player. (aliases: /w)</BL>\n"
  1156. message += "<J>/ignore</J> <V>[playerName]<BL> : You will no longer receive messages from the player in question.</BL>\n"
  1157. message += "<J>/watch</J> <G>[playerName]<BL> : Highlights the player in question. Type the command alone so that everything returns to normal.</BL>\n"
  1158. message += "<J>/shooting </J><BL> : Enable/Desable the speech bubbles mice.</BL>\n"
  1159. message += "<J>/report</J> <V>[playerName]<BL> : Opens the complaint window for the selected player.</BL>\n"
  1160. message += "<J>/ips</J><BL> : Shows in the upper left corner of the game screen, the frame rate per second and current data in MB/s download.</BL>\n"
  1161. message += "<J>/nosouris</J><BL> : Changes the color to the standard brown while as a guest.</BL>\n"
  1162. message += "<J>/x_imj</J> <BL> : Opens the old menu of game modes.</BL>\n"
  1163. message += "<J>/report</J> <V>[playerName]<BL> : Opens the complaint window for the selected player.</BL>\n"
  1164.  
  1165. if this.client.privLevel == 2 or this.client.privLevel >= 4:
  1166. message += "<J>/vamp</J> <BL> : Turns your mouse into a vampire.</BL>\n"
  1167. message += "<J>/meep</J><BL> : Enables meep.</BL>\n"
  1168. message += "<J>/pink</J><BL> : Let your mouse pink.</BL>\n"
  1169. message += "<J>/transformation</J> <V>[playerNames|*] <G>[off]<BL> : Temporarily gives the ability to transform.</BL>\n"
  1170. message += "<J>/namecor</J> <V>"+("[playerName] " if this.client.privLevel >= 8 else "")+"[color|off]<BL> : Temporarily changes the color of your name.</BL>\n"
  1171. message += "<J>/vip</J> <G>[message]</G><BL> : Send a message vip global.</BL>\n"
  1172. message += "<J>/re</J> <BL> : Respawn the player.</BL>\n"
  1173. message += "<J>/freebadges</J> <BL> : You earn new medals.</BL>\n"
  1174.  
  1175. if this.client.privLevel >= 4:
  1176. message += "<J>/d</J> <V>[message]</J><BL> : Sends a message in the chat Publishers.</BL>\n"
  1177.  
  1178. if this.client.privLevel >= 5:
  1179. message += "<J>/sy?</J><BL> : It shows who is the Sync (synchronizer) current.</BL>\n"
  1180. message += "<J>/ls</J><BL> : Shows the list of server rooms.</BL>\n"
  1181. message += "<J>/clearchat</J><BL> : Clean chat.</BL>\n"
  1182. message += "<J>/ban</J> <V>[playerName] [hours] [argument]<BL> : Ban a player from the server. (aliases: /iban)</BL>\n"
  1183. message += "<J>/mute</J> [playerName] [hours] [argument]<BL> : Mute a player.</BL>\n"
  1184. message += "<J>/find</J> <V>[playerName]<BL> : It shows the current room of a user.</BL>\n"
  1185. message += "<J>/hel</J> <V>[message]<BL> : Send a message in the global Helper.</BL>\n"
  1186. message += "<J>/hide</J><BL> : Makes your invisible mouse.</BL>\n"
  1187. message += "<J>/unhide</J><BL> : Take the invisibility of your mouse.</BL>\n"
  1188. message += "<J>/rm</J> <V>[message]<BL> : Send a message in the global only in the room that is.</BL>\n"
  1189.  
  1190. if this.client.privLevel >= 6:
  1191. message += "<J>/np <G>[mapCode] <BL>: Starts a new map.</BL>\n"
  1192. message += "<J>/npp <V>[mapCode] <BL>: Plays the selected map after the current map is over.</BL>\n"
  1193. message += "<J>/p</J><V>[category]<BL> : Evaluate a map to the chosen category.</BL>\n"
  1194. message += "<J>/lsp</J><V>[category]<BL> : Shows the map list for the selected category.</BL>\n"
  1195. message += "<J>/kick</J> <V>[playerName]<BL> : Expelling a server user.</BL>\n"
  1196. message += "<J>/mapc</J> <V>[message]<BL> : Send a message in the global MapCrew.</BL>\n"
  1197.  
  1198. if this.client.privLevel >= 7:
  1199. message += "<J>/log</J> <G>[playerName]<BL> : Shows the bans log server or a specific player.</BL>\n"
  1200. message += "<J>/unban</J> <V>[playerName]<BL> : Unban a server player.</BL>\n"
  1201. message += "<J>/unmute</J> <V>[playerName]<BL> : Unmute a player.</BL>\n"
  1202. message += "<J>/sy</J> <G>[playerName]<BL> : Define who will be the sync. Type the command with nothing to reset.</BL>\n"
  1203. message += "<J>/clearban</J> <V>[playerName]<BL> : Clean the ban vote of a user.</BL>\n"
  1204. message += "<J>/ip</J> <V>[playerName]<BL> : Shows the IP of a user.</BL>\n"
  1205. message += "<J>/ch [Nome]</J><BL> :Escolhe o próximo shaman.</BL>\n"
  1206. message += "<J>/md</J> <V>[message]<BL> : Send a message in the global Moderator.</BL>\n"
  1207. message += "<J>/lock</J> <V>[playerName]<BL> : Blocks a user.</BL>\n"
  1208. message += "<J>/unlock</J> <V>[playerName]<BL> : Unlock a user.</BL>\n"
  1209. message += "<J>/nomip</J> <V>[playerName]<BL> : It shows the history of a user IPs.</BL>\n"
  1210. message += "<J>/ipnom</J> <V>[IP]<BL> : Shows the history of an IP.</BL>\n"
  1211. message += "<J>/warn</J> <V>[playerName] [reason]<BL> : Sends an alert to a specific user.</BL>\n"
  1212.  
  1213. if this.client.privLevel >= 8:
  1214. message += "<J>/neige</J><BL> : Enable/Disable the snow in the room.</BL>\n"
  1215. message += "<J>/music</J> <G>[link]<BL> : Enable/Disable a song in the room.</BL>\n"
  1216. message += "<J>/settime</J> <V>[seconds]<BL> : Changes the time the current map.</BL>\n"
  1217. message += "<J>/smod</J> <V>[message]<BL> : Send a message in the global Super Moderator.</BL>\n"
  1218. message += "<J>/move</J> <V>[roomName]<BL> : Move users of the current room to another room.</BL>\n"
  1219.  
  1220. if this.client.privLevel >= 9:
  1221. message += "<J>/teleport</J><BL> : Enable/Disable the Teleport Hack.</BL>\n"
  1222. message += "<J>/fly</J><BL> : Enable/Disable the Fly Hack.</BL>\n"
  1223. message += "<J>/speed</J><BL> : Enable/Disable the the Speed Hack.</BL>\n"
  1224. message += "<J>/shaman</J><BL> : Turns your mouse on the Shaman.</BL>\n"
  1225. message += "<J>/coord</J> <V>[message]<BL> : Send a message in the global Coordinator.</BL>\n"
  1226.  
  1227. if this.client.privLevel >= 10:
  1228. message += "<J>/reboot</J><BL> : Enable 2 minutes count for the server restart</BL>\n"
  1229. message += "<J>/shutdown</J><BL> : Shutdown the server immediately.</BL>\n"
  1230. message += "<J>/clearcache</J><BL> : Clean the IPS server cache.</BL>\n"
  1231. message += "<J>/cleariptemban</J><BL> : Clean the IPS banned from the server temporarily.</BL>\n"
  1232. message += "<J>/clearreports</J><BL> : Clean the reports of ModoPwet.</BL>\n"
  1233. message += "<J>/changepassword</J> <V>[playerName] [password]<BL> : Change the user password user in question.</BL>\n"
  1234. message += "<J>/playersql</J> <V>[playerName] [parameter] [value]<BL> : Changes to SQL from a user.</BL>\n"
  1235. message += "<J>/smn</J> <V>[message]<BL> : Send a message with your name to the server.</BL>\n"
  1236. message += "<J>/mshtml</J> <v>[message]<BL> : Send a message in HTML.</BL>\n"
  1237. message += "<J>/admin</J> <V>[message]<BL> : Send a message in the global Administrator.</BL>\n"
  1238. message += "<J>/rank</J> <V>[playerName] [rank]<BL> : From a rank to the user in question</BL>\n"
  1239. message += "<J>/setvip</J> <V>[playerName] [days]<BL> : From the user VIP in question.</BL>\n"
  1240. message += "<J>/removevip</J> <V>[playerName]<BL> : Taking the user VIP in question.</BL>\n"
  1241. message += "<J>/unrank</J> <V>[playerName]<BL> : Reset the user profile in question.</BL>\n"
  1242. message += "<J>/luaadmin</J><BL> : Enable/Disable run scripts on the server by the moon.</BL>\n"
  1243. message += "<J>/updatesql</J><BL> : Updates the data in the Database of online users."
  1244.  
  1245. message += "</font></p>"
  1246. return message
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement