diff options
author | Matthias Hecker <mail@apoc.cc> | 2020-04-15 20:26:54 +0200 |
---|---|---|
committer | Matthias Hecker <mail@apoc.cc> | 2020-04-15 20:26:54 +0200 |
commit | ff6d7e5d043da99b2da36f628d52b7b5df47119d (patch) | |
tree | fe513113e54536ff32cdd6ad66faf0e0a020792c /data/rbot/plugins/games/azgame.rb | |
parent | 77540358a94db4c1fe21462c5f821692eb140df7 (diff) |
refactor: wordlist shouldn't use bot singleton #35
also related to #41 and #6
Diffstat (limited to 'data/rbot/plugins/games/azgame.rb')
-rw-r--r-- | data/rbot/plugins/games/azgame.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/data/rbot/plugins/games/azgame.rb b/data/rbot/plugins/games/azgame.rb index ca67881c..b4dbabc1 100644 --- a/data/rbot/plugins/games/azgame.rb +++ b/data/rbot/plugins/games/azgame.rb @@ -157,9 +157,9 @@ class AzGamePlugin < Plugin lang = params[:lang] addlang = params[:addlang] autoadd = @autoadd_base + addlang.to_s - if Wordlist.exist?(lang) + if Wordlist.exist?(@bot, lang) # wordlists are assumed to be UTF-8, but we need to strip the BOM, if present - words = Wordlist.get(lang) + words = Wordlist.get(@bot, lang) if addlang and File.exist?(autoadd) word += File.readlines(autoadd).map {|line| line.sub("\xef\xbb\xbf",'').strip} end @@ -600,7 +600,7 @@ class AzGamePlugin < Plugin return _("az => start a game if none is running, show the current word range otherwise; you can say 'az <language>' if you want to play in a language different from the current bot default") end langs = @rules.keys - wls = Wordlist.list + wls = Wordlist.list(@bot) return [ _("az topics: play, rules, cancel, manage, check"), _("available languages: %{langs}") % { :langs => langs.join(", ") }, |