fixed FAKEIDENT handling
authorpk910 <philipp@zoelle1.de>
Wed, 20 Jul 2011 11:40:44 +0000 (13:40 +0200)
committerpk910 <philipp@zoelle1.de>
Wed, 20 Jul 2011 11:43:45 +0000 (13:43 +0200)
include/numeric.h
ircd/m_fakehost.c
ircd/s_err.c
ircd/s_user.c

index ebabc1c6427ee440ff4551b30e47953233ac1102..522b123cabd8d73642bc380eadff11a566d66344 100644 (file)
@@ -319,7 +319,7 @@ extern const struct Numeric* get_error_numeric(int err);
 /*      RPL_END_USERS        394        Dalnet/EFnet/IRCnet */
 /*      RPL_NOUSERS          395        Dalnet/EFnet/IRCnet */
 #define RPL_HOSTHIDDEN       396       /* UMODE +x completed succesfuly */
-#define RPL_HOSTIDENTHIDDEN  397       /* UMODE +x completed succesfuly (with USERNAME change) */
+#define RPL_HOSTUSERHIDDEN  397        /* UMODE +x completed succesfuly (with USERNAME change) */
 
 /*
  * Errors are in the range from 400-599 currently and are grouped by what
index fa8ff3bef736c8e24ce6aa45af5eb127f0bfffb0..a73dd53aa19b61de48fc49dcc5b7fcb8c62c5f47 100644 (file)
@@ -300,9 +300,8 @@ int ms_fakehost2(struct Client *cptr, struct Client *sptr, int parc, char *parv[
     }
 
     /* 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);
-    hide_hostmask(target, FLAG_FAKEHOST);
+    hide_ident_hostmask(target, FLAG_FAKEHOST, parv[2]);
 
     sendcmdto_serv_butone(sptr, CMD_FAKEHOST2, cptr, "%C %s %s", target, parv[2], parv[3]);
 
index e08877159db2a738458e4c3025a300e2f0566192..49f8a8a56f8716c6536f6b6ccd5baf4bed400000 100644 (file)
@@ -826,7 +826,7 @@ static Numeric replyTable[] = {
 /* 396 */
   { RPL_HOSTHIDDEN, "%s :is now your hidden host", "396" },
 /* 397 */
-  { RPL_HOSTIDENTHIDDEN, "%s@%s :is now your hidden username@host", "397" },
+  { RPL_HOSTUSERHIDDEN, "%s@%s :is now your hidden username@host", "397" },
 /* 398 */
   { 0 },
 /* 399 */
index 3855fbcd5d03b12eee93a0eea09c675c40a08f12..ccaed506618724d3ff44afd914968b5f4128c30b 100644 (file)
@@ -972,14 +972,14 @@ void send_user_info(struct Client* sptr, char* names, int rpl, InfoFormatter fmt
  * @param[in] flag Some flag that affects host-hiding (FLAG_HIDDENHOST, FLAG_ACCOUNT, FLAG_FAKEHOST).
  * @return Zero.
  */
-
 int
 hide_hostmask(struct Client *cptr, unsigned int flag) {
-  return hide_hostmask(chptr, flag, NULL);
+  return hide_ident_hostmask(cptr, flag, NULL);
 }
 
 int
-hide_hostmask(struct Client *cptr, unsigned int flag, char *username)
+hide_ident_hostmask(struct Client *cptr, unsigned int flag, char *username)
 {
   struct Membership *chan;
   char buf[HOSTLEN];