* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
- * the file COPYING for details.
+ * the file COPYING for details.
*
* ---------------------------------------------------
*/
{
if (pcnt >= 3)
{
- IdentHostPair ih = ServerInstance->XLines->IdentSplit(parameters[0]);
- if (ServerInstance->HostMatchesEveryone(ih.first+"@"+ih.second,user))
- return CMD_FAILURE;
-
- if (!strchr(parameters[0],'@'))
+ IdentHostPair ih;
+ User* find = ServerInstance->FindNick(parameters[0]);
+ if (find)
{
- user->WriteServ("NOTICE %s :*** E-Line must contain a username, e.g. *@%s",user->nick,parameters[0]);
- return CMD_FAILURE;
+ ih.first = "*";
+ ih.second = find->GetIPString();
+ std::string c = std::string("*@") + find->GetIPString();
+ parameters[0] = c.c_str();
}
+ else
+ ih = ServerInstance->XLines->IdentSplit(parameters[0]);
+
+ if (ServerInstance->HostMatchesEveryone(ih.first+"@"+ih.second,user))
+ return CMD_FAILURE;
long duration = ServerInstance->Duration(parameters[1]);
}
else
{
- if (ServerInstance->XLines->DelLine(parameters[0], 'E', user))
+ if (ServerInstance->XLines->DelLine(parameters[0], "E", user))
{
ServerInstance->SNO->WriteToSnoMask('x',"%s Removed E-line on %s.",user->nick,parameters[0]);
}