diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-04-12 11:57:26 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-04-12 11:57:26 +0000 |
commit | 2983801517a96a2256a7c1761a6c40d711f67585 (patch) | |
tree | 5fd276b148423f2d8c5af7ab6dbc2c465c2cec47 /modules/m_svsmode.c | |
parent | a7301e1d0ec5b87de4693eaf23eb4c474d489ac2 (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 'modules/m_svsmode.c')
-rw-r--r-- | modules/m_svsmode.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/modules/m_svsmode.c b/modules/m_svsmode.c index 433f660..0344d84 100644 --- a/modules/m_svsmode.c +++ b/modules/m_svsmode.c @@ -54,7 +54,7 @@ * - parv[1] = nickname * - parv[2] = TS * - parv[3] = mode - * - parv[4] = optional argument (services id) + * - parv[4] = optional argument (services id, hostname) */ static void ms_svsmode(struct Client *client_p, struct Client *source_p, @@ -63,7 +63,7 @@ ms_svsmode(struct Client *client_p, struct Client *source_p, struct Client *target_p = NULL; const char *m = NULL, *extarg = NULL; int what = MODE_ADD; - unsigned int flag = 0, setmodes = 0; + unsigned int flag = 0, setflags = 0; time_t ts = 0; if (!HasFlag(source_p, FLAGS_SERVICE)) @@ -78,7 +78,7 @@ ms_svsmode(struct Client *client_p, struct Client *source_p, if (parc > 4 && !EmptyString(parv[4])) extarg = parv[4]; - setmodes = target_p->umodes; + setflags = target_p->umodes; for (m = parv[3]; *m; ++m) { @@ -96,6 +96,11 @@ ms_svsmode(struct Client *client_p, struct Client *source_p, strlcpy(target_p->svid, extarg, sizeof(target_p->svid)); break; + case 'x': + if (what == MODE_ADD && extarg) + user_set_hostmask(target_p, extarg); + break; + case 'o': if (what == MODE_DEL && HasUMode(target_p, UMODE_OPER)) { @@ -163,11 +168,11 @@ ms_svsmode(struct Client *client_p, struct Client *source_p, target_p->name, (unsigned long)target_p->tsinfo, parv[3]); } - if (MyConnect(target_p) && (setmodes != target_p->umodes)) + if (MyConnect(target_p) && (setflags != target_p->umodes)) { char modebuf[IRCD_BUFSIZE]; - send_umode(target_p, target_p, setmodes, 0xffffffff, modebuf); + send_umode(target_p, target_p, setflags, 0xffffffff, modebuf); } } |