summaryrefslogtreecommitdiff
path: root/mentio.py
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2014-07-17 22:24:45 +0200
committerjomo <github@jomo.tv>2014-07-17 22:24:45 +0200
commit8db6085d63ce20a8eaa2f7b68809dc6485bf56fd (patch)
tree2363ef834cb1cc7bf79769a5d5caae521d2119db /mentio.py
parentebf8a22bae30c9060e2520be288c7d0b3af84582 (diff)
use uid(player) helper method
Diffstat (limited to 'mentio.py')
-rw-r--r--mentio.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mentio.py b/mentio.py
index 638eaf9..ab1cc2d 100644
--- a/mentio.py
+++ b/mentio.py
@@ -50,8 +50,8 @@ def on_chat(event):
def on_listen_command(sender, args):
try:
currWords = []
- if str(sender.getUniqueId()) in mentions.keys():
- currWords = mentions[str(sender.getUniqueId())]
+ if uid(sender) in mentions.keys():
+ currWords = mentions[uid(sender)]
# /listen add <word>
if len(args) == 2 and args[0].lower() == "add":
@@ -65,7 +65,7 @@ def on_listen_command(sender, args):
if args[1].lower() is sender.getName():
msg(sender, "&cYou are always listening for your full ingame name by default")
currWords.append(args[1].lower())
- mentions[str(sender.getUniqueId())] = currWords
+ mentions[uid(sender)] = currWords
msg(sender, "&aYou are now listening for '&2"+args[1].lower()+"'!")
save_mentions()
return True
@@ -78,7 +78,7 @@ def on_listen_command(sender, args):
for word in currWords[:]:
if word.lower() == args[1].lower():
currWords.remove(word.lower())
- mentions[str(sender.getUniqueId())] = currWords
+ mentions[uid(sender)] = currWords
success = True
if success == True:
save_mentions()