summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-08-10 00:08:42 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-08-10 00:08:42 +0200
commitfa4a71c43227669b42b4b1c0a68be796091f3d1d (patch)
tree1b9cb2ca14e097bebbe26afed1950c83bce54561
parent2f2644f03203b36fd6aa105e62f4cd15070e1cbe (diff)
rfc2812.rb: support RPL_AWAY reply
-rw-r--r--lib/rbot/rfc2812.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rbot/rfc2812.rb b/lib/rbot/rfc2812.rb
index ac448883..758f574e 100644
--- a/lib/rbot/rfc2812.rb
+++ b/lib/rbot/rfc2812.rb
@@ -1244,6 +1244,12 @@ module Irc
when RPL_DATASTR
data[:text] = argv[1]
handle(:datastr, data)
+ when RPL_AWAY
+ data[:nick] = argv[1]
+ data[:message] = argv[-1]
+ user = @server.get_user(data[:nick])
+ user.away = data[:message]
+ handle(:away, data)
when RPL_WHOREPLY
data[:channel] = argv[1]
data[:user] = argv[2]