diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp index ea6a8ddaf..86dc2a8db 100644 --- a/modules/commands/os_akill.cpp +++ b/modules/commands/os_akill.cpp @@ -98,10 +98,11 @@ class CommandOSAKill : public Command reason += " " + params[3]; if (!mask.empty() && !reason.empty()) { + User *targ = NULL; std::pair canAdd = akills->CanAdd(mask, expires); if (mask.find('!') != Anope::string::npos) source.Reply(_("\002Reminder\002: AKILL masks cannot contain nicknames; make sure you have \002not\002 included a nick portion in your mask.")); - else if (mask.find('@') == Anope::string::npos) + else if (mask.find('@') == Anope::string::npos && !(targ = finduser(mask))) source.Reply(BAD_USERHOST_MASK); else if (mask.find_first_not_of("~@.*?") == Anope::string::npos) source.Reply(USERHOST_MASK_TOO_WIDE, mask.c_str()); @@ -113,9 +114,8 @@ class CommandOSAKill : public Command source.Reply(_("\002%s\002 is already covered by %s."), mask.c_str(), canAdd.second->Mask.c_str()); else { - User *user = finduser(mask); - if (user) - mask = "*@" + user->host; + if (targ) + mask = "*@" + targ->host; unsigned int affected = 0; for (Anope::insensitive_map::iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) if (Anope::Match(it->second->GetIdent() + "@" + it->second->host, mask)) diff --git a/src/operserv.cpp b/src/operserv.cpp index 249a2b344..42a5c2f5b 100644 --- a/src/operserv.cpp +++ b/src/operserv.cpp @@ -98,7 +98,7 @@ void XLine::unserialize(serialized_data &data) time_t expires; data["expires"] >> expires; - XLine *xl = new XLine(data["mask"].astr(), data["by"].astr(), expires, data["expires"].astr(), data["uid"].astr()); + XLine *xl = new XLine(data["mask"].astr(), data["by"].astr(), expires, data["reason"].astr(), data["uid"].astr()); data["created"] >> xl->Created; xl->manager = xlm;