galador-isaac 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/isaac.gemspec +1 -1
- data/lib/isaac.rb +9 -0
- metadata +1 -1
data/isaac.gemspec
CHANGED
data/lib/isaac.rb
CHANGED
@@ -154,6 +154,15 @@ module Isaac
|
|
154
154
|
env = { :nick => $2, :userhost => $3, :channel => $4, :message => $5 }
|
155
155
|
type = env[:channel].match(/^#/) ? :chnotice : :notice
|
156
156
|
@bot.dispatch(type, env)
|
157
|
+
when /(^:(\S+)!(\S+) )?NICK (\S+)/
|
158
|
+
env = { :nick => $2, :userhost => $3, :newnick => $4 }
|
159
|
+
if env[:newnick][0] == ":"
|
160
|
+
# Seems Unreal adds a colon before nick changes. Don't think
|
161
|
+
# this is required by the RFC, but it's easy to fix it. :/
|
162
|
+
env[:newnick].gsub!(":", "")
|
163
|
+
end
|
164
|
+
type = :nick
|
165
|
+
@bot.dispatch(type, env)
|
157
166
|
when /(^:\S+ )?([4-5]\d\d) \S+ (\S+)/
|
158
167
|
env = {:error => $2.to_i, :message => $2, :nick => $3, :channel => $3}
|
159
168
|
@bot.dispatch(:error, env)
|