From: pk910 Date: Sun, 17 Jul 2011 02:05:29 +0000 (+0200) Subject: added FAKEHOST2 to support the FAKEIDENT idea coming from srvx DEV X-Git-Url: http://git.pk910.de/?p=srvx.git;a=commitdiff_plain;h=ad824ae40469c1d6b43e8a74f653ced24410b3fe added FAKEHOST2 to support the FAKEIDENT idea coming from srvx DEV --- diff --git a/src/proto-p10.c b/src/proto-p10.c index b55a467..03a0fa0 100644 --- a/src/proto-p10.c +++ b/src/proto-p10.c @@ -40,6 +40,7 @@ #define CMD_EOB_ACK "EOB_ACK" #define CMD_ERROR "ERROR" #define CMD_FAKEHOST "FAKE" +#define CMD_FAKEHOST2 "FAKE2" #define CMD_GET "GET" #define CMD_GLINE "GLINE" #define CMD_HASH "HASH" @@ -125,6 +126,7 @@ #define TOK_EOB_ACK "EA" #define TOK_ERROR "Y" #define TOK_FAKEHOST "FA" +#define TOK_FAKEHOST2 "FA2" #define TOK_GET "GET" #define TOK_GLINE "GL" #define TOK_HASH "HASH" @@ -221,6 +223,7 @@ #define P10_EOB_ACK TYPE(EOB_ACK) #define P10_ERROR TYPE(ERROR) #define P10_FAKEHOST TYPE(FAKEHOST) +#define P10_FAKEHOST2 TYPE(FAKEHOST2) #define P10_GET TYPE(GET) #define P10_GLINE TYPE(GLINE) #define P10_HASH TYPE(HASH) @@ -502,8 +505,13 @@ irc_account(struct userNode *user, const char *stamp, unsigned long timestamp, u void irc_fakehost(struct userNode *user, const char *host, const char *ident, int force) { - //putsock("%s " P10_FAKEHOST " %s %s %s%s", self->numeric, user->numeric, ident, host, force ? " FORCE" : ""); - putsock("%s " P10_FAKEHOST " %s %s", self->numeric, user->numeric, host); + /* SRVX added the possibility for FAKE IDENTS + * but this is currently *NOT* supported by our IRCu + */ + int useNewFakehost = 0; + + if(useNewFakehost) putsock("%s " P10_FAKEHOST2 " %s %s %s%s", self->numeric, user->numeric, ident, host, force ? " FORCE" : ""); + else putsock("%s " P10_FAKEHOST " %s %s", self->numeric, user->numeric, host); } void