aboutsummaryrefslogtreecommitdiffstats
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar w00t2008-08-07 18:18:27 +0000
committerGravatar w00t2008-08-07 18:18:27 +0000
commit51fe316e69dad7d3c51609199d4010da7692dc98 (patch)
tree9d523162389a6d94523afad43f7791183d3b0074 /src/users.cpp
parentFix remote /rehash with modules, patch from CyberBotX. (diff)
Don't add duplicates, backport of 10122, reported by mixx941
git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@10123 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 8ba069f11..5a50cc136 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -528,6 +528,13 @@ InvitedList* userrec::GetInviteList()
void userrec::InviteTo(const irc::string &channel)
{
+ for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+ {
+ if (channel == *i)
+ {
+ return;
+ }
+ }
invites.push_back(channel);
}