mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-12 12:09:03 -04:00
Added support for +L (services doesnt support this yet)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@792 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
7b0f9d5fbd
commit
60052716ae
@ -21,16 +21,19 @@ class ModuleRedirect : public Module
|
|||||||
|
|
||||||
virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list ¶ms)
|
virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list ¶ms)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((modechar == 'L') && (type == MT_CHANNEL))
|
if ((modechar == 'L') && (type == MT_CHANNEL))
|
||||||
{
|
{
|
||||||
chanrec* c = Srv->Findchannel(params[0]);
|
if (mode_on)
|
||||||
if (c)
|
|
||||||
{
|
{
|
||||||
if (c->IsCustomModeSet('L'))
|
std::string ChanToJoin = params[0];
|
||||||
|
chanrec* c = Srv->FindChannel(ChanToJoin);
|
||||||
|
if (c)
|
||||||
{
|
{
|
||||||
WriteServ(user->fd,"690 %s :Circular redirection, mode +L to %s not allowed.",user->nick,params[0].c_str());
|
if (c->IsCustomModeSet('L'))
|
||||||
return 0;
|
{
|
||||||
|
WriteServ(user->fd,"690 %s :Circular redirection, mode +L to %s not allowed.",user->nick,params[0].c_str());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
@ -45,9 +48,9 @@ class ModuleRedirect : public Module
|
|||||||
{
|
{
|
||||||
if (chan->limit >= Srv->CountUsers(chan))
|
if (chan->limit >= Srv->CountUsers(chan))
|
||||||
{
|
{
|
||||||
char* channel = chan->GetModeParameter('L');
|
std::string channel = chan->GetModeParameter('L');
|
||||||
WriteServ(user->fd,"470 %s :%s has become full, so you are automatically being transferred to the linked channel %s",user->nick,cname,channel);
|
WriteServ(user->fd,"470 %s :%s has become full, so you are automatically being transferred to the linked channel %s",user->nick,cname,channel.c_str());
|
||||||
Srv->JoinUserToChannel(user,channel,"");
|
Srv->JoinUserToChannel(user,channel.c_str(),"");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user