summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitry Kim <dmitry point kim at gmail point com>2007-04-06 13:38:38 +0000
committerDmitry Kim <dmitry point kim at gmail point com>2007-04-06 13:38:38 +0000
commit9db57bfc3d38cae306b6915140fc693811959ac9 (patch)
tree5812f8bc748a924c2082faa39591218f4446f021 /lib
parentcfb41ae15b48e167c76f97fb20ca382ba3dd5032 (diff)
* (rfc2812) fixed 'Welcome' message parsing
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/rfc2812.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbot/rfc2812.rb b/lib/rbot/rfc2812.rb
index bec3d322..f11fd6bc 100644
--- a/lib/rbot/rfc2812.rb
+++ b/lib/rbot/rfc2812.rb
@@ -942,10 +942,10 @@ module Irc
warning "Server thinks client (#{@user.inspect}) has a different nick"
@user.nick = data[:target]
end
- if argv[1] =~ /(\S+)(?:!(\S+?))?@(\S+)/
+ if argv[1] =~ /([^@!\s]+)(?:!([^@!\s]+?))?@(\S+)/
nick = $1
user = $2
- host = $2
+ host = $3
warning "Welcome message nick mismatch (#{nick} vs #{data[:target]})" if nick != data[:target]
@user.user = user if user
@user.host = host if host