* | 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.
*
* ---------------------------------------------------
*/
return CMD_FAILURE;
}
+ User *u = ServerInstance->FindNick(parameters[0]);
+
+ if (u)
+ {
+ parameters[0] = u->GetIPString();
+ }
+
if (ServerInstance->IPMatchesEveryone(parameters[0],user))
return CMD_FAILURE;
long duration = ServerInstance->Duration(parameters[1]);
- const char* ipaddr = parameters[0];
- if (strchr(ipaddr,'@'))
+ const char* ipaddr = parameters[0];
+ User* find = ServerInstance->FindNick(parameters[0]);
+
+ if (find)
{
- while (*ipaddr != '@')
+ ipaddr = find->GetIPString();
+ }
+ else
+ {
+ if (strchr(ipaddr,'@'))
+ {
+ while (*ipaddr != '@')
+ ipaddr++;
ipaddr++;
- ipaddr++;
+ }
}
ZLine* zl = new ZLine(ServerInstance, ServerInstance->Time(), duration, user->nick, parameters[2], ipaddr);
if (ServerInstance->XLines->AddLine(zl,user))