Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix some typos.

  • Loading branch information...
commit 3da8e9bb1a3c0000401dc42ae34e195c9a178dbd 1 parent 3517926
@meh authored
View
2  lib/failirc/common/events/callback.rb
@@ -32,7 +32,7 @@ def initialize (options={}, &block)
end
def <=> (value)
- (value.options[:priority] || 0) <=> (options[:priority] || 0)
+ (options[:priority] || 0) <=> (value.options[:priority] || 0)
end
def call (*args, &block)
View
6 lib/failirc/server/modules/base.rb
@@ -768,7 +768,7 @@ def nick_is_ok? (thing, nick)
if @channels[channel]
channel = @channels[channel]
else
- channel = @channels[channel] = Channel.new(server, ~channel)
+ channel = @channels[channel] = Channel.new(server, channel)
end
if channel.modes.limit?
@@ -1112,9 +1112,9 @@ def nick_is_ok? (thing, nick)
from.send ERR_CHANOPRIVSNEEDED, channel
else
if channel.modes.anonymous?
- channel.topic = Mask.new('anonymous', 'anonymous', 'anonymous.'), ~topic
+ channel.topic = Mask.new('anonymous', 'anonymous', 'anonymous.'), topic
else
- channel.topic = from, ~topic
+ channel.topic = from, topic
end
channel.send ":#{channel.topic.set_by} TOPIC #{channel} :#{channel.topic}"
View
4 lib/failirc/server/modules/base/channel.rb
@@ -55,8 +55,8 @@ class Channel
def initialize (server, name)
raise ArgumentError.new('It is not a valid channel name') unless name.is_valid_channel?
- @server = server
- @name = name
+ @server = Reference.normalize(server)
+ @name = Reference.normalize(name)
@created_on = Time.now
@users = Users.new(self)
View
2  lib/failirc/server/modules/base/channel/topic.rb
@@ -34,7 +34,7 @@ def initialize (channel)
def text= (value)
@semaphore.synchronize {
- @text = value
+ @text = Reference.normalize(value)
@set_on = Time.now
}
end
View
2  lib/failirc/server/modules/reupload.rb
@@ -43,7 +43,7 @@ def reupload (url, time=5, service=:imageshack)
return result || url
end
-on :message, priorty: -102 do |chain=:input, from, to, message|
+on :message, priority: -102 do |chain=:input, from, to, message|
return unless chain == :input
message.scan(%r{https?://\S+}).uniq.each {|uri|
View
6 lib/failirc/server/modules/shorten.rb
@@ -35,13 +35,13 @@ class << self
message.scan(%r{https?://\S+}).uniq.each {|uri|
next if uri.length <= (options[:length] ? options[:length].to_i : 42)
- begin timeout(options[:timeout] ? options[:timeout].to_f : 5) {
+ begin timeout (options[:timeout] || 5).to_f do
message.gsub!(/#{Regexp.escape(uri)}/, Shortie::Service.find_by_key(options[:service]).shorten(uri))
- } rescue Timeout::Error end
+ end rescue Timeout::Error end
}
end
-on :message, priority: 100 do |chain=:input, from, to, message|
+on :message, priority: -100 do |chain=:input, from, to, message|
return unless chain == :output
if to.modes.extended.tinyurl_preview
Please sign in to comment.
Something went wrong with that request. Please try again.