Fix typo
This commit is contained in:
parent
c2a2d9c97b
commit
837df03f05
|
@ -781,7 +781,7 @@ def multiplayer(fro, chan, message):
|
||||||
matchID = int(message[1])
|
matchID = int(message[1])
|
||||||
userToken = glob.tokens.getTokenFromUsername(fro, ignoreIRC=True)
|
userToken = glob.tokens.getTokenFromUsername(fro, ignoreIRC=True)
|
||||||
userToken.joinMatch(matchID)
|
userToken.joinMatch(matchID)
|
||||||
return "Joined match #{}!".format(matchID)
|
return "Attempting to join match #{}!".format(matchID)
|
||||||
|
|
||||||
def mpClose():
|
def mpClose():
|
||||||
myToken = glob.tokens.getTokenFromUsername(fro)
|
myToken = glob.tokens.getTokenFromUsername(fro)
|
||||||
|
@ -813,6 +813,16 @@ def multiplayer(fro, chan, message):
|
||||||
_match.toggleSlotLocked(i)
|
_match.toggleSlotLocked(i)
|
||||||
return "Match size changed to {}".format(matchSize)
|
return "Match size changed to {}".format(matchSize)
|
||||||
|
|
||||||
|
def mpMove():
|
||||||
|
if len(message) < 3 or not message[2].isdigit() or int(message[2]) < 0 or int(message[2]) > 16:
|
||||||
|
raise exceptions.invalidArgumentsException("Wrong syntax: !mp move <username> <slot>")
|
||||||
|
username = message[1]
|
||||||
|
newSlotID = int(message[2])
|
||||||
|
userID = userUtils.getIDSafe(username)
|
||||||
|
_match = glob.matches.matches[getMatchIDFromChannel(chan)]
|
||||||
|
_match.userChangeSlot(userID, newSlotID)
|
||||||
|
return "Player {} moved to slot {}".format(username, newSlotID)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
subcommands = {
|
subcommands = {
|
||||||
"make": mpMake,
|
"make": mpMake,
|
||||||
|
@ -821,6 +831,7 @@ def multiplayer(fro, chan, message):
|
||||||
"lock": mpLock,
|
"lock": mpLock,
|
||||||
"unlock": mpUnlock,
|
"unlock": mpUnlock,
|
||||||
"size": mpSize,
|
"size": mpSize,
|
||||||
|
"move": mpMove,
|
||||||
}
|
}
|
||||||
requestedSubcommand = message[0].lower().strip()
|
requestedSubcommand = message[0].lower().strip()
|
||||||
if requestedSubcommand not in subcommands:
|
if requestedSubcommand not in subcommands:
|
||||||
|
|
|
@ -498,7 +498,7 @@ class match:
|
||||||
return
|
return
|
||||||
|
|
||||||
# Make sure there is no one inside new slot
|
# Make sure there is no one inside new slot
|
||||||
if self.slots[newSlotID].user is not None and self.slots[newSlotID].status != slotStatuses.FREE:
|
if self.slots[newSlotID].user is not None or self.slots[newSlotID].status != slotStatuses.FREE:
|
||||||
return
|
return
|
||||||
|
|
||||||
# Get old slot data
|
# Get old slot data
|
||||||
|
|
Loading…
Reference in New Issue
Block a user