Compare commits
4 Commits
2f19e5a733
...
e5156cddbf
Author | SHA1 | Date | |
---|---|---|---|
e5156cddbf | |||
34521e61c1 | |||
c22dd67fc1 | |||
274d5f03e7 |
14
xC.c
14
xC.c
@ -9439,6 +9439,9 @@ server_add (struct app_context *ctx,
|
||||
str_map_set (&ctx->servers, s->name, s);
|
||||
s->config = subtree;
|
||||
|
||||
relay_prepare_server_update (ctx, s);
|
||||
relay_broadcast (ctx);
|
||||
|
||||
// Add a buffer and activate it
|
||||
struct buffer *buffer = s->buffer = buffer_new (ctx->input,
|
||||
BUFFER_SERVER, irc_make_buffer_name (s, NULL));
|
||||
@ -12937,6 +12940,16 @@ handle_command_kill (struct handler_args *a)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
handle_command_away (struct handler_args *a)
|
||||
{
|
||||
if (*a->arguments)
|
||||
irc_send (a->s, "AWAY :%s", a->arguments);
|
||||
else
|
||||
irc_send (a->s, "AWAY");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
handle_command_nick (struct handler_args *a)
|
||||
{
|
||||
@ -13002,7 +13015,6 @@ TRIVIAL_HANDLER (who, "WHO")
|
||||
TRIVIAL_HANDLER (motd, "MOTD")
|
||||
TRIVIAL_HANDLER (oper, "OPER")
|
||||
TRIVIAL_HANDLER (stats, "STATS")
|
||||
TRIVIAL_HANDLER (away, "AWAY")
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
@ -344,6 +344,11 @@ rpcEventHandlers.set(Relay.Event.BufferStats, e => {
|
||||
rpcEventHandlers.set(Relay.Event.BufferRename, e => {
|
||||
buffers.set(e.new, buffers.get(e.bufferName))
|
||||
buffers.delete(e.bufferName)
|
||||
|
||||
if (e.bufferName === bufferCurrent)
|
||||
bufferCurrent = e.new
|
||||
if (e.bufferName === bufferLast)
|
||||
bufferLast = e.new
|
||||
})
|
||||
|
||||
rpcEventHandlers.set(Relay.Event.BufferRemove, e => {
|
||||
|
22
xW/xW.cpp
22
xW/xW.cpp
@ -678,14 +678,12 @@ buffer_print_line(std::vector<BufferLine>::const_iterator begin,
|
||||
if (!prefix.empty())
|
||||
richedit_replacesel(g.hwndBuffer, &pcf, prefix.c_str());
|
||||
|
||||
std::wstring text;
|
||||
for (const auto &it : line->items)
|
||||
text += it.text;
|
||||
|
||||
CHARFORMAT2 format = default_charformat();
|
||||
format.dwEffects &= ~CFE_AUTOCOLOR;
|
||||
format.crTextColor = GetSysColor(COLOR_GRAYTEXT);
|
||||
richedit_replacesel(g.hwndBuffer, &format, text.c_str());
|
||||
for (auto it : line->items) {
|
||||
it.format.dwEffects &= ~CFE_AUTOCOLOR;
|
||||
it.format.crTextColor = GetSysColor(COLOR_GRAYTEXT);
|
||||
it.format.dwEffects |= CFE_AUTOBACKCOLOR;
|
||||
richedit_replacesel(g.hwndBuffer, &it.format, it.text.c_str());
|
||||
}
|
||||
} else {
|
||||
if (!prefix.empty())
|
||||
richedit_replacesel(g.hwndBuffer, &pcf, prefix.c_str());
|
||||
@ -914,11 +912,15 @@ relay_process_message(const Relay::EventMessage &m)
|
||||
if (!b)
|
||||
break;
|
||||
|
||||
b->buffer_name = data.buffer_name;
|
||||
b->buffer_name = data.new_;
|
||||
|
||||
refresh_buffer_list();
|
||||
if (b->buffer_name == g.buffer_current)
|
||||
if (data.buffer_name == g.buffer_current) {
|
||||
g.buffer_current = data.new_;
|
||||
refresh_status();
|
||||
}
|
||||
if (data.buffer_name == g.buffer_last)
|
||||
g.buffer_last = data.new_;
|
||||
break;
|
||||
}
|
||||
case Relay::Event::BUFFER_REMOVE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user