* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2009 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
}
c = ServerInstance->FindChan(parameter);
- if (!c)
+ if (!c && !IS_OPER(source))
{
source->WriteNumeric(690, "%s :Target channel %s must exist to be set as a redirect.",source->nick.c_str(),parameter.c_str());
parameter.clear();
return MODEACTION_DENY;
}
- if (c->GetStatus(source) < STATUS_OP && !IS_OPER(source))
+ if (c && c->GetStatus(source) < STATUS_OP && !IS_OPER(source))
{
source->WriteNumeric(690, "%s :You must be opped on %s to set it as a redirect.",source->nick.c_str(),parameter.c_str());
parameter.clear();
destchan = ServerInstance->FindChan(channel);
if (destchan && destchan->IsModeSet('L'))
{
- user->WriteNumeric(470, "%s :You may not join %s. A redirect is set, but you may not be redirected as it is a circular loop.", user->nick.c_str(), cname);
+ user->WriteNumeric(470, "%s %s * :You may not join this channel. A redirect is set, but you may not be redirected as it is a circular loop.", user->nick.c_str(), cname);
return 1;
}
- user->WriteNumeric(470, "%s :You may not join %s, so you are automatically being transferred to the redirect channel %s", user->nick.c_str(), cname, channel.c_str());
+ user->WriteNumeric(470, "%s %s %s :You may not join this channel, so you are automatically being transferred to the redirect channel.", user->nick.c_str(), cname, channel.c_str());
Channel::JoinUser(ServerInstance, user, channel.c_str(), false, "", false, ServerInstance->Time());
return 1;
}