summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-04-12 11:57:26 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-04-12 11:57:26 +0000
commit2983801517a96a2256a7c1761a6c40d711f67585 (patch)
tree5fd276b148423f2d8c5af7ab6dbc2c465c2cec47 /src
parenta7301e1d0ec5b87de4693eaf23eb4c474d489ac2 (diff)
- Removed recently added m_svshost.c. Services may now change the host of a
specific user via "SVSMODE <timestamp> <target> +x <hostname>" git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1819 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'src')
-rw-r--r--src/s_user.c19
1 files changed, 19 insertions, 0 deletions
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