From d4bcf45eb3ef838d878971dbcd585510729fcff1 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 6 Apr 2004 09:57:13 +0000 Subject: Fixes to INVITE to return numeric 443 if user is already on the channel git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@399 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/InspIRCd.layout | 4 ++-- src/inspircd.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/InspIRCd.layout b/src/InspIRCd.layout index c868ffe8d..bc21c54cb 100644 --- a/src/InspIRCd.layout +++ b/src/InspIRCd.layout @@ -14,8 +14,8 @@ LeftChar=1 Open=1 Top=1 CursorCol=2 -CursorRow=4713 -TopLine=4678 +CursorRow=3279 +TopLine=3279 LeftChar=1 [Editor_2] diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 471188709..78d84c22e 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -3308,6 +3308,11 @@ void handle_invite(char **parameters, int pcnt, userrec *user) return; } } + if (has_channel(u,c)) + { + WriteServ(user->fd,"443 %s %s %s :Is already on channel %s",user->nick,u->nick,c->name,c->name); + return; + } u->InviteTo(c->name); WriteFrom(u->fd,user,"INVITE %s :%s",u->nick,c->name); WriteServ(user->fd,"341 %s %s %s",user->nick,u->nick,c->name); -- cgit v1.2.3