Skip to content

Commit

Permalink
Merge pull request #657 from zrax/moul_scripts-77
Browse files Browse the repository at this point in the history
Add /r as a short version of /reply
  • Loading branch information
zrax authored May 20, 2020
2 parents 0b50099 + f3b1459 commit 072ac0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Scripts/Python/ki/xKIChat.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def SendMessage(self, message):
selPlyrList = []

# Is it a reply to a private message?
if msg.startswith(PtGetLocalizedString("KI.Commands.ChatReply")):
if msg.startswith(PtGetLocalizedString("KI.Commands.ChatReply")) or msg.startswith("/r "):
if self.toReplyToLastPrivatePlayerID is None:
self.AddChatLine(None, PtGetLocalizedString("KI.Chat.NoOneToReply"), kChat.SystemMessage)
return
Expand Down Expand Up @@ -243,7 +243,10 @@ def SendMessage(self, message):
self.AddChatLine(None, PtGetLocalizedString("KI.Chat.LeftTheGame", [str(self.toReplyToLastPrivatePlayerID[0])]), kChat.SystemMessage)
return
break
message = message[len(PtGetLocalizedString("KI.Commands.ChatReply")) + 1:]
if (msg.startswith("/r ")):
message = message[len("/r "):]
else:
message = message[len(PtGetLocalizedString("KI.Commands.ChatReply")) + 1:]
# What they selected doesn't matter if they're replying.
selPlyrList = [ptPlayer(self.toReplyToLastPrivatePlayerID[0], self.toReplyToLastPrivatePlayerID[1])]
cFlags.private = True
Expand Down
1 change: 1 addition & 0 deletions Scripts/Python/ki/xKIExtChatCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,5 @@
Plasma.PtGetLocalizedString("KI.Commands.ChatPrivate"),
Plasma.PtGetLocalizedString("KI.Commands.ChatNeighbors"),
Plasma.PtGetLocalizedString("KI.Commands.ChatBuddies"),
"/r",
]

0 comments on commit 072ac0b

Please sign in to comment.