hector 1.0.5 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/hector/channel.rb +1 -1
- data/lib/hector/commands/join.rb +1 -1
- data/lib/hector/response.rb +2 -1
- metadata +6 -6
data/lib/hector/channel.rb
CHANGED
@@ -29,7 +29,7 @@ module Hector
|
|
29
29
|
|
30
30
|
def normalize(name)
|
31
31
|
name.force_encoding("UTF-8") if name.respond_to?(:force_encoding)
|
32
|
-
if name =~
|
32
|
+
if name =~ /^[#&+!][#&+!\-\w\p{L}\p{M}\p{N}\p{S}\p{P}\p{Co}]{1,49}$/u && name !~ /,/
|
33
33
|
name.downcase
|
34
34
|
else
|
35
35
|
raise NoSuchChannel, name
|
data/lib/hector/commands/join.rb
CHANGED
@@ -2,7 +2,7 @@ module Hector
|
|
2
2
|
module Commands
|
3
3
|
module Join
|
4
4
|
def on_join
|
5
|
-
request.args.first.split(
|
5
|
+
request.args.first.split(/,(?=[#&+!])/).each do |channel_name|
|
6
6
|
channel = Channel.find_or_create(channel_name)
|
7
7
|
if channel.join(self)
|
8
8
|
channel.broadcast(:join, :source => source, :text => channel.name)
|
data/lib/hector/response.rb
CHANGED
@@ -26,10 +26,11 @@ module Hector
|
|
26
26
|
def initialize(command, *args)
|
27
27
|
@command = command.to_s.upcase
|
28
28
|
@args = args
|
29
|
-
|
29
|
+
|
30
30
|
options = args.pop if args.last.is_a?(Hash)
|
31
31
|
@text = options[:text] if options
|
32
32
|
@source = options[:source] if options
|
33
|
+
@source ||= Hector.server_name if @command =~ /^\d+$/
|
33
34
|
end
|
34
35
|
|
35
36
|
def event_name
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-01-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
16
|
-
requirement: &
|
16
|
+
requirement: &70163681226360 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.12.10
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70163681226360
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: mocha
|
27
|
-
requirement: &
|
27
|
+
requirement: &70163681225880 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 0.9.9
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70163681225880
|
36
36
|
description: A private group chat server for people you trust. Implements a limited
|
37
37
|
subset of the IRC protocol.
|
38
38
|
email:
|