diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-11-30 09:40:18 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-11-30 09:40:18 +0100 |
commit | c6f65e8727db35cff6fd1b665d1c616e4617fdc8 (patch) | |
tree | a67391ce9f7a8992e9454b5cb5e57517ed80933c | |
parent | 265a0cf2a1dc625dd412c724262be07e31214b37 (diff) | |
download | weechat-c6f65e8727db35cff6fd1b665d1c616e4617fdc8.zip |
Add "away" local variable for IRC buffers (defined when user is away, value is away message)
-rw-r--r-- | src/plugins/irc/irc-server.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index dd1319cc5..18bc20224 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -2729,8 +2729,21 @@ irc_server_set_away (struct t_irc_server *server, const char *nick, int is_away) { if (server->is_connected) { + /* set away flag for nick on channel */ if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL) irc_channel_set_away (ptr_channel, nick, is_away); + + /* set/del "away" local variable */ + if (is_away) + { + weechat_buffer_set (ptr_channel->buffer, + "localvar_set_away", server->away_message); + } + else + { + weechat_buffer_set (ptr_channel->buffer, + "localvar_del_away", ""); + } } } } |