From 2983801517a96a2256a7c1761a6c40d711f67585 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 12 Apr 2013 11:57:26 +0000 Subject: - Removed recently added m_svshost.c. Services may now change the host of a specific user via "SVSMODE +x " git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1819 82007160-df01-0410-b94d-b575c5fd34c7 --- src/s_user.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src') diff --git a/src/s_user.c b/src/s_user.c index 5c29525..3ec002c 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -1081,6 +1081,25 @@ send_umode_out(struct Client *client_p, struct Client *source_p, send_umode(client_p, source_p, old, 0xffffffff, buf); } +void +user_set_hostmask(struct Client *target_p, const char *hostname) +{ + if (!valid_hostname(hostname)) + return; + + if (IsUserHostIp(target_p)) + delete_user_host(target_p->username, target_p->host, !MyConnect(target_p)); + + strlcpy(target_p->host, hostname, sizeof(target_p->host)); + SetIPSpoof(target_p); + + add_user_host(target_p->username, target_p->host, !MyConnect(target_p)); + SetUserHost(target_p); + + if (MyClient(target_p)) + clear_ban_cache_client(target_p); +} + /* user_welcome() * * inputs - client pointer to client to welcome -- cgit