diff options
-rw-r--r-- | modules/m_svsmode.c | 8 | ||||
-rw-r--r-- | src/s_user.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/modules/m_svsmode.c b/modules/m_svsmode.c index d54f664..6c42aa0 100644 --- a/modules/m_svsmode.c +++ b/modules/m_svsmode.c @@ -107,7 +107,13 @@ ms_svsmode(struct Client *client_p, struct Client *source_p, case 'x': if (!EmptyString(extarg) && valid_hostname(extarg)) - user_set_hostmask(target_p, extarg, what); + { + if (what == MODE_DEL && HasUMode(target_p, UMODE_HIDDENHOST)) + user_set_hostmask(target_p, extarg, what); + if (what == MODE_ADD && !HasUMode(target_p, UMODE_HIDDENHOST)) + user_set_hostmask(target_p, extarg, what); + } + break; case 'o': diff --git a/src/s_user.c b/src/s_user.c index 9b4dc13..d63eebe 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -1093,7 +1093,7 @@ user_set_hostmask(struct Client *target_p, const char *hostname, const int what) DLINK_FOREACH(ptr, target_p->channel.head) { - char modebuf[4], nickbuf[NICKLEN * 3 + 3]; + char modebuf[4], nickbuf[NICKLEN * 3 + 3] = { '\0' }; char *p = modebuf; int len = 0; const struct Membership *ms = ptr->data; |