ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/s_user.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/s_user.c (file contents):
Revision 2134 by michael, Wed May 29 18:59:39 2013 UTC vs.
Revision 2137 by michael, Wed May 29 19:49:27 2013 UTC

# Line 135 | Line 135 | const unsigned int user_modes[256] =
135    UMODE_UNAUTH,       /* u */
136    0,                  /* v */
137    UMODE_WALLOP,       /* w */
138 <  0,                  /* x */
138 >  UMODE_HIDDENHOST,   /* x */
139    UMODE_SPY,          /* y */
140    UMODE_OPERWALL,     /* z      0x7A */
141    0,0,0,0,0,          /* 0x7B - 0x7F */
# Line 903 | Line 903 | set_user_mode(struct Client *client_p, s
903            break;
904  
905          case 'r':  /* Only services may set +r */
906 +        case 'x':  /* Only services may set +x */
907            break;
908  
909          default:
# Line 1052 | Line 1053 | send_umode_out(struct Client *client_p,
1053   }
1054  
1055   void
1056 < user_set_hostmask(struct Client *target_p, const char *hostname)
1056 > user_set_hostmask(struct Client *target_p, const char *hostname, const int what)
1057   {
1057  if (!valid_hostname(hostname))
1058    return;
1059
1058    if (IsUserHostIp(target_p))
1059      delete_user_host(target_p->username, target_p->host, !MyConnect(target_p));
1060  
1061    strlcpy(target_p->host, hostname, sizeof(target_p->host));
1064  SetIPSpoof(target_p);
1062  
1063    add_user_host(target_p->username, target_p->host, !MyConnect(target_p));
1064    SetUserHost(target_p);
1065  
1066 +  switch (what)
1067 +  {
1068 +    case MODE_ADD:
1069 +      AddUMode(target_p, UMODE_HIDDENHOST);
1070 +      AddFlag(target_p, FLAGS_IP_SPOOFING);
1071 +      break;
1072 +    case MODE_DEL:
1073 +      DelUMode(target_p, UMODE_HIDDENHOST);
1074 +      DelFlag(target_p, FLAGS_IP_SPOOFING);
1075 +      break;
1076 +    default: break;
1077 +  }
1078 +
1079    if (MyClient(target_p))
1080 +  {
1081 +    sendto_one(target_p, form_str(RPL_NEWHOSTIS), me.name,
1082 +               target_p->name, target_p->username,
1083 +               target_p->host);
1084      clear_ban_cache_client(target_p);
1085 +  }
1086   }
1087  
1088   /* user_welcome()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines