galador-isaac 0.3.1.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/isaac.gemspec +1 -1
- data/lib/isaac.rb +5 -6
- metadata +1 -1
data/isaac.gemspec
CHANGED
data/lib/isaac.rb
CHANGED
@@ -155,15 +155,14 @@ module Isaac
|
|
155
155
|
env = { :nick => $2, :userhost => $3, :channel => $4, :message => $5 }
|
156
156
|
type = env[:channel].match(/^#/) ? :chnotice : :notice
|
157
157
|
@bot.dispatch(type, env)
|
158
|
-
when /(^:(\S+)!(\S+) )?NICK (\S+)/
|
158
|
+
when /(^:(\S+)!(\S+) )?NICK :?(\S+)/
|
159
159
|
env = { :nick => $2, :userhost => $3, :newnick => $4 }
|
160
|
-
if env[:newnick][0] == 58 || env[:newnick][0] == ":"
|
161
|
-
# Seems Unreal adds a colon before nick changes. Don't think
|
162
|
-
# this is required by the RFC, but it's easy to fix it. :/
|
163
|
-
env[:newnick].gsub!(":", "")
|
164
|
-
end
|
165
160
|
type = :nick
|
166
161
|
@bot.dispatch(type, env)
|
162
|
+
when /(^:(\S+)!(\S+) )?QUIT :?(.*)/i
|
163
|
+
env = { :nick => $2, :userhost => $3, :message => $4 }
|
164
|
+
type = :quit
|
165
|
+
@bot.dispatch(type, env)
|
167
166
|
when /(^:\S+ )?([4-5]\d\d) \S+ (\S+)/
|
168
167
|
env = {:error => $2.to_i, :message => $2, :nick => $3, :channel => $3}
|
169
168
|
@bot.dispatch(:error, env)
|