summaryrefslogtreecommitdiff
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
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
-rw-r--r--src/InspIRCd.layout4
-rw-r--r--src/inspircd.cpp5
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);