switched wordlist and added alphanumeric check
This commit is contained in:
@@ -38,7 +38,7 @@ class autochannel(MumoModule):
|
||||
self.top_list = None
|
||||
|
||||
# Load wordlist
|
||||
r = requests.get("https://svnweb.freebsd.org/csrg/share/dict/words?view=co&content-type=text/plain")
|
||||
r = requests.get("https://raw.githubusercontent.com/dwyl/english-words/master/words.txt")
|
||||
|
||||
if r.status_code == 200:
|
||||
self.wordlist = r.text.splitlines()
|
||||
@@ -109,7 +109,12 @@ class autochannel(MumoModule):
|
||||
self.add_random_channel(server)
|
||||
|
||||
def add_random_channel(self, server):
|
||||
server.addChannel(self.wordlist[random.randint(0, len(self.wordlist))], self.root.id)
|
||||
word = self.wordlist[random.randint(0, len(self.wordlist))]
|
||||
|
||||
while not word.isalnum():
|
||||
word = self.wordlist[random.randint(0, len(self.wordlist))]
|
||||
|
||||
server.addChannel(word, self.root.id)
|
||||
|
||||
#
|
||||
# --- Meta callback functions
|
||||
|
||||
Reference in New Issue
Block a user