Username: Password:

Author Topic: [Share] Extended disconnection when keyword is received.  (Read 1443 times)

Offline =Mindee=

  • Commander Shepard
  • BOT Developer Administrator
  • Dragon
  • *****
  • Posts: 2,788
  • Cookies 9020
  • We'll bang, OKAY?
    • View Profile
    • http://mindee-bot.com
[Share] Extended disconnection when keyword is received.
« on: May 17, 2020, 11:38:05 PM »
Script:
Code: [Select]
# Character name from which you will send a pm to current character.
char_name = 'Mindee'

# =============================================================================
# Commands
# -----------------------------------------------------------------------------
# Logs out character
cmd_logout = 'logout'
# -----------------------------------------------------------------------------
# Logs out character until specified time.
# Usage: dcuntil hh:mm
# Example: dcuntil 19:45
cmd_logout_until = 'dcuntil'
# =============================================================================

def onReceivePrivateMessage(name, text):
if name == char_name:
if cmd_logout == text:
script.Logout()
elif cmd_logout_until in text:
list = text.split()
time = list[-1]
script.LogoutUntil(time)




Mindee-BOT creator, founder and developer.