summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-05-30 08:23:23 +0200
committerPřemysl Eric Janouch <p@janouch.name>2021-05-30 08:23:23 +0200
commit6f62b9c0c722dbad9f6c3ec969f1375fdcbe5dd2 (patch)
treebbc1ba82d99558e3aaf285be8f1753b6b9fd02d5
parentc1d69e36304c09869f5948695b87252a3a898d47 (diff)
downloadxK-6f62b9c0c722dbad9f6c3ec969f1375fdcbe5dd2.tar.gz
xK-6f62b9c0c722dbad9f6c3ec969f1375fdcbe5dd2.tar.xz
xK-6f62b9c0c722dbad9f6c3ec969f1375fdcbe5dd2.zip
degesch: make CHGHOST update our own userhost info
I've almost forgotten that we use this for message spliting.
-rw-r--r--degesch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/degesch.c b/degesch.c
index 0c4310b..e54bdd9 100644
--- a/degesch.c
+++ b/degesch.c
@@ -6688,12 +6688,14 @@ irc_handle_chghost (struct server *s, const struct irc_message *msg)
if (!user)
return;
- // We don't remember the userhost part, we only log the change
char *new_prefix = xstrdup_printf ("%s!%s@%s", user->nickname,
msg->params.vector[0], msg->params.vector[1]);
if (irc_is_this_us (s, msg->prefix))
{
+ cstr_set (&s->irc_user_host, xstrdup_printf ("%s@%s",
+ msg->params.vector[0], msg->params.vector[1]));
+
log_chghost_self (s, s->buffer, new_prefix);
// Log a message in all open buffers on this server