summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-06 09:57:13 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-06 09:57:13 +0000
commitd4bcf45eb3ef838d878971dbcd585510729fcff1 (patch)
tree79eed653a79415f3221099293647bc74af615dd0 /src/inspircd.cpp
parentbddaa6f3af60aa984bbd7088bc3b77528b0df1da (diff)
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
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp5
1 files changed, 5 insertions, 0 deletions
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);