Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Add /r as a short version of /reply #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Python/ki/xKIChat.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def SendMessage(self, message):
message = message[len(PtGetLocalizedString("KI.Commands.ChatAllAge")) + 1:]

# Is it a reply to a private message?
elif msg.startswith(PtGetLocalizedString("KI.Commands.ChatReply")):
elif 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 @@ -235,7 +235,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 Python/ki/xKIExtChatCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,5 @@
Plasma.PtGetLocalizedString("KI.Commands.ChatPrivate"),
Plasma.PtGetLocalizedString("KI.Commands.ChatNeighbors"),
Plasma.PtGetLocalizedString("KI.Commands.ChatBuddies"),
"/r",
]