/* User is removing the mode, so restore their real host
* and make it match the displayed one.
*/
- user->ChangeDisplayedHost(user->host.c_str());
user->SetMode('x',false);
+ user->ChangeDisplayedHost(user->host.c_str());
return MODEACTION_ALLOW;
}
}
input.reserve(key.length() + 3 + item.length());
input.append(1, id);
input.append(key);
- input.append(1, 0); // null does not terminate a C++ string
+ input.append(1, '\0'); // null does not terminate a C++ string
input.append(item);
std::string rv = Hash->sum(input).substr(0,len);
// mode change, we will call SetMode back to true AFTER the host change is done.
void OnChangeHost(User* u, const std::string& host)
{
- u->SetMode('x', false);
+ if(u->IsModeSet('x'))
+ {
+ u->SetMode('x', false);
+ u->WriteServ("MODE %s -x", u->nick.c_str());
+ }
}
~ModuleCloaking()