|
@ -131,7 +131,7 @@ def kill(bot, update, sudocall = False): |
|
|
"""kill me pls""" |
|
|
"""kill me pls""" |
|
|
db = Db() |
|
|
db = Db() |
|
|
user = update.message.from_user.first_name |
|
|
user = update.message.from_user.first_name |
|
|
if db.is_dead(user): |
|
|
|
|
|
|
|
|
if db.is_dead(user, update.message.chat_id): |
|
|
if sudocall: |
|
|
if sudocall: |
|
|
update.message.reply_text("%s killed again" % user) |
|
|
update.message.reply_text("%s killed again" % user) |
|
|
return |
|
|
return |
|
@ -141,19 +141,19 @@ def kill(bot, update, sudocall = False): |
|
|
message = update.message.from_user.first_name + " died" |
|
|
message = update.message.from_user.first_name + " died" |
|
|
if sudocall: |
|
|
if sudocall: |
|
|
message += " for real" |
|
|
message += " for real" |
|
|
db.kill(user) |
|
|
|
|
|
|
|
|
db.kill(user, update.message.chat_id) |
|
|
update.message.reply_text(message) |
|
|
update.message.reply_text(message) |
|
|
|
|
|
|
|
|
def revive(bot, update, sudocall = False): |
|
|
def revive(bot, update, sudocall = False): |
|
|
"""unkill me pls""" |
|
|
"""unkill me pls""" |
|
|
db = Db() |
|
|
db = Db() |
|
|
user = update.message.from_user.first_name |
|
|
user = update.message.from_user.first_name |
|
|
if not db.is_dead(user): |
|
|
|
|
|
|
|
|
if not db.is_dead(user, update.message.chat_id): |
|
|
update.message.reply_text("Maybe %s should have a litte 'accident' before" % user) |
|
|
update.message.reply_text("Maybe %s should have a litte 'accident' before" % user) |
|
|
return |
|
|
return |
|
|
if sudocall: |
|
|
if sudocall: |
|
|
update.message.reply_text("%s is living again, for real" % user) |
|
|
update.message.reply_text("%s is living again, for real" % user) |
|
|
db.revive(user) |
|
|
|
|
|
|
|
|
db.revive(user, update.message.chat_id) |
|
|
return |
|
|
return |
|
|
update.message.reply_text("You fool! You cannot revive a dead person!") |
|
|
update.message.reply_text("You fool! You cannot revive a dead person!") |
|
|
|
|
|
|
|
@ -165,7 +165,7 @@ SUDOCMDS = { |
|
|
def graveyard(bot, update): |
|
|
def graveyard(bot, update): |
|
|
"""List the dead""" |
|
|
"""List the dead""" |
|
|
db = Db() |
|
|
db = Db() |
|
|
update.message.reply_text("Here are the dead people:\n%s" % db.get_dead_bodies()) |
|
|
|
|
|
|
|
|
update.message.reply_text("Here are the dead people:\n%s" % db.get_dead_bodies(update.message.chat_id)) |
|
|
|
|
|
|
|
|
def sudo(bot, update, args): |
|
|
def sudo(bot, update, args): |
|
|
"""for real""" |
|
|
"""for real""" |
|
|