.BANCHO. Allow !last only in PM

This commit is contained in:
Nyo 2017-01-06 12:01:07 +01:00
parent c6417c31ed
commit 768913da59

View File

@ -570,6 +570,10 @@ def tillerinoAcc(fro, chan, message):
def tillerinoLast(fro, chan, message): def tillerinoLast(fro, chan, message):
try: try:
# Run the command in PM only
if chan.startswith("#"):
return False
data = glob.db.fetch("""SELECT beatmaps.song_name as sn, scores.*, data = glob.db.fetch("""SELECT beatmaps.song_name as sn, scores.*,
beatmaps.beatmap_id as bid, beatmaps.difficulty_std, beatmaps.difficulty_taiko, beatmaps.difficulty_ctb, beatmaps.difficulty_mania, beatmaps.max_combo as fc beatmaps.beatmap_id as bid, beatmaps.difficulty_std, beatmaps.difficulty_taiko, beatmaps.difficulty_ctb, beatmaps.difficulty_mania, beatmaps.max_combo as fc
FROM scores FROM scores