* 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]);
+ IdentHostPair ih;
+ User* find = ServerInstance->FindNick(parameters[0]);
+ if (find)
+ {
+ ih.first = "*";
+ ih.second = find->GetIPString();
+ }
+ else
+ ih = ServerInstance->XLines->IdentSplit(parameters[0]);
+
if (ServerInstance->HostMatchesEveryone(ih.first+"@"+ih.second,user))
return CMD_FAILURE;
* 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]);
+ IdentHostPair ih;
+ User* find = ServerInstance->FindNick(parameters[0]);
+ if (find)
+ {
+ ih.first = "*";
+ ih.second = find->GetIPString();
+ }
+ else
+ ih = ServerInstance->XLines->IdentSplit(parameters[0]);
+
if (ServerInstance->HostMatchesEveryone(ih.first+"@"+ih.second,user))
return CMD_FAILURE;
* 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]);
+ IdentHostPair ih;
+ User* find = ServerInstance->FindNick(parameters[0]);
+ if (find)
+ {
+ ih.first = "*";
+ ih.second = find->GetIPString();
+ }
+ else
+ ih = ServerInstance->XLines->IdentSplit(parameters[0]);
+
if (ServerInstance->HostMatchesEveryone(ih.first+"@"+ih.second,user))
return CMD_FAILURE;
* 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.
*
* ---------------------------------------------------
*/
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)
+ {
+ ipaddr = find->GetIPString();
+ }
+ else
{
- while (*ipaddr != '@')
+ 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))