diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-11-17 15:46:39 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-11-17 15:46:39 +0100 |
commit | a7cefe6c664ca438fc3785186e814738a390b9f3 (patch) | |
tree | 82d2d87335bd49dc7b346b4540850029b331491a /data | |
parent | b891a80a33dfaf93de7d29d790fa312a1dc85ae1 (diff) |
azgame plugin: sort wordlist on load
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/games/azgame.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/rbot/plugins/games/azgame.rb b/data/rbot/plugins/games/azgame.rb index edff9093..dd0dfe0d 100644 --- a/data/rbot/plugins/games/azgame.rb +++ b/data/rbot/plugins/games/azgame.rb @@ -135,7 +135,7 @@ class AzGamePlugin < Plugin wordlist = @wordlist_base + lang.to_s if File.exist?(wordlist) # wordlists are assumed to be UTF-8, but we need to strip the BOM, if present - words = File.readlines(wordlist).map {|line| line.sub("\xef\xbb\xbf",'').strip}.uniq + words = File.readlines(wordlist).map {|line| line.sub("\xef\xbb\xbf",'').strip}.uniq.sort if(words.length >= 4) # something to guess rules = { :good => /^\S+$/, |