cinchrb / cinch

The IRC Bot Building Framework
http://www.rubydoc.info/gems/cinch
MIT License
1k stars 180 forks source link

Halfop flag toggle raises error #178

Closed no-mercy closed 9 years ago

no-mercy commented 9 years ago

with next parameters: modes: "+h" params: ["nomercy"] param_modes: {:add=>["l", "b", "k", "o", "v"], :remove=>["b", "k", "o", "v"]}

.rvm/gems/ruby-2.1.2/gems/cinch-2.1.0/lib/cinch/mode_parser.rb:51:in `parse_modes': uninitialized

It happens only with +h or -h modes, when toggling other flags it seems to work correctly

no-mercy commented 9 years ago

Little update: it happens with next @bot.irc.isupport params: {"PREFIX"=>{"o"=>"@", "v"=>"+"}, "CHANTYPES"=>["#"], "CHANMODES"=>{"A"=>["b"], "B"=>["k"], "C"=>["l"], "D"=>["i", "m", "n", "p", "s", "t", "r"]} we have no 'h' prefix

no-mercy commented 9 years ago

So it can be fixed by next change isupport.rb:59 self["PREFIX"] = {"o" => "@", "v" => "+", 'h' => '%'}

no-mercy commented 9 years ago

So, after long ivestigation i found bug in irc server -- wrong 005 isupport message. Sorry for the disturbance

dominikh commented 9 years ago

We should still improve Cinch to not raise an exception when the server throws wrong information at us, so thanks for diagnosing this. Reopening the issue.