projects
/
ircu2.10.12-pk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reimplemented fakeident support
[ircu2.10.12-pk.git]
/
ircd
/
m_fakehost.c
diff --git
a/ircd/m_fakehost.c
b/ircd/m_fakehost.c
index fa8ff3bef736c8e24ce6aa45af5eb127f0bfffb0..793be4158cd7e376f49827498348c6236723329e 100644
(file)
--- a/
ircd/m_fakehost.c
+++ b/
ircd/m_fakehost.c
@@
-91,8
+91,8
@@
#include "s_bsd.h"
#include "s_conf.h"
#include "s_user.h"
#include "s_bsd.h"
#include "s_conf.h"
#include "s_user.h"
+#include "s_debug.h"
#include "send.h"
#include "send.h"
-
/*
* m_fakehost - fakehost user message handler
*
/*
* m_fakehost - fakehost user message handler
*
@@
-113,7
+113,7
@@
int i;
/* Assign and propagate the fakehost */
ircd_strncpy(cli_user(cptr)->fakehost, parv[1], HOSTLEN);
/* Assign and propagate the fakehost */
ircd_strncpy(cli_user(cptr)->fakehost, parv[1], HOSTLEN);
- hide_hostmask(cptr, FLAG_FAKEHOST);
+ hide_hostmask(cptr,
HIDE_HOSTMASK_
FLAG_FAKEHOST);
/*for(i = HighestFd; i >= 0; i--) {
if((another = LocalClientArray[i]) && IsServer(another)) {
/*for(i = HighestFd; i >= 0; i--) {
if((another = LocalClientArray[i]) && IsServer(another)) {
@@
-137,7
+137,7
@@
int i;
/* Assign and propagate the fakehost */
ircd_strncpy(cli_user(acptr)->fakehost, parv[2], HOSTLEN);
/* Assign and propagate the fakehost */
ircd_strncpy(cli_user(acptr)->fakehost, parv[2], HOSTLEN);
- hide_hostmask(acptr, FLAG_FAKEHOST);
+ hide_hostmask(acptr,
HIDE_HOSTMASK_
FLAG_FAKEHOST);
/*
for(i = HighestFd; i >= 0; i--) {
if((another = LocalClientArray[i]) && IsServer(another)) {
/*
for(i = HighestFd; i >= 0; i--) {
if((another = LocalClientArray[i]) && IsServer(another)) {
@@
-252,7
+252,7
@@
int ms_fakehost(struct Client *cptr, struct Client *sptr, int parc, char *parv[]
/* Set fakehost and propagate the changed host. */
ircd_strncpy(cli_user(target)->fakehost, parv[2], HOSTLEN);
/* Set fakehost and propagate the changed host. */
ircd_strncpy(cli_user(target)->fakehost, parv[2], HOSTLEN);
- hide_hostmask(target, FLAG_FAKEHOST);
+ hide_hostmask(target,
HIDE_HOSTMASK_
FLAG_FAKEHOST);
/* Borrowed from send_umode_out().
* I found no better way to do this. However, maybe someone has the time to check out
/* Borrowed from send_umode_out().
* I found no better way to do this. However, maybe someone has the time to check out
@@
-295,16
+295,16
@@
int ms_fakehost2(struct Client *cptr, struct Client *sptr, int parc, char *parv[
}
/* Ignore the assignment if it changes nothing. */
}
/* Ignore the assignment if it changes nothing. */
- if(IsFakeHost(target) &&
strcmp(cli_user(target)->fakehost, parv[3]) == 0 && strcmp(cli_user(target)->username
, parv[2]) == 0) {
+ if(IsFakeHost(target) &&
IsFakeIdent(target) && strcmp(cli_user(target)->fakehost, parv[3]) == 0 && strcmp(cli_user(target)->fakeuser
, parv[2]) == 0) {
return 0;
}
/* Set fakehost and propagate the changed host. */
return 0;
}
/* Set fakehost and propagate the changed host. */
- ircd_strncpy(cli_user(target)->username, parv[2], USERLEN);
ircd_strncpy(cli_user(target)->fakehost, parv[3], HOSTLEN);
ircd_strncpy(cli_user(target)->fakehost, parv[3], HOSTLEN);
- hide_hostmask(target, FLAG_FAKEHOST);
+ ircd_strncpy(cli_user(target)->fakeuser, parv[2], USERLEN);
+ hide_hostmask(target, HIDE_HOSTMASK_FLAG_FAKEHOST | HIDE_HOSTMASK_FLAG_FAKEIDENT);
- sendcmdto_serv_butone(sptr, CMD_FAKEHOST2, cptr, "%C %s %s", target,
parv[2], parv[3]
);
+ sendcmdto_serv_butone(sptr, CMD_FAKEHOST2, cptr, "%C %s %s", target,
cli_user(target)->fakeuser, cli_user(target)->fakehost
);
return 0;
}
return 0;
}
@@
-315,6
+315,7
@@
int ms_fakehost2(struct Client *cptr, struct Client *sptr, int parc, char *parv[
* parv[0] = sender prefix
* parv[1] = target user numeric
* parv[2] = target user's new fake host
* parv[0] = sender prefix
* parv[1] = target user numeric
* parv[2] = target user's new fake host
+ * parv[3] = target user's new fake ident
*/
int ms_fakehost_old(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) {
struct Client *target;
*/
int ms_fakehost_old(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) {
struct Client *target;
@@
-333,7
+334,7
@@
int ms_fakehost_old(struct Client* cptr, struct Client* sptr, int parc, char* pa
/* Assign and propagate the fakehost */
ircd_strncpy(cli_user(target)->fakehost, parv[2], HOSTLEN);
/* Assign and propagate the fakehost */
ircd_strncpy(cli_user(target)->fakehost, parv[2], HOSTLEN);
- hide_hostmask(target, FLAG_FAKEHOST);
+ hide_hostmask(target,
HIDE_HOSTMASK_
FLAG_FAKEHOST);
sendcmdto_serv_butone(sptr, CMD_FAKEHOST_OLD, cptr, "%C %s", target,
cli_user(target)->fakehost);
sendcmdto_serv_butone(sptr, CMD_FAKEHOST_OLD, cptr, "%C %s", target,
cli_user(target)->fakehost);