Guest User

Untitled

a guest
Apr 16th, 2017
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 124.58 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:
  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.  
  106.  
  107. elif command in ["unban"]:
  108. if this.client.privLevel >= 10:
  109. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  110. this.requireNoSouris(playerName)
  111. found = False
  112.  
  113. if this.server.checkExistingUser(playerName):
  114. if this.server.checkTempBan(playerName):
  115. this.server.removeTempBan(playerName)
  116. found = True
  117.  
  118. if this.server.checkPermaBan(playerName):
  119. this.server.removePermaBan(playerName)
  120. found = True
  121.  
  122. if found:
  123. import time
  124. this.Cursor.execute("insert into BanLog values (?, ?, '', '', ?, 'Unban', '', '')", [playerName, this.client.Username, int(str(time.time())[:9])])
  125. this.server.sendStaffMessage(5, "<V>%s</V> unbanned <V>%s</V>." %(this.client.Username, playerName))
  126.  
  127. elif command in ["unbanip"]:
  128. if this.client.privLevel >= 7:
  129. ip = args[0]
  130. if ip in this.server.ipPermaBanCache:
  131. this.server.ipPermaBanCache.remove(ip)
  132. this.Cursor.execute("delete from ippermaban where IP = ?", [ip])
  133. this.server.sendStaffMessage(7, "<V>%s</V> unbanned the IP <V>%S</V>." %(this.client.Username, ip))
  134. else:
  135. this.client.sendMessage("This IP is not banned.")
  136.  
  137.  
  138. elif command in ["mute"]:
  139. if this.client.privLevel >= 5:
  140. if (args[0] == "help"):
  141. message = "\n<J>Mute help:\n"
  142. message += "<ROSE>0<J> - <CH>2 <J> - <N>Flood</N>\n"
  143. message += "<ROSE>1<J> - <CH>1 <J> - <N>Disrespect to a player</N>\n"
  144. message += "<ROSE>2<J> - <CH>24 <J> - <N>Disrespect to staff</N>\n"
  145. message += "<J>Using <N>/mute playerName <CH>time <ROSE>argument</ROSE>"
  146. this.client.sendMessage(message)
  147. else:
  148. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  149. time = args[1] if (argsCount >= 2) else "1"
  150. 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"
  151. hours = int(time) if (time.isdigit()) else 1
  152. this.requireNoSouris(playerName)
  153. hours = 500 if (hours > 500) else hours
  154. hours = 24 if (this.client.privLevel <= 6 and hours > 24) else hours
  155. if (reason in ["Why not set", "Another motive"]):
  156. this.client.sendMessage("<ROSE>Need help? Type <J>/mute help</J>")
  157. this.server.mutePlayer(playerName, hours, reason, this.client.Username)
  158.  
  159. elif command in ["unmute"]:
  160. if this.client.privLevel >= 7:
  161. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  162. this.requireNoSouris(playerName)
  163. this.server.sendStaffMessage(5, "<V>%s</V> unmuted <V>%s</V>." %(this.client.Username, playerName))
  164. this.server.removeModMute(playerName)
  165. this.client.isMute = False
  166.  
  167. elif command in ["rank"]:
  168. if this.client.privLevel in [10, 11]:
  169. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  170. rank = args[1].lower()
  171. this.requireNoSouris(playerName)
  172. if not this.server.checkExistingUser(playerName) or playerName in this.server.adminAllow:
  173. this.client.sendMessage("User not found: <V>%s</V>." %(playerName))
  174. else:
  175. privLevel = 11 if rank.startswith("fund") else 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 3 if rank.startswith("dev") or rank.startswith("lua") else 2 if rank.startswith("vip") else 1
  176. rankName = "Fundador" if rank.startswith("fund") else "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 "Lua Developer" if rank.startswith("dev") or rank.startswith("lua") else "Vip" if rank.startswith("vip") else "Player"
  177. player = this.server.players.get(playerName)
  178. if player != None:
  179. player.privLevel = privLevel
  180. player.TitleNumber = 0
  181. player.sendCompleteTitleList()
  182. else:
  183. this.Cursor.execute("update Users set PrivLevel = ?, TitleNumber = 0 where Username = ?", [privLevel, playerName])
  184.  
  185. this.server.sendStaffMessage(7, "<V>%s</V> won the rank of <V>%s</V>." %(playerName, rankName))
  186. elif command in ["rank2"]:
  187. if this.client.privLevel in [10, 11, 17, 18]:
  188. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  189. rank = args[1].lower()
  190. this.requireNoSouris(playerName)
  191. if not this.server.checkExistingUser(playerName) or playerName in this.server.adminAllow:
  192. this.client.sendMessage("User not found: <V>%s</V>." %(playerName))
  193. else:
  194. privLevel = 18 if rank.startswith("afund") else 17 if rank.startswith("aadm") else 16 if rank.startswith("acoord") else 15 if rank.startswith("asmod") else 14 if rank.startswith("amod") else 13 if rank.startswith("amap") or rank.startswith("amc") else 12 if rank.startswith("ahel") else 3 if rank.startswith("adev") or rank.startswith("alua") else 2 if rank.startswith("avip") else 1
  195. rankName = "AFundador" if rank.startswith("afund") else "AAdministrador" if rank.startswith("aadmin") else "ACoordinator" if rank.startswith("acoord") else "ASuper Moderator" if rank.startswith("asmod") else "AModerator" if rank.startswith("amod") else "AMapCrew" if rank.startswith("amap") or rank.startswith("amc") else "AHelper" if rank.startswith("ahel") else "ALua Developer" if rank.startswith("adev") or rank.startswith("alua") else "AVip" if rank.startswith("avip") else "Player"
  196. player = this.server.players.get(playerName)
  197. if player != None:
  198. player.privLevel = privLevel
  199. player.TitleNumber = 0
  200. player.sendCompleteTitleList()
  201. else:
  202. this.Cursor.execute("update Users set PrivLevel = ?, TitleNumber = 0 where Username = ?", [privLevel, playerName])
  203.  
  204. this.server.sendStaffMessage(7, "<V>%s</V> won the rank of <V>%s</V>." %(playerName, rankName))
  205. elif command in ["np", "npp"]:
  206. if this.client.privLevel >= 6:
  207. if len(args) == 0:
  208. this.client.room.mapChange()
  209. else:
  210. if not this.client.room.isVotingMode:
  211. code = args[0]
  212. if code.startswith("@"):
  213. mapInfo = this.client.room.getMapInfo(int(code[1:]))
  214. if mapInfo[0] == None:
  215. this.client.sendLangueMessage("", "$CarteIntrouvable")
  216. else:
  217. this.client.room.forceNextMap = code
  218. if command == "np":
  219. if this.client.room.changeMapTimer != None:
  220. this.client.room.changeMapTimer.cancel()
  221. this.client.room.mapChange()
  222. else:
  223. this.client.sendLangueMessage("", "$ProchaineCarte " + code)
  224.  
  225. elif code.isdigit():
  226. this.client.room.forceNextMap = code
  227. if command == "np":
  228. if this.client.room.changeMapTimer != None:
  229. this.client.room.changeMapTimer.cancel()
  230. this.client.room.mapChange()
  231. else:
  232. this.client.sendLangueMessage("", "$ProchaineCarte " + code)
  233.  
  234. elif command in ["mod", "mapcrews"]:
  235. staff = {}
  236. staffList = "$ModoPasEnLigne" if command == "mod" else "$MapcrewPasEnLigne"
  237.  
  238. for player in this.server.players.values():
  239. if command == "mod" and player.privLevel in [5,6,7,8,9,10,11] and not player.privLevel == 6 or command == "mapcrews" and player.privLevel == 6:
  240. if staff.has_key(player.Langue.lower()):
  241. names = staff[player.Langue.lower()]
  242. names.append(player.Username)
  243. staff[player.Langue.lower()] = names
  244. else:
  245. names = []
  246. names.append(player.Username)
  247. staff[player.Langue.lower()] = names
  248.  
  249. if len(staff) >= 1:
  250. staffList = "$ModoEnLigne" if command == "mod" else "$MapcrewEnLigne"
  251. for list in staff.items():
  252. staffList += "<br><BL>["+str(list[0])+"] <BV>"+str("<BL>, <BV>").join(list[1])
  253.  
  254. this.client.sendLangueMessage("", staffList)
  255. elif command in ["mod2", "mapcrews2"]:
  256. staff = {}
  257. staffList = "$ModoPasEnLigne" if command == "mod" else "$MapcrewPasEnLigne"
  258.  
  259. for player in this.server.players.values():
  260. if command == "mod2" and player.privLevel in [13,14,15,16,17,18] and not player.privLevel == 13 or command == "mapcrews2" and player.privLevel == 13:
  261. if staff.has_key(player.Langue.lower()):
  262. names = staff[player.Langue.lower()]
  263. names.append(player.Username)
  264. staff[player.Langue.lower()] = names
  265. else:
  266. names = []
  267. names.append(player.Username)
  268. staff[player.Langue.lower()] = names
  269.  
  270. if len(staff) >= 1:
  271. staffList = "$ModoEnLigne" if command == "mod" else "$MapcrewEnLigne"
  272. for list in staff.items():
  273. staffList += "<br><BL>["+str(list[0])+"] <BV>"+str("<BL>, <BV>").join(list[1])
  274.  
  275. this.client.sendLangueMessage("", staffList)
  276. elif command in ["ls"]:
  277. if this.client.privLevel >= 4:
  278. data = []
  279.  
  280. for room in this.server.rooms.values():
  281. if room.name.startswith("*") and not room.name.startswith("*" + chr(3)):
  282. data.append(["ALL", room.name, room.getPlayerCount()])
  283. elif room.name.startswith(str(chr(3))) or room.name.startswith("*" + chr(3)):
  284. if room.name.startswith(("*" + chr(3))):
  285. data.append(["TRIBEHOUSE", room.name, room.getPlayerCount()])
  286. else:
  287. data.append(["PRIVATE", room.name, room.getPlayerCount()])
  288. else:
  289. data.append([room.community.upper(), room.roomName, room.getPlayerCount()])
  290.  
  291. result = "\n"
  292. for roomInfo in data:
  293. result += "[<J>"+str(roomInfo[0])+"<BL>] <b>"+str(roomInfo[1])+"</b> : "+str(roomInfo[2])+"\n"
  294.  
  295. 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>"
  296. this.client.sendMessage(result)
  297.  
  298. elif command in ["lsc"]:
  299. if this.client.privLevel >= 4:
  300. result = {}
  301. for room in this.server.rooms.values():
  302. if result.has_key(room.community):
  303. result[room.community] = result[room.community] + room.getPlayerCount()
  304. else:
  305. result[room.community] = room.getPlayerCount()
  306.  
  307. message = "\n"
  308. for community in result.items():
  309. message += "<V>"+str(community[0].upper())+"<BL> : <J>"+str(community[1])+"\n"
  310. message += "<V>ALL<BL> : <J>"+str(sum(result.values()))
  311. this.client.sendMessage(message)
  312.  
  313. elif command in ["luaadmin"]:
  314. if this.client.privLevel >= 10:
  315. this.client.isLuaAdmin = not this.client.isLuaAdmin
  316. this.client.sendMessage("You can run scripts as administrator." if this.client.isLuaAdmin else "You can not run scripts as administrator anymore.")
  317.  
  318. elif command in ["skip"]:
  319. if this.client.canSkipMusic and this.client.room.isMusic and this.client.room.isPlayingMusic:
  320. this.client.room.musicSkipVotes += 1
  321. this.client.checkMusicSkip()
  322.  
  323. elif command in ["pw"]:
  324. if this.client.room.roomName.startswith("*" + this.client.Username) or this.client.room.roomName.startswith(this.client.Username):
  325. if len(args) == 0:
  326. this.client.room.roomPassword = ""
  327. this.client.sendLangueMessage("", "$MDP_Desactive")
  328. else:
  329. password = args[0]
  330. this.client.room.roomPassword = password
  331. this.client.sendLangueMessage("", "$Mot_De_Passe : " + password)
  332. elif command in ["fund", "fund*"]:
  333. if this.client.privLevel == 11:
  334. if this.client.gender in [2, 0]:
  335. this.client.sendStaffMessage("<font color='#0022FF'>" + ("[ALL]" if "*" in command else "") + "[Fundador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  336. else:
  337. this.client.sendStaffMessage("<font color='#0022FF'>" + ("[ALL]" if "*" in command else "") + "[Fundador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  338. elif command in ["admin", "admin*"]:
  339. if this.client.privLevel == 10 or this.client.privLevel == 11:
  340. if this.client.gender in [2, 0]:
  341. this.client.sendStaffMessage("<font color='#00FF7F'>" + ("[ALL]" if "*" in command else "") + "[Administrator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  342. else:
  343. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Administrator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  344. elif command in ["afund", "afund*"]:
  345. if this.client.privLevel in [11, 18]:
  346. if this.client.gender in [2, 0]:
  347. this.client.sendStaffMessage("<font color='#FF0000'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Fundador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  348. else:
  349. this.client.sendStaffMessage("<font color='#FF0000'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Fundador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  350. elif command in ["coord", "coord*"]:
  351. if this.client.privLevel == 9 or this.client.privLevel in [11, 10]:
  352. if this.client.gender in [2, 0]:
  353. this.client.sendStaffMessage("<font color='#FFFF00'>" + ("[ALL]" if "*" in command else "") + "[Coordenador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  354. else:
  355. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Coordenador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  356. elif command in ["evento", "evento*"]:
  357. if this.client.privLevel == 9 or this.client.privLevel in [11, 10]:
  358. if this.client.gender in [2, 0]:
  359. this.client.sendStaffMessage("<font color='#00FFBD'>" + ("[ALL]" if "*" in command else "") + "[Evento][<b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  360. else:
  361. this.client.sendStaffMessage("<font color='#00FFBD'>" + ("[ALL]" if "*" in command else "") + "[Evento][<b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  362. elif command in ["smod", "sms", "smod*", "sms*"]:
  363. if this.client.privLevel == 8 or this.client.privLevel in [11, 10, 9]:
  364. if this.client.gender in [2, 0]:
  365. this.client.sendStaffMessage("<font color='#15FA00'>" + ("[ALL]" if "*" in command else "") + "[Super Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  366. else:
  367. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Super Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  368. elif command in ["acoord", "acoord*"]:
  369. if this.client.privLevel == 16 or this.client.privLevel in [11, 10, 18, 17]:
  370. if this.client.gender in [2, 0]:
  371. this.client.sendStaffMessage("<font color='#FFFF00'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Coordenador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  372. else:
  373. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Coordenador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  374. elif command in ["md", "md*"]:
  375. if this.client.privLevel == 7 or this.client.privLevel in [11, 10, 9, 8]:
  376. if this.client.gender in [2, 0]:
  377. this.client.sendStaffMessage("<font color='#F39F04'>" + ("[ALL]" if "*" in command else "") + "[Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  378. else:
  379. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  380. elif command in ["aadmin", "aadmin*"]:
  381. if this.client.privLevel == 17 or this.client.privLevel in [11, 10, 18]:
  382. if this.client.gender in [2, 0]:
  383. this.client.sendStaffMessage("<font color='#00FF7F'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Administrator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  384. else:
  385. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Administrator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  386. elif command in ["mapc", "mapc*"]:
  387. if this.client.privLevel == 6 or this.client.privLevel in [11, 10, 9, 8, 7]:
  388. this.client.sendStaffMessage("<font color='#00FFFF'>" + ("[ALL]" if "*" in command else "") + "[MapCrew <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  389. elif command in ["asmod", "asms", "asmod*", "asms*"]:
  390. if this.client.privLevel == 15 or this.client.privLevel in [11, 10, 9, 18, 17, 16, 8]:
  391. if this.client.gender in [2, 0]:
  392. this.client.sendStaffMessage("<font color='#15FA00'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Super Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  393. else:
  394. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Super Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  395. elif command in ["hel", "hel*"]:
  396. if this.client.privLevel == 5 or this.client.privLevel in [11, 10, 9, 8, 7, 6]:
  397. this.client.sendStaffMessage("<font color='#FFF68F'>" + ("[ALL]" if "*" in command else "") + "[Helper <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  398. elif command in ["amd", "amd*"]:
  399. if this.client.privLevel == 14 or this.client.privLevel in [11, 10, 9, 8, 7, 18, 17, 16, 15]:
  400. if this.client.gender in [2, 0]:
  401. this.client.sendStaffMessage("<font color='#F39F04'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  402. else:
  403. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  404. elif command in ["vip"]:
  405. if this.client.privLevel == 2 or this.client.privLevel in [11, 10, 9, 8, 7, 6, 5, 18, 17, 16, 15, 14, 13]:
  406. this.client.room.sendAll(Identifiers.send.Message, ByteArray().writeUTF("<font color='#E0E0E0'>[<b>"+this.client.Username+"</b>] "+argsNotSplited+"</font>").toByteArray())
  407. elif command in ["amapc", "amapc*"]:
  408. if this.client.privLevel == 13 or this.client.privLevel in [11, 10, 9, 8, 7, 18, 17, 16, 15, 14, 6]:
  409. this.client.sendStaffMessage("<font color='#00FFFF'>" + ("[ALL]" if "*" in command else "") + "[Ajudante MapCrew <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  410. elif command in ["rm"]:
  411. if this.client.privLevel == 5 or this.client.privLevel in [11, 10, 9, 8, 7, 6]:
  412. this.client.room.sendAll(Identifiers.send.Message, ByteArray().writeUTF("<font color='#FF69B4'>[<b>"+this.client.Username+"</b>] "+argsNotSplited+"</font>").toByteArray())
  413.  
  414. elif command in ["smn"]:
  415. if this.client.privLevel == 9 or this.client.privLevel in [11, 10, 18, 17, 16]:
  416. this.client.sendAllModerationChat(-1, argsNotSplited)
  417.  
  418. elif command in ["mshtml"]:
  419. if this.client.privLevel == 9 or this.client.privLevel in [11, 10]:
  420. this.client.sendAllModerationChat(0, argsNotSplited.replace("&#", "&amp;#").replace("&lt;", "<"))
  421.  
  422. elif command in ["ajuda", "help"]:
  423. if this.client.privLevel >= 1:
  424. this.client.sendLogMessage(this.getCommandsList())
  425.  
  426. elif command in ["hide"]:
  427. if this.client.privLevel >= 5:
  428. this.client.isHidden = True
  429. this.client.sendPlayerDisconnect()
  430. this.client.sendMessage("You are invisible.")
  431.  
  432. elif command in ["unhide"]:
  433. if this.client.privLevel >= 5:
  434. if this.client.isHidden:
  435. this.client.isHidden = False
  436. this.client.enterRoom(this.client.room.name)
  437. this.client.sendMessage("You are not invisible.")
  438.  
  439. elif command in ["reboot"]:
  440. if this.client.privLevel == 11:
  441. this.server.sendServerReboot()
  442.  
  443. elif command in ["shutdown"]:
  444. if this.client.privLevel == 11:
  445. this.server.closeServer()
  446.  
  447. elif command in ["updatesql"]:
  448. if this.client.privLevel == 10 or this.client.privLevel == 11:
  449. this.server.updateConfig()
  450. for player in this.server.players.values():
  451. if not player.isGuest:
  452. player.updateDatabase()
  453.  
  454. this.server.sendStaffMessage(5, "%s are updating the database." %(this.client.Username))
  455.  
  456. elif command in ["kill", "suicide", "mort", "die"]:
  457. if not this.client.isDead:
  458. this.client.isDead = True
  459. if not this.client.room.noAutoScore: this.client.playerScore += 1
  460. this.client.sendPlayerDied()
  461. this.client.room.checkShouldChangeMap()
  462.  
  463. elif command in ["title", "titulo", "titre"]:
  464. if this.client.privLevel >= 1:
  465. if len(args) == 0:
  466. p = ByteArray()
  467. p2 = ByteArray()
  468. titlesCount = 0
  469. starTitlesCount = 0
  470.  
  471. for title in this.client.titleList:
  472. titleInfo = str(title).split(".")
  473. titleNumber = int(titleInfo[0])
  474. titleStars = int(titleInfo[1])
  475. if 1 < titleStars:
  476. p.writeShort(titleNumber).writeByte(titleStars)
  477. starTitlesCount += 1
  478. else:
  479. p2.writeShort(titleNumber)
  480. titlesCount += 1
  481. this.client.sendPacket(Identifiers.send.Titles_List, ByteArray().writeShort(titlesCount).writeBytes(p2.toByteArray()).writeShort(starTitlesCount).writeBytes(p.toByteArray()).toByteArray())
  482. else:
  483. titleID = args[0]
  484. found = False
  485. for title in this.client.titleList:
  486. if str(title).split(".")[0] == titleID:
  487. found = True
  488. if found:
  489. this.client.TitleNumber = int(titleID)
  490. for title in this.client.titleList:
  491. if str(title).split(".")[0] == titleID:
  492. this.client.TitleStars = int(str(title).split(".")[1])
  493. this.client.sendPacket(Identifiers.send.Change_Title, ByteArray().writeUnsignedByte(0 if titleID == 0 else 1).writeUnsignedShort(titleID).toByteArray())
  494.  
  495. elif command in ["sy?"]:
  496. if this.client.privLevel >= 5:
  497. this.client.sendLangueMessage("", "$SyncEnCours : [" + this.client.room.currentSyncName + "]")
  498.  
  499. elif command in ["sy"]:
  500. if this.client.privLevel >= 7:
  501. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  502. player = this.server.players.get(playerName)
  503. if player != None:
  504. player.isSync = True
  505. this.client.room.currentSyncCode = player.playerCode
  506. this.client.room.currentSyncName = player.Username
  507. if this.client.room.mapCode != -1 or this.client.room.EMapCode != 0:
  508. this.client.sendPacket(Identifiers.old.send.Sync, [player.playerCode, ""])
  509. else:
  510. this.client.sendPacket(Identifiers.old.send.Sync, [player.playerCode])
  511.  
  512. this.client.sendLangueMessage("", "$NouveauSync <V>" + playerName)
  513.  
  514. elif command in ["ch"]:
  515. if this.client.privLevel >= 7:
  516. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  517. player = this.server.players.get(playerName)
  518. if player != None:
  519. if this.client.room.forceNextShaman == player:
  520. this.client.sendLangueMessage("", "$PasProchaineChamane", player.Username)
  521. this.client.room.forceNextShaman = -1
  522. else:
  523. this.client.sendLangueMessage("", "$ProchaineChamane", player.Username)
  524. this.client.room.forceNextShaman = player
  525.  
  526. elif re.match("p\\d+(\\.\\d+)?", command):
  527. if this.client.privLevel >= 6:
  528. mapCode = this.client.room.mapCode
  529. mapName = this.client.room.mapName
  530. currentCategory = this.client.room.mapPerma
  531. if mapCode != -1:
  532. category = int(command[1:])
  533. if category in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 17, 18, 19, 22, 41, 42, 44, 45]:
  534. this.server.sendStaffMessage(6, "[%s] @%s : %s -> %s" %(this.client.Username, mapCode, currentCategory, category))
  535. this.Cursor.execute("update MapEditor set Perma = ? where Code = ?", [category, mapCode])
  536.  
  537. elif re.match("lsp\\d+(\\.\\d+)?", command):
  538. if this.client.privLevel >= 6:
  539. category = int(command[3:])
  540. if category in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 17, 18, 19, 22, 41, 42, 44]:
  541. mapList = ""
  542. mapCount = 0
  543. this.Cursor.execute("select * from mapeditor where Perma = ?", [category])
  544. r = this.Cursor.fetchall()
  545. for rs in r:
  546. mapCount += 1
  547. yesVotes = rs["YesVotes"]
  548. noVotes = rs["NoVotes"]
  549. totalVotes = yesVotes + noVotes
  550. if totalVotes < 1: totalVotes = 1
  551. rating = (1.0 * yesVotes / totalVotes) * 100
  552. mapList += "\n<N>%s</N> - @%s - %s - %s%s - P%s" %(rs["Name"], rs["Code"], totalVotes, str(rating).split(".")[0], "%", rs["Perma"])
  553.  
  554. 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))
  555. except: this.client.sendMessage("<R>There are many maps and you can not open.</R>")
  556.  
  557. elif command in ["lsmaps"]:
  558. if len(args) == 0:
  559. this.client.privLevel >= 1
  560. else:
  561. this.client.privLevel >= 6
  562.  
  563. playerName = this.client.Username if len(args) == 0 else this.client.TFMUtils.parsePlayerName(args[0])
  564. mapList = ""
  565. mapCount = 0
  566.  
  567. this.Cursor.execute("select * from MapEditor where Name = ?", [playerName])
  568. r = this.Cursor.fetchall()
  569. for rs in r:
  570. mapCount += 1
  571. yesVotes = rs["YesVotes"]
  572. noVotes = rs["NoVotes"]
  573. totalVotes = yesVotes + noVotes
  574. if totalVotes < 1: totalVotes = 1
  575. rating = (1.0 * yesVotes / totalVotes) * 100
  576. mapList += "\n<N>"+str(rs["Name"])+" - @"+str(rs["Code"])+" - "+str(totalVotes)+" - "+str(rating).split(".")[0]+"% - P"+str(rs["Perma"])
  577.  
  578. try: this.client.sendLogMessage("<font size= \"12\"><V>"+playerName+"<N>'s maps: <BV>"+str(mapCount)+ str(mapList)+"</font>")
  579. except: this.client.sendMessage("<R>There are many maps and you can not open.</R>")
  580.  
  581. elif command in ["info"]:
  582. if this.client.privLevel >= 1:
  583. if this.client.room.mapCode != -1:
  584. totalVotes = this.client.room.mapYesVotes + this.client.room.mapNoVotes
  585. if totalVotes < 1: totalVotes = 1
  586. rating = (1.0 * this.client.room.mapYesVotes / totalVotes) * 100
  587. 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))
  588.  
  589. elif command in ["re", "respawn"]:
  590. if len(args) == 0:
  591. if this.client.privLevel >= 2:
  592. if not this.client.canRespawn:
  593. this.client.room.respawnSpecific(this.client.Username, True)
  594. this.client.canRespawn = True
  595.  
  596. else:
  597. if this.client.privLevel >= 7:
  598. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  599. if this.client.room.clients.has_key(playerName):
  600. this.client.room.respawnSpecific(playerName, True)
  601.  
  602. elif command in ["neige"]:
  603. if this.client.privLevel >= 8 or this.requireTribe(True):
  604. this.client.room.startSnow(1000, 60, not this.client.room.isSnowing)
  605.  
  606. elif command in ["music", "musique"]:
  607. if this.client.privLevel >= 8 or this.requireTribe(True):
  608. if len(args) == 0:
  609. this.client.room.sendAll(Identifiers.old.send.Music, [])
  610. else:
  611. this.client.room.sendAll(Identifiers.old.send.Music, [args[0]])
  612.  
  613. elif command in ["clearreports"]:
  614. if this.client.privLevel >= 10:
  615. this.server.reports = {"names": []}
  616. this.client.sendMessage("Done.")
  617. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> cleaned the Modopwet reports.")
  618.  
  619. elif command in ["clearcache"]:
  620. if this.client.privLevel >= 10:
  621. this.server.ipPermaBanCache = []
  622. this.client.sendMessage("Done.")
  623. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> cleared the ips in cache from server.")
  624.  
  625. elif command in ["cleariptempban"]:
  626. if this.client.privLevel >= 10:
  627. this.server.tempIPBanList = []
  628. this.client.sendMessage("Done.")
  629. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> cleared the IPS list banned from the server.")
  630.  
  631. elif command in ["log"]:
  632. if this.client.privLevel >= 7:
  633. playerName = this.client.TFMUtils.parsePlayerName(args[0]) if len(args) > 0 else ""
  634. logList = []
  635. 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])
  636. r = this.Cursor.fetchall()
  637. for rs in r:
  638. if rs["Status"] == "Unban":
  639. logList += rs["Name"], "", rs["BannedBy"], "", "", rs["Date"].ljust(13, "0")
  640. else:
  641. logList += rs["Name"], rs["IP"], rs["BannedBy"], rs["Time"], rs["Reason"], rs["Date"].ljust(13, "0")
  642. this.client.sendPacket(Identifiers.old.send.Log, logList)
  643.  
  644. elif command in ["move"]:
  645. if this.client.privLevel >= 8:
  646. for player in this.client.room.clients.values():
  647. player.enterRoom(argsNotSplited)
  648.  
  649. elif command in ["nomip"]:
  650. if this.client.privLevel >= 7:
  651. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  652. ipList = "IPS List Player: "+playerName
  653. this.Cursor.execute("select IP from LoginLog where Username = ?", [playerName])
  654. r = this.Cursor.fetchall()
  655. for rs in r:
  656. ipList += "\n" + rs["IP"]
  657. this.client.sendMessage(ipList)
  658.  
  659. elif command in ["ipnom"]:
  660. if this.client.privLevel >= 7:
  661. ip = args[0]
  662. nameList = "Players list using the IP: "+ip
  663. historyList = "IP History:"
  664. for player in this.server.players.values():
  665. if player.ipAddress == ip:
  666. nameList += "\n" + player.Username
  667.  
  668. this.Cursor.execute("select Username from LoginLog where IP = ?", [ip])
  669. r = this.Cursor.fetchall()
  670. for rs in r:
  671. historyList += "\n" + rs["Username"]
  672.  
  673. this.client.sendMessage(nameList + "\n" + historyList)
  674.  
  675. elif command in ["settime"]:
  676. if this.client.privLevel >= 7:
  677. time = args[0]
  678. if time.isdigit():
  679. iTime = int(time)
  680. iTime = 5 if iTime < 5 else (32767 if iTime > 32767 else iTime)
  681. for player in this.client.room.clients.values():
  682. player.sendRoundTime(iTime)
  683. this.client.room.changeMapTimers(iTime)
  684.  
  685. elif command in ["changeusername"]:
  686. if this.client.privLevel >= 10:
  687. this.requireArgs(2)
  688. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  689. username = args[1]
  690. this.requireNoSouris(playerName)
  691. if not this.server.checkExistingUser(playerName):
  692. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  693. else:
  694. this.Cursor.execute("update Users set Username = ? where Username = ?", [(username), playerName])
  695. this.client.sendMessage("Username changed successfully.")
  696. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> changed the username of: <V>"+playerName+"<BL>.")
  697.  
  698. player = this.server.players.get(playerName)
  699. if player != None:
  700. this.client.sendMessage("Seu nome foi alterado com sucesso!")
  701.  
  702. elif command in ["changepassword"]:
  703. if this.client.privLevel in [10, 11]:
  704. this.requireArgs(2)
  705. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  706. password = args[1]
  707. this.requireNoSouris(playerName)
  708. if not this.server.checkExistingUser(playerName):
  709. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  710. else:
  711. 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])
  712. this.client.sendMessage("Password changed successfully.")
  713. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> changed the password of: <V>"+playerName+"<BL>.")
  714.  
  715. player = this.server.players.get(playerName)
  716. if player != None:
  717. player.sendLangueMessage("", "$Changement_MDP_ok")
  718.  
  719. elif command in ["playersql"]:
  720. if this.client.privLevel >= 10:
  721. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  722. paramter = args[1]
  723. value = args[2]
  724. this.requireNoSouris(playerName)
  725. player = this.server.players.get(playerName)
  726. if player != None:
  727. player.transport.loseConnection()
  728.  
  729. if not this.server.checkExistingUser(playerName):
  730. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  731. else:
  732. try:
  733. this.Cursor.execute("update Users set " + paramter + " = ? where Username = ?", [value, playerName])
  734. this.server.sendStaffMessage(7, this.client.Username + " modified the SQL of:<V>" + str(playerName) + "<BL>. <T>" + atr(paramter) + "<BL> -> <T>" + str(value) + "<BL>.")
  735. except:
  736. this.client.sendMessage("Incorrect or missing parameters.")
  737.  
  738. elif command in ["clearban"]:
  739. if this.client.privLevel >= 7:
  740. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  741. player = this.server.players.get(playerName)
  742. if player != None:
  743. player.voteBan = []
  744. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> removed all votes of <V>"+playerName+"<BL>.")
  745.  
  746. elif command in ["ip"]:
  747. if this.client.privLevel >= 7:
  748. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  749. player = this.server.players.get(playerName)
  750. if player != None:
  751. this.client.sendMessage("Player's IP <V>"+playerName+"<BL> : <V>"+player.ipAddress+"<BL>.")
  752.  
  753. elif command in ["kick"]:
  754. if this.client.privLevel >= 6:
  755. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  756. player = this.server.players.get(playerName)
  757. if player != None:
  758. player.room.removeClient(player)
  759. player.transport.loseConnection()
  760. this.server.sendStaffMessage(6, "<V>"+this.client.Username+"<BL> kicked <V>"+playerName+"<BL> from server.")
  761. else:
  762. this.client.sendMessage("The player <V>"+playerName+"<BL> is not online.")
  763.  
  764. elif command in ["search", "find"]:
  765. if this.client.privLevel >= 5:
  766. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  767. result = ""
  768. for player in this.server.players.values():
  769. if playerName in player.Username:
  770. result += "\n<V>"+player.Username+"<BL> -> <V>"+player.room.name
  771. this.client.sendMessage(result)
  772.  
  773. elif command in ["clearchat"]:
  774. if this.client.privLevel >= 5:
  775. this.client.room.sendAll(Identifiers.send.Message, ByteArray().writeUTF("\n" * 100).toByteArray())
  776.  
  777. elif command in ["staff", "equipe"]:
  778. lists = ["<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>"]
  779. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel > 4")
  780. r = this.Cursor.fetchall()
  781. for rs in r:
  782. playerName = rs["Username"]
  783. privLevel = int(rs["PrivLevel"])
  784. player = this.server.players.get(playerName)
  785. lists[{11:0, 10:1, 9:2, 8:3, 7:4, 6:5, 5:6}[privLevel]] += "\n<V>" + playerName + "<N> - " + {11: "<J>Fundador", 10: "<ROSE>Administrator", 9:"<VI>Coordinator", 8:"<J>Super Moderator", 7:"<CE>Moderator", 6:"<CEP>MapCrew", 5:"<CS>Helper"}[privLevel] + "<N> - [" + ("<VP>Online <N>- <T>" + str(player.Langue) if player != None else "<R>Offline") + "<N>]\n"
  786. this.client.sendLogMessage("<V><p align='center'><b>Staff</b></p>" + "".join(lists) + "</p>")
  787. elif command in ["staff2", "equipe2"]:
  788. lists = ["<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>"]
  789. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel > 12")
  790. r = this.Cursor.fetchall()
  791. for rs in r:
  792. playerName = rs["Username"]
  793. privLevel = int(rs["PrivLevel"])
  794. player = this.server.players.get(playerName)
  795. lists[{18:0, 17:1, 16:2, 15:3, 14:4, 13:5, 12:6}[privLevel]] += "\n<V>" + playerName + "<N> - " + {18: "<J>Ajudante Fundador", 17: "<ROSE>Ajudante Administrator", 16:"<VI>Ajudante Coordinator", 15:"<J>Ajudante SMod", 14:"<CE>Ajudante Moderator", 13:"<CEP>Ajudante MapCrew", 12:"<CS>Ajudante em Teste"}[privLevel] + "<N> - [" + ("<VP>Online <N>- <T>" + str(player.Langue) if player != None else "<R>Offline") + "<N>]\n"
  796. this.client.sendLogMessage("<V><p align='center'><b>Staff</b></p>" + "".join(lists) + "</p>")
  797. elif command in ["vips", "vipers"]:
  798. lists = "<V><p align='center'><b>Vips</b></p><p align='center'>"
  799. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 2")
  800. r = this.Cursor.fetchall()
  801. for rs in r:
  802. playerName = rs["Username"]
  803. 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"
  804. this.client.sendLogMessage(lists + "</p>")
  805. elif command in ["mods"]:
  806. lists = "<V><p align='center'><b>Moderadores</b></p><p align='center'>"
  807. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 7")
  808. r = this.Cursor.fetchall()
  809. for rs in r:
  810. playerName = rs["Username"]
  811. lists += "\n<N>" + str(playerName) + " - <N><ROSE>Moderador<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  812. this.client.sendLogMessage(lists + "</p>")
  813. elif command in ["teleport"]:
  814. if this.client.privLevel >= 7:
  815. this.client.isTeleport = not this.client.isTeleport
  816. this.client.room.bindMouse(this.client.Username, this.client.isTeleport)
  817. this.client.sendMessage("Teleport Hack: " + ("<VP>On" if this.client.isTeleport else "<R>Off") + " !")
  818. elif command in ["smods"]:
  819. lists = "<V><p align='center'><b>Super Moderadores</b></p><p align='center'>"
  820. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 8")
  821. r = this.Cursor.fetchall()
  822. for rs in r:
  823. playerName = rs["Username"]
  824. lists += "\n<N>" + str(playerName) + " - <N><J>Super Moderador<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  825. this.client.sendLogMessage(lists + "</p>")
  826. elif command in ["fly"]:
  827. if this.client.privLevel >= 9:
  828. this.client.isFly = not this.client.isFly
  829. this.client.room.bindKeyBoard(this.client.Username, 32, False, this.client.isFly)
  830. this.client.sendMessage("Fly Hack: " + ("<VP>On" if this.client.isFly else "<R>Off") + " !")
  831. elif command in ["coords"]:
  832. lists = "<V><p align='center'><b>Coordenadores</b></p><p align='center'>"
  833. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 9")
  834. r = this.Cursor.fetchall()
  835. for rs in r:
  836. playerName = rs["Username"]
  837. lists += "\n<N>" + str(playerName) + " - <N><J>Coordenador<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  838. this.client.sendLogMessage(lists + "</p>")
  839. elif command in ["speed"]:
  840. if this.client.privLevel >= 9:
  841. this.client.isSpeed = not this.client.isSpeed
  842. this.client.room.bindKeyBoard(this.client.Username, 32, False, this.client.isSpeed)
  843. this.client.sendMessage("Speed Hack: " + ("<VP>On" if this.client.isSpeed else "<R>Off") + " !")
  844. elif command in ["admins"]:
  845. lists = "<V><p align='center'><b>Administradores</b></p><p align='center'>"
  846. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 10")
  847. r = this.Cursor.fetchall()
  848. for rs in r:
  849. playerName = rs["Username"]
  850. lists += "\n<N>" + str(playerName) + " - <N><J>Admin<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  851. this.client.sendLogMessage(lists + "</p>")
  852. elif command in ["vamp"]:
  853. if this.client.privLevel >= 9:
  854. if len(args) == 0:
  855. if this.client.privLevel >= 2:
  856. if this.client.room.numCompleted > 1 or this.client.privLevel >= 9:
  857. this.client.sendVampireMode(False)
  858. else:
  859. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  860. player = this.server.players.get(playerName)
  861. if player != None:
  862. player.sendVampireMode(False)
  863. elif command in ["funds"]:
  864. lists = "<V><p align='center'><b>Fundadores</b></p><p align='center'>"
  865. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 11")
  866. r = this.Cursor.fetchall()
  867. for rs in r:
  868. playerName = rs["Username"]
  869. lists += "\n<N>" + str(playerName) + " - <N><J>Fundador<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  870. this.client.sendLogMessage(lists + "</p>")
  871. elif command in ["meep"]:
  872. if this.client.privLevel >= 9:
  873. if len(args) == 0:
  874. if this.client.privLevel >= 2:
  875. if this.client.room.numCompleted > 1 or this.client.privLevel >= 9:
  876. this.client.sendPacket(Identifiers.send.Can_Meep, chr(1))
  877. else:
  878. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  879. if playerName == "*":
  880. for player in this.client.room.players.values():
  881. player.sendPacket(Identifiers.send.Can_Meep, chr(1))
  882. else:
  883. player = this.server.players.get(playerName)
  884. if player != None:
  885. player.sendPacket(Identifiers.send.Can_Meep, chr(1))
  886. elif command in ["helpers"]:
  887. lists = "<V><p align='center'><b>Helpers</b></p><p align='center'>"
  888. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 5")
  889. r = this.Cursor.fetchall()
  890. for rs in r:
  891. playerName = rs["Username"]
  892. lists += "\n<N>" + str(playerName) + " - <N><J>Ajudante<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  893. this.client.sendLogMessage(lists + "</p>")
  894. elif command in ["pink"]:
  895. if this.client.privLevel >= 4:
  896. this.client.room.sendAll(Identifiers.send.Player_Damanged, ByteArray().writeInt(this.client.playerCode).toByteArray())
  897. elif command in ["mapcs"]:
  898. lists = "<V><p align='center'><b>MapCrews</b></p><p align='center'>"
  899. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 6")
  900. r = this.Cursor.fetchall()
  901. for rs in r:
  902. playerName = rs["Username"]
  903. lists += "\n<N>" + str(playerName) + " - <N><J>MapCrew<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  904. this.client.sendLogMessage(lists + "</p>")
  905. elif command in ["transformation"]:
  906. if this.client.privLevel >= 9:
  907. if len(args) == 0:
  908. if this.client.privLevel >= 2:
  909. if this.client.room.numCompleted > 1 or this.client.privLevel >= 9:
  910. this.client.sendPacket(Identifiers.send.Can_Transformation, chr(1))
  911. else:
  912. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  913. if playerName == "*":
  914. for player in this.client.room.players.values():
  915. player.sendPacket(Identifiers.send.Can_Transformation, chr(1))
  916. else:
  917. player = this.server.players.get(playerName)
  918. if player != None:
  919. player.sendPacket(Identifiers.send.Can_Transformation, chr(1))
  920.  
  921. elif command in ["shaman"]:
  922. if this.client.privLevel >= 9:
  923. if len(args) == 0:
  924. this.client.isShaman = True
  925. 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())
  926.  
  927. else:
  928. this.requireArgs(1)
  929. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  930. player = this.server.players.get(playerName)
  931. if player != None:
  932. player.isShaman = True
  933. 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())
  934.  
  935. elif command in ["lock"]:
  936. if this.client.privLevel >= 7:
  937. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  938. this.requireNoSouris(playerName)
  939. if not this.server.checkExistingUser(playerName):
  940. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  941. else:
  942. if this.server.getPlayerPrivlevel(playerName) < 4:
  943. player = this.server.players.get(playerName)
  944. if player != None:
  945. player.room.removeClient(player)
  946. player.transport.loseConnection()
  947.  
  948. this.Cursor.execute("update Users set PrivLevel = -1 where Username = ?", [playerName])
  949.  
  950. this.server.sendStaffMessage(7, "<V>"+playerName+"<BL> was locked by <V>"+this.client.Username)
  951.  
  952. elif command in ["unlock"]:
  953. if this.client.privLevel >= 7:
  954. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  955. this.requireNoSouris(playerName)
  956.  
  957. if not this.server.checkExistingUser(playerName):
  958. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  959. else:
  960. if this.server.getPlayerPrivlevel(playerName) == -1:
  961. this.Cursor.execute("update Users set PrivLevel = 1 where Username = ?", [playerName])
  962.  
  963. this.server.sendStaffMessage(7, "<V>"+playerName+"<BL> was unlocked by <V>"+this.client.Username)
  964.  
  965. elif command in ["nomecor", "namecor"]:
  966. if len(args) == 1:
  967. if this.client.privLevel >= 2:
  968. hexColor = args[0][1:] if args[0].startswith("#") else args[0]
  969.  
  970. try:
  971. this.client.room.setNameColor(this.client.Username, int(hexColor, 16))
  972. this.client.nameColor = hexColor
  973. this.client.sendMessage("Color changed.")
  974. except:
  975. this.client.sendMessage("Invalid color. Try HEX, ex: #00000")
  976.  
  977. elif len(args) > 1:
  978. if this.client.privLevel >= 7:
  979. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  980. hexColor = args[1][1:] if args[1].startswith("#") else args[1]
  981. try:
  982. if playerName == "*":
  983. for player in this.client.room.players.values():
  984. this.client.room.setNameColor(player.Username, int(hexColor, 16))
  985. else:
  986. this.client.room.setNameColor(playerName, int(hexColor, 16))
  987. except:
  988. this.client.sendMessage("Invalid color. Try HEX, ex: #00000")
  989. else:
  990. if this.client.privLevel >= 2:
  991. this.client.room.showColorPicker(10000, this.client.Username, int(this.client.nameColor) if this.client.nameColor == "" else 0xc2c2da, "Select a color for your name.")
  992.  
  993. elif command in ["color", "cor"]:
  994. if this.client.privLevel >= 1:
  995. if len(args) == 1:
  996. hexColor = args[0][1:] if args[0].startswith("#") else args[0]
  997.  
  998. try:
  999. value = int(hexColor, 16)
  1000. this.client.mouseColor = hexColor
  1001. this.client.playerLook = "1;" + this.client.playerLook.split(";")[1]
  1002. this.client.sendMessage("Color changed.")
  1003. except:
  1004. this.client.sendMessage("Invalid color. Try HEX, ex: #00000")
  1005.  
  1006. elif len(args) > 1:
  1007. if this.client.privLevel >= 9:
  1008. playerName = this.client.Utils.parsePlayerName(args[0])
  1009. hexColor = "" if args[1] == "off" else args[1][1:] if args[1].startswith("#") else args[1]
  1010. try:
  1011. value = 0 if hexColor == "" else int(hexColor, 16)
  1012. if playerName == "*":
  1013. for player in this.client.room.players.values():
  1014. player.tempMouseColor = hexColor
  1015.  
  1016. else:
  1017. player = this.server.players.get(playerName)
  1018. if player != None:
  1019. player.tempMouseColor = hexColor
  1020. except:
  1021. this.client.sendMessage("Invalid color. Try HEX, ex: #00000")
  1022. else:
  1023. this.client.room.showColorPicker(10001, this.client.Username, int(this.client.MouseColor, 16), "Select a color for your body.")
  1024.  
  1025. elif command in ["giveforall"]:
  1026. if this.client.privLevel >= 9:
  1027. this.requireArgs(2)
  1028. type = args[0].lower()
  1029. count = int(args[1]) if args[1].isdigit() else 0
  1030. 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 ""
  1031. if count > 0 and not type == "":
  1032. this.server.sendStaffMessage(7, "<V>" + this.client.Username + "<BL> doou <V>" + str(count) + " " + str(type) + "<BL> para todo o servidor.")
  1033. for player in this.server.players.values():
  1034. player.sendMessage("Você recebeu <V>" + str(count) + " " + str(type) + "<BL>.")
  1035. if type == "queijos":
  1036. player.shopCheeses += count
  1037. elif type == "fraises":
  1038. player.shopFraises += count
  1039. elif type == "bootcamps":
  1040. player.bootcampCount += count
  1041. elif type == "firsts":
  1042. player.cheeseCount += count
  1043. player.firstCount += count
  1044. elif type == "profile":
  1045. player.cheeseCount += count
  1046. elif type == "saves":
  1047. player.shamanSaves += count
  1048. elif type == "hardSaves":
  1049. player.hardModeSaves += count
  1050. elif type == "divineSaves":
  1051. player.divineModeSaves += count
  1052. elif type == "moedas":
  1053. player.nowCoins += count
  1054. elif type == "fichas":
  1055. player.nowTokens += count
  1056.  
  1057. elif command in ["give"]:
  1058. if this.client.privLevel >= 9:
  1059. this.requireArgs(3)
  1060. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1061. type = args[1].lower()
  1062. count = int(args[2]) if args[2].isdigit() else 0
  1063. count = 10000 if count > 10000 else count
  1064. this.requireNoSouris(playerName)
  1065. 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 ""
  1066. if count > 0 and not type == "":
  1067. player = this.server.players.get(playerName)
  1068. if player != None:
  1069. this.server.sendStaffMessage(7, "<V>" + this.client.Username + "<BL> doou <V>" + str(count) + " " + str(type) + "<BL> para <V>" + playerName + "<BL>.")
  1070. player.sendMessage("Você recebeu <V>" + str(count) + " " + str(type) + "<BL>.")
  1071. if type == "queijos":
  1072. player.shopCheeses += count
  1073. elif type == "fraises":
  1074. player.shopFraises += count
  1075. elif type == "bootcamps":
  1076. player.bootcampCount += count
  1077. elif type == "firsts":
  1078. player.cheeseCount += count
  1079. player.firstCount += count
  1080. elif type == "profile":
  1081. player.cheeseCount += count
  1082. elif type == "saves":
  1083. player.shamanSaves += count
  1084. elif type == "hardSaves":
  1085. player.hardModeSaves += count
  1086. elif type == "divineSaves":
  1087. player.divineModeSaves += count
  1088. elif type == "moedas":
  1089. player.nowCoins += count
  1090. elif type == "fichas":
  1091. player.nowTokens += count
  1092.  
  1093. elif command in ["ungive"]:
  1094. if this.client.privLevel >= 9:
  1095. this.requireArgs(3)
  1096. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1097. type = args[1].lower()
  1098. count = int(args[2]) if args[2].isdigit() else 0
  1099. count = 10000 if count > 10000 else count
  1100. this.requireNoSouris(playerName)
  1101. 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 ""
  1102. if count > 0 and not type == "":
  1103. player = this.server.players.get(playerName)
  1104. if player != None:
  1105. this.server.sendStaffMessage(7, "<V>" + this.client.Username + "<BL> tirou <V>" + str(count) + " " + str(type) + "<BL> de <V>" + playerName + "<BL>.")
  1106. player.sendMessage("Você perdeu <V>" + str(count) + " " + str(type) + "<BL>.")
  1107. if type == "queijos":
  1108. player.shopCheeses -= count
  1109. elif type == "fraises":
  1110. player.shopFraises -= count
  1111. elif type == "bootcamps":
  1112. player.bootcampCount -= count
  1113. elif type == "firsts":
  1114. player.cheeseCount -= count
  1115. player.firstCount -= count
  1116. elif type == "profile":
  1117. player.cheeseCount -= count
  1118. elif type == "saves":
  1119. player.shamanSaves -= count
  1120. elif type == "hardSaves":
  1121. player.hardModeSaves -= count
  1122. elif type == "divineSaves":
  1123. player.divineModeSaves -= count
  1124. elif type == "moedas":
  1125. player.nowCoins -= count
  1126. elif type == "fichas":
  1127. player.nowTokens -= count
  1128.  
  1129. elif command in ["unrank"]:
  1130. if this.client.privLevel >= 10:
  1131. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1132. if not this.server.checkExistingUser(playerName):
  1133. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  1134. else:
  1135. player = this.server.players.get(playerName)
  1136. if player != None:
  1137. player.room.removeClient(player)
  1138. player.transport.loseConnection()
  1139.  
  1140. 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])
  1141. this.server.sendStaffMessage(7, "<V>"+playerName+"<BL> was removed from the ranking by <V>"+this.client.Username+"<BL>.")
  1142.  
  1143. elif command in ["warn"]:
  1144. if this.client.privLevel >= 4:
  1145. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1146. message = argsNotSplited.split(" ", 1)[1]
  1147. player = this.server.players.get(playerName)
  1148.  
  1149. if player == None:
  1150. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  1151. else:
  1152. 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 ""
  1153. player.sendMessage("<ROSE>[<b>Warning</b>] The "+str(rank)+" "+this.client.Username+" sent to you an alert. Reason: "+str(message))
  1154. this.client.sendMessage("<BL>Your alert has been sent to <V>"+playerName+"<BL>.")
  1155. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> sent a warning to"+"<V> "+playerName+"<BL>. Reason: <V>"+str(message))
  1156.  
  1157. elif command in ["mjj"]:
  1158. roomName = args[0]
  1159. if roomName.startswith("#"):
  1160. if roomName.startswith("#utility"):
  1161. this.client.enterRoom(roomName)
  1162. else:
  1163. this.client.enterRoom(roomName + "1")
  1164. else:
  1165. 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)
  1166.  
  1167. elif command in ["mulodrome"]:
  1168. if this.client.privLevel >= 10 or this.client.room.roomName.startswith(this.client.Username) and not this.client.room.isMulodrome:
  1169. for player in this.client.room.clients.values():
  1170. player.sendPacket(Identifiers.send.Mulodrome_Start, chr(1 if player.Username == this.client.Username else 0))
  1171.  
  1172. elif command in ["follow"]:
  1173. if this.client.privLevel >= 5:
  1174. this.requireArgs(1)
  1175. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1176. player = this.server.players.get(playerName)
  1177. if player != None:
  1178. this.client.enterRoom(player.roomName)
  1179.  
  1180. elif command in ["moveplayer"]:
  1181. if this.client.privLevel >= 7:
  1182. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1183. roomName = argsNotSplited.split(" ", 1)[1]
  1184. player = this.server.players.get(playerName)
  1185. if player != None:
  1186. player.enterRoom(roomName)
  1187.  
  1188. elif command in ["setvip"]:
  1189. if this.client.privLevel >= 10:
  1190. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1191. days = args[1]
  1192. this.requireNoSouris(playerName)
  1193. if not this.server.checkExistingUser(playerName):
  1194. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  1195. else:
  1196. this.server.setVip(playerName, int(days) if days.isdigit() else 1)
  1197.  
  1198. elif command in ["removevip"]:
  1199. if this.client.privLevel >= 10:
  1200. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1201. this.requireNoSouris(playerName)
  1202. if not this.server.checkExistingUser(playerName):
  1203. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  1204. else:
  1205. player = this.server.players.get(playerName)
  1206. if player != None:
  1207. player.privLevel = 1
  1208. if player.TitleNumber == 1100:
  1209. player.TitleNumber = 0
  1210.  
  1211. player.sendMessage("<CH>You lost your VIP privilege.")
  1212. this.Cursor.execute("update Users set VipTime = 0 where Username = ?", [playerName])
  1213. else:
  1214. this.Cursor.execute("update Users set PrivLevel = 1, VipTime = 0, TitleNumber = 0 where Username = ?", [playerName])
  1215.  
  1216. this.server.sendStaffMessage(7, "The player <V>"+playerName+"<BL> is not VIP anymore.")
  1217.  
  1218. elif command in ["bootcamp", "vanilla", "survivor", "racing", "defilante", "tutorial", "x_eneko"]:
  1219. 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 "")
  1220.  
  1221. elif command in ["tropplein"]:
  1222. if this.client.privLevel >= 7 or this.client.isFuncorp:
  1223. maxPlayers = int(args[0])
  1224. if maxPlayers < 1: maxPlayers = 1
  1225. this.client.room.maxPlayers = maxPlayers
  1226. this.client.sendMessage("Maximum number of players in the room set to: <V>" +str(maxPlayers))
  1227.  
  1228. elif command in ["ranking", "classement"]:
  1229. this.client.reloadRanking()
  1230.  
  1231. elif command in ["openshop"]:
  1232. if this.client.privLevel >= 1:
  1233. this.client.shop.open()
  1234. elif command in ["item2018"]:
  1235. if this.client.iceCoins >= 0:
  1236. this.client.iceCoins -= 0
  1237. this.client.shopItems in [2284]
  1238. elif command in ["buyconsumables"]:
  1239. if this.client.privLevel >= 1:
  1240. this.client.consumablesShop.open()
  1241. elif command in ["item2017"]:
  1242. if this.client.iceCoins >= 0:
  1243. this.client.iceCoins -= 0
  1244. this.client.shopItems in [2283]
  1245. elif command in ["roleta"]:
  1246. if this.client.privLevel >= 1:
  1247. this.client.spinTheWheel.open()
  1248.  
  1249. elif command in ["d"]:
  1250. if this.client.privLevel >= 4:
  1251. message = argsNotSplited
  1252. this.client.sendAllModerationChat(9, message)
  1253.  
  1254. elif command in ["mm"]:
  1255. if this.client.privLevel >= 7:
  1256. this.client.room.sendAll(Identifiers.send.Staff_Chat, ByteArray().writeByte(0).writeUTF("").writeUTF(argsNotSplited).writeShort(0).writeByte(0).toByteArray())
  1257.  
  1258. elif command in ["call"]:
  1259. if this.client.privLevel >= 10:
  1260. for player in this.server.players.values():
  1261. 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())
  1262.  
  1263. elif command in ["funcorp"]:
  1264. if len(args) > 0:
  1265. if (this.client.room.roomName == "*strm_" + this.client.Username.lower()) or this.client.privLevel >= 7 or this.client.isFuncorp:
  1266. if args[0] == "on" and not this.client.privLevel == 1:
  1267. this.client.room.isFuncorp = True
  1268. for player in this.client.room.clients.values():
  1269. player.sendLangueMessage("", "<FC>$FunCorpActive</FC>")
  1270. elif args[0] == "off" and not this.client.privLevel == 1:
  1271. this.client.room.isFuncorp = False
  1272. for player in this.client.room.clients.values():
  1273. player.sendLangueMessage("", "<FC>$FunCorpDesactive</FC>")
  1274. elif args[0] == "help":
  1275. this.client.sendLogMessage(this.sendListFCHelp())
  1276. else:
  1277. this.client.sendMessage("Wrong parameters.")
  1278.  
  1279. elif command in ["eventconfig2"]:
  1280. if this.client.privLevel >= 10:
  1281. if len(args) > 0:
  1282. if (this.client.room.roomName == "*strm_" + this.client.Username.lower()) or this.client.privLevel >= 7 or this.activeEvent:
  1283. if args[0] == "on" and not this.client.privLevel == 1:
  1284. this.client.room.sendAll(Identifiers.send.Can_Meep, chr(1))
  1285. this.client.room.sendAll([5, 51], "\x09\x00\x19\x0c\x00\xe2\xff\x9c")
  1286. #this.sendMessage("<J>Pegue o Pote de Ouro e entregue para o Duende.")
  1287. #this.sendMessage("<J>Evento desenvolvido e pensado por Dolly.")
  1288. this.client.room.sendAll([5, 51], "\x09\x00\x1a\x0c\x01\xff\x9c")
  1289. this.client.room.sendAll([5, 51], "\x09\x00\x1b\x0c\x02\x1d\xff\x9c")
  1290. this.client.room.sendAll([5, 51], "\x09\x00\x1c\x0c\xff\x9c")
  1291. this.client.room.sendAll([5, 51], "\x09\x00\x1d\x0c\x02\xd4\xff\x9c")
  1292. this.client.room.sendAll([5, 51], "\x09\x00\x1e\x0c\x02\xff\x9c")
  1293. this.client.room.sendAll([5, 51], "\x09\x00\x1f\x0c\x03\x99\xff\x9c")
  1294. this.client.room.sendAll([5, 51], "\x09\x00 \x0c\xff\x9c")
  1295. this.client.room.sendAll([5, 51], "\x09\x00!\x0c\x04\x00\xff\x9c")
  1296. this.client.room.sendAll([5, 51], "\x09\x00\"\x0c\xff\x9c")
  1297. this.client.room.sendAll([5, 51], "\x09\x00#\x0c\x04%\xff\x9c")
  1298. this.client.room.sendAll([5, 51], "\x09\x00$\x0c\x04\xa8\xff\x9c")
  1299. this.client.room.sendAll([5, 51], "\x09\x00%\x0c\x05\xff\x9c")
  1300. this.client.room.sendAll([5, 51], "\x09\x00&\x0c\x04\xff\x9c")
  1301. this.client.room.sendAll([5, 51], "\x09\x00\'\x0c\x04\xff\x9c")
  1302. this.client.room.sendAll([5, 51], "\x09\x00(\x0c\x05`\xff\x9c")
  1303. this.client.room.sendAll([5, 51], "\x09\x00)\x0c\x05\xff\x9c")
  1304. this.client.room.sendAll([5, 51], "\x09\x00*\x0c\x05\xff\x9c")
  1305. this.client.room.sendAll([5, 51], "\x09\x00+\x0c\x06\xff\x9c")
  1306. this.client.room.sendAll([5, 51], "\x09\x00,\x0c\x07\x08\xff\x9c")
  1307. this.client.room.sendAll([5, 51], "\x09\x00-\x0c\xff\x9c")
  1308. this.client.room.sendAll([5, 51], "\x09\x00.\x0c\x07\xae\xff\x9c")
  1309. this.client.room.sendAll([5, 51], "\x09\x00/\x0c\x05\xdf\xff\x9c")
  1310. this.client.room.sendAll([5, 51], "\x09\x000\x0c\x032\xff\x9c")
  1311. this.client.room.sendAll([5, 51], "\x09\x001\x0c\x04\xa5\xff\x9c")
  1312. #this.sendNPC(1, 4, "Duende", 374, "85;132,0,0,0,0,0,0,1,0", 1850, 900, 11, 0)
  1313. for player in this.client.room.clients.values():
  1314. player.sendLangueMessage("", "<FC>O Evento foi ativado!<FC>")
  1315. player.sendLangueMessage("", "<J>Pegue o Pote de Ouro e entregue para o Duende.<J>")
  1316. player.sendLangueMessage("", "<J>Evento desenvolvido e pensado por Dolly.<J>")
  1317. player.sendNPC(1, 4, "Duende", 374, "85;132,0,0,0,0,0,0,1,0", 1850, 900, 11, 0)
  1318. elif args[0] == "off" and not this.client.privLevel == 1:
  1319. #this.activeEvent = False
  1320. for player in this.client.room.clients.values():
  1321. player.sendLangueMessage("", "<FC>O Evento foi desativado!<FC>")
  1322.  
  1323. elif command in ["eventconfig"]:
  1324. if this.client.privLevel >= 10:
  1325. if len(args) > 0:
  1326. if (this.client.room.roomName == "*strm_" + this.client.Username.lower()) or this.client.privLevel >= 7 or this.activeEvent:
  1327. if args[0] == "on" and not this.client.privLevel == 1:
  1328. this.client.room.sendAll(Identifiers.send.Can_Meep, chr(1))
  1329. this.client.room.sendAll([5, 51], "\x09\x00\x19\x0c\x00\xe2\xff\x9c")
  1330. #this.sendMessage("<J>Pegue o Pote de Ouro e entregue para o Duende.")
  1331. #this.sendMessage("<J>Evento desenvolvido e pensado por Dolly.")
  1332. this.client.room.sendAll([5, 51], "\x02\x00\x1a\x0c\x01\xff\x9c")
  1333. this.client.room.sendAll([5, 51], "\x02\x00\x1b\x0c\x02\x1d\xff\x9c")
  1334. this.client.room.sendAll([5, 51], "\x02\x00\x1c\x0c\xff\x9c")
  1335. this.client.room.sendAll([5, 51], "\x02\x00\x1d\x0c\x02\xd4\xff\x9c")
  1336. this.client.room.sendAll([5, 51], "\x02\x00\x1e\x0c\x02\xff\x9c")
  1337. this.client.room.sendAll([5, 51], "\x02\x00\x1f\x0c\x03\x99\xff\x9c")
  1338. this.client.room.sendAll([5, 51], "\x02\x00 \x0c\xff\x9c")
  1339. this.client.room.sendAll([5, 51], "\x02\x00!\x0c\x04\x00\xff\x9c")
  1340. this.client.room.sendAll([5, 51], "\x02\x00\"\x0c\xff\x9c")
  1341. this.client.room.sendAll([5, 51], "\x02\x00#\x0c\x04%\xff\x9c")
  1342. this.client.room.sendAll([5, 51], "\x02\x00$\x0c\x04\xa8\xff\x9c")
  1343. this.client.room.sendAll([5, 51], "\x02\x00%\x0c\x05\xff\x9c")
  1344. this.client.room.sendAll([5, 51], "\x02\x00&\x0c\x04\xff\x9c")
  1345. this.client.room.sendAll([5, 51], "\x02\x00\'\x0c\x04\xff\x9c")
  1346. this.client.room.sendAll([5, 51], "\x02\x00(\x0c\x05`\xff\x9c")
  1347. this.client.room.sendAll([5, 51], "\x02\x00)\x0c\x05\xff\x9c")
  1348. this.client.room.sendAll([5, 51], "\x02\x00*\x0c\x05\xff\x9c")
  1349. this.client.room.sendAll([5, 51], "\x02\x00+\x0c\x06\xff\x9c")
  1350. this.client.room.sendAll([5, 51], "\x02\x00,\x0c\x07\x08\xff\x9c")
  1351. this.client.room.sendAll([5, 51], "\x02\x00-\x0c\xff\x9c")
  1352. this.client.room.sendAll([5, 51], "\x02\x00.\x0c\x07\xae\xff\x9c")
  1353. this.client.room.sendAll([5, 51], "\x02\x00/\x0c\x05\xdf\xff\x9c")
  1354. this.client.room.sendAll([5, 51], "\x02\x000\x0c\x032\xff\x9c")
  1355. this.client.room.sendAll([5, 51], "\x02\x001\x0c\x04\xa5\xff\x9c")
  1356. #this.sendNPC(1, 4, "Duende", 374, "85;132,0,0,0,0,0,0,1,0", 1850, 900, 11, 0)
  1357. for player in this.client.room.clients.values():
  1358. player.sendLangueMessage("", "<FC>O Evento foi ativado!<FC>")
  1359. player.sendLangueMessage("", "<J>Pegue o Pote de Ouro e entregue para o Duende.<J>")
  1360. player.sendLangueMessage("", "<J>Evento desenvolvido e pensado por Dolly.<J>")
  1361. player.sendNPC(1, 4, "Duende", 374, "85;132,0,0,0,0,0,0,1,0", 1850, 900, 11, 0)
  1362. elif args[0] == "off" and not this.client.privLevel == 1:
  1363. #this.activeEvent = False
  1364. for player in this.client.room.clients.values():
  1365. player.sendLangueMessage("", "<FC>O Evento foi desativado!<FC>")
  1366.  
  1367. elif command in ["mmfc"]:
  1368. if this.client.privLevel >= 10:
  1369. message = "<FC>"+argsNotSplited
  1370. for player in this.client.room.clients.values():
  1371. player.sendLangueMessage("", message)
  1372.  
  1373. elif command in ["changenick"]:
  1374. if this.client.privLevel >= 7 or this.client.isFuncorp:
  1375. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1376. player = this.server.players.get(playerName)
  1377. if player != None:
  1378. player.mouseName = playerName if args[1] == "off" else argsNotSplited.split(" ", 1)[1]
  1379.  
  1380. elif command in ["changesize"]:
  1381. if this.client.privLevel >= 7 or (this.client.room.roomName == "*strm_" + this.client.Username.lower()):
  1382. if this.client.room.isFuncorp:
  1383. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1384. this.client.playerSize = 1.0 if args[1] == "off" else (5.0 if float(args[1]) > 5.0 else float(args[1]))
  1385. if args[1] == "off":
  1386. this.client.sendMessage("All the players now have their regular size.")
  1387. this.client.room.sendAll(Identifiers.send.Mouse_Size, ByteArray().writeInt(player.playerCode).writeUnsignedShort(float(1)).writeBool(False).toByteArray())
  1388.  
  1389. elif this.client.playerSize >= float(0.1) or this.client.playerSize <= float(5.0):
  1390. if playerName == "*":
  1391. for player in this.client.room.clients.values():
  1392. this.client.sendMessage("All the players now have the size " + str(this.client.playerSize) + ".")
  1393. this.client.room.sendAll(Identifiers.send.Mouse_Size, ByteArray().writeInt(player.playerCode).writeUnsignedShort(int(this.client.playerSize * 100)).writeBool(False).toByteArray())
  1394. else:
  1395. player = this.server.players.get(playerName)
  1396. if player != None:
  1397. this.client.sendMessage("The following players now have the size " + str(this.client.playerSize) + ": <BV>" + str(player.Username) + "</BV>")
  1398. this.client.room.sendAll(Identifiers.send.Mouse_Size, ByteArray().writeInt(player.playerCode).writeUnsignedShort(int(this.client.playerSize * 100)).writeBool(False).toByteArray())
  1399. else:
  1400. this.client.sendMessage("Invalid size.")
  1401. else:
  1402. this.client.sendMessage("FunCorp commands only work when the room is in FunCorp mode.")
  1403.  
  1404. except Exception as ERROR:
  1405. pass
  1406.  
  1407. def sendListFCHelp(this):
  1408. message = "FunCorp commands:\n\n"
  1409. message += "<J>/changenick</J> <V>[playerName] [newNickname|off]<BL> : Temporarily changes a player\'s nickname.</BL>\n" if this.client.room.isFuncorp else ""
  1410. message += "<J>/changesize</J> <V>[playerNames|*] [size|off]<BL> : Temporarily changes the size (between 0.1x and 5x) of players.</BL>\n"
  1411. message += "<J>/closeroom</J><BL> : Close the current room.</BL>\n" if this.client.room.isFuncorp else ""
  1412. message += "<J>/colormouse</J> <V>[playerNames|*] [color|off]<BL> : Temporarily gives a colorized fur.</BL>\n"
  1413. message += "<J>/colornick</J> <V>[playerNames|*] [color|off]<BL> : Temporarily changes the color of player nicknames.</BL>\n"
  1414. message += "<J>/commu</J> <V>[code]<BL> : Lets you change your community. Ex: /commu fr</BL>\n" if this.client.room.isFuncorp else ""
  1415. message += "<J>/funcorp</J> <G>[on|off|help]<BL> : Enable/disable the funcorp mode, or show the list of funcorp-related commands</BL>\n"
  1416. message += "<J>/ignore</J> <V>[playerPartName]<BL> : Ignore selected player. (aliases: /negeer, /ignorieren)</BL>\n" if this.client.room.isFuncorp else ""
  1417. message += "<J>/linkmice</J> <V>[playerNames] <G>[off]<BL> : Temporarily links players.</BL>\n"
  1418. message += "<J>/lsfc</J><BL> : Lists online FunCorp members.</BL>\n" if this.client.room.isFuncorp else ""
  1419. message += "<J>/meep</J> <V>[playerNames|*] <G>[off]<BL> : Give meep to players.</BL>\n"
  1420. message += "<J>/profil</J> <V>[playerPartName]<BL> : Display player\'s info. (aliases: /profile, /perfil, /profiel)</BL>\n" if this.client.room.isFuncorp else ""
  1421. 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 ""
  1422. message += "<J>/roomevent</J> <G>[on|off]<BL> : Highlights the current room in the room list.</BL>\n" if this.client.room.isFuncorp else ""
  1423. message += "<J>/roomkick</J> <V>[playerName]<BL> : Kicks a player from a room.</BL>\n" if this.client.room.isFuncorp else ""
  1424. message += "<J>/np <G>[mapCode] <BL>: Starts a new map.</BL>\n"
  1425. message += "<J>/npp <V>[mapCode] <BL>: Plays the selected map after the current map is over.</BL>\n"
  1426. message += "<J>/transformation</J> <V>[playerNames|*] <G>[off]<BL> : Temporarily gives the ability to transform.</BL>\n"
  1427. 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 ""
  1428. return message
  1429.  
  1430. def getCommandsList(this):
  1431. rank = "Player" if this.client.privLevel == 1 else "VIP" if this.client.privLevel == 2 else "Developer Lua" if this.client.privLevel == 3 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 "Fundador" if this.client.privLevel == 11 else ""
  1432. message = rank + " commands:\n\n"
  1433. message += "<J>/profil</J> <V>[playerPartName]<BL> : Display player\'s info. (aliases: /profile, /perfil, /profiel)</BL>\n"
  1434. message += "<J>/mulodrome</J><BL> : Starts a new mulodrome.</BL>\n"
  1435. message += "<J>/skip</J><BL> : Vote for the current song (the room \"music\") is skipped.</BL>\n"
  1436. 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"
  1437. message += "<J>/mort</J><BL> : It makes your mouse die instantly. (aliases: /kill, /die, /suicide)</BL>\n"
  1438. 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"
  1439. message += "<J>/mod</J><BL> : Shows a list of online Moderators.</BL>\n"
  1440. message += "<J>/mapcrew</J><BL> : List all online mapcrews separated by community.</BL>\n"
  1441. message += "<J>/staff</J><BL> : Shows the server team. (aliases: /team, /equipe)</BL>\n"
  1442. message += "<J>/shop</J><BL> : Opens shop items.</BL>\n"
  1443. message += "<J>/vips</J><BL> : Shows VIP\'s list server.</BL>\n"
  1444. 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"
  1445. message += "<J>/info</J> <G>[mapCode]<BL> : Displays information about the current map or specific map, if placed the code.</BL>\n"
  1446. message += "<J>/help</J><BL> : Server Command List. (aliases: /ajuda)</BL>\n"
  1447. 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"
  1448. message += "<J>/colormouse</J> <G>[color|off]<BL> : Change the color of your mouse.</BL>\n"
  1449. 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"
  1450. message += "<J>/f</J> <G>[flag]<BL> : Balance the flag of the country in question.</BL>\n"
  1451. message += "<J>/clavier</J><BL> : Toggles between English and French keyboard.</BL>\n"
  1452. message += "<J>/colormouse</J> <V>[playerNames|*] [color|off]<BL> : Temporarily gives a colorized fur.</BL>\n"
  1453. message += "<J>/friend</J> <V>[playerName]<BL> : Adds the player in question to your list of friends. (aliases: /amigo, /ami)</BL>\n"
  1454. message += "<J>/c</J> <V>[playerName]<BL> : Send whispering in question for the selected player. (aliases: /w)</BL>\n"
  1455. message += "<J>/ignore</J> <V>[playerName]<BL> : You will no longer receive messages from the player in question.</BL>\n"
  1456. message += "<J>/watch</J> <G>[playerName]<BL> : Highlights the player in question. Type the command alone so that everything returns to normal.</BL>\n"
  1457. message += "<J>/shooting </J><BL> : Enable/Desable the speech bubbles mice.</BL>\n"
  1458. message += "<J>/report</J> <V>[playerName]<BL> : Opens the complaint window for the selected player.</BL>\n"
  1459. 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"
  1460. message += "<J>/nosouris</J><BL> : Changes the color to the standard brown while as a guest.</BL>\n"
  1461. message += "<J>/x_imj</J> <BL> : Opens the old menu of game modes.</BL>\n"
  1462. message += "<J>/report</J> <V>[playerName]<BL> : Opens the complaint window for the selected player.</BL>\n"
  1463.  
  1464. if this.client.privLevel == 2 or this.client.privLevel >= 5:
  1465. message += "<J>/vamp</J> <BL> : Turns your mouse into a vampire.</BL>\n"
  1466. message += "<J>/meep</J><BL> : Enables meep.</BL>\n"
  1467. message += "<J>/pink</J><BL> : Let your mouse pink.</BL>\n"
  1468. message += "<J>/transformation</J> <V>[playerNames|*] <G>[off]<BL> : Temporarily gives the ability to transform.</BL>\n"
  1469. message += "<J>/namecor</J> <V>"+("[playerName] " if this.client.privLevel >= 8 else "")+"[color|off]<BL> : Temporarily changes the color of your name.</BL>\n"
  1470. message += "<J>/vip</J> <G>[message]</G><BL> : Send a message vip global.</BL>\n"
  1471. message += "<J>/re</J> <BL> : Respawn the player.</BL>\n"
  1472. message += "<J>/freebadges</J> <BL> : You earn new medals.</BL>\n"
  1473.  
  1474. if this.client.privLevel >= 11:
  1475. message += "<J>/reboot</J><BL> : Enable 2 minutes count for the server restart</BL>\n"
  1476. message += "<J>/shutdown</J><BL> : Shutdown the server immediately.</BL>\n"
  1477. message += "<J>/clearcache</J><BL> : Clean the IPS server cache.</BL>\n"
  1478. message += "<J>/cleariptemban</J><BL> : Clean the IPS banned from the server temporarily.</BL>\n"
  1479. message += "<J>/clearreports</J><BL> : Clean the reports of ModoPwet.</BL>\n"
  1480. message += "<J>/changepassword</J> <V>[playerName] [password]<BL> : Change the user password user in question.</BL>\n"
  1481. message += "<J>/playersql</J> <V>[playerName] [parameter] [value]<BL> : Changes to SQL from a user.</BL>\n"
  1482. message += "<J>/smn</J> <V>[message]<BL> : Send a message with your name to the server.</BL>\n"
  1483. message += "<J>/mshtml</J> <v>[message]<BL> : Send a message in HTML.</BL>\n"
  1484. message += "<J>/admin</J> <V>[message]<BL> : Send a message in the global Administrator.</BL>\n"
  1485. message += "<J>/rank</J> <V>[playerName] [rank]<BL> : From a rank to the user in question</BL>\n"
  1486. message += "<J>/setvip</J> <V>[playerName] [days]<BL> : From the user VIP in question.</BL>\n"
  1487. message += "<J>/removevip</J> <V>[playerName]<BL> : Taking the user VIP in question.</BL>\n"
  1488. message += "<J>/unrank</J> <V>[playerName]<BL> : Reset the user profile in question.</BL>\n"
  1489. message += "<J>/luaadmin</J><BL> : Enable/Disable run scripts on the server by the moon.</BL>\n"
  1490. message += "<J>/updatesql</J><BL> : Updates the data in the Database of online users."
  1491.  
  1492. if this.client.privLevel >= 5:
  1493. message += "<J>/sy?</J><BL> : It shows who is the Sync (synchronizer) current.</BL>\n"
  1494. message += "<J>/ls</J><BL> : Shows the list of server rooms.</BL>\n"
  1495. message += "<J>/clearchat</J><BL> : Clean chat.</BL>\n"
  1496. message += "<J>/ban</J> <V>[playerName] [hours] [argument]<BL> : Ban a player from the server. (aliases: /iban)</BL>\n"
  1497. message += "<J>/mute</J> [playerName] [hours] [argument]<BL> : Mute a player.</BL>\n"
  1498. message += "<J>/find</J> <V>[playerName]<BL> : It shows the current room of a user.</BL>\n"
  1499. message += "<J>/hel</J> <V>[message]<BL> : Send a message in the global Helper.</BL>\n"
  1500. message += "<J>/hide</J><BL> : Makes your invisible mouse.</BL>\n"
  1501. message += "<J>/unhide</J><BL> : Take the invisibility of your mouse.</BL>\n"
  1502. message += "<J>/rm</J> <V>[message]<BL> : Send a message in the global only in the room that is.</BL>\n"
  1503.  
  1504. if this.client.privLevel >= 6:
  1505. message += "<J>/np <G>[mapCode] <BL>: Starts a new map.</BL>\n"
  1506. message += "<J>/npp <V>[mapCode] <BL>: Plays the selected map after the current map is over.</BL>\n"
  1507. message += "<J>/p</J><V>[category]<BL> : Evaluate a map to the chosen category.</BL>\n"
  1508. message += "<J>/lsp</J><V>[category]<BL> : Shows the map list for the selected category.</BL>\n"
  1509. message += "<J>/kick</J> <V>[playerName]<BL> : Expelling a server user.</BL>\n"
  1510. message += "<J>/mapc</J> <V>[message]<BL> : Send a message in the global MapCrew.</BL>\n"
  1511.  
  1512. if this.client.privLevel >= 7:
  1513. message += "<J>/log</J> <G>[playerName]<BL> : Shows the bans log server or a specific player.</BL>\n"
  1514. message += "<J>/unban</J> <V>[playerName]<BL> : Unban a server player.</BL>\n"
  1515. message += "<J>/unmute</J> <V>[playerName]<BL> : Unmute a player.</BL>\n"
  1516. message += "<J>/sy</J> <G>[playerName]<BL> : Define who will be the sync. Type the command with nothing to reset.</BL>\n"
  1517. message += "<J>/clearban</J> <V>[playerName]<BL> : Clean the ban vote of a user.</BL>\n"
  1518. message += "<J>/ip</J> <V>[playerName]<BL> : Shows the IP of a user.</BL>\n"
  1519. message += "<J>/ch [Nome]</J><BL> :Escolhe o próximo shaman.</BL>\n"
  1520. message += "<J>/md</J> <V>[message]<BL> : Send a message in the global Moderator.</BL>\n"
  1521. message += "<J>/lock</J> <V>[playerName]<BL> : Blocks a user.</BL>\n"
  1522. message += "<J>/unlock</J> <V>[playerName]<BL> : Unlock a user.</BL>\n"
  1523. message += "<J>/nomip</J> <V>[playerName]<BL> : It shows the history of a user IPs.</BL>\n"
  1524. message += "<J>/ipnom</J> <V>[IP]<BL> : Shows the history of an IP.</BL>\n"
  1525. message += "<J>/warn</J> <V>[playerName] [reason]<BL> : Sends an alert to a specific user.</BL>\n"
  1526.  
  1527. if this.client.privLevel >= 8:
  1528. message += "<J>/neige</J><BL> : Enable/Disable the snow in the room.</BL>\n"
  1529. message += "<J>/music</J> <G>[link]<BL> : Enable/Disable a song in the room.</BL>\n"
  1530. message += "<J>/settime</J> <V>[seconds]<BL> : Changes the time the current map.</BL>\n"
  1531. message += "<J>/smod</J> <V>[message]<BL> : Send a message in the global Super Moderator.</BL>\n"
  1532. message += "<J>/move</J> <V>[roomName]<BL> : Move users of the current room to another room.</BL>\n"
  1533.  
  1534. if this.client.privLevel >= 9:
  1535. message += "<J>/teleport</J><BL> : Enable/Disable the Teleport Hack.</BL>\n"
  1536. message += "<J>/fly</J><BL> : Enable/Disable the Fly Hack.</BL>\n"
  1537. message += "<J>/speed</J><BL> : Enable/Disable the the Speed Hack.</BL>\n"
  1538. message += "<J>/shaman</J><BL> : Turns your mouse on the Shaman.</BL>\n"
  1539. message += "<J>/coord</J> <V>[message]<BL> : Send a message in the global Coordinator.</BL>\n"
  1540.  
  1541. if this.client.privLevel >= 10:
  1542. message += "<J>/reboot</J><BL> : Enable 2 minutes count for the server restart</BL>\n"
  1543. message += "<J>/shutdown</J><BL> : Shutdown the server immediately.</BL>\n"
  1544. message += "<J>/clearcache</J><BL> : Clean the IPS server cache.</BL>\n"
  1545. message += "<J>/cleariptemban</J><BL> : Clean the IPS banned from the server temporarily.</BL>\n"
  1546. message += "<J>/clearreports</J><BL> : Clean the reports of ModoPwet.</BL>\n"
  1547. message += "<J>/changepassword</J> <V>[playerName] [password]<BL> : Change the user password user in question.</BL>\n"
  1548. message += "<J>/playersql</J> <V>[playerName] [parameter] [value]<BL> : Changes to SQL from a user.</BL>\n"
  1549. message += "<J>/smn</J> <V>[message]<BL> : Send a message with your name to the server.</BL>\n"
  1550. message += "<J>/mshtml</J> <v>[message]<BL> : Send a message in HTML.</BL>\n"
  1551. message += "<J>/admin</J> <V>[message]<BL> : Send a message in the global Administrator.</BL>\n"
  1552. message += "<J>/rank</J> <V>[playerName] [rank]<BL> : From a rank to the user in question</BL>\n"
  1553. message += "<J>/setvip</J> <V>[playerName] [days]<BL> : From the user VIP in question.</BL>\n"
  1554. message += "<J>/removevip</J> <V>[playerName]<BL> : Taking the user VIP in question.</BL>\n"
  1555. message += "<J>/unrank</J> <V>[playerName]<BL> : Reset the user profile in question.</BL>\n"
  1556. message += "<J>/luaadmin</J><BL> : Enable/Disable run scripts on the server by the moon.</BL>\n"
  1557. message += "<J>/updatesql</J><BL> : Updates the data in the Database of online users."
  1558. if this.client.privLevel == 12 or this.client.privLevel >= 13:
  1559. message += "<J>/vamp</J> <BL> : Turns your mouse into a vampire.</BL>\n"
  1560. message += "<J>/meep</J><BL> : Enables meep.</BL>\n"
  1561. message += "<J>/pink</J><BL> : Let your mouse pink.</BL>\n"
  1562. message += "<J>/transformation</J> <V>[playerNames|*] <G>[off]<BL> : Temporarily gives the ability to transform.</BL>\n"
  1563. message += "<J>/namecor</J> <V>"+("[playerName] " if this.client.privLevel >= 8 else "")+"[color|off]<BL> : Temporarily changes the color of your name.</BL>\n"
  1564. message += "<J>/vip</J> <G>[message]</G><BL> : Send a message vip global.</BL>\n"
  1565. message += "<J>/re</J> <BL> : Respawn the player.</BL>\n"
  1566. message += "<J>/freebadges</J> <BL> : You earn new medals.</BL>\n"
  1567.  
  1568. if this.client.privLevel >= 18:
  1569. message += "<J>/reboot</J><BL> : Enable 2 minutes count for the server restart</BL>\n"
  1570. message += "<J>/shutdown</J><BL> : Shutdown the server immediately.</BL>\n"
  1571. message += "<J>/clearcache</J><BL> : Clean the IPS server cache.</BL>\n"
  1572. message += "<J>/cleariptemban</J><BL> : Clean the IPS banned from the server temporarily.</BL>\n"
  1573. message += "<J>/clearreports</J><BL> : Clean the reports of ModoPwet.</BL>\n"
  1574. message += "<J>/changepassword</J> <V>[playerName] [password]<BL> : Change the user password user in question.</BL>\n"
  1575. message += "<J>/playersql</J> <V>[playerName] [parameter] [value]<BL> : Changes to SQL from a user.</BL>\n"
  1576. message += "<J>/smn</J> <V>[message]<BL> : Send a message with your name to the server.</BL>\n"
  1577. message += "<J>/mshtml</J> <v>[message]<BL> : Send a message in HTML.</BL>\n"
  1578. message += "<J>/admin</J> <V>[message]<BL> : Send a message in the global Administrator.</BL>\n"
  1579. message += "<J>/rank</J> <V>[playerName] [rank]<BL> : From a rank to the user in question</BL>\n"
  1580. message += "<J>/setvip</J> <V>[playerName] [days]<BL> : From the user VIP in question.</BL>\n"
  1581. message += "<J>/removevip</J> <V>[playerName]<BL> : Taking the user VIP in question.</BL>\n"
  1582. message += "<J>/unrank</J> <V>[playerName]<BL> : Reset the user profile in question.</BL>\n"
  1583. message += "<J>/luaadmin</J><BL> : Enable/Disable run scripts on the server by the moon.</BL>\n"
  1584. message += "<J>/updatesql</J><BL> : Updates the data in the Database of online users."
  1585.  
  1586. if this.client.privLevel >= 12:
  1587. message += "<J>/sy?</J><BL> : It shows who is the Sync (synchronizer) current.</BL>\n"
  1588. message += "<J>/ls</J><BL> : Shows the list of server rooms.</BL>\n"
  1589. message += "<J>/clearchat</J><BL> : Clean chat.</BL>\n"
  1590. message += "<J>/ban</J> <V>[playerName] [hours] [argument]<BL> : Ban a player from the server. (aliases: /iban)</BL>\n"
  1591. message += "<J>/mute</J> [playerName] [hours] [argument]<BL> : Mute a player.</BL>\n"
  1592. message += "<J>/find</J> <V>[playerName]<BL> : It shows the current room of a user.</BL>\n"
  1593. message += "<J>/hel</J> <V>[message]<BL> : Send a message in the global Helper.</BL>\n"
  1594. message += "<J>/hide</J><BL> : Makes your invisible mouse.</BL>\n"
  1595. message += "<J>/unhide</J><BL> : Take the invisibility of your mouse.</BL>\n"
  1596. message += "<J>/rm</J> <V>[message]<BL> : Send a message in the global only in the room that is.</BL>\n"
  1597.  
  1598. if this.client.privLevel >= 13:
  1599. message += "<J>/np <G>[mapCode] <BL>: Starts a new map.</BL>\n"
  1600. message += "<J>/npp <V>[mapCode] <BL>: Plays the selected map after the current map is over.</BL>\n"
  1601. message += "<J>/p</J><V>[category]<BL> : Evaluate a map to the chosen category.</BL>\n"
  1602. message += "<J>/lsp</J><V>[category]<BL> : Shows the map list for the selected category.</BL>\n"
  1603. message += "<J>/kick</J> <V>[playerName]<BL> : Expelling a server user.</BL>\n"
  1604. message += "<J>/mapc</J> <V>[message]<BL> : Send a message in the global MapCrew.</BL>\n"
  1605.  
  1606. if this.client.privLevel >= 14:
  1607. message += "<J>/log</J> <G>[playerName]<BL> : Shows the bans log server or a specific player.</BL>\n"
  1608. message += "<J>/unban</J> <V>[playerName]<BL> : Unban a server player.</BL>\n"
  1609. message += "<J>/unmute</J> <V>[playerName]<BL> : Unmute a player.</BL>\n"
  1610. message += "<J>/sy</J> <G>[playerName]<BL> : Define who will be the sync. Type the command with nothing to reset.</BL>\n"
  1611. message += "<J>/clearban</J> <V>[playerName]<BL> : Clean the ban vote of a user.</BL>\n"
  1612. message += "<J>/ip</J> <V>[playerName]<BL> : Shows the IP of a user.</BL>\n"
  1613. message += "<J>/ch [Nome]</J><BL> :Escolhe o próximo shaman.</BL>\n"
  1614. message += "<J>/md</J> <V>[message]<BL> : Send a message in the global Moderator.</BL>\n"
  1615. message += "<J>/lock</J> <V>[playerName]<BL> : Blocks a user.</BL>\n"
  1616. message += "<J>/unlock</J> <V>[playerName]<BL> : Unlock a user.</BL>\n"
  1617. message += "<J>/nomip</J> <V>[playerName]<BL> : It shows the history of a user IPs.</BL>\n"
  1618. message += "<J>/ipnom</J> <V>[IP]<BL> : Shows the history of an IP.</BL>\n"
  1619. message += "<J>/warn</J> <V>[playerName] [reason]<BL> : Sends an alert to a specific user.</BL>\n"
  1620.  
  1621. if this.client.privLevel >= 15:
  1622. message += "<J>/neige</J><BL> : Enable/Disable the snow in the room.</BL>\n"
  1623. message += "<J>/music</J> <G>[link]<BL> : Enable/Disable a song in the room.</BL>\n"
  1624. message += "<J>/settime</J> <V>[seconds]<BL> : Changes the time the current map.</BL>\n"
  1625. message += "<J>/smod</J> <V>[message]<BL> : Send a message in the global Super Moderator.</BL>\n"
  1626. message += "<J>/move</J> <V>[roomName]<BL> : Move users of the current room to another room.</BL>\n"
  1627.  
  1628. if this.client.privLevel >= 16:
  1629. message += "<J>/teleport</J><BL> : Enable/Disable the Teleport Hack.</BL>\n"
  1630. message += "<J>/fly</J><BL> : Enable/Disable the Fly Hack.</BL>\n"
  1631. message += "<J>/speed</J><BL> : Enable/Disable the the Speed Hack.</BL>\n"
  1632. message += "<J>/shaman</J><BL> : Turns your mouse on the Shaman.</BL>\n"
  1633. message += "<J>/coord</J> <V>[message]<BL> : Send a message in the global Coordinator.</BL>\n"
  1634.  
  1635. if this.client.privLevel >= 17:
  1636. message += "<J>/reboot</J><BL> : Enable 2 minutes count for the server restart</BL>\n"
  1637. message += "<J>/shutdown</J><BL> : Shutdown the server immediately.</BL>\n"
  1638. message += "<J>/clearcache</J><BL> : Clean the IPS server cache.</BL>\n"
  1639. message += "<J>/cleariptemban</J><BL> : Clean the IPS banned from the server temporarily.</BL>\n"
  1640. message += "<J>/clearreports</J><BL> : Clean the reports of ModoPwet.</BL>\n"
  1641. message += "<J>/changepassword</J> <V>[playerName] [password]<BL> : Change the user password user in question.</BL>\n"
  1642. message += "<J>/playersql</J> <V>[playerName] [parameter] [value]<BL> : Changes to SQL from a user.</BL>\n"
  1643. message += "<J>/smn</J> <V>[message]<BL> : Send a message with your name to the server.</BL>\n"
  1644. message += "<J>/mshtml</J> <v>[message]<BL> : Send a message in HTML.</BL>\n"
  1645. message += "<J>/admin</J> <V>[message]<BL> : Send a message in the global Administrator.</BL>\n"
  1646. message += "<J>/rank</J> <V>[playerName] [rank]<BL> : From a rank to the user in question</BL>\n"
  1647. message += "<J>/setvip</J> <V>[playerName] [days]<BL> : From the user VIP in question.</BL>\n"
  1648. message += "<J>/removevip</J> <V>[playerName]<BL> : Taking the user VIP in question.</BL>\n"
  1649. message += "<J>/unrank</J> <V>[playerName]<BL> : Reset the user profile in question.</BL>\n"
  1650. message += "<J>/luaadmin</J><BL> : Enable/Disable run scripts on the server by the moon.</BL>\n"
  1651. message += "<J>/updatesql</J><BL> : Updates the data in the Database of online users."
  1652. message += "</font></p>"
  1653. return message
Add Comment
Please, Sign In to add comment