Use whatever account that is in id 999 as bot

This commit is contained in:
Sunpy
2018-02-14 17:44:37 +01:00
parent 29db61fd12
commit 27a5f9c000
10 changed files with 30 additions and 27 deletions

View File

@@ -17,6 +17,7 @@ def connect():
:return:
"""
glob.BOT_NAME = userUtils.getUsername(999)
token = glob.tokens.addToken(999)
token.actionID = actions.IDLE
glob.streams.broadcast("main", serverPackets.userPanel(999))

View File

@@ -18,6 +18,7 @@ except:
VERSION = "Unknown"
DATADOG_PREFIX = "peppy"
BOT_NAME = "FokaBot"
application = None
db = None
redis = None

View File

@@ -433,7 +433,7 @@ class match:
# saying that the match has completed.
chanName = "#multi_{}".format(self.matchID)
if self.isTourney and (chanName in glob.channels.channels):
chat.sendMessage("FokaBot", chanName, "Match has just finished.")
chat.sendMessage(glob.BOT_NAME, chanName, "Match has just finished.")
def resetSlots(self):
for i in range(0,16):
@@ -665,7 +665,7 @@ class match:
# FokaBot is too busy
if to == 999:
chat.sendMessage("FokaBot", froToken.username, "I would love to join your match, but I'm busy keeping ripple up and running. Sorry. Beep Boop.")
chat.sendMessage(glob.BOT_NAME, froToken.username, "I would love to join your match, but I'm busy keeping ripple up and running. Sorry. Beep Boop.")
# Send message
message = "Come join my multiplayer match: \"[osump://{}/{} {}]\"".format(self.matchID, self.matchPassword.replace(" ", "_"), self.matchName)
@@ -855,7 +855,7 @@ class match:
if totalUsers == 0:
message = "The match is now empty."
chat.sendMessage("FokaBot", chanName, message)
chat.sendMessage(glob.BOT_NAME, chanName, message)
def __enter__(self):
# 🌚🌚🌚🌚🌚

View File

@@ -487,7 +487,7 @@ class token:
:return:
"""
self.restricted = True
chat.sendMessage("FokaBot", self.username, "Your account is currently in restricted mode. Please visit ripple's website for more information.")
chat.sendMessage(glob.BOT_NAME, self.username, "Your account is currently in restricted mode. Please visit ripple's website for more information.")
def resetRestricted(self):
"""
@@ -496,7 +496,7 @@ class token:
:return:
"""
chat.sendMessage("FokaBot", self.username, "Your account has been unrestricted! Please log in again.")
chat.sendMessage(glob.BOT_NAME, self.username, "Your account has been unrestricted! Please log in again.")
def joinStream(self, name):
"""