From 51fe316e69dad7d3c51609199d4010da7692dc98 Mon Sep 17 00:00:00 2001 From: w00t Date: Thu, 7 Aug 2008 18:18:27 +0000 Subject: 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 --- src/users.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/users.cpp') 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); } -- cgit v1.3.1-10-gc9f91