summaryrefslogtreecommitdiff
path: root/pmtoggle.py
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2015-03-15 04:28:56 +0100
committerjomo <github@jomo.tv>2015-03-15 04:28:56 +0100
commitcc50dc30bc7ad995495fa0cd518b03702c33df28 (patch)
tree23d09cf20a20086b616daadb0b9bb606ae417692 /pmtoggle.py
parenta87ad7b2e949bfdb3693bcb6ce1dc1ef250dd008 (diff)
remove redundant loop
Diffstat (limited to 'pmtoggle.py')
-rw-r--r--pmtoggle.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/pmtoggle.py b/pmtoggle.py
index 91dbc0c..6388616 100644
--- a/pmtoggle.py
+++ b/pmtoggle.py
@@ -47,7 +47,6 @@ def on_quit(event):
uuid = uid(event.getPlayer())
if uuid in toggle_dict:
del toggle_dict[uuid]
- for pid in toggle_dict:
- if toggle_dict[pid] == uuid:
- del toggle_dict[pid]
- msg(Bukkit.getPlayer(juuid(pid)), "%s &cwent off so your Private Message Toggle has been disabled!" % Bukkit.getPlayer(juuid(uuid)).getDisplayName()) \ No newline at end of file
+ if toggle_dict.get(pid) == uuid:
+ del toggle_dict[pid]
+ msg(Bukkit.getPlayer(juuid(pid)), "%s &cwent off so your Private Message Toggle has been disabled!" % Bukkit.getPlayer(juuid(uuid)).getDisplayName()) \ No newline at end of file