This commit is contained in:
SuperSonic 2019-08-25 14:57:15 +08:00
parent 16fbaef036
commit c27c751f38
2 changed files with 19 additions and 2 deletions

View file

@ -22,6 +22,7 @@ class English:
"Wrong UserID or the guy is not in Group": "Wrong UserID or the guy is not in Group",
"Disable without Initialize\nAdmin of the Group\n%s": "Disable without Initialize\nAdmin of the Group\n%s",
"Sorry...\nThe number of members is not satisfied (%s needed)": "Sorry...\nThe number of members is not satisfied (%s needed)",
"Name%s\nPicture URL%s%s\nStatusMessage\n%s\nLINE System UserID%s": "Name%s\nPicture URL%s%s\nStatusMessage\n%s\nLINE System UserID%s",
"LINE System UserID\n": "LINE System UserID\n",
"DO NOT KICK, thank you ^^": "DO NOT KICK, thank you ^^",
"DO NOT TOUCH THE GROUP URL SETTINGs, see you...": "DO NOT TOUCH THE GROUP URL SETTINGs, see you...",
@ -34,6 +35,7 @@ class English:
"Testing...": "Testing...",
"Speed:\n%ss": "Speed:\n%ss",
"Bye Bye": "Bye Bye",
"Not Found": "Not Found",
"Okay": "Okay",
"Exit.": "Exit."
}

View file

@ -371,8 +371,11 @@ class Yuuki:
if ncMessage.message.from_ in GroupPrivilege and len(msgSep) == 3:
if msgSep[1] == "add":
if msgSep[2] in [Member.mid for Member in GroupInfo.members]:
self.data.updateData(self.data.getData("Group")[GroupInfo.id]["Ext_Admin"], True, msgSep[2])
self.sendText(self.sendToWho(ncMessage), _("Okay"))
if msgSep[2] not in self.data.getData("BlackList"):
self.data.updateData(self.data.getData("Group")[GroupInfo.id]["Ext_Admin"], True, msgSep[2])
self.sendText(self.sendToWho(ncMessage), _("Okay"))
else:
self.sendText(self.sendToWho(ncMessage), _("The User(s) was in our blacklist database."))
else:
self.sendText(self.sendToWho(ncMessage), _("Wrong UserID or the guy is not in Group"))
elif msgSep[1] == "delete":
@ -412,6 +415,18 @@ class Yuuki:
if ncMessage.message.from_ in self.Admin:
ComMsg = self.readCommandLine(msgSep[1:len(msgSep)])
self.sendText(self.sendToWho(ncMessage), str(eval(ComMsg)))
elif ncMessage.message.contentType == ContentType.CONTACT:
Catched = ncMessage.message.contentMetadata["mid"]
contactInfo = self.getContact(Catched)
if contactInfo == None or contactInfo == False:
msg = _("Not Found")
elif contactInfo.mid in self.data.getData("BlackList"):
msg = "{}\n{}".format(_("The User(s) was in our blacklist database."), contactInfo.mid)
else:
msg = _("Name%s\nPicture URL%s%s\nStatusMessage\n%s\nLINE System UserID%s") % \
(contactInfo.displayName, self.LINE_Media_server, contactInfo.pictureStatus,
contactInfo.statusMessage, contactInfo.mid)
self.sendText(self.sendToWho(ncMessage), msg)
def Security(self, ncMessage):
"""