X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fdictclient.rb;h=f55defa42cdd3ee261769696c7633394409d9062;hb=052217de30c59206d7025b582d4604557a747470;hp=34276dad0c901d518f75b794b2abf4e3a6a037cc;hpb=0de1116a4d27cfdb2a0d4e8df00f16527e1566bd;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/dictclient.rb b/data/rbot/plugins/dictclient.rb index 34276dad..f55defa4 100644 --- a/data/rbot/plugins/dictclient.rb +++ b/data/rbot/plugins/dictclient.rb @@ -91,7 +91,7 @@ class DictClientPlugin < Plugin # the DICT object is automatically disconnected. the return value of the block # is returned from this method. # if an IRC message argument is passed, the error message will be replied - def with_dict(m=nil &block) + def with_dict(m=nil, &block) server, port = @bot.config['dictclient.server'].split ':' if @bot.config['dictclient.server'] server ||= 'dict.org' port ||= DICT::DEFAULT_PORT @@ -159,7 +159,7 @@ class DictClientPlugin < Plugin if results results.collect {|database, matches| @bot.config['dictclient.match_format'].gsub( - '', matches.collect {|m| format_headword m}.join(', ') + '', matches.collect {|hit| format_headword hit}.join(', ') ).gsub( '', format_database(database) )